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

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

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

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

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

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

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

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

_ZNK5draco17GeometryAttribute10GetBytePosENS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEE:
  118|  18.9M|  inline int64_t GetBytePos(AttributeValueIndex att_index) const {
  119|  18.9M|    return byte_offset_ + byte_stride_ * att_index.value();
  120|  18.9M|  }
_ZNK5draco17GeometryAttribute10GetAddressENS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEE:
  122|  18.8M|  inline const uint8_t* GetAddress(AttributeValueIndex att_index) const {
  123|  18.8M|    const int64_t byte_pos = GetBytePos(att_index);
  124|  18.8M|    return buffer_->data() + byte_pos;
  125|  18.8M|  }
_ZN5draco17GeometryAttribute10GetAddressENS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEE:
  126|  13.5k|  inline uint8_t* GetAddress(AttributeValueIndex att_index) {
  127|  13.5k|    const int64_t byte_pos = GetBytePos(att_index);
  128|  13.5k|    return buffer_->data() + byte_pos;
  129|  13.5k|  }
_ZNK5draco17GeometryAttribute14IsAddressValidEPKh:
  130|  56.6M|  inline bool IsAddressValid(const uint8_t* address) const {
  131|  56.6M|    return ((buffer_->data() + buffer_->data_size()) > address);
  132|  56.6M|  }
_ZNK5draco17GeometryAttribute14attribute_typeEv:
  266|  65.3k|  Type attribute_type() const { return attribute_type_; }
_ZNK5draco17GeometryAttribute9data_typeEv:
  269|  28.7k|  DataType data_type() const { return data_type_; }
_ZNK5draco17GeometryAttribute14num_componentsEv:
  273|  53.6k|  uint8_t num_components() const { return num_components_; }
_ZNK5draco17GeometryAttribute11byte_strideEv:
  282|    846|  int64_t byte_stride() const { return byte_stride_; }
_ZNK5draco17GeometryAttribute9unique_idEv:
  287|  11.0k|  uint32_t unique_id() const { return unique_id_; }
_ZN5draco17GeometryAttribute13set_unique_idEj:
  288|  82.7k|  void set_unique_id(uint32_t id) { unique_id_ = id; }
_ZNK5draco17GeometryAttribute12ConvertValueIlEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEPT_:
  229|  18.8M|  bool ConvertValue(AttributeValueIndex att_index, OutT* out_value) const {
  230|  18.8M|    return ConvertValue<OutT>(att_index, num_components_, out_value);
  231|  18.8M|  }
_ZNK5draco17GeometryAttribute12ConvertValueIlEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEaPT_:
  179|  18.8M|                    OutT* out_val) const {
  180|  18.8M|    if (out_val == nullptr) {
  ------------------
  |  Branch (180:9): [True: 0, False: 18.8M]
  ------------------
  181|      0|      return false;
  182|      0|    }
  183|  18.8M|    switch (data_type_) {
  184|      0|      case DT_INT8:
  ------------------
  |  Branch (184:7): [True: 0, False: 18.8M]
  ------------------
  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: 18.8M]
  ------------------
  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: 18.8M]
  ------------------
  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: 18.8M]
  ------------------
  194|      0|        return ConvertTypedValue<uint16_t, OutT>(att_id, out_num_components,
  195|      0|                                                 out_val);
  196|  18.8M|      case DT_INT32:
  ------------------
  |  Branch (196:7): [True: 18.8M, False: 0]
  ------------------
  197|  18.8M|        return ConvertTypedValue<int32_t, OutT>(att_id, out_num_components,
  198|  18.8M|                                                out_val);
  199|      0|      case DT_UINT32:
  ------------------
  |  Branch (199:7): [True: 0, False: 18.8M]
  ------------------
  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: 18.8M]
  ------------------
  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: 18.8M]
  ------------------
  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: 18.8M]
  ------------------
  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: 18.8M]
  ------------------
  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: 18.8M]
  ------------------
  215|      0|        return ConvertTypedValue<bool, OutT>(att_id, out_num_components,
  216|      0|                                             out_val);
  217|      0|      default:
  ------------------
  |  Branch (217:7): [True: 0, False: 18.8M]
  ------------------
  218|       |        // Wrong attribute type.
  219|      0|        return false;
  220|  18.8M|    }
  221|  18.8M|  }
_ZNK5draco17GeometryAttribute17ConvertTypedValueIilEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEhPT0_:
  306|  18.8M|                         OutT* out_value) const {
  307|  18.8M|    const uint8_t* src_address = GetAddress(att_id);
  308|       |
  309|       |    // Convert all components available in both the original and output formats.
  310|  75.4M|    for (int i = 0; i < std::min(num_components_, out_num_components); ++i) {
  ------------------
  |  Branch (310:21): [True: 56.5M, False: 18.8M]
  ------------------
  311|  56.5M|      if (!IsAddressValid(src_address)) {
  ------------------
  |  Branch (311:11): [True: 0, False: 56.5M]
  ------------------
  312|      0|        return false;
  313|      0|      }
  314|  56.5M|      const T in_value = *reinterpret_cast<const T*>(src_address);
  315|  56.5M|      if (!ConvertComponentValue<T, OutT>(in_value, normalized_,
  ------------------
  |  Branch (315:11): [True: 0, False: 56.5M]
  ------------------
  316|  56.5M|                                          out_value + i)) {
  317|      0|        return false;
  318|      0|      }
  319|  56.5M|      src_address += sizeof(T);
  320|  56.5M|    }
  321|       |    // Fill empty data for unused output components if needed.
  322|  18.8M|    for (int i = num_components_; i < out_num_components; ++i) {
  ------------------
  |  Branch (322:35): [True: 0, False: 18.8M]
  ------------------
  323|      0|      out_value[i] = static_cast<OutT>(0);
  324|      0|    }
  325|  18.8M|    return true;
  326|  18.8M|  }
_ZN5draco17GeometryAttribute21ConvertComponentValueIilEEbRKT_bPT0_:
  364|  56.5M|                                    OutT* out_value) {
  365|       |    // Make sure the |in_value| can be represented as an integral type OutT.
  366|  56.5M|#if __cplusplus >= 201703L
  367|  56.5M|    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|  56.5M|#if __cplusplus >= 201703L
  374|       |      if constexpr (!std::is_same<T, bool>::value &&
  375|  56.5M|                    std::is_integral<T>::value) {
  376|       |#else
  377|       |      if (!std::is_same<T, bool>::value && std::is_integral<T>::value) {
  378|       |#endif
  379|  56.5M|        static constexpr OutT kOutMin =
  380|  56.5M|            std::is_signed<T>::value ? std::numeric_limits<OutT>::min() : 0;
  ------------------
  |  Branch (380:13): [True: 0, Folded]
  ------------------
  381|  56.5M|        if (in_value < kOutMin || in_value > std::numeric_limits<OutT>::max()) {
  ------------------
  |  Branch (381:13): [True: 0, False: 56.5M]
  |  Branch (381:35): [True: 0, False: 56.5M]
  ------------------
  382|      0|          return false;
  383|      0|        }
  384|  56.5M|      }
  385|       |
  386|       |      // Check conversion of floating point |in_value| to integral value OutT.
  387|  56.5M|#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|  56.5M|    }
  419|       |
  420|  56.5M|    if (!normalized) {
  ------------------
  |  Branch (420:9): [True: 56.5M, False: 0]
  ------------------
  421|  56.5M|      *out_value = static_cast<OutT>(in_value);
  422|  56.5M|    } 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|  56.5M|    return true;
  470|  56.5M|  }
_ZNK5draco17GeometryAttribute12ConvertValueIfEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEPT_:
  229|  24.8k|  bool ConvertValue(AttributeValueIndex att_index, OutT* out_value) const {
  230|  24.8k|    return ConvertValue<OutT>(att_index, num_components_, out_value);
  231|  24.8k|  }
_ZNK5draco17GeometryAttribute12ConvertValueIfEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEaPT_:
  179|  24.8k|                    OutT* out_val) const {
  180|  24.8k|    if (out_val == nullptr) {
  ------------------
  |  Branch (180:9): [True: 0, False: 24.8k]
  ------------------
  181|      0|      return false;
  182|      0|    }
  183|  24.8k|    switch (data_type_) {
  184|      0|      case DT_INT8:
  ------------------
  |  Branch (184:7): [True: 0, False: 24.8k]
  ------------------
  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: 24.8k]
  ------------------
  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: 24.8k]
  ------------------
  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: 24.8k]
  ------------------
  194|      0|        return ConvertTypedValue<uint16_t, OutT>(att_id, out_num_components,
  195|      0|                                                 out_val);
  196|  24.8k|      case DT_INT32:
  ------------------
  |  Branch (196:7): [True: 24.8k, False: 0]
  ------------------
  197|  24.8k|        return ConvertTypedValue<int32_t, OutT>(att_id, out_num_components,
  198|  24.8k|                                                out_val);
  199|      0|      case DT_UINT32:
  ------------------
  |  Branch (199:7): [True: 0, False: 24.8k]
  ------------------
  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: 24.8k]
  ------------------
  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: 24.8k]
  ------------------
  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: 24.8k]
  ------------------
  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: 24.8k]
  ------------------
  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: 24.8k]
  ------------------
  215|      0|        return ConvertTypedValue<bool, OutT>(att_id, out_num_components,
  216|      0|                                             out_val);
  217|      0|      default:
  ------------------
  |  Branch (217:7): [True: 0, False: 24.8k]
  ------------------
  218|       |        // Wrong attribute type.
  219|      0|        return false;
  220|  24.8k|    }
  221|  24.8k|  }
_ZNK5draco17GeometryAttribute17ConvertTypedValueIifEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEhPT0_:
  306|  24.8k|                         OutT* out_value) const {
  307|  24.8k|    const uint8_t* src_address = GetAddress(att_id);
  308|       |
  309|       |    // Convert all components available in both the original and output formats.
  310|  99.3k|    for (int i = 0; i < std::min(num_components_, out_num_components); ++i) {
  ------------------
  |  Branch (310:21): [True: 74.4k, False: 24.8k]
  ------------------
  311|  74.4k|      if (!IsAddressValid(src_address)) {
  ------------------
  |  Branch (311:11): [True: 0, False: 74.4k]
  ------------------
  312|      0|        return false;
  313|      0|      }
  314|  74.4k|      const T in_value = *reinterpret_cast<const T*>(src_address);
  315|  74.4k|      if (!ConvertComponentValue<T, OutT>(in_value, normalized_,
  ------------------
  |  Branch (315:11): [True: 0, False: 74.4k]
  ------------------
  316|  74.4k|                                          out_value + i)) {
  317|      0|        return false;
  318|      0|      }
  319|  74.4k|      src_address += sizeof(T);
  320|  74.4k|    }
  321|       |    // Fill empty data for unused output components if needed.
  322|  24.8k|    for (int i = num_components_; i < out_num_components; ++i) {
  ------------------
  |  Branch (322:35): [True: 0, False: 24.8k]
  ------------------
  323|      0|      out_value[i] = static_cast<OutT>(0);
  324|      0|    }
  325|  24.8k|    return true;
  326|  24.8k|  }
_ZN5draco17GeometryAttribute21ConvertComponentValueIifEEbRKT_bPT0_:
  364|  74.4k|                                    OutT* out_value) {
  365|       |    // Make sure the |in_value| can be represented as an integral type OutT.
  366|  74.4k|#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|  74.4k|    if (!normalized) {
  ------------------
  |  Branch (420:9): [True: 74.4k, False: 0]
  ------------------
  421|  74.4k|      *out_value = static_cast<OutT>(in_value);
  422|  74.4k|    } 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|  74.4k|    return true;
  470|  74.4k|  }

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

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

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

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

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

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

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

_ZN5draco17OctahedronToolBoxC2Ev:
   53|  3.80k|      : quantization_bits_(-1),
   54|  3.80k|        max_quantized_value_(-1),
   55|  3.80k|        max_value_(-1),
   56|  3.80k|        dequantization_scale_(1.f),
   57|  3.80k|        center_value_(-1) {}
_ZN5draco17OctahedronToolBox19SetQuantizationBitsEi:
   59|  3.48k|  bool SetQuantizationBits(int32_t q) {
   60|  3.48k|    if (q < 2 || q > 30) {
  ------------------
  |  Branch (60:9): [True: 1.09k, False: 2.39k]
  |  Branch (60:18): [True: 211, False: 2.18k]
  ------------------
   61|  1.30k|      return false;
   62|  1.30k|    }
   63|  2.18k|    quantization_bits_ = q;
   64|  2.18k|    max_quantized_value_ = (1u << quantization_bits_) - 1;
   65|  2.18k|    max_value_ = max_quantized_value_ - 1;
   66|  2.18k|    dequantization_scale_ = 2.f / max_value_;
   67|  2.18k|    center_value_ = max_value_ / 2;
   68|  2.18k|    return true;
   69|  3.48k|  }
_ZNK5draco17OctahedronToolBox28CanonicalizeOctahedralCoordsEiiPiS1_:
   76|  3.24M|                                           int32_t* out_t) const {
   77|  3.24M|    if ((s == 0 && t == 0) || (s == 0 && t == max_value_) ||
  ------------------
  |  Branch (77:10): [True: 3.35k, False: 3.24M]
  |  Branch (77:20): [True: 0, False: 3.35k]
  |  Branch (77:32): [True: 3.35k, False: 3.24M]
  |  Branch (77:42): [True: 0, False: 3.35k]
  ------------------
   78|  3.24M|        (s == max_value_ && t == 0)) {
  ------------------
  |  Branch (78:10): [True: 2.24M, False: 998k]
  |  Branch (78:29): [True: 5.62k, False: 2.24M]
  ------------------
   79|  5.62k|      s = max_value_;
   80|  5.62k|      t = max_value_;
   81|  3.24M|    } else if (s == 0 && t > center_value_) {
  ------------------
  |  Branch (81:16): [True: 3.35k, False: 3.23M]
  |  Branch (81:26): [True: 951, False: 2.40k]
  ------------------
   82|    951|      t = center_value_ - (t - center_value_);
   83|  3.24M|    } else if (s == max_value_ && t < center_value_) {
  ------------------
  |  Branch (83:16): [True: 2.24M, False: 997k]
  |  Branch (83:35): [True: 5.74k, False: 2.23M]
  ------------------
   84|  5.74k|      t = center_value_ + (center_value_ - t);
   85|  3.23M|    } else if (t == max_value_ && s < center_value_) {
  ------------------
  |  Branch (85:16): [True: 2.24M, False: 993k]
  |  Branch (85:35): [True: 200, False: 2.24M]
  ------------------
   86|    200|      s = center_value_ + (center_value_ - s);
   87|  3.23M|    } else if (t == 0 && s > center_value_) {
  ------------------
  |  Branch (87:16): [True: 4.94k, False: 3.23M]
  |  Branch (87:26): [True: 1.82k, False: 3.12k]
  ------------------
   88|  1.82k|      s = center_value_ - (s - center_value_);
   89|  1.82k|    }
   90|       |
   91|  3.24M|    *out_s = s;
   92|  3.24M|    *out_t = t;
   93|  3.24M|  }
_ZNK5draco17OctahedronToolBox40IntegerVectorToQuantizedOctahedralCoordsEPKiPiS3_:
   99|  3.24M|                                                       int32_t* out_t) const {
  100|  3.24M|    DRACO_DCHECK_EQ(
  101|  3.24M|        std::abs(int_vec[0]) + std::abs(int_vec[1]) + std::abs(int_vec[2]),
  102|  3.24M|        center_value_);
  103|  3.24M|    int32_t s, t;
  104|  3.24M|    if (int_vec[0] >= 0) {
  ------------------
  |  Branch (104:9): [True: 1.57M, False: 1.66M]
  ------------------
  105|       |      // Right hemisphere.
  106|  1.57M|      s = (int_vec[1] + center_value_);
  107|  1.57M|      t = (int_vec[2] + center_value_);
  108|  1.66M|    } else {
  109|       |      // Left hemisphere.
  110|  1.66M|      if (int_vec[1] < 0) {
  ------------------
  |  Branch (110:11): [True: 49.1k, False: 1.61M]
  ------------------
  111|  49.1k|        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.66M|      if (int_vec[2] < 0) {
  ------------------
  |  Branch (115:11): [True: 54.4k, False: 1.61M]
  ------------------
  116|  54.4k|        t = std::abs(int_vec[1]);
  117|  1.61M|      } else {
  118|  1.61M|        t = (max_value_ - std::abs(int_vec[1]));
  119|  1.61M|      }
  120|  1.66M|    }
  121|  3.24M|    CanonicalizeOctahedralCoords(s, t, out_s, out_t);
  122|  3.24M|  }
_ZNK5draco17OctahedronToolBox37QuantizedOctahedralCoordsToUnitVectorEiiPf:
  198|  81.6k|                                                    float* out_vector) const {
  199|  81.6k|    OctahedralCoordsToUnitVector(in_s * dequantization_scale_ - 1.f,
  200|  81.6k|                                 in_t * dequantization_scale_ - 1.f,
  201|  81.6k|                                 out_vector);
  202|  81.6k|  }
_ZNK5draco17OctahedronToolBox11IsInDiamondERKiS2_:
  205|  2.01M|  inline bool IsInDiamond(const int32_t& s, const int32_t& t) const {
  206|       |    // Expect center already at origin.
  207|  2.01M|    DRACO_DCHECK_LE(s, center_value_);
  208|  2.01M|    DRACO_DCHECK_LE(t, center_value_);
  209|  2.01M|    DRACO_DCHECK_GE(s, -center_value_);
  210|  2.01M|    DRACO_DCHECK_GE(t, -center_value_);
  211|  2.01M|    const uint32_t st =
  212|  2.01M|        static_cast<uint32_t>(std::abs(s)) + static_cast<uint32_t>(std::abs(t));
  213|  2.01M|    return st <= center_value_;
  214|  2.01M|  }
_ZNK5draco17OctahedronToolBox13InvertDiamondEPiS1_:
  216|  2.25M|  void InvertDiamond(int32_t* s, int32_t* t) const {
  217|       |    // Expect center already at origin.
  218|  2.25M|    DRACO_DCHECK_LE(*s, center_value_);
  219|  2.25M|    DRACO_DCHECK_LE(*t, center_value_);
  220|  2.25M|    DRACO_DCHECK_GE(*s, -center_value_);
  221|  2.25M|    DRACO_DCHECK_GE(*t, -center_value_);
  222|  2.25M|    int32_t sign_s = 0;
  223|  2.25M|    int32_t sign_t = 0;
  224|  2.25M|    if (*s >= 0 && *t >= 0) {
  ------------------
  |  Branch (224:9): [True: 2.08M, False: 164k]
  |  Branch (224:20): [True: 1.99M, False: 91.3k]
  ------------------
  225|  1.99M|      sign_s = 1;
  226|  1.99M|      sign_t = 1;
  227|  1.99M|    } else if (*s <= 0 && *t <= 0) {
  ------------------
  |  Branch (227:16): [True: 167k, False: 87.7k]
  |  Branch (227:27): [True: 87.3k, False: 80.6k]
  ------------------
  228|  87.3k|      sign_s = -1;
  229|  87.3k|      sign_t = -1;
  230|   168k|    } else {
  231|   168k|      sign_s = (*s > 0) ? 1 : -1;
  ------------------
  |  Branch (231:16): [True: 87.7k, False: 80.6k]
  ------------------
  232|   168k|      sign_t = (*t > 0) ? 1 : -1;
  ------------------
  |  Branch (232:16): [True: 80.6k, False: 87.7k]
  ------------------
  233|   168k|    }
  234|       |
  235|       |    // Perform the addition and subtraction using unsigned integers to avoid
  236|       |    // signed integer overflows for bad data. Note that the result will be
  237|       |    // unchanged for non-overflowing cases.
  238|  2.25M|    const uint32_t corner_point_s = sign_s * center_value_;
  239|  2.25M|    const uint32_t corner_point_t = sign_t * center_value_;
  240|  2.25M|    uint32_t us = *s;
  241|  2.25M|    uint32_t ut = *t;
  242|  2.25M|    us = us + us - corner_point_s;
  243|  2.25M|    ut = ut + ut - corner_point_t;
  244|  2.25M|    if (sign_s * sign_t >= 0) {
  ------------------
  |  Branch (244:9): [True: 2.08M, False: 168k]
  ------------------
  245|  2.08M|      uint32_t temp = us;
  246|  2.08M|      us = -ut;
  247|  2.08M|      ut = -temp;
  248|  2.08M|    } else {
  249|   168k|      std::swap(us, ut);
  250|   168k|    }
  251|  2.25M|    us = us + corner_point_s;
  252|  2.25M|    ut = ut + corner_point_t;
  253|       |
  254|  2.25M|    *s = us;
  255|  2.25M|    *t = ut;
  256|  2.25M|    *s /= 2;
  257|  2.25M|    *t /= 2;
  258|  2.25M|  }
_ZNK5draco17OctahedronToolBox6ModMaxEi:
  272|  4.03M|  int32_t ModMax(int32_t x) const {
  273|  4.03M|    if (x > this->center_value()) {
  ------------------
  |  Branch (273:9): [True: 35.0k, False: 4.00M]
  ------------------
  274|  35.0k|      return x - this->max_quantized_value();
  275|  35.0k|    }
  276|  4.00M|    if (x < -this->center_value()) {
  ------------------
  |  Branch (276:9): [True: 11.4k, False: 3.99M]
  ------------------
  277|  11.4k|      return x + this->max_quantized_value();
  278|  11.4k|    }
  279|  3.99M|    return x;
  280|  4.00M|  }
_ZNK5draco17OctahedronToolBox17quantization_bitsEv:
  291|  2.05k|  int32_t quantization_bits() const { return quantization_bits_; }
_ZNK5draco17OctahedronToolBox19max_quantized_valueEv:
  292|  46.5k|  int32_t max_quantized_value() const { return max_quantized_value_; }
_ZNK5draco17OctahedronToolBox12center_valueEv:
  294|  12.0M|  int32_t center_value() const { return center_value_; }
_ZNK5draco17OctahedronToolBox28OctahedralCoordsToUnitVectorEffPf:
  298|  81.6k|                                           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|  81.6k|    float y = in_s_scaled;
  329|  81.6k|    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|  81.6k|    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|  81.6k|    float x_offset = -x;
  342|  81.6k|    x_offset = x_offset < 0 ? 0 : x_offset;
  ------------------
  |  Branch (342:16): [True: 31, False: 81.6k]
  ------------------
  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|  81.6k|    y += y < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (347:10): [True: 48.9k, False: 32.6k]
  ------------------
  348|  81.6k|    z += z < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (348:10): [True: 49.0k, False: 32.6k]
  ------------------
  349|       |
  350|       |    // Normalize the computed vector.
  351|  81.6k|    const float norm_squared = x * x + y * y + z * z;
  352|  81.6k|    if (norm_squared < 1e-6) {
  ------------------
  |  Branch (352:9): [True: 0, False: 81.6k]
  ------------------
  353|      0|      out_vector[0] = 0;
  354|      0|      out_vector[1] = 0;
  355|      0|      out_vector[2] = 0;
  356|  81.6k|    } else {
  357|  81.6k|      const float d = 1.0f / std::sqrt(norm_squared);
  358|  81.6k|      out_vector[0] = x * d;
  359|  81.6k|      out_vector[1] = y * d;
  360|  81.6k|      out_vector[2] = z * d;
  361|  81.6k|    }
  362|  81.6k|  }
_ZNK5draco17OctahedronToolBox25CanonicalizeIntegerVectorIiEEvPT_:
  173|  3.24M|  void CanonicalizeIntegerVector(T* vec) const {
  174|  3.24M|    static_assert(std::is_integral<T>::value, "T must be an integral type.");
  175|  3.24M|    static_assert(std::is_signed<T>::value, "T must be a signed type.");
  176|  3.24M|    const int64_t abs_sum = static_cast<int64_t>(std::abs(vec[0])) +
  177|  3.24M|                            static_cast<int64_t>(std::abs(vec[1])) +
  178|  3.24M|                            static_cast<int64_t>(std::abs(vec[2]));
  179|       |
  180|  3.24M|    if (abs_sum == 0) {
  ------------------
  |  Branch (180:9): [True: 2.98M, False: 261k]
  ------------------
  181|  2.98M|      vec[0] = center_value_;  // vec[1] == v[2] == 0
  182|  2.98M|    } else {
  183|   261k|      vec[0] =
  184|   261k|          (static_cast<int64_t>(vec[0]) * static_cast<int64_t>(center_value_)) /
  185|   261k|          abs_sum;
  186|   261k|      vec[1] =
  187|   261k|          (static_cast<int64_t>(vec[1]) * static_cast<int64_t>(center_value_)) /
  188|   261k|          abs_sum;
  189|   261k|      if (vec[2] >= 0) {
  ------------------
  |  Branch (189:11): [True: 139k, False: 122k]
  ------------------
  190|   139k|        vec[2] = center_value_ - std::abs(vec[0]) - std::abs(vec[1]);
  191|   139k|      } else {
  192|   122k|        vec[2] = -(center_value_ - std::abs(vec[0]) - std::abs(vec[1]));
  193|   122k|      }
  194|   261k|    }
  195|  3.24M|  }

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

_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    514|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    514|            attribute, transform, mesh_data),
   52|    514|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  196|    501|                                                                buffer) {
  197|    501|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  198|    501|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    501|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (198:7): [True: 26, False: 475]
  ------------------
  199|       |    // Decode prediction mode.
  200|     26|    uint8_t mode;
  201|     26|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (201:9): [True: 1, False: 25]
  ------------------
  202|      1|      return false;
  203|      1|    }
  204|       |
  205|     25|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (205:9): [True: 23, False: 2]
  ------------------
  206|       |      // Unsupported mode.
  207|     23|      return false;
  208|     23|    }
  209|     25|  }
  210|    477|#endif
  211|       |
  212|       |  // Encode selected edges using separate rans bit coder for each context.
  213|  2.12k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (213:19): [True: 1.75k, False: 367]
  ------------------
  214|  1.75k|    uint32_t num_flags;
  215|  1.75k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (215:9): [True: 29, False: 1.72k]
  ------------------
  216|     29|      return false;
  217|     29|    }
  218|  1.72k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (218:9): [True: 42, False: 1.68k]
  ------------------
  219|     42|      return false;
  220|     42|    }
  221|  1.68k|    if (num_flags > 0) {
  ------------------
  |  Branch (221:9): [True: 666, False: 1.02k]
  ------------------
  222|    666|      is_crease_edge_[i].resize(num_flags);
  223|    666|      RAnsBitDecoder decoder;
  224|    666|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (224:11): [True: 39, False: 627]
  ------------------
  225|     39|        return false;
  226|     39|      }
  227|  1.22M|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (227:28): [True: 1.22M, False: 627]
  ------------------
  228|  1.22M|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  229|  1.22M|      }
  230|    627|      decoder.EndDecoding();
  231|    627|    }
  232|  1.68k|  }
  233|    367|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  234|    367|                                     MeshDataT>::DecodePredictionData(buffer);
  235|    477|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    334|                          const PointIndex* /* entry_to_point_id_map */) {
   87|    334|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    334|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  1.67k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 1.33k, False: 334]
  ------------------
   93|  1.33k|    pred_vals[i].resize(num_components, 0);
   94|  1.33k|  }
   95|    334|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    334|                                         out_data);
   97|       |
   98|    334|  const CornerTable* const table = this->mesh_data().corner_table();
   99|    334|  const std::vector<int32_t>* const vertex_to_data_map =
  100|    334|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    334|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    334|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    334|  const int corner_map_size =
  109|    334|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|    334|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (110:7): [True: 0, False: 334]
  ------------------
  111|      0|    return false;
  112|      0|  }
  113|   953k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (113:19): [True: 953k, False: 200]
  ------------------
  114|   953k|    const CornerIndex start_corner_id =
  115|   953k|        this->mesh_data().data_to_corner_map()->at(p);
  116|       |
  117|   953k|    CornerIndex corner_id(start_corner_id);
  118|   953k|    int num_parallelograms = 0;
  119|   953k|    bool first_pass = true;
  120|  2.04M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (120:12): [True: 1.11M, False: 933k]
  ------------------
  121|  1.11M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (121:11): [True: 59.8k, False: 1.05M]
  ------------------
  122|  1.11M|              p, corner_id, table, *vertex_to_data_map, out_data,
  123|  1.11M|              num_components, &(pred_vals[num_parallelograms][0]))) {
  124|       |        // Parallelogram prediction applied and stored in
  125|       |        // |pred_vals[num_parallelograms]|
  126|  59.8k|        ++num_parallelograms;
  127|       |        // Stop processing when we reach the maximum number of allowed
  128|       |        // parallelograms.
  129|  59.8k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (129:13): [True: 431, False: 59.3k]
  ------------------
  130|    431|          break;
  131|    431|        }
  132|  59.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|  1.10M|      if (first_pass) {
  ------------------
  |  Branch (136:11): [True: 1.07M, False: 33.0k]
  ------------------
  137|  1.07M|        corner_id = table->SwingLeft(corner_id);
  138|  1.07M|      } else {
  139|  33.0k|        corner_id = table->SwingRight(corner_id);
  140|  33.0k|      }
  141|  1.10M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (141:11): [True: 19.8k, False: 1.09M]
  ------------------
  142|  19.8k|        break;
  143|  19.8k|      }
  144|  1.09M|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (144:11): [True: 952k, False: 137k]
  |  Branch (144:47): [True: 933k, False: 19.0k]
  ------------------
  145|   933k|        first_pass = false;
  146|   933k|        corner_id = table->SwingRight(start_corner_id);
  147|   933k|      }
  148|  1.09M|    }
  149|       |
  150|       |    // Check which of the available parallelograms are actually used and compute
  151|       |    // the final predicted value.
  152|   953k|    int num_used_parallelograms = 0;
  153|   953k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (153:9): [True: 40.1k, False: 913k]
  ------------------
  154|  5.93M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (154:23): [True: 5.89M, False: 40.1k]
  ------------------
  155|  5.89M|        multi_pred_vals[i] = 0;
  156|  5.89M|      }
  157|       |      // Check which parallelograms are actually used.
  158|  99.8k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (158:23): [True: 59.7k, False: 40.0k]
  ------------------
  159|  59.7k|        const int context = num_parallelograms - 1;
  160|  59.7k|        const int pos = is_crease_edge_pos[context]++;
  161|  59.7k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (161:13): [True: 134, False: 59.6k]
  ------------------
  162|    134|          return false;
  163|    134|        }
  164|  59.6k|        const bool is_crease = is_crease_edge_[context][pos];
  165|  59.6k|        if (!is_crease) {
  ------------------
  |  Branch (165:13): [True: 7.35k, False: 52.2k]
  ------------------
  166|  7.35k|          ++num_used_parallelograms;
  167|   739k|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (167:27): [True: 731k, False: 7.35k]
  ------------------
  168|   731k|            multi_pred_vals[j] =
  169|   731k|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  170|   731k|          }
  171|  7.35k|        }
  172|  59.6k|      }
  173|  40.1k|    }
  174|   953k|    const int dst_offset = p * num_components;
  175|   953k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (175:9): [True: 950k, False: 3.43k]
  ------------------
  176|       |      // No parallelogram was valid.
  177|       |      // We use the last decoded point as a reference.
  178|   950k|      const int src_offset = (p - 1) * num_components;
  179|   950k|      this->transform().ComputeOriginalValue(
  180|   950k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  181|   950k|    } else {
  182|       |      // Compute the correction from the predicted value.
  183|   310k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (183:23): [True: 307k, False: 3.43k]
  ------------------
  184|   307k|        multi_pred_vals[c] /= num_used_parallelograms;
  185|   307k|      }
  186|  3.43k|      this->transform().ComputeOriginalValue(
  187|  3.43k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  188|  3.43k|    }
  189|   953k|  }
  190|    200|  return true;
  191|    334|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    658|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    658|            attribute, transform, mesh_data),
   52|    658|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  196|    639|                                                                buffer) {
  197|    639|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  198|    639|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    639|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (198:7): [True: 21, False: 618]
  ------------------
  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: 19, False: 1]
  ------------------
  206|       |      // Unsupported mode.
  207|     19|      return false;
  208|     19|    }
  209|     20|  }
  210|    619|#endif
  211|       |
  212|       |  // Encode selected edges using separate rans bit coder for each context.
  213|  2.76k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (213:19): [True: 2.28k, False: 481]
  ------------------
  214|  2.28k|    uint32_t num_flags;
  215|  2.28k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (215:9): [True: 23, False: 2.25k]
  ------------------
  216|     23|      return false;
  217|     23|    }
  218|  2.25k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (218:9): [True: 72, False: 2.18k]
  ------------------
  219|     72|      return false;
  220|     72|    }
  221|  2.18k|    if (num_flags > 0) {
  ------------------
  |  Branch (221:9): [True: 735, False: 1.45k]
  ------------------
  222|    735|      is_crease_edge_[i].resize(num_flags);
  223|    735|      RAnsBitDecoder decoder;
  224|    735|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (224:11): [True: 43, False: 692]
  ------------------
  225|     43|        return false;
  226|     43|      }
  227|  1.09M|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (227:28): [True: 1.09M, False: 692]
  ------------------
  228|  1.09M|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  229|  1.09M|      }
  230|    692|      decoder.EndDecoding();
  231|    692|    }
  232|  2.18k|  }
  233|    481|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  234|    481|                                     MeshDataT>::DecodePredictionData(buffer);
  235|    619|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    437|                          const PointIndex* /* entry_to_point_id_map */) {
   87|    437|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    437|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  2.18k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 1.74k, False: 437]
  ------------------
   93|  1.74k|    pred_vals[i].resize(num_components, 0);
   94|  1.74k|  }
   95|    437|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    437|                                         out_data);
   97|       |
   98|    437|  const CornerTable* const table = this->mesh_data().corner_table();
   99|    437|  const std::vector<int32_t>* const vertex_to_data_map =
  100|    437|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    437|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    437|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    437|  const int corner_map_size =
  109|    437|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|    437|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (110:7): [True: 0, False: 437]
  ------------------
  111|      0|    return false;
  112|      0|  }
  113|   200k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (113:19): [True: 200k, False: 222]
  ------------------
  114|   200k|    const CornerIndex start_corner_id =
  115|   200k|        this->mesh_data().data_to_corner_map()->at(p);
  116|       |
  117|   200k|    CornerIndex corner_id(start_corner_id);
  118|   200k|    int num_parallelograms = 0;
  119|   200k|    bool first_pass = true;
  120|  1.19M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (120:12): [True: 1.16M, False: 37.0k]
  ------------------
  121|  1.16M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (121:11): [True: 359k, False: 801k]
  ------------------
  122|  1.16M|              p, corner_id, table, *vertex_to_data_map, out_data,
  123|  1.16M|              num_components, &(pred_vals[num_parallelograms][0]))) {
  124|       |        // Parallelogram prediction applied and stored in
  125|       |        // |pred_vals[num_parallelograms]|
  126|   359k|        ++num_parallelograms;
  127|       |        // Stop processing when we reach the maximum number of allowed
  128|       |        // parallelograms.
  129|   359k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (129:13): [True: 306, False: 358k]
  ------------------
  130|    306|          break;
  131|    306|        }
  132|   359k|      }
  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|  1.16M|      if (first_pass) {
  ------------------
  |  Branch (136:11): [True: 1.08M, False: 70.8k]
  ------------------
  137|  1.08M|        corner_id = table->SwingLeft(corner_id);
  138|  1.08M|      } else {
  139|  70.8k|        corner_id = table->SwingRight(corner_id);
  140|  70.8k|      }
  141|  1.16M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (141:11): [True: 163k, False: 996k]
  ------------------
  142|   163k|        break;
  143|   163k|      }
  144|   996k|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (144:11): [True: 68.2k, False: 928k]
  |  Branch (144:47): [True: 37.0k, False: 31.1k]
  ------------------
  145|  37.0k|        first_pass = false;
  146|  37.0k|        corner_id = table->SwingRight(start_corner_id);
  147|  37.0k|      }
  148|   996k|    }
  149|       |
  150|       |    // Check which of the available parallelograms are actually used and compute
  151|       |    // the final predicted value.
  152|   200k|    int num_used_parallelograms = 0;
  153|   200k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (153:9): [True: 198k, False: 2.67k]
  ------------------
  154|  18.2M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (154:23): [True: 18.0M, False: 198k]
  ------------------
  155|  18.0M|        multi_pred_vals[i] = 0;
  156|  18.0M|      }
  157|       |      // Check which parallelograms are actually used.
  158|   556k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (158:23): [True: 359k, False: 197k]
  ------------------
  159|   359k|        const int context = num_parallelograms - 1;
  160|   359k|        const int pos = is_crease_edge_pos[context]++;
  161|   359k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (161:13): [True: 215, False: 358k]
  ------------------
  162|    215|          return false;
  163|    215|        }
  164|   358k|        const bool is_crease = is_crease_edge_[context][pos];
  165|   358k|        if (!is_crease) {
  ------------------
  |  Branch (165:13): [True: 18.4k, False: 340k]
  ------------------
  166|  18.4k|          ++num_used_parallelograms;
  167|   837k|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (167:27): [True: 819k, False: 18.4k]
  ------------------
  168|   819k|            multi_pred_vals[j] =
  169|   819k|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  170|   819k|          }
  171|  18.4k|        }
  172|   358k|      }
  173|   198k|    }
  174|   200k|    const int dst_offset = p * num_components;
  175|   200k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (175:9): [True: 189k, False: 10.9k]
  ------------------
  176|       |      // No parallelogram was valid.
  177|       |      // We use the last decoded point as a reference.
  178|   189k|      const int src_offset = (p - 1) * num_components;
  179|   189k|      this->transform().ComputeOriginalValue(
  180|   189k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  181|   189k|    } else {
  182|       |      // Compute the correction from the predicted value.
  183|   528k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (183:23): [True: 517k, False: 10.9k]
  ------------------
  184|   517k|        multi_pred_vals[c] /= num_used_parallelograms;
  185|   517k|      }
  186|  10.9k|      this->transform().ComputeOriginalValue(
  187|  10.9k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  188|  10.9k|    }
  189|   200k|  }
  190|    222|  return true;
  191|    437|}

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

_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|   556k|  const MeshData& mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   293k|  const MeshData& mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|   856k|  const MeshData& mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   223k|  const MeshData& mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  2.72k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  2.72k|        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|  3.37k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  3.37k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|  3.47M|  const MeshData& mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    154|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    154|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    230|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    230|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    193|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    193|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    203|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    203|        mesh_data_(mesh_data) {}

_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    306|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    154|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    154|    DRACO_DCHECK_EQ(i, 0);
   70|    154|    (void)i;
   71|    154|    return GeometryAttribute::POSITION;
   72|    154|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    153|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    153|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 153]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    153|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 152]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    152|    predictor_.SetPositionAttribute(*att);
   82|    152|    return true;
   83|    153|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    151|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    151|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 10, False: 141]
  ------------------
  148|     10|    return false;
  149|     10|  }
  150|       |
  151|    141|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    141|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    141|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 30, False: 111]
  ------------------
  153|     30|    uint8_t prediction_mode;
  154|     30|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 29]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     29|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 2, False: 27]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      2|      return false;
  160|      2|    }
  161|       |
  162|     27|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 27]
  ------------------
  163|     27|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     27|  }
  167|    138|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    138|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 4, False: 134]
  ------------------
  171|      4|    return false;
  172|      4|  }
  173|       |
  174|    134|  return true;
  175|    138|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    134|                                      const PointIndex* entry_to_point_id_map) {
  103|    134|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    134|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    134|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    134|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    134|  const int corner_map_size =
  111|    134|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    134|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 134]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    134|  VectorD<int32_t, 3> pred_normal_3d;
  117|    134|  int32_t pred_normal_oct[2];
  118|       |
  119|   556k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 556k, False: 134]
  ------------------
  120|   556k|    const CornerIndex corner_id =
  121|   556k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   556k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   556k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   556k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   556k|                    octahedron_tool_box_.center_value());
  128|   556k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 474k, False: 82.4k]
  ------------------
  129|   474k|      pred_normal_3d = -pred_normal_3d;
  130|   474k|    }
  131|   556k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   556k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   556k|    const int data_offset = data_id * 2;
  135|   556k|    this->transform().ComputeOriginalValue(
  136|   556k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   556k|  }
  138|    134|  flip_normal_bit_decoder_.EndDecoding();
  139|    134|  return true;
  140|    134|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    134|  void SetQuantizationBits(int q) {
   85|    134|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    134|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    457|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    230|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    230|    DRACO_DCHECK_EQ(i, 0);
   70|    230|    (void)i;
   71|    230|    return GeometryAttribute::POSITION;
   72|    230|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    228|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    228|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 228]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    228|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 227]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    227|    predictor_.SetPositionAttribute(*att);
   82|    227|    return true;
   83|    228|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    225|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    225|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 13, False: 212]
  ------------------
  148|     13|    return false;
  149|     13|  }
  150|       |
  151|    212|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    212|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    212|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 49, False: 163]
  ------------------
  153|     49|    uint8_t prediction_mode;
  154|     49|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 48]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     48|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 1, False: 47]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      1|      return false;
  160|      1|    }
  161|       |
  162|     47|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 47]
  ------------------
  163|     47|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     47|  }
  167|    210|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    210|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 11, False: 199]
  ------------------
  171|     11|    return false;
  172|     11|  }
  173|       |
  174|    199|  return true;
  175|    210|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    199|                                      const PointIndex* entry_to_point_id_map) {
  103|    199|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    199|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    199|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    199|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    199|  const int corner_map_size =
  111|    199|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    199|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 199]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    199|  VectorD<int32_t, 3> pred_normal_3d;
  117|    199|  int32_t pred_normal_oct[2];
  118|       |
  119|   293k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 293k, False: 199]
  ------------------
  120|   293k|    const CornerIndex corner_id =
  121|   293k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   293k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   293k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   293k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   293k|                    octahedron_tool_box_.center_value());
  128|   293k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 216k, False: 76.7k]
  ------------------
  129|   216k|      pred_normal_3d = -pred_normal_3d;
  130|   216k|    }
  131|   293k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   293k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   293k|    const int data_offset = data_id * 2;
  135|   293k|    this->transform().ComputeOriginalValue(
  136|   293k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   293k|  }
  138|    199|  flip_normal_bit_decoder_.EndDecoding();
  139|    199|  return true;
  140|    199|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    199|  void SetQuantizationBits(int q) {
   85|    199|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    199|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    384|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    193|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    193|    DRACO_DCHECK_EQ(i, 0);
   70|    193|    (void)i;
   71|    193|    return GeometryAttribute::POSITION;
   72|    193|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    192|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    192|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 192]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    192|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 191]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    191|    predictor_.SetPositionAttribute(*att);
   82|    191|    return true;
   83|    192|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    191|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    191|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 7, False: 184]
  ------------------
  148|      7|    return false;
  149|      7|  }
  150|       |
  151|    184|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    184|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    184|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 42, False: 142]
  ------------------
  153|     42|    uint8_t prediction_mode;
  154|     42|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 41]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     41|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 14, False: 27]
  ------------------
  158|       |      // Invalid prediction mode.
  159|     14|      return false;
  160|     14|    }
  161|       |
  162|     27|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 27]
  ------------------
  163|     27|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     27|  }
  167|    169|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    169|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 7, False: 162]
  ------------------
  171|      7|    return false;
  172|      7|  }
  173|       |
  174|    162|  return true;
  175|    169|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    162|                                      const PointIndex* entry_to_point_id_map) {
  103|    162|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    162|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    162|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    162|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    162|  const int corner_map_size =
  111|    162|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    162|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 162]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    162|  VectorD<int32_t, 3> pred_normal_3d;
  117|    162|  int32_t pred_normal_oct[2];
  118|       |
  119|   856k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 856k, False: 162]
  ------------------
  120|   856k|    const CornerIndex corner_id =
  121|   856k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   856k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   856k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   856k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   856k|                    octahedron_tool_box_.center_value());
  128|   856k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 287k, False: 569k]
  ------------------
  129|   287k|      pred_normal_3d = -pred_normal_3d;
  130|   287k|    }
  131|   856k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   856k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   856k|    const int data_offset = data_id * 2;
  135|   856k|    this->transform().ComputeOriginalValue(
  136|   856k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   856k|  }
  138|    162|  flip_normal_bit_decoder_.EndDecoding();
  139|    162|  return true;
  140|    162|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    162|  void SetQuantizationBits(int q) {
   85|    162|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    162|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    405|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    203|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    203|    DRACO_DCHECK_EQ(i, 0);
   70|    203|    (void)i;
   71|    203|    return GeometryAttribute::POSITION;
   72|    203|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    203|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    203|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 203]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    203|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 202]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    202|    predictor_.SetPositionAttribute(*att);
   82|    202|    return true;
   83|    203|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    202|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    202|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 6, False: 196]
  ------------------
  148|      6|    return false;
  149|      6|  }
  150|       |
  151|    196|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    196|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    196|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 56, False: 140]
  ------------------
  153|     56|    uint8_t prediction_mode;
  154|     56|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 55]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     55|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 3, False: 52]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      3|      return false;
  160|      3|    }
  161|       |
  162|     52|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 52]
  ------------------
  163|     52|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     52|  }
  167|    192|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    192|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 4, False: 188]
  ------------------
  171|      4|    return false;
  172|      4|  }
  173|       |
  174|    188|  return true;
  175|    192|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    188|                                      const PointIndex* entry_to_point_id_map) {
  103|    188|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    188|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    188|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    188|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    188|  const int corner_map_size =
  111|    188|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    188|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 188]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    188|  VectorD<int32_t, 3> pred_normal_3d;
  117|    188|  int32_t pred_normal_oct[2];
  118|       |
  119|   223k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 223k, False: 188]
  ------------------
  120|   223k|    const CornerIndex corner_id =
  121|   223k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   223k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   223k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   223k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   223k|                    octahedron_tool_box_.center_value());
  128|   223k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 194k, False: 28.3k]
  ------------------
  129|   194k|      pred_normal_3d = -pred_normal_3d;
  130|   194k|    }
  131|   223k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   223k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   223k|    const int data_offset = data_id * 2;
  135|   223k|    this->transform().ComputeOriginalValue(
  136|   223k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   223k|  }
  138|    188|  flip_normal_bit_decoder_.EndDecoding();
  139|    188|  return true;
  140|    188|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    188|  void SetQuantizationBits(int q) {
   85|    188|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    188|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    469|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    469|            attribute, transform, mesh_data),
   37|    469|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    936|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    469|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    469|    DRACO_DCHECK_EQ(i, 0);
   70|    469|    (void)i;
   71|    469|    return GeometryAttribute::POSITION;
   72|    469|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    468|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    468|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 468]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    468|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 467]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    467|    predictor_.SetPositionAttribute(*att);
   82|    467|    return true;
   83|    468|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    466|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    466|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 36, False: 430]
  ------------------
  148|     36|    return false;
  149|     36|  }
  150|       |
  151|    430|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    430|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    430|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 175, False: 255]
  ------------------
  153|    175|    uint8_t prediction_mode;
  154|    175|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 174]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|    174|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 5, False: 169]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      5|      return false;
  160|      5|    }
  161|       |
  162|    169|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 169]
  ------------------
  163|    169|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|    169|  }
  167|    424|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    424|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 40, False: 384]
  ------------------
  171|     40|    return false;
  172|     40|  }
  173|       |
  174|    384|  return true;
  175|    424|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    384|                                      const PointIndex* entry_to_point_id_map) {
  103|    384|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    384|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    384|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    384|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    384|  const int corner_map_size =
  111|    384|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    384|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 384]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    384|  VectorD<int32_t, 3> pred_normal_3d;
  117|    384|  int32_t pred_normal_oct[2];
  118|       |
  119|  1.07M|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 1.07M, False: 384]
  ------------------
  120|  1.07M|    const CornerIndex corner_id =
  121|  1.07M|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|  1.07M|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|  1.07M|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|  1.07M|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|  1.07M|                    octahedron_tool_box_.center_value());
  128|  1.07M|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 451k, False: 623k]
  ------------------
  129|   451k|      pred_normal_3d = -pred_normal_3d;
  130|   451k|    }
  131|  1.07M|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|  1.07M|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|  1.07M|    const int data_offset = data_id * 2;
  135|  1.07M|    this->transform().ComputeOriginalValue(
  136|  1.07M|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|  1.07M|  }
  138|    384|  flip_normal_bit_decoder_.EndDecoding();
  139|    384|  return true;
  140|    384|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    384|  void SetQuantizationBits(int q) {
   85|    384|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    384|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    549|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    549|            attribute, transform, mesh_data),
   37|    549|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|  1.09k|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    549|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    549|    DRACO_DCHECK_EQ(i, 0);
   70|    549|    (void)i;
   71|    549|    return GeometryAttribute::POSITION;
   72|    549|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    548|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    548|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 548]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    548|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 3, False: 545]
  ------------------
   79|      3|      return false;  // Currently works only for 3 component positions.
   80|      3|    }
   81|    545|    predictor_.SetPositionAttribute(*att);
   82|    545|    return true;
   83|    548|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    541|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    541|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 38, False: 503]
  ------------------
  148|     38|    return false;
  149|     38|  }
  150|       |
  151|    503|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    503|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    503|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 206, False: 297]
  ------------------
  153|    206|    uint8_t prediction_mode;
  154|    206|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 205]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|    205|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 1, False: 204]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      1|      return false;
  160|      1|    }
  161|       |
  162|    204|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 204]
  ------------------
  163|    204|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|    204|  }
  167|    501|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    501|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 22, False: 479]
  ------------------
  171|     22|    return false;
  172|     22|  }
  173|       |
  174|    479|  return true;
  175|    501|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    479|                                      const PointIndex* entry_to_point_id_map) {
  103|    479|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    479|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    479|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    479|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    479|  const int corner_map_size =
  111|    479|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    479|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 479]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    479|  VectorD<int32_t, 3> pred_normal_3d;
  117|    479|  int32_t pred_normal_oct[2];
  118|       |
  119|   244k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 243k, False: 479]
  ------------------
  120|   243k|    const CornerIndex corner_id =
  121|   243k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   243k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   243k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   243k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   243k|                    octahedron_tool_box_.center_value());
  128|   243k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 235k, False: 8.27k]
  ------------------
  129|   235k|      pred_normal_3d = -pred_normal_3d;
  130|   235k|    }
  131|   243k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   243k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   243k|    const int data_offset = data_id * 2;
  135|   243k|    this->transform().ComputeOriginalValue(
  136|   243k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   243k|  }
  138|    479|  flip_normal_bit_decoder_.EndDecoding();
  139|    479|  return true;
  140|    479|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    479|  void SetQuantizationBits(int q) {
   85|    479|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    479|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    154|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    154|            attribute, transform, mesh_data),
   37|    154|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    230|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    230|            attribute, transform, mesh_data),
   37|    230|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    193|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    193|            attribute, transform, mesh_data),
   37|    193|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    203|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    203|            attribute, transform, mesh_data),
   37|    203|        predictor_(mesh_data) {}

_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    181|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    181|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 26, False: 155]
  ------------------
  105|     26|      this->normal_prediction_mode_ = mode;
  106|     26|      return true;
  107|    155|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 155, False: 0]
  ------------------
  108|    155|      this->normal_prediction_mode_ = mode;
  109|    155|      return true;
  110|    155|    }
  111|      0|    return false;
  112|    181|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   556k|                             DataTypeT* prediction) override {
   42|   556k|    DRACO_DCHECK(this->IsInitialized());
   43|   556k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   556k|    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|   556k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   556k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   556k|    VectorD<int64_t, 3> normal;
   53|   556k|    CornerIndex c_next, c_prev;
   54|  1.14M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 586k, False: 556k]
  ------------------
   55|       |      // Getting corners.
   56|   586k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 144, False: 586k]
  ------------------
   57|    144|        c_next = corner_table->Next(corner_id);
   58|    144|        c_prev = corner_table->Previous(corner_id);
   59|   586k|      } else {
   60|   586k|        c_next = corner_table->Next(cit.Corner());
   61|   586k|        c_prev = corner_table->Previous(cit.Corner());
   62|   586k|      }
   63|   586k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   586k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   586k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   586k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   586k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   586k|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|   586k|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|   586k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   586k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   586k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   586k|      cit.Next();
   81|   586k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   556k|    constexpr int64_t upper_bound = 1 << 29;
   85|   556k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 96, False: 556k]
  ------------------
   86|     96|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|     96|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 31, False: 65]
  ------------------
   88|     31|        const int64_t quotient = abs_sum / upper_bound;
   89|     31|        normal = normal / quotient;
   90|     31|      }
   91|   556k|    } else {
   92|   556k|      const int64_t abs_sum = normal.AbsSum();
   93|   556k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 1.89k, False: 554k]
  ------------------
   94|  1.89k|        const int64_t quotient = abs_sum / upper_bound;
   95|  1.89k|        normal = normal / quotient;
   96|  1.89k|      }
   97|   556k|    }
   98|   556k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   556k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   556k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   556k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   556k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    277|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    277|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 46, False: 231]
  ------------------
  105|     46|      this->normal_prediction_mode_ = mode;
  106|     46|      return true;
  107|    231|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 231, False: 0]
  ------------------
  108|    231|      this->normal_prediction_mode_ = mode;
  109|    231|      return true;
  110|    231|    }
  111|      0|    return false;
  112|    277|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   293k|                             DataTypeT* prediction) override {
   42|   293k|    DRACO_DCHECK(this->IsInitialized());
   43|   293k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   293k|    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|   293k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   293k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   293k|    VectorD<int64_t, 3> normal;
   53|   293k|    CornerIndex c_next, c_prev;
   54|  2.04M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.74M, False: 293k]
  ------------------
   55|       |      // Getting corners.
   56|  1.74M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 228, False: 1.74M]
  ------------------
   57|    228|        c_next = corner_table->Next(corner_id);
   58|    228|        c_prev = corner_table->Previous(corner_id);
   59|  1.74M|      } else {
   60|  1.74M|        c_next = corner_table->Next(cit.Corner());
   61|  1.74M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.74M|      }
   63|  1.74M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.74M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.74M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.74M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.74M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.74M|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|  1.74M|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|  1.74M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.74M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.74M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.74M|      cit.Next();
   81|  1.74M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   293k|    constexpr int64_t upper_bound = 1 << 29;
   85|   293k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 152, False: 292k]
  ------------------
   86|    152|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    152|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 39, False: 113]
  ------------------
   88|     39|        const int64_t quotient = abs_sum / upper_bound;
   89|     39|        normal = normal / quotient;
   90|     39|      }
   91|   292k|    } else {
   92|   292k|      const int64_t abs_sum = normal.AbsSum();
   93|   292k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 124k, False: 168k]
  ------------------
   94|   124k|        const int64_t quotient = abs_sum / upper_bound;
   95|   124k|        normal = normal / quotient;
   96|   124k|      }
   97|   292k|    }
   98|   293k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   293k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   293k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   293k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   293k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    220|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    220|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 26, False: 194]
  ------------------
  105|     26|      this->normal_prediction_mode_ = mode;
  106|     26|      return true;
  107|    194|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 194, False: 0]
  ------------------
  108|    194|      this->normal_prediction_mode_ = mode;
  109|    194|      return true;
  110|    194|    }
  111|      0|    return false;
  112|    220|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   856k|                             DataTypeT* prediction) override {
   42|   856k|    DRACO_DCHECK(this->IsInitialized());
   43|   856k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   856k|    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|   856k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   856k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   856k|    VectorD<int64_t, 3> normal;
   53|   856k|    CornerIndex c_next, c_prev;
   54|  1.72M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 873k, False: 856k]
  ------------------
   55|       |      // Getting corners.
   56|   873k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 150, False: 873k]
  ------------------
   57|    150|        c_next = corner_table->Next(corner_id);
   58|    150|        c_prev = corner_table->Previous(corner_id);
   59|   873k|      } else {
   60|   873k|        c_next = corner_table->Next(cit.Corner());
   61|   873k|        c_prev = corner_table->Previous(cit.Corner());
   62|   873k|      }
   63|   873k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   873k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   873k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   873k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   873k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   873k|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|   873k|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|   873k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   873k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   873k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   873k|      cit.Next();
   81|   873k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   856k|    constexpr int64_t upper_bound = 1 << 29;
   85|   856k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 100, False: 856k]
  ------------------
   86|    100|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    100|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 26, False: 74]
  ------------------
   88|     26|        const int64_t quotient = abs_sum / upper_bound;
   89|     26|        normal = normal / quotient;
   90|     26|      }
   91|   856k|    } else {
   92|   856k|      const int64_t abs_sum = normal.AbsSum();
   93|   856k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 1.54k, False: 854k]
  ------------------
   94|  1.54k|        const int64_t quotient = abs_sum / upper_bound;
   95|  1.54k|        normal = normal / quotient;
   96|  1.54k|      }
   97|   856k|    }
   98|   856k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   856k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   856k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   856k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   856k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    255|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    255|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 51, False: 204]
  ------------------
  105|     51|      this->normal_prediction_mode_ = mode;
  106|     51|      return true;
  107|    204|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 204, False: 0]
  ------------------
  108|    204|      this->normal_prediction_mode_ = mode;
  109|    204|      return true;
  110|    204|    }
  111|      0|    return false;
  112|    255|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   223k|                             DataTypeT* prediction) override {
   42|   223k|    DRACO_DCHECK(this->IsInitialized());
   43|   223k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   223k|    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|   223k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   223k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   223k|    VectorD<int64_t, 3> normal;
   53|   223k|    CornerIndex c_next, c_prev;
   54|  1.55M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.33M, False: 223k]
  ------------------
   55|       |      // Getting corners.
   56|  1.33M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 300, False: 1.33M]
  ------------------
   57|    300|        c_next = corner_table->Next(corner_id);
   58|    300|        c_prev = corner_table->Previous(corner_id);
   59|  1.33M|      } else {
   60|  1.33M|        c_next = corner_table->Next(cit.Corner());
   61|  1.33M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.33M|      }
   63|  1.33M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.33M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.33M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.33M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.33M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.33M|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|  1.33M|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|  1.33M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.33M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.33M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.33M|      cit.Next();
   81|  1.33M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   223k|    constexpr int64_t upper_bound = 1 << 29;
   85|   223k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 200, False: 223k]
  ------------------
   86|    200|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    200|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 52, False: 148]
  ------------------
   88|     52|        const int64_t quotient = abs_sum / upper_bound;
   89|     52|        normal = normal / quotient;
   90|     52|      }
   91|   223k|    } else {
   92|   223k|      const int64_t abs_sum = normal.AbsSum();
   93|   223k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 107k, False: 115k]
  ------------------
   94|   107k|        const int64_t quotient = abs_sum / upper_bound;
   95|   107k|        normal = normal / quotient;
   96|   107k|      }
   97|   223k|    }
   98|   223k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   223k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   223k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   223k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   223k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    469|      : Base(md) {
   35|    469|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    469|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    638|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    638|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 150, False: 488]
  ------------------
  105|    150|      this->normal_prediction_mode_ = mode;
  106|    150|      return true;
  107|    488|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 488, False: 0]
  ------------------
  108|    488|      this->normal_prediction_mode_ = mode;
  109|    488|      return true;
  110|    488|    }
  111|      0|    return false;
  112|    638|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|  1.07M|                             DataTypeT* prediction) override {
   42|  1.07M|    DRACO_DCHECK(this->IsInitialized());
   43|  1.07M|    typedef typename MeshDataT::CornerTable CornerTable;
   44|  1.07M|    const CornerTable* const corner_table = this->mesh_data_.corner_table();
   45|       |    // Going to compute the predicted normal from the surrounding triangles
   46|       |    // according to the connectivity of the given corner table.
   47|  1.07M|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|  1.07M|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|  1.07M|    VectorD<int64_t, 3> normal;
   53|  1.07M|    CornerIndex c_next, c_prev;
   54|  2.80M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.73M, False: 1.07M]
  ------------------
   55|       |      // Getting corners.
   56|  1.73M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 430k, False: 1.30M]
  ------------------
   57|   430k|        c_next = corner_table->Next(corner_id);
   58|   430k|        c_prev = corner_table->Previous(corner_id);
   59|  1.30M|      } else {
   60|  1.30M|        c_next = corner_table->Next(cit.Corner());
   61|  1.30M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.30M|      }
   63|  1.73M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.73M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.73M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.73M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.73M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.73M|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|  1.73M|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|  1.73M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.73M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.73M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.73M|      cit.Next();
   81|  1.73M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|  1.07M|    constexpr int64_t upper_bound = 1 << 29;
   85|  1.07M|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 72.8k, False: 1.00M]
  ------------------
   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: 393, False: 72.4k]
  ------------------
   88|    393|        const int64_t quotient = abs_sum / upper_bound;
   89|    393|        normal = normal / quotient;
   90|    393|      }
   91|  1.00M|    } else {
   92|  1.00M|      const int64_t abs_sum = normal.AbsSum();
   93|  1.00M|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 2.46k, False: 999k]
  ------------------
   94|  2.46k|        const int64_t quotient = abs_sum / upper_bound;
   95|  2.46k|        normal = normal / quotient;
   96|  2.46k|      }
   97|  1.00M|    }
   98|  1.07M|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|  1.07M|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|  1.07M|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|  1.07M|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|  1.07M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    549|      : Base(md) {
   35|    549|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    549|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    753|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    753|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 192, False: 561]
  ------------------
  105|    192|      this->normal_prediction_mode_ = mode;
  106|    192|      return true;
  107|    561|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 561, False: 0]
  ------------------
  108|    561|      this->normal_prediction_mode_ = mode;
  109|    561|      return true;
  110|    561|    }
  111|      0|    return false;
  112|    753|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   243k|                             DataTypeT* prediction) override {
   42|   243k|    DRACO_DCHECK(this->IsInitialized());
   43|   243k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   243k|    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|   243k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   243k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   243k|    VectorD<int64_t, 3> normal;
   53|   243k|    CornerIndex c_next, c_prev;
   54|  1.66M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.42M, False: 243k]
  ------------------
   55|       |      // Getting corners.
   56|  1.42M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 450k, False: 973k]
  ------------------
   57|   450k|        c_next = corner_table->Next(corner_id);
   58|   450k|        c_prev = corner_table->Previous(corner_id);
   59|   973k|      } else {
   60|   973k|        c_next = corner_table->Next(cit.Corner());
   61|   973k|        c_prev = corner_table->Previous(cit.Corner());
   62|   973k|      }
   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|   243k|    constexpr int64_t upper_bound = 1 << 29;
   85|   243k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 76.3k, False: 167k]
  ------------------
   86|  76.3k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  76.3k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 403, False: 75.9k]
  ------------------
   88|    403|        const int64_t quotient = abs_sum / upper_bound;
   89|    403|        normal = normal / quotient;
   90|    403|      }
   91|   167k|    } else {
   92|   167k|      const int64_t abs_sum = normal.AbsSum();
   93|   167k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 4.16k, False: 163k]
  ------------------
   94|  4.16k|        const int64_t quotient = abs_sum / upper_bound;
   95|  4.16k|        normal = normal / quotient;
   96|  4.16k|      }
   97|   167k|    }
   98|   243k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   243k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   243k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   243k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   243k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    154|      : Base(md) {
   35|    154|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    154|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    230|      : Base(md) {
   35|    230|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    230|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    193|      : Base(md) {
   35|    193|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    193|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    203|      : Base(md) {
   35|    203|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    203|  };

_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  1.72M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  1.72M|    DRACO_DCHECK(this->IsInitialized());
   73|  1.72M|    const auto corner_table = mesh_data_.corner_table();
   74|  1.72M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  1.72M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  1.72M|    return GetPositionForDataId(data_id);
   77|  1.72M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  1.72M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  1.72M|    DRACO_DCHECK(this->IsInitialized());
   65|  1.72M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  1.72M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  1.72M|    VectorD<int64_t, 3> pos;
   68|  1.72M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  1.72M|    return pos;
   70|  1.72M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    152|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    152|    pos_attribute_ = &position_attribute;
   43|    152|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    134|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    134|    entry_to_point_id_map_ = map;
   46|    134|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.78M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.78M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.78M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.78M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.78M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.78M|    return GetPositionForDataId(data_id);
   77|  3.78M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  3.78M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.78M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.78M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.78M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.78M|    VectorD<int64_t, 3> pos;
   68|  3.78M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.78M|    return pos;
   70|  3.78M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    227|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    227|    pos_attribute_ = &position_attribute;
   43|    227|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    199|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    199|    entry_to_point_id_map_ = map;
   46|    199|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.60M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.60M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.60M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.60M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.60M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.60M|    return GetPositionForDataId(data_id);
   77|  2.60M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  2.60M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.60M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.60M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.60M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.60M|    VectorD<int64_t, 3> pos;
   68|  2.60M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.60M|    return pos;
   70|  2.60M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    191|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    191|    pos_attribute_ = &position_attribute;
   43|    191|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    162|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    162|    entry_to_point_id_map_ = map;
   46|    162|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.88M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.88M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.88M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.88M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.88M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.88M|    return GetPositionForDataId(data_id);
   77|  2.88M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  2.88M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.88M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.88M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.88M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.88M|    VectorD<int64_t, 3> pos;
   68|  2.88M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.88M|    return pos;
   70|  2.88M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    202|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    202|    pos_attribute_ = &position_attribute;
   43|    202|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    188|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    188|    entry_to_point_id_map_ = map;
   46|    188|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    469|      : pos_attribute_(nullptr),
   36|    469|        entry_to_point_id_map_(nullptr),
   37|    469|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    469|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  4.54M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  4.54M|    DRACO_DCHECK(this->IsInitialized());
   73|  4.54M|    const auto corner_table = mesh_data_.corner_table();
   74|  4.54M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  4.54M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  4.54M|    return GetPositionForDataId(data_id);
   77|  4.54M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  4.54M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  4.54M|    DRACO_DCHECK(this->IsInitialized());
   65|  4.54M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  4.54M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  4.54M|    VectorD<int64_t, 3> pos;
   68|  4.54M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  4.54M|    return pos;
   70|  4.54M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    467|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    467|    pos_attribute_ = &position_attribute;
   43|    467|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    384|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    384|    entry_to_point_id_map_ = map;
   46|    384|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    549|      : pos_attribute_(nullptr),
   36|    549|        entry_to_point_id_map_(nullptr),
   37|    549|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    549|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_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_37PredictionSchemeWrapDecodingTransformIiiEENS_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_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    545|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    545|    pos_attribute_ = &position_attribute;
   43|    545|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    479|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    479|    entry_to_point_id_map_ = map;
   46|    479|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    154|      : pos_attribute_(nullptr),
   36|    154|        entry_to_point_id_map_(nullptr),
   37|    154|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    154|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    230|      : pos_attribute_(nullptr),
   36|    230|        entry_to_point_id_map_(nullptr),
   37|    230|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    230|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    193|      : pos_attribute_(nullptr),
   36|    193|        entry_to_point_id_map_(nullptr),
   37|    193|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    193|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    203|      : pos_attribute_(nullptr),
   36|    203|        entry_to_point_id_map_(nullptr),
   37|    203|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    203|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}

_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    486|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    486|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    472|                          const PointIndex* /* entry_to_point_id_map */) {
   64|    472|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    472|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    472|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    472|      new DataTypeT[num_components]());
   70|       |
   71|    472|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    472|  const CornerTable* const table = this->mesh_data().corner_table();
   74|    472|  const std::vector<int32_t>* const vertex_to_data_map =
   75|    472|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    472|  const int corner_map_size =
   78|    472|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|    472|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (79:7): [True: 0, False: 472]
  ------------------
   80|      0|    return false;
   81|      0|  }
   82|  2.83M|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (82:19): [True: 2.83M, False: 472]
  ------------------
   83|  2.83M|    const CornerIndex start_corner_id =
   84|  2.83M|        this->mesh_data().data_to_corner_map()->at(p);
   85|       |
   86|  2.83M|    CornerIndex corner_id(start_corner_id);
   87|  2.83M|    int num_parallelograms = 0;
   88|   222M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (88:21): [True: 219M, False: 2.83M]
  ------------------
   89|   219M|      pred_vals[i] = static_cast<DataTypeT>(0);
   90|   219M|    }
   91|  6.23M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (91:12): [True: 3.40M, False: 2.83M]
  ------------------
   92|  3.40M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (92:11): [True: 238k, False: 3.16M]
  ------------------
   93|  3.40M|              p, corner_id, table, *vertex_to_data_map, out_data,
   94|  3.40M|              num_components, parallelogram_pred_vals.get())) {
   95|  21.3M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (95:25): [True: 21.0M, False: 238k]
  ------------------
   96|  21.0M|          pred_vals[c] =
   97|  21.0M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   98|  21.0M|        }
   99|   238k|        ++num_parallelograms;
  100|   238k|      }
  101|       |
  102|       |      // Proceed to the next corner attached to the vertex.
  103|  3.40M|      corner_id = table->SwingRight(corner_id);
  104|  3.40M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (104:11): [True: 108k, False: 3.29M]
  ------------------
  105|   108k|        corner_id = kInvalidCornerIndex;
  106|   108k|      }
  107|  3.40M|    }
  108|       |
  109|  2.83M|    const int dst_offset = p * num_components;
  110|  2.83M|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (110:9): [True: 2.70M, False: 132k]
  ------------------
  111|       |      // No parallelogram was valid.
  112|       |      // We use the last decoded point as a reference.
  113|  2.70M|      const int src_offset = (p - 1) * num_components;
  114|  2.70M|      this->transform().ComputeOriginalValue(
  115|  2.70M|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  116|  2.70M|    } else {
  117|       |      // Compute the correction from the predicted value.
  118|  11.4M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (118:23): [True: 11.3M, False: 132k]
  ------------------
  119|  11.3M|        pred_vals[c] /= num_parallelograms;
  120|  11.3M|      }
  121|   132k|      this->transform().ComputeOriginalValue(
  122|   132k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  123|   132k|    }
  124|  2.83M|  }
  125|    472|  return true;
  126|    472|}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    735|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    735|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    701|                          const PointIndex* /* entry_to_point_id_map */) {
   64|    701|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    701|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    701|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    701|      new DataTypeT[num_components]());
   70|       |
   71|    701|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    701|  const CornerTable* const table = this->mesh_data().corner_table();
   74|    701|  const std::vector<int32_t>* const vertex_to_data_map =
   75|    701|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    701|  const int corner_map_size =
   78|    701|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|    701|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (79:7): [True: 0, False: 701]
  ------------------
   80|      0|    return false;
   81|      0|  }
   82|   895k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (82:19): [True: 895k, False: 701]
  ------------------
   83|   895k|    const CornerIndex start_corner_id =
   84|   895k|        this->mesh_data().data_to_corner_map()->at(p);
   85|       |
   86|   895k|    CornerIndex corner_id(start_corner_id);
   87|   895k|    int num_parallelograms = 0;
   88|  27.3M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (88:21): [True: 26.4M, False: 895k]
  ------------------
   89|  26.4M|      pred_vals[i] = static_cast<DataTypeT>(0);
   90|  26.4M|    }
   91|  6.17M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (91:12): [True: 5.28M, False: 895k]
  ------------------
   92|  5.28M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (92:11): [True: 1.72M, False: 3.55M]
  ------------------
   93|  5.28M|              p, corner_id, table, *vertex_to_data_map, out_data,
   94|  5.28M|              num_components, parallelogram_pred_vals.get())) {
   95|  52.7M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (95:25): [True: 51.0M, False: 1.72M]
  ------------------
   96|  51.0M|          pred_vals[c] =
   97|  51.0M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   98|  51.0M|        }
   99|  1.72M|        ++num_parallelograms;
  100|  1.72M|      }
  101|       |
  102|       |      // Proceed to the next corner attached to the vertex.
  103|  5.28M|      corner_id = table->SwingRight(corner_id);
  104|  5.28M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (104:11): [True: 874k, False: 4.40M]
  ------------------
  105|   874k|        corner_id = kInvalidCornerIndex;
  106|   874k|      }
  107|  5.28M|    }
  108|       |
  109|   895k|    const int dst_offset = p * num_components;
  110|   895k|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (110:9): [True: 3.61k, False: 891k]
  ------------------
  111|       |      // No parallelogram was valid.
  112|       |      // We use the last decoded point as a reference.
  113|  3.61k|      const int src_offset = (p - 1) * num_components;
  114|  3.61k|      this->transform().ComputeOriginalValue(
  115|  3.61k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  116|   891k|    } else {
  117|       |      // Compute the correction from the predicted value.
  118|  27.2M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (118:23): [True: 26.3M, False: 891k]
  ------------------
  119|  26.3M|        pred_vals[c] /= num_parallelograms;
  120|  26.3M|      }
  121|   891k|      this->transform().ComputeOriginalValue(
  122|   891k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  123|   891k|    }
  124|   895k|  }
  125|    701|  return true;
  126|    701|}

_ZN5draco40MeshPredictionSchemeParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   40|    725|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   41|    725|            attribute, transform, mesh_data) {}
_ZN5draco40MeshPredictionSchemeParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   60|    692|                          const PointIndex* /* entry_to_point_id_map */) {
   61|    692|  this->transform().Init(num_components);
   62|       |
   63|    692|  const CornerTable* const table = this->mesh_data().corner_table();
   64|    692|  const std::vector<int32_t>* const vertex_to_data_map =
   65|    692|      this->mesh_data().vertex_to_data_map();
   66|       |
   67|       |  // For storage of prediction values (already initialized to zero).
   68|    692|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   69|       |
   70|       |  // Restore the first value.
   71|    692|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    692|  const int corner_map_size =
   74|    692|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   75|    692|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (75:7): [True: 0, False: 692]
  ------------------
   76|      0|    return false;
   77|      0|  }
   78|  1.51M|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (78:19): [True: 1.51M, False: 692]
  ------------------
   79|  1.51M|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
   80|  1.51M|    const int dst_offset = p * num_components;
   81|  1.51M|    if (!ComputeParallelogramPrediction(p, corner_id, table,
  ------------------
  |  Branch (81:9): [True: 1.27M, False: 241k]
  ------------------
   82|  1.51M|                                        *vertex_to_data_map, out_data,
   83|  1.51M|                                        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|  1.27M|      const int src_offset = (p - 1) * num_components;
   88|  1.27M|      this->transform().ComputeOriginalValue(
   89|  1.27M|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
   90|  1.27M|    } else {
   91|       |      // Apply the parallelogram prediction.
   92|   241k|      this->transform().ComputeOriginalValue(
   93|   241k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
   94|   241k|    }
   95|  1.51M|  }
   96|    692|  return true;
   97|    692|}
_ZN5draco40MeshPredictionSchemeParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   40|    828|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   41|    828|            attribute, transform, mesh_data) {}
_ZN5draco40MeshPredictionSchemeParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   60|    766|                          const PointIndex* /* entry_to_point_id_map */) {
   61|    766|  this->transform().Init(num_components);
   62|       |
   63|    766|  const CornerTable* const table = this->mesh_data().corner_table();
   64|    766|  const std::vector<int32_t>* const vertex_to_data_map =
   65|    766|      this->mesh_data().vertex_to_data_map();
   66|       |
   67|       |  // For storage of prediction values (already initialized to zero).
   68|    766|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   69|       |
   70|       |  // Restore the first value.
   71|    766|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    766|  const int corner_map_size =
   74|    766|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   75|    766|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (75:7): [True: 0, False: 766]
  ------------------
   76|      0|    return false;
   77|      0|  }
   78|   419k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (78:19): [True: 419k, False: 766]
  ------------------
   79|   419k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
   80|   419k|    const int dst_offset = p * num_components;
   81|   419k|    if (!ComputeParallelogramPrediction(p, corner_id, table,
  ------------------
  |  Branch (81:9): [True: 4.25k, False: 414k]
  ------------------
   82|   419k|                                        *vertex_to_data_map, out_data,
   83|   419k|                                        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|  4.25k|      const int src_offset = (p - 1) * num_components;
   88|  4.25k|      this->transform().ComputeOriginalValue(
   89|  4.25k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
   90|   414k|    } else {
   91|       |      // Apply the parallelogram prediction.
   92|   414k|      this->transform().ComputeOriginalValue(
   93|   414k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
   94|   414k|    }
   95|   419k|  }
   96|    766|  return true;
   97|    766|}

_ZN5draco30ComputeParallelogramPredictionINS_24MeshAttributeCornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  6.02M|    int num_components, DataTypeT* out_prediction) {
   49|  6.02M|  const CornerIndex oci = table->Opposite(ci);
   50|  6.02M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 4.91M, False: 1.11M]
  ------------------
   51|  4.91M|    return false;
   52|  4.91M|  }
   53|  1.11M|  int vert_opp, vert_next, vert_prev;
   54|  1.11M|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  1.11M|                                        &vert_opp, &vert_next, &vert_prev);
   56|  1.11M|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 674k, False: 438k]
  |  Branch (56:35): [True: 555k, False: 118k]
  ------------------
   57|   555k|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 539k, False: 16.0k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|   539k|    const int v_opp_off = vert_opp * num_components;
   60|   539k|    const int v_next_off = vert_next * num_components;
   61|   539k|    const int v_prev_off = vert_prev * num_components;
   62|  34.8M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 34.3M, False: 539k]
  ------------------
   63|  34.3M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  34.3M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  34.3M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  34.3M|      const int64_t result =
   67|  34.3M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  34.3M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  34.3M|    }
   71|   539k|    return true;
   72|   539k|  }
   73|   572k|  return false;  // Not all data is available for prediction
   74|  1.11M|}
_ZN5draco23GetParallelogramEntriesINS_24MeshAttributeCornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  1.11M|    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|  1.11M|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  1.11M|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  1.11M|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  1.11M|}
_ZN5draco30ComputeParallelogramPredictionINS_11CornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  6.85M|    int num_components, DataTypeT* out_prediction) {
   49|  6.85M|  const CornerIndex oci = table->Opposite(ci);
   50|  6.85M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 55.7k, False: 6.80M]
  ------------------
   51|  55.7k|    return false;
   52|  55.7k|  }
   53|  6.80M|  int vert_opp, vert_next, vert_prev;
   54|  6.80M|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  6.80M|                                        &vert_opp, &vert_next, &vert_prev);
   56|  6.80M|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 3.56M, False: 3.23M]
  |  Branch (56:35): [True: 2.84M, False: 720k]
  ------------------
   57|  2.84M|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 2.49M, False: 350k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|  2.49M|    const int v_opp_off = vert_opp * num_components;
   60|  2.49M|    const int v_next_off = vert_next * num_components;
   61|  2.49M|    const int v_prev_off = vert_prev * num_components;
   62|   108M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 106M, False: 2.49M]
  ------------------
   63|   106M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|   106M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|   106M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|   106M|      const int64_t result =
   67|   106M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|   106M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|   106M|    }
   71|  2.49M|    return true;
   72|  2.49M|  }
   73|  4.30M|  return false;  // Not all data is available for prediction
   74|  6.80M|}
_ZN5draco23GetParallelogramEntriesINS_11CornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  6.80M|    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|  6.80M|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  6.80M|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  6.80M|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  6.80M|}

_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_i:
   44|    281|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   45|    281|            attribute, transform, mesh_data),
   46|    281|        pos_attribute_(nullptr),
   47|    281|        entry_to_point_id_map_(nullptr),
   48|    281|        num_components_(0),
   49|    281|        version_(version) {}
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   71|    558|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   73|    281|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   74|    281|    DRACO_DCHECK_EQ(i, 0);
   75|    281|    (void)i;
   76|    281|    return GeometryAttribute::POSITION;
   77|    281|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   79|    279|  bool SetParentAttribute(const PointAttribute* att) override {
   80|    279|    if (att == nullptr) {
  ------------------
  |  Branch (80:9): [True: 0, False: 279]
  ------------------
   81|      0|      return false;
   82|      0|    }
   83|    279|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (83:9): [True: 0, False: 279]
  ------------------
   84|      0|      return false;  // Invalid attribute type.
   85|      0|    }
   86|    279|    if (att->num_components() != 3) {
  ------------------
  |  Branch (86:9): [True: 2, False: 277]
  ------------------
   87|      2|      return false;  // Currently works only for 3 component positions.
   88|      2|    }
   89|    277|    pos_attribute_ = att;
   90|    277|    return true;
   91|    279|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  156|    269|    DecodePredictionData(DecoderBuffer* buffer) {
  157|       |  // Decode the delta coded orientations.
  158|    269|  uint32_t num_orientations = 0;
  159|    269|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    269|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (159:7): [True: 45, False: 224]
  ------------------
  160|     45|    if (!buffer->Decode(&num_orientations)) {
  ------------------
  |  Branch (160:9): [True: 1, False: 44]
  ------------------
  161|      1|      return false;
  162|      1|    }
  163|    224|  } else {
  164|    224|    if (!DecodeVarint(&num_orientations, buffer)) {
  ------------------
  |  Branch (164:9): [True: 1, False: 223]
  ------------------
  165|      1|      return false;
  166|      1|    }
  167|    224|  }
  168|    267|  if (num_orientations == 0) {
  ------------------
  |  Branch (168:7): [True: 3, False: 264]
  ------------------
  169|      3|    return false;
  170|      3|  }
  171|    264|  if (num_orientations > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (171:7): [True: 13, False: 251]
  ------------------
  172|       |    // We can't have more orientations than the maximum number of decoded
  173|       |    // values.
  174|     13|    return false;
  175|     13|  }
  176|    251|  orientations_.resize(num_orientations);
  177|    251|  bool last_orientation = true;
  178|    251|  RAnsBitDecoder decoder;
  179|    251|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (179:7): [True: 6, False: 245]
  ------------------
  180|      6|    return false;
  181|      6|  }
  182|   190k|  for (uint32_t i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (182:24): [True: 190k, False: 245]
  ------------------
  183|   190k|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (183:9): [True: 36.2k, False: 154k]
  ------------------
  184|  36.2k|      last_orientation = !last_orientation;
  185|  36.2k|    }
  186|   190k|    orientations_[i] = last_orientation;
  187|   190k|  }
  188|    245|  decoder.EndDecoding();
  189|    245|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  190|    245|                                     MeshDataT>::DecodePredictionData(buffer);
  191|    251|}
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  125|    190|                          const PointIndex* entry_to_point_id_map) {
  126|    190|  if (num_components != 2) {
  ------------------
  |  Branch (126:7): [True: 11, False: 179]
  ------------------
  127|       |    // Corrupt/malformed input. Two output components are req'd.
  128|     11|    return false;
  129|     11|  }
  130|    179|  num_components_ = num_components;
  131|    179|  entry_to_point_id_map_ = entry_to_point_id_map;
  132|    179|  predicted_value_ =
  133|    179|      std::unique_ptr<DataTypeT[]>(new DataTypeT[num_components]);
  134|    179|  this->transform().Init(num_components);
  135|       |
  136|    179|  const int corner_map_size =
  137|    179|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  138|    179|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (138:7): [True: 0, False: 179]
  ------------------
  139|      0|    return false;
  140|      0|  }
  141|   602k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (141:19): [True: 602k, False: 155]
  ------------------
  142|   602k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  143|   602k|    if (!ComputePredictedValue(corner_id, out_data, p)) {
  ------------------
  |  Branch (143:9): [True: 24, False: 602k]
  ------------------
  144|     24|      return false;
  145|     24|    }
  146|       |
  147|   602k|    const int dst_offset = p * num_components;
  148|   602k|    this->transform().ComputeOriginalValue(
  149|   602k|        predicted_value_.get(), in_corr + dst_offset, out_data + dst_offset);
  150|   602k|  }
  151|    155|  return true;
  152|    179|}
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
  196|   602k|                          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|   602k|  const CornerIndex next_corner_id =
  201|   602k|      this->mesh_data().corner_table()->Next(corner_id);
  202|   602k|  const CornerIndex prev_corner_id =
  203|   602k|      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|   602k|  int next_data_id, prev_data_id;
  207|       |
  208|   602k|  int next_vert_id, prev_vert_id;
  209|   602k|  next_vert_id =
  210|   602k|      this->mesh_data().corner_table()->Vertex(next_corner_id).value();
  211|   602k|  prev_vert_id =
  212|   602k|      this->mesh_data().corner_table()->Vertex(prev_corner_id).value();
  213|       |
  214|   602k|  next_data_id = this->mesh_data().vertex_to_data_map()->at(next_vert_id);
  215|   602k|  prev_data_id = this->mesh_data().vertex_to_data_map()->at(prev_vert_id);
  216|       |
  217|   602k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (217:7): [True: 444k, False: 157k]
  |  Branch (217:33): [True: 286k, False: 157k]
  ------------------
  218|       |    // Both other corners have available UV coordinates for prediction.
  219|   286k|    const Vector2f n_uv = GetTexCoordForEntryId(next_data_id, data);
  220|   286k|    const Vector2f p_uv = GetTexCoordForEntryId(prev_data_id, data);
  221|   286k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (221:9): [True: 283k, False: 2.28k]
  ------------------
  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|   567k|      for (const int i : {0, 1}) {
  ------------------
  |  Branch (225:24): [True: 567k, False: 283k]
  ------------------
  226|   567k|        if (std::isnan(p_uv[i]) || static_cast<double>(p_uv[i]) > INT_MAX ||
  ------------------
  |  Branch (226:13): [True: 0, False: 567k]
  |  Branch (226:36): [True: 67.8k, False: 500k]
  ------------------
  227|   500k|            static_cast<double>(p_uv[i]) < INT_MIN) {
  ------------------
  |  Branch (227:13): [True: 0, False: 500k]
  ------------------
  228|  67.8k|          predicted_value_[i] = INT_MIN;
  229|   500k|        } else {
  230|   500k|          predicted_value_[i] = static_cast<int>(p_uv[i]);
  231|   500k|        }
  232|   567k|      }
  233|   283k|      return true;
  234|   283k|    }
  235|       |
  236|       |    // Get positions at all corners.
  237|  2.28k|    const Vector3f tip_pos = GetPositionForEntryId(data_id);
  238|  2.28k|    const Vector3f next_pos = GetPositionForEntryId(next_data_id);
  239|  2.28k|    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|  2.28k|    const Vector3f pn = prev_pos - next_pos;
  264|  2.28k|    const Vector3f cn = tip_pos - next_pos;
  265|  2.28k|    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|  2.28k|    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|  2.28k|    if (version_ < DRACO_BITSTREAM_VERSION(1, 2) || pn_norm2_squared > 0) {
  ------------------
  |  |  115|  4.56k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (276:9): [True: 0, False: 2.28k]
  |  Branch (276:53): [True: 450, False: 1.83k]
  ------------------
  277|    450|      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|    450|      t = sqrt((cn - pn * s).SquaredNorm() / pn_norm2_squared);
  282|  1.83k|    } else {
  283|  1.83k|      s = 0;
  284|  1.83k|      t = 0;
  285|  1.83k|    }
  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|  2.28k|    const Vector2f pn_uv = p_uv - n_uv;
  302|  2.28k|    const float pnus = pn_uv[0] * s + n_uv[0];
  303|  2.28k|    const float pnut = pn_uv[0] * t;
  304|  2.28k|    const float pnvs = pn_uv[1] * s + n_uv[1];
  305|  2.28k|    const float pnvt = pn_uv[1] * t;
  306|  2.28k|    Vector2f predicted_uv;
  307|  2.28k|    if (orientations_.empty()) {
  ------------------
  |  Branch (307:9): [True: 24, False: 2.25k]
  ------------------
  308|     24|      return false;
  309|     24|    }
  310|       |
  311|       |    // When decoding the data, we already know which orientation to use.
  312|  2.25k|    const bool orientation = orientations_.back();
  313|  2.25k|    orientations_.pop_back();
  314|  2.25k|    if (orientation) {
  ------------------
  |  Branch (314:9): [True: 1.66k, False: 587]
  ------------------
  315|  1.66k|      predicted_uv = Vector2f(pnus - pnvt, pnvs + pnut);
  316|  1.66k|    } else {
  317|    587|      predicted_uv = Vector2f(pnus + pnvt, pnvs - pnut);
  318|    587|    }
  319|  2.25k|    if (std::is_integral<DataTypeT>::value) {
  ------------------
  |  Branch (319:9): [True: 2.25k, 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|  2.25k|      const double u = floor(predicted_uv[0] + 0.5);
  324|  2.25k|      if (std::isnan(u) || u > INT_MAX || u < INT_MIN) {
  ------------------
  |  Branch (324:11): [True: 0, False: 2.25k]
  |  Branch (324:28): [True: 68, False: 2.18k]
  |  Branch (324:43): [True: 39, False: 2.14k]
  ------------------
  325|    107|        predicted_value_[0] = INT_MIN;
  326|  2.14k|      } else {
  327|  2.14k|        predicted_value_[0] = static_cast<int>(u);
  328|  2.14k|      }
  329|  2.25k|      const double v = floor(predicted_uv[1] + 0.5);
  330|  2.25k|      if (std::isnan(v) || v > INT_MAX || v < INT_MIN) {
  ------------------
  |  Branch (330:11): [True: 0, False: 2.25k]
  |  Branch (330:28): [True: 61, False: 2.19k]
  |  Branch (330:43): [True: 48, False: 2.14k]
  ------------------
  331|    109|        predicted_value_[1] = INT_MIN;
  332|  2.14k|      } else {
  333|  2.14k|        predicted_value_[1] = static_cast<int>(v);
  334|  2.14k|      }
  335|  2.25k|    } 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|  2.25k|    return true;
  341|  2.28k|  }
  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|   315k|  int data_offset = 0;
  346|   315k|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (346:7): [True: 157k, False: 157k]
  ------------------
  347|       |    // Use the value on the previous corner as the prediction.
  348|   157k|    data_offset = prev_data_id * num_components_;
  349|   157k|  }
  350|   315k|  if (next_data_id < data_id) {
  ------------------
  |  Branch (350:7): [True: 17, False: 315k]
  ------------------
  351|       |    // Use the value on the next corner as the prediction.
  352|     17|    data_offset = next_data_id * num_components_;
  353|   315k|  } else {
  354|       |    // None of the other corners have a valid value. Use the last encoded value
  355|       |    // as the prediction if possible.
  356|   315k|    if (data_id > 0) {
  ------------------
  |  Branch (356:9): [True: 315k, False: 179]
  ------------------
  357|   315k|      data_offset = (data_id - 1) * num_components_;
  358|   315k|    } else {
  359|       |      // We are encoding the first value. Predict 0.
  360|    537|      for (int i = 0; i < num_components_; ++i) {
  ------------------
  |  Branch (360:23): [True: 358, False: 179]
  ------------------
  361|    358|        predicted_value_[i] = 0;
  362|    358|      }
  363|    179|      return true;
  364|    179|    }
  365|   315k|  }
  366|   947k|  for (int i = 0; i < num_components_; ++i) {
  ------------------
  |  Branch (366:19): [True: 631k, False: 315k]
  ------------------
  367|   631k|    predicted_value_[i] = data[data_offset + i];
  368|   631k|  }
  369|   315k|  return true;
  370|   315k|}
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetTexCoordForEntryIdEiPKi:
  102|   572k|  Vector2f GetTexCoordForEntryId(int entry_id, const DataTypeT* data) const {
  103|   572k|    const int data_offset = entry_id * num_components_;
  104|   572k|    return Vector2f(static_cast<float>(data[data_offset]),
  105|   572k|                    static_cast<float>(data[data_offset + 1]));
  106|   572k|  }
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetPositionForEntryIdEi:
   94|  6.84k|  Vector3f GetPositionForEntryId(int entry_id) const {
   95|  6.84k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   96|  6.84k|    Vector3f pos;
   97|  6.84k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   98|  6.84k|                                 &pos[0]);
   99|  6.84k|    return pos;
  100|  6.84k|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_i:
   44|    308|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   45|    308|            attribute, transform, mesh_data),
   46|    308|        pos_attribute_(nullptr),
   47|    308|        entry_to_point_id_map_(nullptr),
   48|    308|        num_components_(0),
   49|    308|        version_(version) {}
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   71|    612|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   73|    308|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   74|    308|    DRACO_DCHECK_EQ(i, 0);
   75|    308|    (void)i;
   76|    308|    return GeometryAttribute::POSITION;
   77|    308|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   79|    305|  bool SetParentAttribute(const PointAttribute* att) override {
   80|    305|    if (att == nullptr) {
  ------------------
  |  Branch (80:9): [True: 0, False: 305]
  ------------------
   81|      0|      return false;
   82|      0|    }
   83|    305|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (83:9): [True: 0, False: 305]
  ------------------
   84|      0|      return false;  // Invalid attribute type.
   85|      0|    }
   86|    305|    if (att->num_components() != 3) {
  ------------------
  |  Branch (86:9): [True: 1, False: 304]
  ------------------
   87|      1|      return false;  // Currently works only for 3 component positions.
   88|      1|    }
   89|    304|    pos_attribute_ = att;
   90|    304|    return true;
   91|    305|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  156|    297|    DecodePredictionData(DecoderBuffer* buffer) {
  157|       |  // Decode the delta coded orientations.
  158|    297|  uint32_t num_orientations = 0;
  159|    297|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    297|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (159:7): [True: 22, False: 275]
  ------------------
  160|     22|    if (!buffer->Decode(&num_orientations)) {
  ------------------
  |  Branch (160:9): [True: 1, False: 21]
  ------------------
  161|      1|      return false;
  162|      1|    }
  163|    275|  } else {
  164|    275|    if (!DecodeVarint(&num_orientations, buffer)) {
  ------------------
  |  Branch (164:9): [True: 2, False: 273]
  ------------------
  165|      2|      return false;
  166|      2|    }
  167|    275|  }
  168|    294|  if (num_orientations == 0) {
  ------------------
  |  Branch (168:7): [True: 2, False: 292]
  ------------------
  169|      2|    return false;
  170|      2|  }
  171|    292|  if (num_orientations > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (171:7): [True: 41, False: 251]
  ------------------
  172|       |    // We can't have more orientations than the maximum number of decoded
  173|       |    // values.
  174|     41|    return false;
  175|     41|  }
  176|    251|  orientations_.resize(num_orientations);
  177|    251|  bool last_orientation = true;
  178|    251|  RAnsBitDecoder decoder;
  179|    251|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (179:7): [True: 5, False: 246]
  ------------------
  180|      5|    return false;
  181|      5|  }
  182|   557k|  for (uint32_t i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (182:24): [True: 557k, False: 246]
  ------------------
  183|   557k|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (183:9): [True: 468k, False: 88.0k]
  ------------------
  184|   468k|      last_orientation = !last_orientation;
  185|   468k|    }
  186|   557k|    orientations_[i] = last_orientation;
  187|   557k|  }
  188|    246|  decoder.EndDecoding();
  189|    246|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  190|    246|                                     MeshDataT>::DecodePredictionData(buffer);
  191|    251|}
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  125|    197|                          const PointIndex* entry_to_point_id_map) {
  126|    197|  if (num_components != 2) {
  ------------------
  |  Branch (126:7): [True: 8, False: 189]
  ------------------
  127|       |    // Corrupt/malformed input. Two output components are req'd.
  128|      8|    return false;
  129|      8|  }
  130|    189|  num_components_ = num_components;
  131|    189|  entry_to_point_id_map_ = entry_to_point_id_map;
  132|    189|  predicted_value_ =
  133|    189|      std::unique_ptr<DataTypeT[]>(new DataTypeT[num_components]);
  134|    189|  this->transform().Init(num_components);
  135|       |
  136|    189|  const int corner_map_size =
  137|    189|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  138|    189|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (138:7): [True: 0, False: 189]
  ------------------
  139|      0|    return false;
  140|      0|  }
  141|   220k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (141:19): [True: 220k, False: 149]
  ------------------
  142|   220k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  143|   220k|    if (!ComputePredictedValue(corner_id, out_data, p)) {
  ------------------
  |  Branch (143:9): [True: 40, False: 220k]
  ------------------
  144|     40|      return false;
  145|     40|    }
  146|       |
  147|   220k|    const int dst_offset = p * num_components;
  148|   220k|    this->transform().ComputeOriginalValue(
  149|   220k|        predicted_value_.get(), in_corr + dst_offset, out_data + dst_offset);
  150|   220k|  }
  151|    149|  return true;
  152|    189|}
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
  196|   220k|                          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|   220k|  const CornerIndex next_corner_id =
  201|   220k|      this->mesh_data().corner_table()->Next(corner_id);
  202|   220k|  const CornerIndex prev_corner_id =
  203|   220k|      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|   220k|  int next_data_id, prev_data_id;
  207|       |
  208|   220k|  int next_vert_id, prev_vert_id;
  209|   220k|  next_vert_id =
  210|   220k|      this->mesh_data().corner_table()->Vertex(next_corner_id).value();
  211|   220k|  prev_vert_id =
  212|   220k|      this->mesh_data().corner_table()->Vertex(prev_corner_id).value();
  213|       |
  214|   220k|  next_data_id = this->mesh_data().vertex_to_data_map()->at(next_vert_id);
  215|   220k|  prev_data_id = this->mesh_data().vertex_to_data_map()->at(prev_vert_id);
  216|       |
  217|   220k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (217:7): [True: 220k, False: 494]
  |  Branch (217:33): [True: 219k, False: 396]
  ------------------
  218|       |    // Both other corners have available UV coordinates for prediction.
  219|   219k|    const Vector2f n_uv = GetTexCoordForEntryId(next_data_id, data);
  220|   219k|    const Vector2f p_uv = GetTexCoordForEntryId(prev_data_id, data);
  221|   219k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (221:9): [True: 213k, False: 5.99k]
  ------------------
  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|   427k|      for (const int i : {0, 1}) {
  ------------------
  |  Branch (225:24): [True: 427k, False: 213k]
  ------------------
  226|   427k|        if (std::isnan(p_uv[i]) || static_cast<double>(p_uv[i]) > INT_MAX ||
  ------------------
  |  Branch (226:13): [True: 0, False: 427k]
  |  Branch (226:36): [True: 18.6k, False: 408k]
  ------------------
  227|   408k|            static_cast<double>(p_uv[i]) < INT_MIN) {
  ------------------
  |  Branch (227:13): [True: 0, False: 408k]
  ------------------
  228|  18.6k|          predicted_value_[i] = INT_MIN;
  229|   408k|        } else {
  230|   408k|          predicted_value_[i] = static_cast<int>(p_uv[i]);
  231|   408k|        }
  232|   427k|      }
  233|   213k|      return true;
  234|   213k|    }
  235|       |
  236|       |    // Get positions at all corners.
  237|  5.99k|    const Vector3f tip_pos = GetPositionForEntryId(data_id);
  238|  5.99k|    const Vector3f next_pos = GetPositionForEntryId(next_data_id);
  239|  5.99k|    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.99k|    const Vector3f pn = prev_pos - next_pos;
  264|  5.99k|    const Vector3f cn = tip_pos - next_pos;
  265|  5.99k|    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.99k|    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.99k|    if (version_ < DRACO_BITSTREAM_VERSION(1, 2) || pn_norm2_squared > 0) {
  ------------------
  |  |  115|  11.9k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (276:9): [True: 0, False: 5.99k]
  |  Branch (276:53): [True: 308, False: 5.68k]
  ------------------
  277|    308|      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|    308|      t = sqrt((cn - pn * s).SquaredNorm() / pn_norm2_squared);
  282|  5.68k|    } else {
  283|  5.68k|      s = 0;
  284|  5.68k|      t = 0;
  285|  5.68k|    }
  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.99k|    const Vector2f pn_uv = p_uv - n_uv;
  302|  5.99k|    const float pnus = pn_uv[0] * s + n_uv[0];
  303|  5.99k|    const float pnut = pn_uv[0] * t;
  304|  5.99k|    const float pnvs = pn_uv[1] * s + n_uv[1];
  305|  5.99k|    const float pnvt = pn_uv[1] * t;
  306|  5.99k|    Vector2f predicted_uv;
  307|  5.99k|    if (orientations_.empty()) {
  ------------------
  |  Branch (307:9): [True: 40, False: 5.95k]
  ------------------
  308|     40|      return false;
  309|     40|    }
  310|       |
  311|       |    // When decoding the data, we already know which orientation to use.
  312|  5.95k|    const bool orientation = orientations_.back();
  313|  5.95k|    orientations_.pop_back();
  314|  5.95k|    if (orientation) {
  ------------------
  |  Branch (314:9): [True: 5.24k, False: 710]
  ------------------
  315|  5.24k|      predicted_uv = Vector2f(pnus - pnvt, pnvs + pnut);
  316|  5.24k|    } else {
  317|    710|      predicted_uv = Vector2f(pnus + pnvt, pnvs - pnut);
  318|    710|    }
  319|  5.95k|    if (std::is_integral<DataTypeT>::value) {
  ------------------
  |  Branch (319:9): [True: 5.95k, 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.95k|      const double u = floor(predicted_uv[0] + 0.5);
  324|  5.95k|      if (std::isnan(u) || u > INT_MAX || u < INT_MIN) {
  ------------------
  |  Branch (324:11): [True: 0, False: 5.95k]
  |  Branch (324:28): [True: 66, False: 5.89k]
  |  Branch (324:43): [True: 34, False: 5.85k]
  ------------------
  325|    100|        predicted_value_[0] = INT_MIN;
  326|  5.85k|      } else {
  327|  5.85k|        predicted_value_[0] = static_cast<int>(u);
  328|  5.85k|      }
  329|  5.95k|      const double v = floor(predicted_uv[1] + 0.5);
  330|  5.95k|      if (std::isnan(v) || v > INT_MAX || v < INT_MIN) {
  ------------------
  |  Branch (330:11): [True: 0, False: 5.95k]
  |  Branch (330:28): [True: 82, False: 5.87k]
  |  Branch (330:43): [True: 28, False: 5.84k]
  ------------------
  331|    110|        predicted_value_[1] = INT_MIN;
  332|  5.84k|      } else {
  333|  5.84k|        predicted_value_[1] = static_cast<int>(v);
  334|  5.84k|      }
  335|  5.95k|    } 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.95k|    return true;
  341|  5.99k|  }
  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|    890|  int data_offset = 0;
  346|    890|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (346:7): [True: 396, False: 494]
  ------------------
  347|       |    // Use the value on the previous corner as the prediction.
  348|    396|    data_offset = prev_data_id * num_components_;
  349|    396|  }
  350|    890|  if (next_data_id < data_id) {
  ------------------
  |  Branch (350:7): [True: 140, False: 750]
  ------------------
  351|       |    // Use the value on the next corner as the prediction.
  352|    140|    data_offset = next_data_id * num_components_;
  353|    750|  } else {
  354|       |    // None of the other corners have a valid value. Use the last encoded value
  355|       |    // as the prediction if possible.
  356|    750|    if (data_id > 0) {
  ------------------
  |  Branch (356:9): [True: 561, False: 189]
  ------------------
  357|    561|      data_offset = (data_id - 1) * num_components_;
  358|    561|    } else {
  359|       |      // We are encoding the first value. Predict 0.
  360|    567|      for (int i = 0; i < num_components_; ++i) {
  ------------------
  |  Branch (360:23): [True: 378, False: 189]
  ------------------
  361|    378|        predicted_value_[i] = 0;
  362|    378|      }
  363|    189|      return true;
  364|    189|    }
  365|    750|  }
  366|  2.10k|  for (int i = 0; i < num_components_; ++i) {
  ------------------
  |  Branch (366:19): [True: 1.40k, False: 701]
  ------------------
  367|  1.40k|    predicted_value_[i] = data[data_offset + i];
  368|  1.40k|  }
  369|    701|  return true;
  370|    890|}
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetTexCoordForEntryIdEiPKi:
  102|   439k|  Vector2f GetTexCoordForEntryId(int entry_id, const DataTypeT* data) const {
  103|   439k|    const int data_offset = entry_id * num_components_;
  104|   439k|    return Vector2f(static_cast<float>(data[data_offset]),
  105|   439k|                    static_cast<float>(data[data_offset + 1]));
  106|   439k|  }
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetPositionForEntryIdEi:
   94|  17.9k|  Vector3f GetPositionForEntryId(int entry_id) const {
   95|  17.9k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   96|  17.9k|    Vector3f pos;
   97|  17.9k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   98|  17.9k|                                 &pos[0]);
   99|  17.9k|    return pos;
  100|  17.9k|  }

_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   38|    247|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   39|    247|            attribute, transform, mesh_data),
   40|    247|        predictor_(mesh_data) {}
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   62|    491|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   64|    247|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   65|    247|    DRACO_DCHECK_EQ(i, 0);
   66|    247|    (void)i;
   67|    247|    return GeometryAttribute::POSITION;
   68|    247|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   70|    246|  bool SetParentAttribute(const PointAttribute* att) override {
   71|    246|    if (!att || att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (71:9): [True: 0, False: 246]
  |  Branch (71:17): [True: 0, False: 246]
  ------------------
   72|      0|      return false;  // Invalid attribute type.
   73|      0|    }
   74|    246|    if (att->num_components() != 3) {
  ------------------
  |  Branch (74:9): [True: 2, False: 244]
  ------------------
   75|      2|      return false;  // Currently works only for 3 component positions.
   76|      2|    }
   77|    244|    predictor_.SetPositionAttribute(*att);
   78|    244|    return true;
   79|    246|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  128|    241|                                                                buffer) {
  129|       |  // Decode the delta coded orientations.
  130|    241|  int32_t num_orientations = 0;
  131|    241|  if (!buffer->Decode(&num_orientations) || num_orientations < 0) {
  ------------------
  |  Branch (131:7): [True: 4, False: 237]
  |  Branch (131:45): [True: 5, False: 232]
  ------------------
  132|      9|    return false;
  133|      9|  }
  134|       |
  135|       |  // Check that the decoded number of orientations is not unreasonably high.
  136|    232|  const int32_t max_num_orientations = max_num_predicted_values_;
  137|    232|  if (max_num_orientations != -1 && num_orientations > max_num_orientations) {
  ------------------
  |  Branch (137:7): [True: 232, False: 0]
  |  Branch (137:37): [True: 49, False: 183]
  ------------------
  138|     49|    return false;
  139|     49|  }
  140|       |
  141|    183|  predictor_.ResizeOrientations(num_orientations);
  142|    183|  bool last_orientation = true;
  143|    183|  RAnsBitDecoder decoder;
  144|    183|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (144:7): [True: 6, False: 177]
  ------------------
  145|      6|    return false;
  146|      6|  }
  147|   813k|  for (int i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (147:19): [True: 812k, False: 177]
  ------------------
  148|   812k|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (148:9): [True: 32.0k, False: 780k]
  ------------------
  149|  32.0k|      last_orientation = !last_orientation;
  150|  32.0k|    }
  151|   812k|    predictor_.set_orientation(i, last_orientation);
  152|   812k|  }
  153|    177|  decoder.EndDecoding();
  154|    177|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  155|    177|                                     MeshDataT>::DecodePredictionData(buffer);
  156|    183|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE24SetMaxNumPredictedValuesEi:
   81|    241|  virtual void SetMaxNumPredictedValues(int32_t num) {
   82|    241|    max_num_predicted_values_ = num;
   83|    241|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   97|    152|                                      const PointIndex* entry_to_point_id_map) {
   98|    152|  if (num_components != MeshPredictionSchemeTexCoordsPortablePredictor<
  ------------------
  |  Branch (98:7): [True: 12, False: 140]
  ------------------
   99|    152|                            DataTypeT, MeshDataT>::kNumComponents) {
  100|     12|    return false;
  101|     12|  }
  102|    140|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  103|    140|  this->transform().Init(num_components);
  104|       |
  105|    140|  const int corner_map_size =
  106|    140|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  107|    140|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (107:7): [True: 0, False: 140]
  ------------------
  108|      0|    return false;
  109|      0|  }
  110|  1.22M|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 1.22M, False: 105]
  ------------------
  111|  1.22M|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  112|  1.22M|    if (!predictor_.template ComputePredictedValue<false>(corner_id, out_data,
  ------------------
  |  Branch (112:9): [True: 35, False: 1.22M]
  ------------------
  113|  1.22M|                                                          p)) {
  114|     35|      return false;
  115|     35|    }
  116|       |
  117|  1.22M|    const int dst_offset = p * num_components;
  118|  1.22M|    this->transform().ComputeOriginalValue(predictor_.predicted_value(),
  119|  1.22M|                                           in_corr + dst_offset,
  120|  1.22M|                                           out_data + dst_offset);
  121|  1.22M|  }
  122|    105|  return true;
  123|    140|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   38|    292|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   39|    292|            attribute, transform, mesh_data),
   40|    292|        predictor_(mesh_data) {}
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   62|    580|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   64|    292|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   65|    292|    DRACO_DCHECK_EQ(i, 0);
   66|    292|    (void)i;
   67|    292|    return GeometryAttribute::POSITION;
   68|    292|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   70|    289|  bool SetParentAttribute(const PointAttribute* att) override {
   71|    289|    if (!att || att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (71:9): [True: 0, False: 289]
  |  Branch (71:17): [True: 0, False: 289]
  ------------------
   72|      0|      return false;  // Invalid attribute type.
   73|      0|    }
   74|    289|    if (att->num_components() != 3) {
  ------------------
  |  Branch (74:9): [True: 1, False: 288]
  ------------------
   75|      1|      return false;  // Currently works only for 3 component positions.
   76|      1|    }
   77|    288|    predictor_.SetPositionAttribute(*att);
   78|    288|    return true;
   79|    289|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  128|    284|                                                                buffer) {
  129|       |  // Decode the delta coded orientations.
  130|    284|  int32_t num_orientations = 0;
  131|    284|  if (!buffer->Decode(&num_orientations) || num_orientations < 0) {
  ------------------
  |  Branch (131:7): [True: 2, False: 282]
  |  Branch (131:45): [True: 14, False: 268]
  ------------------
  132|     16|    return false;
  133|     16|  }
  134|       |
  135|       |  // Check that the decoded number of orientations is not unreasonably high.
  136|    268|  const int32_t max_num_orientations = max_num_predicted_values_;
  137|    268|  if (max_num_orientations != -1 && num_orientations > max_num_orientations) {
  ------------------
  |  Branch (137:7): [True: 268, False: 0]
  |  Branch (137:37): [True: 68, False: 200]
  ------------------
  138|     68|    return false;
  139|     68|  }
  140|       |
  141|    200|  predictor_.ResizeOrientations(num_orientations);
  142|    200|  bool last_orientation = true;
  143|    200|  RAnsBitDecoder decoder;
  144|    200|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (144:7): [True: 3, False: 197]
  ------------------
  145|      3|    return false;
  146|      3|  }
  147|  4.58k|  for (int i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (147:19): [True: 4.38k, False: 197]
  ------------------
  148|  4.38k|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (148:9): [True: 2.04k, False: 2.33k]
  ------------------
  149|  2.04k|      last_orientation = !last_orientation;
  150|  2.04k|    }
  151|  4.38k|    predictor_.set_orientation(i, last_orientation);
  152|  4.38k|  }
  153|    197|  decoder.EndDecoding();
  154|    197|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  155|    197|                                     MeshDataT>::DecodePredictionData(buffer);
  156|    200|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE24SetMaxNumPredictedValuesEi:
   81|    284|  virtual void SetMaxNumPredictedValues(int32_t num) {
   82|    284|    max_num_predicted_values_ = num;
   83|    284|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   97|    189|                                      const PointIndex* entry_to_point_id_map) {
   98|    189|  if (num_components != MeshPredictionSchemeTexCoordsPortablePredictor<
  ------------------
  |  Branch (98:7): [True: 4, False: 185]
  ------------------
   99|    189|                            DataTypeT, MeshDataT>::kNumComponents) {
  100|      4|    return false;
  101|      4|  }
  102|    185|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  103|    185|  this->transform().Init(num_components);
  104|       |
  105|    185|  const int corner_map_size =
  106|    185|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  107|    185|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (107:7): [True: 0, False: 185]
  ------------------
  108|      0|    return false;
  109|      0|  }
  110|   159k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 159k, False: 76]
  ------------------
  111|   159k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  112|   159k|    if (!predictor_.template ComputePredictedValue<false>(corner_id, out_data,
  ------------------
  |  Branch (112:9): [True: 109, False: 159k]
  ------------------
  113|   159k|                                                          p)) {
  114|    109|      return false;
  115|    109|    }
  116|       |
  117|   159k|    const int dst_offset = p * num_components;
  118|   159k|    this->transform().ComputeOriginalValue(predictor_.predicted_value(),
  119|   159k|                                           in_corr + dst_offset,
  120|   159k|                                           out_data + dst_offset);
  121|   159k|  }
  122|     76|  return true;
  123|    185|}

_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS3_:
   38|    247|      : pos_attribute_(nullptr),
   39|    247|        entry_to_point_id_map_(nullptr),
   40|    247|        mesh_data_(md) {}
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    244|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    244|    pos_attribute_ = &position_attribute;
   43|    244|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18ResizeOrientationsEi:
   73|    183|  void ResizeOrientations(int num_orientations) {
   74|    183|    orientations_.resize(num_orientations);
   75|    183|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE15set_orientationEib:
   71|   812k|  void set_orientation(int i, bool v) { orientations_[i] = v; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    140|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    140|    entry_to_point_id_map_ = map;
   46|    140|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueILb0EEEbNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
   93|  1.22M|                                                 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.22M|  const CornerIndex next_corner_id = mesh_data_.corner_table()->Next(corner_id);
   98|  1.22M|  const CornerIndex prev_corner_id =
   99|  1.22M|      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.22M|  int next_data_id, prev_data_id;
  103|       |
  104|  1.22M|  int next_vert_id, prev_vert_id;
  105|  1.22M|  next_vert_id = mesh_data_.corner_table()->Vertex(next_corner_id).value();
  106|  1.22M|  prev_vert_id = mesh_data_.corner_table()->Vertex(prev_corner_id).value();
  107|       |
  108|  1.22M|  next_data_id = mesh_data_.vertex_to_data_map()->at(next_vert_id);
  109|  1.22M|  prev_data_id = mesh_data_.vertex_to_data_map()->at(prev_vert_id);
  110|       |
  111|  1.22M|  typedef VectorD<int64_t, 2> Vec2;
  112|  1.22M|  typedef VectorD<int64_t, 3> Vec3;
  113|  1.22M|  typedef VectorD<uint64_t, 2> Vec2u;
  114|       |
  115|  1.22M|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (115:7): [True: 839k, False: 382k]
  |  Branch (115:33): [True: 457k, False: 382k]
  ------------------
  116|       |    // Both other corners have available UV coordinates for prediction.
  117|   457k|    const Vec2 n_uv = GetTexCoordForEntryId(next_data_id, data);
  118|   457k|    const Vec2 p_uv = GetTexCoordForEntryId(prev_data_id, data);
  119|   457k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (119:9): [True: 400k, False: 56.6k]
  ------------------
  120|       |      // We cannot do a reliable prediction on degenerated UV triangles.
  121|   400k|      predicted_value_[0] = p_uv[0];
  122|   400k|      predicted_value_[1] = p_uv[1];
  123|   400k|      return true;
  124|   400k|    }
  125|       |
  126|       |    // Get positions at all corners.
  127|  56.6k|    const Vec3 tip_pos = GetPositionForEntryId(data_id);
  128|  56.6k|    const Vec3 next_pos = GetPositionForEntryId(next_data_id);
  129|  56.6k|    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|  56.6k|    const Vec3 pn = prev_pos - next_pos;
  146|  56.6k|    const uint64_t pn_norm2_squared = pn.SquaredNorm();
  147|  56.6k|    if (pn_norm2_squared != 0) {
  ------------------
  |  Branch (147:9): [True: 97, False: 56.5k]
  ------------------
  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|     97|      const Vec3 cn = tip_pos - next_pos;
  153|     97|      const int64_t cn_dot_pn = pn.Dot(cn);
  154|       |
  155|     97|      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|     97|      const int64_t n_uv_absmax_element =
  164|     97|          std::max(std::abs(n_uv[0]), std::abs(n_uv[1]));
  165|     97|      if (n_uv_absmax_element >
  ------------------
  |  Branch (165:11): [True: 19, False: 78]
  ------------------
  166|     97|          std::numeric_limits<int64_t>::max() / pn_norm2_squared) {
  167|       |        // Return false if the below multiplication would overflow.
  168|     19|        return false;
  169|     19|      }
  170|     78|      const int64_t pn_uv_absmax_element =
  171|     78|          std::max(std::abs(pn_uv[0]), std::abs(pn_uv[1]));
  172|     78|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (172:11): [True: 3, False: 75]
  ------------------
  173|     78|          std::numeric_limits<int64_t>::max() / pn_uv_absmax_element) {
  174|       |        // Return false if squared length calculation would overflow.
  175|      3|        return false;
  176|      3|      }
  177|       |      // Keep the scaled prediction arithmetic in the unsigned domain.
  178|     75|      const Vec2 x_uv = Vec2(Vec2u(n_uv) * pn_norm2_squared +
  179|     75|                             Vec2u(pn_uv) * static_cast<uint64_t>(cn_dot_pn));
  180|     75|      const int64_t pn_absmax_element =
  181|     75|          std::max(std::max(std::abs(pn[0]), std::abs(pn[1])), std::abs(pn[2]));
  182|     75|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (182:11): [True: 2, False: 73]
  ------------------
  183|     75|          std::numeric_limits<int64_t>::max() / pn_absmax_element) {
  184|       |        // Return false if squared length calculation would overflow.
  185|      2|        return false;
  186|      2|      }
  187|       |
  188|       |      // Compute squared length of vector CX in position coordinate system:
  189|     73|      const Vec3 x_pos = next_pos + (cn_dot_pn * pn) / pn_norm2_squared;
  190|     73|      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|     73|      Vec2 cx_uv(pn_uv[1], -pn_uv[0]);  // Rotated PN_UV.
  207|       |      // Compute CX.Norm2() * PN.Norm2()
  208|     73|      const uint64_t norm_squared =
  209|     73|          IntSqrt(cx_norm2_squared * pn_norm2_squared);
  210|       |      // Final cx_uv in the scaled coordinate space.
  211|     73|      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|     73|      Vec2 predicted_uv;
  216|     73|      if (is_encoder_t) {
  ------------------
  |  Branch (216:11): [Folded, False: 73]
  ------------------
  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|     73|      } else {
  233|       |        // When decoding the data, we already know which orientation to use.
  234|     73|        if (orientations_.empty()) {
  ------------------
  |  Branch (234:13): [True: 11, False: 62]
  ------------------
  235|     11|          return false;
  236|     11|        }
  237|     62|        const bool orientation = orientations_.back();
  238|     62|        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|     62|        if (orientation) {
  ------------------
  |  Branch (241:13): [True: 31, False: 31]
  ------------------
  242|     31|          predicted_uv = Vec2(Vec2u(x_uv) + Vec2u(cx_uv)) / pn_norm2_squared;
  243|     31|        } else {
  244|     31|          predicted_uv = Vec2(Vec2u(x_uv) - Vec2u(cx_uv)) / pn_norm2_squared;
  245|     31|        }
  246|     62|      }
  247|     62|      predicted_value_[0] = static_cast<int>(predicted_uv[0]);
  248|     62|      predicted_value_[1] = static_cast<int>(predicted_uv[1]);
  249|     62|      return true;
  250|     73|    }
  251|  56.6k|  }
  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|   820k|  int data_offset = 0;
  256|   820k|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (256:7): [True: 438k, False: 382k]
  ------------------
  257|       |    // Use the value on the previous corner as the prediction.
  258|   438k|    data_offset = prev_data_id * kNumComponents;
  259|   438k|  }
  260|   820k|  if (next_data_id < data_id) {
  ------------------
  |  Branch (260:7): [True: 56.5k, False: 764k]
  ------------------
  261|       |    // Use the value on the next corner as the prediction.
  262|  56.5k|    data_offset = next_data_id * kNumComponents;
  263|   764k|  } else {
  264|       |    // None of the other corners have a valid value. Use the last encoded value
  265|       |    // as the prediction if possible.
  266|   764k|    if (data_id > 0) {
  ------------------
  |  Branch (266:9): [True: 763k, False: 140]
  ------------------
  267|   763k|      data_offset = (data_id - 1) * kNumComponents;
  268|   763k|    } else {
  269|       |      // We are encoding the first value. Predict 0.
  270|    420|      for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (270:23): [True: 280, False: 140]
  ------------------
  271|    280|        predicted_value_[i] = 0;
  272|    280|      }
  273|    140|      return true;
  274|    140|    }
  275|   764k|  }
  276|  2.46M|  for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (276:19): [True: 1.64M, False: 820k]
  ------------------
  277|  1.64M|    predicted_value_[i] = data[data_offset + i];
  278|  1.64M|  }
  279|   820k|  return true;
  280|   820k|}
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetTexCoordForEntryIdEiPKi:
   58|   915k|                                            const DataTypeT* data) const {
   59|   915k|    const int data_offset = entry_id * kNumComponents;
   60|   915k|    return VectorD<int64_t, 2>(data[data_offset], data[data_offset + 1]);
   61|   915k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetPositionForEntryIdEi:
   49|   169k|  VectorD<int64_t, 3> GetPositionForEntryId(int entry_id) const {
   50|   169k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   51|   169k|    VectorD<int64_t, 3> pos;
   52|   169k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   53|   169k|                                 &pos[0]);
   54|   169k|    return pos;
   55|   169k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE15predicted_valueEv:
   69|  1.22M|  const DataTypeT* predicted_value() const { return predicted_value_; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS3_:
   38|    292|      : pos_attribute_(nullptr),
   39|    292|        entry_to_point_id_map_(nullptr),
   40|    292|        mesh_data_(md) {}
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    288|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    288|    pos_attribute_ = &position_attribute;
   43|    288|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18ResizeOrientationsEi:
   73|    200|  void ResizeOrientations(int num_orientations) {
   74|    200|    orientations_.resize(num_orientations);
   75|    200|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE15set_orientationEib:
   71|  4.38k|  void set_orientation(int i, bool v) { orientations_[i] = v; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    185|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    185|    entry_to_point_id_map_ = map;
   46|    185|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueILb0EEEbNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
   93|   159k|                                                 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|   159k|  const CornerIndex next_corner_id = mesh_data_.corner_table()->Next(corner_id);
   98|   159k|  const CornerIndex prev_corner_id =
   99|   159k|      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|   159k|  int next_data_id, prev_data_id;
  103|       |
  104|   159k|  int next_vert_id, prev_vert_id;
  105|   159k|  next_vert_id = mesh_data_.corner_table()->Vertex(next_corner_id).value();
  106|   159k|  prev_vert_id = mesh_data_.corner_table()->Vertex(prev_corner_id).value();
  107|       |
  108|   159k|  next_data_id = mesh_data_.vertex_to_data_map()->at(next_vert_id);
  109|   159k|  prev_data_id = mesh_data_.vertex_to_data_map()->at(prev_vert_id);
  110|       |
  111|   159k|  typedef VectorD<int64_t, 2> Vec2;
  112|   159k|  typedef VectorD<int64_t, 3> Vec3;
  113|   159k|  typedef VectorD<uint64_t, 2> Vec2u;
  114|       |
  115|   159k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (115:7): [True: 159k, False: 213]
  |  Branch (115:33): [True: 159k, False: 247]
  ------------------
  116|       |    // Both other corners have available UV coordinates for prediction.
  117|   159k|    const Vec2 n_uv = GetTexCoordForEntryId(next_data_id, data);
  118|   159k|    const Vec2 p_uv = GetTexCoordForEntryId(prev_data_id, data);
  119|   159k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (119:9): [True: 142k, False: 16.4k]
  ------------------
  120|       |      // We cannot do a reliable prediction on degenerated UV triangles.
  121|   142k|      predicted_value_[0] = p_uv[0];
  122|   142k|      predicted_value_[1] = p_uv[1];
  123|   142k|      return true;
  124|   142k|    }
  125|       |
  126|       |    // Get positions at all corners.
  127|  16.4k|    const Vec3 tip_pos = GetPositionForEntryId(data_id);
  128|  16.4k|    const Vec3 next_pos = GetPositionForEntryId(next_data_id);
  129|  16.4k|    const Vec3 prev_pos = GetPositionForEntryId(prev_data_id);
  130|       |    // We use the positions of the above triangle to predict the texture
  131|       |    // coordinate on the tip corner C.
  132|       |    // To convert the triangle into the UV coordinate system we first compute
  133|       |    // position X on the vector |prev_pos - next_pos| that is the projection of
  134|       |    // point C onto vector |prev_pos - next_pos|:
  135|       |    //
  136|       |    //              C
  137|       |    //             /.  \
  138|       |    //            / .     \
  139|       |    //           /  .        \
  140|       |    //          N---X----------P
  141|       |    //
  142|       |    // Where next_pos is point (N), prev_pos is point (P) and tip_pos is the
  143|       |    // position of predicted coordinate (C).
  144|       |    //
  145|  16.4k|    const Vec3 pn = prev_pos - next_pos;
  146|  16.4k|    const uint64_t pn_norm2_squared = pn.SquaredNorm();
  147|  16.4k|    if (pn_norm2_squared != 0) {
  ------------------
  |  Branch (147:9): [True: 661, False: 15.8k]
  ------------------
  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|    661|      const Vec3 cn = tip_pos - next_pos;
  153|    661|      const int64_t cn_dot_pn = pn.Dot(cn);
  154|       |
  155|    661|      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|    661|      const int64_t n_uv_absmax_element =
  164|    661|          std::max(std::abs(n_uv[0]), std::abs(n_uv[1]));
  165|    661|      if (n_uv_absmax_element >
  ------------------
  |  Branch (165:11): [True: 21, False: 640]
  ------------------
  166|    661|          std::numeric_limits<int64_t>::max() / pn_norm2_squared) {
  167|       |        // Return false if the below multiplication would overflow.
  168|     21|        return false;
  169|     21|      }
  170|    640|      const int64_t pn_uv_absmax_element =
  171|    640|          std::max(std::abs(pn_uv[0]), std::abs(pn_uv[1]));
  172|    640|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (172:11): [True: 6, False: 634]
  ------------------
  173|    640|          std::numeric_limits<int64_t>::max() / pn_uv_absmax_element) {
  174|       |        // Return false if squared length calculation would overflow.
  175|      6|        return false;
  176|      6|      }
  177|       |      // Keep the scaled prediction arithmetic in the unsigned domain.
  178|    634|      const Vec2 x_uv = Vec2(Vec2u(n_uv) * pn_norm2_squared +
  179|    634|                             Vec2u(pn_uv) * static_cast<uint64_t>(cn_dot_pn));
  180|    634|      const int64_t pn_absmax_element =
  181|    634|          std::max(std::max(std::abs(pn[0]), std::abs(pn[1])), std::abs(pn[2]));
  182|    634|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (182:11): [True: 5, False: 629]
  ------------------
  183|    634|          std::numeric_limits<int64_t>::max() / pn_absmax_element) {
  184|       |        // Return false if squared length calculation would overflow.
  185|      5|        return false;
  186|      5|      }
  187|       |
  188|       |      // Compute squared length of vector CX in position coordinate system:
  189|    629|      const Vec3 x_pos = next_pos + (cn_dot_pn * pn) / pn_norm2_squared;
  190|    629|      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|    629|      Vec2 cx_uv(pn_uv[1], -pn_uv[0]);  // Rotated PN_UV.
  207|       |      // Compute CX.Norm2() * PN.Norm2()
  208|    629|      const uint64_t norm_squared =
  209|    629|          IntSqrt(cx_norm2_squared * pn_norm2_squared);
  210|       |      // Final cx_uv in the scaled coordinate space.
  211|    629|      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|    629|      Vec2 predicted_uv;
  216|    629|      if (is_encoder_t) {
  ------------------
  |  Branch (216:11): [Folded, False: 629]
  ------------------
  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|    629|      } else {
  233|       |        // When decoding the data, we already know which orientation to use.
  234|    629|        if (orientations_.empty()) {
  ------------------
  |  Branch (234:13): [True: 77, False: 552]
  ------------------
  235|     77|          return false;
  236|     77|        }
  237|    552|        const bool orientation = orientations_.back();
  238|    552|        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|    552|        if (orientation) {
  ------------------
  |  Branch (241:13): [True: 479, False: 73]
  ------------------
  242|    479|          predicted_uv = Vec2(Vec2u(x_uv) + Vec2u(cx_uv)) / pn_norm2_squared;
  243|    479|        } else {
  244|     73|          predicted_uv = Vec2(Vec2u(x_uv) - Vec2u(cx_uv)) / pn_norm2_squared;
  245|     73|        }
  246|    552|      }
  247|    552|      predicted_value_[0] = static_cast<int>(predicted_uv[0]);
  248|    552|      predicted_value_[1] = static_cast<int>(predicted_uv[1]);
  249|    552|      return true;
  250|    629|    }
  251|  16.4k|  }
  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|  16.2k|  int data_offset = 0;
  256|  16.2k|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (256:7): [True: 16.0k, False: 213]
  ------------------
  257|       |    // Use the value on the previous corner as the prediction.
  258|  16.0k|    data_offset = prev_data_id * kNumComponents;
  259|  16.0k|  }
  260|  16.2k|  if (next_data_id < data_id) {
  ------------------
  |  Branch (260:7): [True: 15.8k, False: 460]
  ------------------
  261|       |    // Use the value on the next corner as the prediction.
  262|  15.8k|    data_offset = next_data_id * kNumComponents;
  263|  15.8k|  } else {
  264|       |    // None of the other corners have a valid value. Use the last encoded value
  265|       |    // as the prediction if possible.
  266|    460|    if (data_id > 0) {
  ------------------
  |  Branch (266:9): [True: 275, False: 185]
  ------------------
  267|    275|      data_offset = (data_id - 1) * kNumComponents;
  268|    275|    } else {
  269|       |      // We are encoding the first value. Predict 0.
  270|    555|      for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (270:23): [True: 370, False: 185]
  ------------------
  271|    370|        predicted_value_[i] = 0;
  272|    370|      }
  273|    185|      return true;
  274|    185|    }
  275|    460|  }
  276|  48.2k|  for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (276:19): [True: 32.1k, False: 16.0k]
  ------------------
  277|  32.1k|    predicted_value_[i] = data[data_offset + i];
  278|  32.1k|  }
  279|  16.0k|  return true;
  280|  16.2k|}
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetTexCoordForEntryIdEiPKi:
   58|   318k|                                            const DataTypeT* data) const {
   59|   318k|    const int data_offset = entry_id * kNumComponents;
   60|   318k|    return VectorD<int64_t, 2>(data[data_offset], data[data_offset + 1]);
   61|   318k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetPositionForEntryIdEi:
   49|  49.4k|  VectorD<int64_t, 3> GetPositionForEntryId(int entry_id) const {
   50|  49.4k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   51|  49.4k|    VectorD<int64_t, 3> pos;
   52|  49.4k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   53|  49.4k|                                 &pos[0]);
   54|  49.4k|    return pos;
   55|  49.4k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE15predicted_valueEv:
   69|   159k|  const DataTypeT* predicted_value() const { return predicted_value_; }

_ZNK5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|    252|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    622|  bool AreCorrectionsPositive() override {
   71|    622|    return transform_.AreCorrectionsPositive();
   72|    622|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    246|  bool DecodePredictionData(DecoderBuffer* buffer) override {
   49|    246|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 15, False: 231]
  ------------------
   50|     15|      return false;
   51|     15|    }
   52|    231|    return true;
   53|    246|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE9transformEv:
   81|   871k|  inline Transform& transform() { return transform_; }
_ZNK5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|    337|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    717|  bool AreCorrectionsPositive() override {
   71|    717|    return transform_.AreCorrectionsPositive();
   72|    717|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    324|  bool DecodePredictionData(DecoderBuffer* buffer) override {
   49|    324|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 17, False: 307]
  ------------------
   50|     17|      return false;
   51|     17|    }
   52|    307|    return true;
   53|    324|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE9transformEv:
   81|  1.14M|  inline Transform& transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   46|  6.54k|      : attribute_(attribute), transform_(transform) {}
_ZNK5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22GetNumParentAttributesEv:
   58|  4.39k|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22AreCorrectionsPositiveEv:
   70|  6.32k|  bool AreCorrectionsPositive() override {
   71|  6.32k|    return transform_.AreCorrectionsPositive();
   72|  6.32k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|  4.79k|  bool DecodePredictionData(DecoderBuffer* buffer) override {
   49|  4.79k|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 283, False: 4.51k]
  ------------------
   50|    283|      return false;
   51|    283|    }
   52|  4.51k|    return true;
   53|  4.79k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE9transformEv:
   81|  10.4M|  inline Transform& transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    636|      : attribute_(attribute), transform_(transform) {}
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    733|      : attribute_(attribute), transform_(transform) {}

_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    636|                                 const PointCloudDecoder* decoder) {
  188|    636|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    636|      method, att_id, decoder, TransformT());
  190|    636|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    636|                                 const TransformT& transform) {
  156|    636|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 636]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    636|  const PointAttribute* const att = decoder->point_cloud()->attribute(att_id);
  160|    636|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 636, 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|    636|    const MeshDecoder* const mesh_decoder =
  167|    636|        static_cast<const MeshDecoder*>(decoder);
  168|       |
  169|    636|    auto ret = CreateMeshPredictionScheme<
  170|    636|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    636|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    636|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    636|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 384, False: 252]
  ------------------
  174|    384|      return ret;
  175|    384|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    636|  }
  178|       |  // Create delta decoder.
  179|    252|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    252|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    636|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    162|      uint16_t bitstream_version) {
  143|    162|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    162|        method, attribute, transform, mesh_data, bitstream_version);
  145|    162|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    162|        uint16_t bitstream_version) {
  127|    162|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 154, False: 8]
  ------------------
  128|    154|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    154|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    154|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    154|                                                  mesh_data));
  132|    154|      }
  133|      8|      return nullptr;
  134|    162|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    234|      uint16_t bitstream_version) {
  143|    234|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    234|        method, attribute, transform, mesh_data, bitstream_version);
  145|    234|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    234|        uint16_t bitstream_version) {
  127|    234|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 230, False: 4]
  ------------------
  128|    230|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    230|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    230|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    230|                                                  mesh_data));
  132|    230|      }
  133|      4|      return nullptr;
  134|    234|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    733|                                 const PointCloudDecoder* decoder) {
  188|    733|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    733|      method, att_id, decoder, TransformT());
  190|    733|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    733|                                 const TransformT& transform) {
  156|    733|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 733]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    733|  const PointAttribute* const att = decoder->point_cloud()->attribute(att_id);
  160|    733|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 733, 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|    733|    const MeshDecoder* const mesh_decoder =
  167|    733|        static_cast<const MeshDecoder*>(decoder);
  168|       |
  169|    733|    auto ret = CreateMeshPredictionScheme<
  170|    733|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    733|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    733|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    733|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 396, False: 337]
  ------------------
  174|    396|      return ret;
  175|    396|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    733|  }
  178|       |  // Create delta decoder.
  179|    337|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    337|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    733|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    201|      uint16_t bitstream_version) {
  143|    201|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    201|        method, attribute, transform, mesh_data, bitstream_version);
  145|    201|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    201|        uint16_t bitstream_version) {
  111|    201|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 193, False: 8]
  ------------------
  112|    193|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    193|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    193|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    193|                                                  mesh_data));
  116|    193|      }
  117|      8|      return nullptr;
  118|    201|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    207|      uint16_t bitstream_version) {
  143|    207|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    207|        method, attribute, transform, mesh_data, bitstream_version);
  145|    207|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    207|        uint16_t bitstream_version) {
  111|    207|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 203, False: 4]
  ------------------
  112|    203|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    203|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    203|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    203|                                                  mesh_data));
  116|    203|      }
  117|      4|      return nullptr;
  118|    207|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|  6.54k|                                 const PointCloudDecoder* decoder) {
  188|  6.54k|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|  6.54k|      method, att_id, decoder, TransformT());
  190|  6.54k|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|  6.54k|                                 const TransformT& transform) {
  156|  6.54k|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 6.54k]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|  6.54k|  const PointAttribute* const att = decoder->point_cloud()->attribute(att_id);
  160|  6.54k|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 6.54k, 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|  6.54k|    const MeshDecoder* const mesh_decoder =
  167|  6.54k|        static_cast<const MeshDecoder*>(decoder);
  168|       |
  169|  6.54k|    auto ret = CreateMeshPredictionScheme<
  170|  6.54k|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|  6.54k|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|  6.54k|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|  6.54k|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 6.09k, False: 450]
  ------------------
  174|  6.09k|      return ret;
  175|  6.09k|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|  6.54k|  }
  178|       |  // Create delta decoder.
  179|    450|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    450|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|  6.54k|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  2.72k|      uint16_t bitstream_version) {
  143|  2.72k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  2.72k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  2.72k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  2.72k|        uint16_t bitstream_version) {
   53|  2.72k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 725, False: 1.99k]
  ------------------
   54|    725|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    725|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    725|                                                         MeshDataT>(
   57|    725|                attribute, transform, mesh_data));
   58|    725|      }
   59|  1.99k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  1.99k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 486, False: 1.51k]
  ------------------
   61|    486|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    486|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    486|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    486|                                                  mesh_data));
   65|    486|      }
   66|  1.51k|#endif
   67|  1.51k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 514, False: 997]
  ------------------
   68|    514|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    514|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    514|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    514|                                                  mesh_data));
   72|    514|      }
   73|    997|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|    997|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 281, False: 716]
  ------------------
   75|    281|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    281|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    281|                                                     MeshDataT>(
   78|    281|                attribute, transform, mesh_data, bitstream_version));
   79|    281|      }
   80|    716|#endif
   81|    716|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 247, False: 469]
  ------------------
   82|    247|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    247|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    247|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    247|                                                  mesh_data));
   86|    247|      }
   87|    469|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    469|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 469, False: 0]
  ------------------
   89|    469|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    469|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    469|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    469|                                                  mesh_data));
   93|    469|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  2.72k|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  3.37k|      uint16_t bitstream_version) {
  143|  3.37k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  3.37k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  3.37k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  3.37k|        uint16_t bitstream_version) {
   53|  3.37k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 828, False: 2.54k]
  ------------------
   54|    828|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    828|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    828|                                                         MeshDataT>(
   57|    828|                attribute, transform, mesh_data));
   58|    828|      }
   59|  2.54k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  2.54k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 735, False: 1.80k]
  ------------------
   61|    735|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    735|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    735|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    735|                                                  mesh_data));
   65|    735|      }
   66|  1.80k|#endif
   67|  1.80k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 658, False: 1.14k]
  ------------------
   68|    658|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    658|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    658|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    658|                                                  mesh_data));
   72|    658|      }
   73|  1.14k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|  1.14k|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 308, False: 841]
  ------------------
   75|    308|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    308|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    308|                                                     MeshDataT>(
   78|    308|                attribute, transform, mesh_data, bitstream_version));
   79|    308|      }
   80|    841|#endif
   81|    841|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 292, False: 549]
  ------------------
   82|    292|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    292|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    292|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    292|                                                  mesh_data));
   86|    292|      }
   87|    549|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    549|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 549, False: 0]
  ------------------
   89|    549|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    549|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    549|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    549|                                                  mesh_data));
   93|    549|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  3.37k|    }

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

_ZN5draco28PredictionSchemeDeltaDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    231|    const PointIndex*) {
   50|    231|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    231|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    231|  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|  21.4k|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 21.1k, False: 231]
  ------------------
   57|  21.1k|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|  21.1k|                                           in_corr + i, out_data + i);
   59|  21.1k|  }
   60|    231|  return true;
   61|    231|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    307|    const PointIndex*) {
   50|    307|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    307|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    307|  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|  67.5k|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 67.2k, False: 307]
  ------------------
   57|  67.2k|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|  67.2k|                                           in_corr + i, out_data + i);
   59|  67.2k|  }
   60|    307|  return true;
   61|    307|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    450|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    385|    const PointIndex*) {
   50|    385|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    385|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    385|  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|  89.3k|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 88.9k, False: 385]
  ------------------
   57|  88.9k|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|  88.9k|                                           in_corr + i, out_data + i);
   59|  88.9k|  }
   60|    385|  return true;
   61|    385|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    252|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    337|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}

_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    636|    uint16_t bitstream_version) {
   38|    636|  const PointAttribute* const att = source->point_cloud()->attribute(att_id);
   39|    636|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 636, False: 0]
  ------------------
   40|    636|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 169, False: 467]
  ------------------
   41|    467|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 33, False: 434]
  ------------------
   42|    434|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 1, False: 433]
  ------------------
   43|    433|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 5, False: 428]
  ------------------
   44|    428|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 387, False: 41]
  ------------------
   45|    626|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 31, False: 10]
  ------------------
   46|    626|    const CornerTable* const ct = source->GetCornerTable();
   47|    626|    const MeshAttributeIndicesEncodingData* const encoding_data =
   48|    626|        source->GetAttributeEncodingData(att_id);
   49|    626|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 230, False: 396]
  |  Branch (49:26): [True: 0, False: 396]
  ------------------
   50|       |      // No connectivity data found.
   51|    230|      return nullptr;
   52|    230|    }
   53|       |    // Connectivity data exists.
   54|    396|    const MeshAttributeCornerTable* const att_ct =
   55|    396|        source->GetAttributeCornerTable(att_id);
   56|    396|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 162, False: 234]
  ------------------
   57|    162|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    162|      MeshData md;
   59|    162|      md.Set(source->mesh(), att_ct,
   60|    162|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    162|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    162|      MeshPredictionSchemeFactoryT factory;
   63|    162|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    162|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 154, False: 8]
  ------------------
   65|    154|        return ret;
   66|    154|      }
   67|    234|    } else {
   68|    234|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    234|      MeshData md;
   70|    234|      md.Set(source->mesh(), ct,
   71|    234|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    234|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    234|      MeshPredictionSchemeFactoryT factory;
   74|    234|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    234|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 230, False: 4]
  ------------------
   76|    230|        return ret;
   77|    230|      }
   78|    234|    }
   79|    396|  }
   80|     22|  return nullptr;
   81|    636|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    733|    uint16_t bitstream_version) {
   38|    733|  const PointAttribute* const att = source->point_cloud()->attribute(att_id);
   39|    733|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 733, False: 0]
  ------------------
   40|    733|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 162, False: 571]
  ------------------
   41|    571|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 7, False: 564]
  ------------------
   42|    564|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 5, False: 559]
  ------------------
   43|    559|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 99, False: 460]
  ------------------
   44|    460|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 397, False: 63]
  ------------------
   45|    724|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 54, False: 9]
  ------------------
   46|    724|    const CornerTable* const ct = source->GetCornerTable();
   47|    724|    const MeshAttributeIndicesEncodingData* const encoding_data =
   48|    724|        source->GetAttributeEncodingData(att_id);
   49|    724|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 316, False: 408]
  |  Branch (49:26): [True: 0, False: 408]
  ------------------
   50|       |      // No connectivity data found.
   51|    316|      return nullptr;
   52|    316|    }
   53|       |    // Connectivity data exists.
   54|    408|    const MeshAttributeCornerTable* const att_ct =
   55|    408|        source->GetAttributeCornerTable(att_id);
   56|    408|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 201, False: 207]
  ------------------
   57|    201|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    201|      MeshData md;
   59|    201|      md.Set(source->mesh(), att_ct,
   60|    201|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    201|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    201|      MeshPredictionSchemeFactoryT factory;
   63|    201|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    201|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 193, False: 8]
  ------------------
   65|    193|        return ret;
   66|    193|      }
   67|    207|    } else {
   68|    207|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    207|      MeshData md;
   70|    207|      md.Set(source->mesh(), ct,
   71|    207|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    207|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    207|      MeshPredictionSchemeFactoryT factory;
   74|    207|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    207|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 203, False: 4]
  ------------------
   76|    203|        return ret;
   77|    203|      }
   78|    207|    }
   79|    408|  }
   80|     21|  return nullptr;
   81|    733|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|  6.54k|    uint16_t bitstream_version) {
   38|  6.54k|  const PointAttribute* const att = source->point_cloud()->attribute(att_id);
   39|  6.54k|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 6.54k, False: 0]
  ------------------
   40|  6.54k|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 1.63k, False: 4.90k]
  ------------------
   41|  4.90k|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 1.28k, False: 3.61k]
  ------------------
   42|  3.61k|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 1.20k, False: 2.41k]
  ------------------
   43|  2.41k|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 544, False: 1.87k]
  ------------------
   44|  1.87k|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 1.04k, False: 828]
  ------------------
   45|  6.30k|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 591, False: 237]
  ------------------
   46|  6.30k|    const CornerTable* const ct = source->GetCornerTable();
   47|  6.30k|    const MeshAttributeIndicesEncodingData* const encoding_data =
   48|  6.30k|        source->GetAttributeEncodingData(att_id);
   49|  6.30k|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 213, False: 6.09k]
  |  Branch (49:26): [True: 0, False: 6.09k]
  ------------------
   50|       |      // No connectivity data found.
   51|    213|      return nullptr;
   52|    213|    }
   53|       |    // Connectivity data exists.
   54|  6.09k|    const MeshAttributeCornerTable* const att_ct =
   55|  6.09k|        source->GetAttributeCornerTable(att_id);
   56|  6.09k|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 2.72k, False: 3.37k]
  ------------------
   57|  2.72k|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|  2.72k|      MeshData md;
   59|  2.72k|      md.Set(source->mesh(), att_ct,
   60|  2.72k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|  2.72k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|  2.72k|      MeshPredictionSchemeFactoryT factory;
   63|  2.72k|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|  2.72k|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 2.72k, False: 0]
  ------------------
   65|  2.72k|        return ret;
   66|  2.72k|      }
   67|  3.37k|    } else {
   68|  3.37k|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|  3.37k|      MeshData md;
   70|  3.37k|      md.Set(source->mesh(), ct,
   71|  3.37k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|  3.37k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|  3.37k|      MeshPredictionSchemeFactoryT factory;
   74|  3.37k|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|  3.37k|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 3.37k, False: 0]
  ------------------
   76|  3.37k|        return ret;
   77|  3.37k|      }
   78|  3.37k|    }
   79|  6.09k|  }
   80|    237|  return nullptr;
   81|  6.54k|}

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

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

_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE14IsInBottomLeftERKNS_7VectorDIiLi2EEE:
   92|  1.14M|  bool IsInBottomLeft(const Point2& p) const {
   93|  1.14M|    if (p[0] == 0 && p[1] == 0) {
  ------------------
  |  Branch (93:9): [True: 996k, False: 151k]
  |  Branch (93:22): [True: 984k, False: 11.3k]
  ------------------
   94|   984k|      return true;
   95|   984k|    }
   96|   162k|    return (p[0] < 0 && p[1] <= 0);
  ------------------
  |  Branch (96:13): [True: 75.0k, False: 87.4k]
  |  Branch (96:25): [True: 37.3k, False: 37.7k]
  ------------------
   97|  1.14M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE16GetRotationCountENS_7VectorDIiLi2EEE:
   50|  1.14M|  int32_t GetRotationCount(Point2 pred) const {
   51|  1.14M|    const DataType sign_x = pred[0];
   52|  1.14M|    const DataType sign_y = pred[1];
   53|       |
   54|  1.14M|    int32_t rotation_count = 0;
   55|  1.14M|    if (sign_x == 0) {
  ------------------
  |  Branch (55:9): [True: 996k, False: 151k]
  ------------------
   56|   996k|      if (sign_y == 0) {
  ------------------
  |  Branch (56:11): [True: 984k, False: 11.3k]
  ------------------
   57|   984k|        rotation_count = 0;
   58|   984k|      } else if (sign_y > 0) {
  ------------------
  |  Branch (58:18): [True: 5.76k, False: 5.53k]
  ------------------
   59|  5.76k|        rotation_count = 3;
   60|  5.76k|      } else {
   61|  5.53k|        rotation_count = 1;
   62|  5.53k|      }
   63|   996k|    } else if (sign_x > 0) {
  ------------------
  |  Branch (63:16): [True: 76.1k, False: 75.0k]
  ------------------
   64|  76.1k|      if (sign_y >= 0) {
  ------------------
  |  Branch (64:11): [True: 37.3k, False: 38.7k]
  ------------------
   65|  37.3k|        rotation_count = 2;
   66|  38.7k|      } else {
   67|  38.7k|        rotation_count = 1;
   68|  38.7k|      }
   69|  76.1k|    } else {
   70|  75.0k|      if (sign_y <= 0) {
  ------------------
  |  Branch (70:11): [True: 37.3k, False: 37.7k]
  ------------------
   71|  37.3k|        rotation_count = 0;
   72|  37.7k|      } else {
   73|  37.7k|        rotation_count = 3;
   74|  37.7k|      }
   75|  75.0k|    }
   76|  1.14M|    return rotation_count;
   77|  1.14M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE11RotatePointENS_7VectorDIiLi2EEEi:
   79|   250k|  Point2 RotatePoint(Point2 p, int32_t rotation_count) const {
   80|   250k|    switch (rotation_count) {
   81|  87.8k|      case 1:
  ------------------
  |  Branch (81:7): [True: 87.8k, False: 162k]
  ------------------
   82|  87.8k|        return Point2(p[1], -p[0]);
   83|  74.6k|      case 2:
  ------------------
  |  Branch (83:7): [True: 74.6k, False: 175k]
  ------------------
   84|  74.6k|        return Point2(-p[0], -p[1]);
   85|  87.8k|      case 3:
  ------------------
  |  Branch (85:7): [True: 87.8k, False: 162k]
  ------------------
   86|  87.8k|        return Point2(-p[1], p[0]);
   87|      0|      default:
  ------------------
  |  Branch (87:7): [True: 0, False: 250k]
  ------------------
   88|      0|        return p;
   89|   250k|    }
   90|   250k|  }
_ZN5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiEC2Ev:
   40|    733|  PredictionSchemeNormalOctahedronCanonicalizedTransformBase() : Base() {}

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

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

_ZN5draco37PredictionSchemeWrapDecodingTransformIiiE19DecodeTransformDataEPNS_13DecoderBufferE:
   65|  5.80k|  bool DecodeTransformData(DecoderBuffer* buffer) {
   66|  5.80k|    DataTypeT min_value, max_value;
   67|  5.80k|    if (!buffer->Decode(&min_value)) {
  ------------------
  |  Branch (67:9): [True: 90, False: 5.71k]
  ------------------
   68|     90|      return false;
   69|     90|    }
   70|  5.71k|    if (!buffer->Decode(&max_value)) {
  ------------------
  |  Branch (70:9): [True: 54, False: 5.66k]
  ------------------
   71|     54|      return false;
   72|     54|    }
   73|  5.66k|    if (min_value > max_value) {
  ------------------
  |  Branch (73:9): [True: 197, False: 5.46k]
  ------------------
   74|    197|      return false;
   75|    197|    }
   76|  5.46k|    this->set_min_value(min_value);
   77|  5.46k|    this->set_max_value(max_value);
   78|  5.46k|    if (!this->InitCorrectionBounds()) {
  ------------------
  |  Branch (78:9): [True: 16, False: 5.44k]
  ------------------
   79|     16|      return false;
   80|     16|    }
   81|  5.44k|    return true;
   82|  5.46k|  }
_ZNK5draco37PredictionSchemeWrapDecodingTransformIiiE20ComputeOriginalValueEPKiS3_Pi:
   38|  10.4M|                                   DataTypeT* out_original_vals) const {
   39|       |    // For now we assume both |DataTypeT| and |CorrTypeT| are equal.
   40|  10.4M|    static_assert(std::is_same<DataTypeT, CorrTypeT>::value,
   41|  10.4M|                  "Predictions and corrections must have the same type.");
   42|       |
   43|       |    // The only valid implementation right now is for int32_t.
   44|  10.4M|    static_assert(std::is_same<DataTypeT, int32_t>::value,
   45|  10.4M|                  "Only int32_t is supported for predicted values.");
   46|       |
   47|  10.4M|    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|   385M|    for (int i = 0; i < this->num_components(); ++i) {
  ------------------
  |  Branch (53:21): [True: 375M, False: 10.4M]
  ------------------
   54|   375M|      int64_t value = static_cast<int64_t>(predicted_vals[i]) +
   55|   375M|                      static_cast<int64_t>(corr_vals[i]);
   56|   375M|      if (value > this->max_value()) {
  ------------------
  |  Branch (56:11): [True: 45.4k, False: 375M]
  ------------------
   57|  45.4k|        value -= this->max_dif();
   58|   375M|      } else if (value < this->min_value()) {
  ------------------
  |  Branch (58:18): [True: 1.05M, False: 374M]
  ------------------
   59|  1.05M|        value += this->max_dif();
   60|  1.05M|      }
   61|   375M|      out_original_vals[i] = static_cast<DataTypeT>(value);
   62|   375M|    }
   63|  10.4M|  }
_ZN5draco37PredictionSchemeWrapDecodingTransformIiiEC2Ev:
   32|  6.54k|  PredictionSchemeWrapDecodingTransform() {}

_ZNK5draco33PredictionSchemeWrapTransformBaseIiE22AreCorrectionsPositiveEv:
   60|  6.32k|  bool AreCorrectionsPositive() const { return false; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE13set_min_valueERKi:
  100|  5.46k|  inline void set_min_value(const DataTypeT& v) { min_value_ = v; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE13set_max_valueERKi:
  102|  5.46k|  inline void set_max_value(const DataTypeT& v) { max_value_ = v; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE20InitCorrectionBoundsEv:
   83|  5.46k|  bool InitCorrectionBounds() {
   84|  5.46k|    const int64_t dif =
   85|  5.46k|        static_cast<int64_t>(max_value_) - static_cast<int64_t>(min_value_);
   86|  5.46k|    if (dif < 0 || dif >= std::numeric_limits<DataTypeT>::max()) {
  ------------------
  |  Branch (86:9): [True: 0, False: 5.46k]
  |  Branch (86:20): [True: 16, False: 5.44k]
  ------------------
   87|     16|      return false;
   88|     16|    }
   89|  5.44k|    max_dif_ = 1 + static_cast<DataTypeT>(dif);
   90|  5.44k|    max_correction_ = max_dif_ / 2;
   91|  5.44k|    min_correction_ = -max_correction_;
   92|  5.44k|    if ((max_dif_ & 1) == 0) {
  ------------------
  |  Branch (92:9): [True: 2.32k, False: 3.12k]
  ------------------
   93|  2.32k|      max_correction_ -= 1;
   94|  2.32k|    }
   95|  5.44k|    return true;
   96|  5.46k|  }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE4InitEi:
   55|  4.48k|  void Init(int num_components) {
   56|  4.48k|    num_components_ = num_components;
   57|  4.48k|    clamped_value_.resize(num_components);
   58|  4.48k|  }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE19ClampPredictedValueEPKi:
   63|  10.4M|      const DataTypeT* predicted_val) const {
   64|   385M|    for (int i = 0; i < this->num_components(); ++i) {
  ------------------
  |  Branch (64:21): [True: 375M, False: 10.4M]
  ------------------
   65|   375M|      if (predicted_val[i] > max_value_) {
  ------------------
  |  Branch (65:11): [True: 558k, False: 374M]
  ------------------
   66|   558k|        clamped_value_[i] = max_value_;
   67|   374M|      } else if (predicted_val[i] < min_value_) {
  ------------------
  |  Branch (67:18): [True: 12.9M, False: 362M]
  ------------------
   68|  12.9M|        clamped_value_[i] = min_value_;
   69|   362M|      } else {
   70|   362M|        clamped_value_[i] = predicted_val[i];
   71|   362M|      }
   72|   375M|    }
   73|  10.4M|    return clamped_value_.data();
   74|  10.4M|  }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE14num_componentsEv:
   98|   771M|  inline int num_components() const { return num_components_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE9max_valueEv:
  101|   375M|  inline DataTypeT max_value() const { return max_value_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE7max_difEv:
  103|  1.10M|  inline DataTypeT max_dif() const { return max_dif_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE9min_valueEv:
   99|   375M|  inline DataTypeT min_value() const { return min_value_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE17quantization_bitsEv:
   77|    863|  int quantization_bits() const {
   78|    863|    DRACO_DCHECK(false);
   79|    863|    return -1;
   80|    863|  }
_ZN5draco33PredictionSchemeWrapTransformBaseIiEC2Ev:
   44|  6.54k|      : num_components_(0),
   45|  6.54k|        min_value_(0),
   46|  6.54k|        max_value_(0),
   47|  6.54k|        max_dif_(0),
   48|  6.54k|        max_correction_(0),
   49|  6.54k|        min_correction_(0) {}

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

_ZNK5draco26SequentialAttributeDecoder9attributeEv:
   53|  9.70k|  const PointAttribute* attribute() const { return attribute_; }
_ZN5draco26SequentialAttributeDecoder9attributeEv:
   54|   110M|  PointAttribute* attribute() { return attribute_; }
_ZNK5draco26SequentialAttributeDecoder12attribute_idEv:
   55|  7.91k|  int attribute_id() const { return attribute_id_; }
_ZNK5draco26SequentialAttributeDecoder7decoderEv:
   56|  35.6k|  PointCloudDecoder* decoder() const { return decoder_; }
_ZN5draco26SequentialAttributeDecoder20SetPortableAttributeENSt3__110unique_ptrINS_14PointAttributeENS1_14default_deleteIS3_EEEE:
   69|  11.0k|  void SetPortableAttribute(std::unique_ptr<PointAttribute> att) {
   70|  11.0k|    portable_attribute_ = std::move(att);
   71|  11.0k|  }
_ZN5draco26SequentialAttributeDecoder18portable_attributeEv:
   73|  37.0k|  PointAttribute* portable_attribute() { return portable_attribute_.get(); }
_ZN5draco26SequentialAttributeDecoderD2Ev:
   29|  21.5k|  virtual ~SequentialAttributeDecoder() = default;

_ZN5draco37SequentialAttributeDecodersControllerC2ENSt3__110unique_ptrINS_15PointsSequencerENS1_14default_deleteIS3_EEEE:
   26|  28.1k|    : sequencer_(std::move(sequencer)) {}
_ZN5draco37SequentialAttributeDecodersController27DecodeAttributesDecoderDataEPNS_13DecoderBufferE:
   29|  8.65k|    DecoderBuffer* buffer) {
   30|  8.65k|  if (!AttributesDecoder::DecodeAttributesDecoderData(buffer)) {
  ------------------
  |  Branch (30:7): [True: 216, False: 8.43k]
  ------------------
   31|    216|    return false;
   32|    216|  }
   33|       |  // Decode unique ids of all sequential encoders and create them.
   34|  8.43k|  const int32_t num_attributes = GetNumAttributes();
   35|  8.43k|  sequential_decoders_.resize(num_attributes);
   36|  29.9k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (36:19): [True: 21.5k, False: 8.40k]
  ------------------
   37|  21.5k|    uint8_t decoder_type;
   38|  21.5k|    if (!buffer->Decode(&decoder_type)) {
  ------------------
  |  Branch (38:9): [True: 13, False: 21.5k]
  ------------------
   39|     13|      return false;
   40|     13|    }
   41|       |    // Create the decoder from the id.
   42|  21.5k|    sequential_decoders_[i] = CreateSequentialDecoder(decoder_type);
   43|  21.5k|    if (!sequential_decoders_[i]) {
  ------------------
  |  Branch (43:9): [True: 11, False: 21.5k]
  ------------------
   44|     11|      return false;
   45|     11|    }
   46|  21.5k|    if (!sequential_decoders_[i]->Init(GetDecoder(), GetAttributeId(i))) {
  ------------------
  |  Branch (46:9): [True: 9, False: 21.5k]
  ------------------
   47|      9|      return false;
   48|      9|    }
   49|  21.5k|  }
   50|  8.40k|  return true;
   51|  8.43k|}
_ZN5draco37SequentialAttributeDecodersController16DecodeAttributesEPNS_13DecoderBufferE:
   54|  6.16k|    DecoderBuffer* buffer) {
   55|  6.16k|  if (!sequencer_ || !sequencer_->GenerateSequence(&point_ids_)) {
  ------------------
  |  Branch (55:7): [True: 0, False: 6.16k]
  |  Branch (55:22): [True: 9, False: 6.15k]
  ------------------
   56|      9|    return false;
   57|      9|  }
   58|       |  // Initialize point to attribute value mapping for all decoded attributes.
   59|  6.15k|  const int32_t num_attributes = GetNumAttributes();
   60|  24.1k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (60:19): [True: 18.0k, False: 6.15k]
  ------------------
   61|  18.0k|    PointAttribute* const pa =
   62|  18.0k|        GetDecoder()->point_cloud()->attribute(GetAttributeId(i));
   63|  18.0k|    if (!sequencer_->UpdatePointToAttributeIndexMapping(pa)) {
  ------------------
  |  Branch (63:9): [True: 3, False: 18.0k]
  ------------------
   64|      3|      return false;
   65|      3|    }
   66|  18.0k|  }
   67|  6.15k|  return AttributesDecoder::DecodeAttributes(buffer);
   68|  6.15k|}
_ZN5draco37SequentialAttributeDecodersController24DecodePortableAttributesEPNS_13DecoderBufferE:
   71|  6.15k|    DecoderBuffer* in_buffer) {
   72|  6.15k|  const int32_t num_attributes = GetNumAttributes();
   73|  15.9k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (73:19): [True: 12.6k, False: 3.29k]
  ------------------
   74|  12.6k|    if (!sequential_decoders_[i]->DecodePortableAttribute(point_ids_,
  ------------------
  |  Branch (74:9): [True: 2.85k, False: 9.79k]
  ------------------
   75|  12.6k|                                                          in_buffer)) {
   76|  2.85k|      return false;
   77|  2.85k|    }
   78|  12.6k|  }
   79|  3.29k|  return true;
   80|  6.15k|}
_ZN5draco37SequentialAttributeDecodersController36DecodeDataNeededByPortableTransformsEPNS_13DecoderBufferE:
   83|  3.29k|    DecodeDataNeededByPortableTransforms(DecoderBuffer* in_buffer) {
   84|  3.29k|  const int32_t num_attributes = GetNumAttributes();
   85|  8.03k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (85:19): [True: 5.63k, False: 2.39k]
  ------------------
   86|  5.63k|    if (!sequential_decoders_[i]->DecodeDataNeededByPortableTransform(
  ------------------
  |  Branch (86:9): [True: 898, False: 4.73k]
  ------------------
   87|  5.63k|            point_ids_, in_buffer)) {
   88|    898|      return false;
   89|    898|    }
   90|  5.63k|  }
   91|  2.39k|  return true;
   92|  3.29k|}
_ZN5draco37SequentialAttributeDecodersController35TransformAttributesToOriginalFormatEv:
   95|  2.39k|    TransformAttributesToOriginalFormat() {
   96|  2.39k|  const int32_t num_attributes = GetNumAttributes();
   97|  5.98k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (97:19): [True: 4.11k, False: 1.86k]
  ------------------
   98|       |    // Check whether the attribute transform should be skipped.
   99|  4.11k|    if (GetDecoder()->options()) {
  ------------------
  |  Branch (99:9): [True: 4.11k, False: 0]
  ------------------
  100|  4.11k|      const PointAttribute* const attribute =
  101|  4.11k|          sequential_decoders_[i]->attribute();
  102|  4.11k|      const PointAttribute* const portable_attribute =
  103|  4.11k|          sequential_decoders_[i]->GetPortableAttribute();
  104|  4.11k|      if (portable_attribute &&
  ------------------
  |  Branch (104:11): [True: 3.52k, False: 593]
  |  Branch (104:11): [True: 829, False: 3.28k]
  ------------------
  105|  3.52k|          GetDecoder()->options()->GetAttributeBool(
  ------------------
  |  Branch (105:11): [True: 829, False: 2.69k]
  ------------------
  106|  3.52k|              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|    829|        sequential_decoders_[i]->attribute()->CopyFrom(*portable_attribute);
  113|    829|        continue;
  114|    829|      }
  115|  4.11k|    }
  116|  3.28k|    if (!sequential_decoders_[i]->TransformAttributeToOriginalFormat(
  ------------------
  |  Branch (116:9): [True: 535, False: 2.75k]
  ------------------
  117|  3.28k|            point_ids_)) {
  118|    535|      return false;
  119|    535|    }
  120|  3.28k|  }
  121|  1.86k|  return true;
  122|  2.39k|}
_ZN5draco37SequentialAttributeDecodersController23CreateSequentialDecoderEh:
  126|  21.5k|    uint8_t decoder_type) {
  127|  21.5k|  switch (decoder_type) {
  128|  2.17k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_GENERIC:
  ------------------
  |  Branch (128:5): [True: 2.17k, False: 19.3k]
  ------------------
  129|  2.17k|      return std::unique_ptr<SequentialAttributeDecoder>(
  130|  2.17k|          new SequentialAttributeDecoder());
  131|  17.0k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_INTEGER:
  ------------------
  |  Branch (131:5): [True: 17.0k, False: 4.45k]
  ------------------
  132|  17.0k|      return std::unique_ptr<SequentialAttributeDecoder>(
  133|  17.0k|          new SequentialIntegerAttributeDecoder());
  134|    714|    case SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION:
  ------------------
  |  Branch (134:5): [True: 714, False: 20.8k]
  ------------------
  135|    714|      return std::unique_ptr<SequentialAttributeDecoder>(
  136|    714|          new SequentialQuantizationAttributeDecoder());
  137|      0|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
  138|  1.56k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS:
  ------------------
  |  Branch (138:5): [True: 1.56k, False: 19.9k]
  ------------------
  139|  1.56k|      return std::unique_ptr<SequentialNormalAttributeDecoder>(
  140|  1.56k|          new SequentialNormalAttributeDecoder());
  141|      0|#endif
  142|     11|    default:
  ------------------
  |  Branch (142:5): [True: 11, False: 21.5k]
  ------------------
  143|     11|      break;
  144|  21.5k|  }
  145|       |  // Unknown or unsupported decoder type.
  146|     11|  return nullptr;
  147|  21.5k|}

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

_ZN5draco33SequentialIntegerAttributeDecoderC2Ev:
   23|  19.3k|SequentialIntegerAttributeDecoder::SequentialIntegerAttributeDecoder() =
_ZN5draco33SequentialIntegerAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   27|  19.3k|                                             int attribute_id) {
   28|  19.3k|  if (!SequentialAttributeDecoder::Init(decoder, attribute_id)) {
  ------------------
  |  Branch (28:7): [True: 0, False: 19.3k]
  ------------------
   29|      0|    return false;
   30|      0|  }
   31|  19.3k|  return true;
   32|  19.3k|}
_ZN5draco33SequentialIntegerAttributeDecoder34TransformAttributeToOriginalFormatERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEE:
   35|  2.69k|    const std::vector<PointIndex>& point_ids) {
   36|  2.69k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   37|  2.69k|  if (decoder() &&
  ------------------
  |  Branch (37:7): [True: 2.69k, False: 0]
  ------------------
   38|  2.69k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.69k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (38:7): [True: 8, False: 2.68k]
  ------------------
   39|      8|    return true;  // Don't revert the transform here for older files.
   40|      8|  }
   41|  2.68k|#endif
   42|  2.68k|  return StoreValues(static_cast<uint32_t>(point_ids.size()));
   43|  2.69k|}
_ZN5draco33SequentialIntegerAttributeDecoder12DecodeValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   46|  11.8k|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
   47|       |  // Decode prediction scheme.
   48|  11.8k|  int8_t prediction_scheme_method;
   49|  11.8k|  if (!in_buffer->Decode(&prediction_scheme_method)) {
  ------------------
  |  Branch (49:7): [True: 224, False: 11.5k]
  ------------------
   50|    224|    return false;
   51|    224|  }
   52|       |  // Check that decoded prediction scheme method type is valid.
   53|  11.5k|  if (prediction_scheme_method < PREDICTION_NONE ||
  ------------------
  |  Branch (53:7): [True: 75, False: 11.5k]
  ------------------
   54|  11.5k|      prediction_scheme_method >= NUM_PREDICTION_SCHEMES) {
  ------------------
  |  Branch (54:7): [True: 179, False: 11.3k]
  ------------------
   55|    254|    return false;
   56|    254|  }
   57|  11.3k|  if (prediction_scheme_method != PREDICTION_NONE) {
  ------------------
  |  Branch (57:7): [True: 10.8k, False: 452]
  ------------------
   58|  10.8k|    int8_t prediction_transform_type;
   59|  10.8k|    if (!in_buffer->Decode(&prediction_transform_type)) {
  ------------------
  |  Branch (59:9): [True: 90, False: 10.7k]
  ------------------
   60|     90|      return false;
   61|     90|    }
   62|       |    // Check that decoded prediction scheme transform type is valid.
   63|  10.7k|    if (prediction_transform_type < PREDICTION_TRANSFORM_NONE ||
  ------------------
  |  Branch (63:9): [True: 29, False: 10.7k]
  ------------------
   64|  10.7k|        prediction_transform_type >= NUM_PREDICTION_SCHEME_TRANSFORM_TYPES) {
  ------------------
  |  Branch (64:9): [True: 67, False: 10.6k]
  ------------------
   65|     96|      return false;
   66|     96|    }
   67|  10.6k|    prediction_scheme_ = CreateIntPredictionScheme(
   68|  10.6k|        static_cast<PredictionSchemeMethod>(prediction_scheme_method),
   69|  10.6k|        static_cast<PredictionSchemeTransformType>(prediction_transform_type));
   70|  10.6k|  }
   71|       |
   72|  11.1k|  if (prediction_scheme_) {
  ------------------
  |  Branch (72:7): [True: 7.91k, False: 3.22k]
  ------------------
   73|  7.91k|    if (!InitPredictionScheme(prediction_scheme_.get())) {
  ------------------
  |  Branch (73:9): [True: 29, False: 7.88k]
  ------------------
   74|     29|      return false;
   75|     29|    }
   76|  7.91k|  }
   77|       |
   78|  11.1k|  if (!DecodeIntegerValues(point_ids, in_buffer)) {
  ------------------
  |  Branch (78:7): [True: 2.04k, False: 9.06k]
  ------------------
   79|  2.04k|    return false;
   80|  2.04k|  }
   81|       |
   82|  9.06k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   83|  9.06k|  const int32_t num_values = static_cast<uint32_t>(point_ids.size());
   84|  9.06k|  if (decoder() &&
  ------------------
  |  Branch (84:7): [True: 9.06k, False: 0]
  ------------------
   85|  9.06k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  9.06k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (85:7): [True: 32, False: 9.03k]
  ------------------
   86|       |    // For older files, revert the transform right after we decode the data.
   87|     32|    if (!StoreValues(num_values)) {
  ------------------
  |  Branch (87:9): [True: 1, False: 31]
  ------------------
   88|      1|      return false;
   89|      1|    }
   90|     32|  }
   91|  9.06k|#endif
   92|  9.06k|  return true;
   93|  9.06k|}
_ZN5draco33SequentialIntegerAttributeDecoder25CreateIntPredictionSchemeENS_22PredictionSchemeMethodENS_29PredictionSchemeTransformTypeE:
   98|  9.28k|    PredictionSchemeTransformType transform_type) {
   99|  9.28k|  if (transform_type != PREDICTION_TRANSFORM_WRAP) {
  ------------------
  |  Branch (99:7): [True: 2.74k, False: 6.54k]
  ------------------
  100|  2.74k|    return nullptr;  // For now we support only wrap transform.
  101|  2.74k|  }
  102|  6.54k|  return CreatePredictionSchemeForDecoder<
  103|  6.54k|      int32_t, PredictionSchemeWrapDecodingTransform<int32_t>>(
  104|  6.54k|      method, attribute_id(), decoder());
  105|  9.28k|}
_ZN5draco33SequentialIntegerAttributeDecoder19DecodeIntegerValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
  108|  11.0k|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
  109|  11.0k|  const int num_components = GetNumValueComponents();
  110|  11.0k|  if (num_components <= 0) {
  ------------------
  |  Branch (110:7): [True: 0, False: 11.0k]
  ------------------
  111|      0|    return false;
  112|      0|  }
  113|  11.0k|  const size_t num_entries = point_ids.size();
  114|  11.0k|  const size_t num_values = num_entries * num_components;
  115|  11.0k|  PreparePortableAttribute(static_cast<int>(num_entries), num_components);
  116|  11.0k|  int32_t* const portable_attribute_data = GetPortableAttributeData();
  117|  11.0k|  if (portable_attribute_data == nullptr) {
  ------------------
  |  Branch (117:7): [True: 16, False: 11.0k]
  ------------------
  118|     16|    return false;
  119|     16|  }
  120|  11.0k|  uint8_t compressed;
  121|  11.0k|  if (!in_buffer->Decode(&compressed)) {
  ------------------
  |  Branch (121:7): [True: 48, False: 11.0k]
  ------------------
  122|     48|    return false;
  123|     48|  }
  124|  11.0k|  if (compressed > 0) {
  ------------------
  |  Branch (124:7): [True: 663, False: 10.3k]
  ------------------
  125|       |    // Decode compressed values.
  126|    663|    if (!DecodeSymbols(static_cast<uint32_t>(num_values), num_components,
  ------------------
  |  Branch (126:9): [True: 245, False: 418]
  ------------------
  127|    663|                       in_buffer,
  128|    663|                       reinterpret_cast<uint32_t*>(portable_attribute_data))) {
  129|    245|      return false;
  130|    245|    }
  131|  10.3k|  } else {
  132|       |    // Decode the integer data directly.
  133|       |    // Get the number of bytes for a given entry.
  134|  10.3k|    uint8_t num_bytes;
  135|  10.3k|    if (!in_buffer->Decode(&num_bytes)) {
  ------------------
  |  Branch (135:9): [True: 22, False: 10.3k]
  ------------------
  136|     22|      return false;
  137|     22|    }
  138|  10.3k|    if (num_bytes == DataTypeLength(DT_INT32)) {
  ------------------
  |  Branch (138:9): [True: 548, False: 9.80k]
  ------------------
  139|    548|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (139:11): [True: 0, False: 548]
  ------------------
  140|    548|          sizeof(int32_t) * num_values) {
  141|      0|        return false;
  142|      0|      }
  143|    548|      if (!in_buffer->Decode(portable_attribute_data,
  ------------------
  |  Branch (143:11): [True: 3, False: 545]
  ------------------
  144|    548|                             sizeof(int32_t) * num_values)) {
  145|      3|        return false;
  146|      3|      }
  147|  9.80k|    } else {
  148|  9.80k|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (148:11): [True: 25, False: 9.77k]
  ------------------
  149|  9.80k|          num_bytes * num_values) {
  150|     25|        return false;
  151|     25|      }
  152|  9.77k|      if (in_buffer->remaining_size() <
  ------------------
  |  Branch (152:11): [True: 17, False: 9.75k]
  ------------------
  153|  9.77k|          static_cast<int64_t>(num_bytes) * static_cast<int64_t>(num_values)) {
  154|     17|        return false;
  155|     17|      }
  156|  1.50G|      for (size_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (156:26): [True: 1.50G, False: 9.75k]
  ------------------
  157|  1.50G|        if (!in_buffer->Decode(portable_attribute_data + i, num_bytes)) {
  ------------------
  |  Branch (157:13): [True: 0, False: 1.50G]
  ------------------
  158|      0|          return false;
  159|      0|        }
  160|  1.50G|      }
  161|  9.75k|    }
  162|  10.3k|  }
  163|       |
  164|  10.7k|  if (num_values > 0 && (prediction_scheme_ == nullptr ||
  ------------------
  |  Branch (164:7): [True: 10.7k, False: 0]
  |  Branch (164:26): [True: 3.06k, False: 7.66k]
  ------------------
  165|  9.38k|                         !prediction_scheme_->AreCorrectionsPositive())) {
  ------------------
  |  Branch (165:26): [True: 6.32k, False: 1.33k]
  ------------------
  166|       |    // Convert the values back to the original signed format.
  167|  9.38k|    ConvertSymbolsToSignedInts(
  168|  9.38k|        reinterpret_cast<const uint32_t*>(portable_attribute_data),
  169|  9.38k|        static_cast<int>(num_values), portable_attribute_data);
  170|  9.38k|  }
  171|       |
  172|       |  // If the data was encoded with a prediction scheme, we must revert it.
  173|  10.7k|  if (prediction_scheme_) {
  ------------------
  |  Branch (173:7): [True: 7.66k, False: 3.06k]
  ------------------
  174|  7.66k|    prediction_scheme_->SetMaxNumPredictedValues(num_values);
  175|  7.66k|    if (!prediction_scheme_->DecodePredictionData(in_buffer)) {
  ------------------
  |  Branch (175:9): [True: 1.06k, False: 6.59k]
  ------------------
  176|  1.06k|      return false;
  177|  1.06k|    }
  178|       |
  179|  6.59k|    if (num_values > 0) {
  ------------------
  |  Branch (179:9): [True: 6.59k, False: 0]
  ------------------
  180|  6.59k|      if (!prediction_scheme_->ComputeOriginalValues(
  ------------------
  |  Branch (180:11): [True: 592, False: 6.00k]
  ------------------
  181|  6.59k|              portable_attribute_data, portable_attribute_data,
  182|  6.59k|              static_cast<int>(num_values), num_components, point_ids.data())) {
  183|    592|        return false;
  184|    592|      }
  185|  6.59k|    }
  186|  6.59k|  }
  187|  9.06k|  return true;
  188|  10.7k|}
_ZN5draco33SequentialIntegerAttributeDecoder11StoreValuesEj:
  190|  1.99k|bool SequentialIntegerAttributeDecoder::StoreValues(uint32_t num_values) {
  191|  1.99k|  switch (attribute()->data_type()) {
  192|    309|    case DT_UINT8:
  ------------------
  |  Branch (192:5): [True: 309, False: 1.68k]
  ------------------
  193|    309|      StoreTypedValues<uint8_t>(num_values);
  194|    309|      break;
  195|    874|    case DT_INT8:
  ------------------
  |  Branch (195:5): [True: 874, False: 1.11k]
  ------------------
  196|    874|      StoreTypedValues<int8_t>(num_values);
  197|    874|      break;
  198|    144|    case DT_UINT16:
  ------------------
  |  Branch (198:5): [True: 144, False: 1.84k]
  ------------------
  199|    144|      StoreTypedValues<uint16_t>(num_values);
  200|    144|      break;
  201|    176|    case DT_INT16:
  ------------------
  |  Branch (201:5): [True: 176, False: 1.81k]
  ------------------
  202|    176|      StoreTypedValues<int16_t>(num_values);
  203|    176|      break;
  204|    177|    case DT_UINT32:
  ------------------
  |  Branch (204:5): [True: 177, False: 1.81k]
  ------------------
  205|    177|      StoreTypedValues<uint32_t>(num_values);
  206|    177|      break;
  207|    183|    case DT_INT32:
  ------------------
  |  Branch (207:5): [True: 183, False: 1.80k]
  ------------------
  208|    183|      StoreTypedValues<int32_t>(num_values);
  209|    183|      break;
  210|    127|    default:
  ------------------
  |  Branch (210:5): [True: 127, False: 1.86k]
  ------------------
  211|    127|      return false;
  212|  1.99k|  }
  213|  1.86k|  return true;
  214|  1.99k|}
_ZN5draco33SequentialIntegerAttributeDecoder24PreparePortableAttributeEii:
  238|  11.0k|    int num_entries, int num_components) {
  239|  11.0k|  GeometryAttribute ga;
  240|  11.0k|  ga.Init(attribute()->attribute_type(), nullptr, num_components, DT_INT32,
  241|  11.0k|          false, num_components * DataTypeLength(DT_INT32), 0);
  242|  11.0k|  std::unique_ptr<PointAttribute> port_att(new PointAttribute(ga));
  243|  11.0k|  port_att->SetIdentityMapping();
  244|  11.0k|  port_att->Reset(num_entries);
  245|  11.0k|  port_att->set_unique_id(attribute()->unique_id());
  246|  11.0k|  SetPortableAttribute(std::move(port_att));
  247|  11.0k|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIhEEvj:
  217|    309|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|    309|  const int num_components = attribute()->num_components();
  219|    309|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|    309|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|    309|      new AttributeTypeT[num_components]);
  222|    309|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|    309|  int val_id = 0;
  224|    309|  int out_byte_pos = 0;
  225|  19.9M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 19.9M, False: 309]
  ------------------
  226|   256M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 236M, False: 19.9M]
  ------------------
  227|   236M|      const AttributeTypeT value =
  228|   236M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|   236M|      att_val[c] = value;
  230|   236M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|  19.9M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|  19.9M|    out_byte_pos += entry_size;
  234|  19.9M|  }
  235|    309|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIaEEvj:
  217|    874|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|    874|  const int num_components = attribute()->num_components();
  219|    874|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|    874|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|    874|      new AttributeTypeT[num_components]);
  222|    874|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|    874|  int val_id = 0;
  224|    874|  int out_byte_pos = 0;
  225|  84.8M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 84.8M, False: 874]
  ------------------
  226|   758M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 673M, False: 84.8M]
  ------------------
  227|   673M|      const AttributeTypeT value =
  228|   673M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|   673M|      att_val[c] = value;
  230|   673M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|  84.8M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|  84.8M|    out_byte_pos += entry_size;
  234|  84.8M|  }
  235|    874|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesItEEvj:
  217|    144|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|    144|  const int num_components = attribute()->num_components();
  219|    144|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|    144|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|    144|      new AttributeTypeT[num_components]);
  222|    144|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|    144|  int val_id = 0;
  224|    144|  int out_byte_pos = 0;
  225|   429k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 428k, False: 144]
  ------------------
  226|  14.4M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 13.9M, False: 428k]
  ------------------
  227|  13.9M|      const AttributeTypeT value =
  228|  13.9M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|  13.9M|      att_val[c] = value;
  230|  13.9M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|   428k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|   428k|    out_byte_pos += entry_size;
  234|   428k|  }
  235|    144|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIsEEvj:
  217|    176|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|    176|  const int num_components = attribute()->num_components();
  219|    176|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|    176|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|    176|      new AttributeTypeT[num_components]);
  222|    176|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|    176|  int val_id = 0;
  224|    176|  int out_byte_pos = 0;
  225|  1.96M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 1.96M, False: 176]
  ------------------
  226|   225M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 223M, False: 1.96M]
  ------------------
  227|   223M|      const AttributeTypeT value =
  228|   223M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|   223M|      att_val[c] = value;
  230|   223M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|  1.96M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|  1.96M|    out_byte_pos += entry_size;
  234|  1.96M|  }
  235|    176|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIjEEvj:
  217|    177|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|    177|  const int num_components = attribute()->num_components();
  219|    177|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|    177|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|    177|      new AttributeTypeT[num_components]);
  222|    177|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|    177|  int val_id = 0;
  224|    177|  int out_byte_pos = 0;
  225|   786k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 786k, False: 177]
  ------------------
  226|  87.4M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 86.7M, False: 786k]
  ------------------
  227|  86.7M|      const AttributeTypeT value =
  228|  86.7M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|  86.7M|      att_val[c] = value;
  230|  86.7M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|   786k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|   786k|    out_byte_pos += entry_size;
  234|   786k|  }
  235|    177|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIiEEvj:
  217|    183|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|    183|  const int num_components = attribute()->num_components();
  219|    183|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|    183|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|    183|      new AttributeTypeT[num_components]);
  222|    183|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|    183|  int val_id = 0;
  224|    183|  int out_byte_pos = 0;
  225|  2.20M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 2.20M, False: 183]
  ------------------
  226|  86.2M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 84.0M, False: 2.20M]
  ------------------
  227|  84.0M|      const AttributeTypeT value =
  228|  84.0M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|  84.0M|      att_val[c] = value;
  230|  84.0M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|  2.20M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|  2.20M|    out_byte_pos += entry_size;
  234|  2.20M|  }
  235|    183|}

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

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

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

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

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

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

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

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

_ZN5draco10AnsDecoderC2Ev:
   56|  37.8k|  AnsDecoder() : buf(nullptr), buf_offset(0), state(0) {}
rans_bit_decoder.cc:_ZN5dracoL13ans_read_initEPNS_10AnsDecoderEPKhi:
  300|  25.0k|                                const uint8_t* const buf, int offset) {
  301|  25.0k|  unsigned x;
  302|  25.0k|  if (offset < 1) {
  ------------------
  |  Branch (302:7): [True: 22, False: 25.0k]
  ------------------
  303|     22|    return 1;
  304|     22|  }
  305|  25.0k|  ans->buf = buf;
  306|  25.0k|  x = buf[offset - 1] >> 6;
  307|  25.0k|  if (x == 0) {
  ------------------
  |  Branch (307:7): [True: 22.3k, False: 2.74k]
  ------------------
  308|  22.3k|    ans->buf_offset = offset - 1;
  309|  22.3k|    ans->state = buf[offset - 1] & 0x3F;
  310|  22.3k|  } else if (x == 1) {
  ------------------
  |  Branch (310:14): [True: 2.44k, False: 302]
  ------------------
  311|  2.44k|    if (offset < 2) {
  ------------------
  |  Branch (311:9): [True: 1, False: 2.44k]
  ------------------
  312|      1|      return 1;
  313|      1|    }
  314|  2.44k|    ans->buf_offset = offset - 2;
  315|  2.44k|    ans->state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  316|  2.44k|  } else if (x == 2) {
  ------------------
  |  Branch (316:14): [True: 285, False: 17]
  ------------------
  317|    285|    if (offset < 3) {
  ------------------
  |  Branch (317:9): [True: 0, False: 285]
  ------------------
  318|      0|      return 1;
  319|      0|    }
  320|    285|    ans->buf_offset = offset - 3;
  321|    285|    ans->state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  322|    285|  } else {
  323|     17|    return 1;
  324|     17|  }
  325|  25.0k|  ans->state += DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  25.0k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  326|  25.0k|  if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   64|  25.0k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
                if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  25.0k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (326:7): [True: 4, False: 25.0k]
  ------------------
  327|      4|    return 1;
  328|      4|  }
  329|  25.0k|  return 0;
  330|  25.0k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|  2.44k|static uint32_t mem_get_le16(const void* vmem) {
   68|  2.44k|  uint32_t val;
   69|  2.44k|  const uint8_t* mem = (const uint8_t*)vmem;
   70|       |
   71|  2.44k|  val = mem[1] << 8;
   72|  2.44k|  val |= mem[0];
   73|  2.44k|  return val;
   74|  2.44k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    285|static uint32_t mem_get_le24(const void* vmem) {
   77|    285|  uint32_t val;
   78|    285|  const uint8_t* mem = (const uint8_t*)vmem;
   79|       |
   80|    285|  val = mem[2] << 16;
   81|    285|  val |= mem[1] << 8;
   82|    285|  val |= mem[0];
   83|    285|  return val;
   84|    285|}
rans_bit_decoder.cc:_ZN5dracoL14rabs_desc_readEPNS_10AnsDecoderEh:
  166|   133M|static inline int rabs_desc_read(struct AnsDecoder* ans, AnsP8 p0) {
  167|   133M|  int val;
  168|       |#if DRACO_ANS_IMPL1
  169|       |  unsigned l_s;
  170|       |#else
  171|   133M|  unsigned quot, rem, x, xn;
  172|   133M|#endif
  173|   133M|  const AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
  ------------------
  |  |   63|   133M|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  174|   133M|  if (ans->state < DRACO_ANS_L_BASE && ans->buf_offset > 0) {
  ------------------
  |  |   64|   267M|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  |  Branch (174:7): [True: 101M, False: 32.5M]
  |  Branch (174:40): [True: 139k, False: 101M]
  ------------------
  175|   139k|    ans->state = ans->state * DRACO_ANS_IO_BASE + ans->buf[--ans->buf_offset];
  ------------------
  |  |   65|   139k|#define DRACO_ANS_IO_BASE 256
  ------------------
  176|   139k|  }
  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|   133M|  x = ans->state;
  184|   133M|  quot = x / DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|   133M|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  185|   133M|  rem = x % DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|   133M|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  186|   133M|  xn = quot * p;
  187|   133M|  val = rem < p;
  188|   133M|  if (UNPREDICTABLE(val)) {
  ------------------
  |  |  165|   267M|#define UNPREDICTABLE(x) x
  |  |  ------------------
  |  |  |  Branch (165:26): [True: 124M, False: 9.29M]
  |  |  ------------------
  ------------------
  189|   124M|    ans->state = xn + rem;
  190|   124M|  } else {
  191|       |    // ans->state = quot * p0 + rem - p;
  192|  9.29M|    ans->state = x - xn - p;
  193|  9.29M|  }
  194|   133M|#endif
  195|   133M|  return val;
  196|   133M|}
rans_bit_decoder.cc:_ZN5dracoL12ans_read_endEPNS_10AnsDecoderE:
  332|  54.4k|static inline int ans_read_end(struct AnsDecoder* const ans) {
  333|  54.4k|  return ans->state == DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  54.4k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  334|  54.4k|}
_ZN5draco11RAnsDecoderILi12EEC2Ev:
  416|  4.49k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi12EE24rans_build_look_up_tableEPKjj:
  484|  2.55k|                                       uint32_t num_symbols) {
  485|  2.55k|    lut_table_.resize(rans_precision);
  486|  2.55k|    probability_table_.resize(num_symbols);
  487|  2.55k|    uint32_t cum_prob = 0;
  488|  2.55k|    uint32_t act_prob = 0;
  489|  32.0k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 29.6k, False: 2.39k]
  ------------------
  490|  29.6k|      probability_table_[i].prob = token_probs[i];
  491|  29.6k|      probability_table_[i].cum_prob = cum_prob;
  492|  29.6k|      cum_prob += token_probs[i];
  493|  29.6k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 162, False: 29.4k]
  ------------------
  494|    162|        return false;
  495|    162|      }
  496|  8.80M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 8.77M, False: 29.4k]
  ------------------
  497|  8.77M|        lut_table_[j] = i;
  498|  8.77M|      }
  499|  29.4k|      act_prob = cum_prob;
  500|  29.4k|    }
  501|  2.39k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 298, False: 2.09k]
  ------------------
  502|    298|      return false;
  503|    298|    }
  504|  2.09k|    return true;
  505|  2.39k|  }
_ZN5draco11RAnsDecoderILi12EE9read_initEPKhi:
  421|  2.03k|  inline int read_init(const uint8_t* const buf, int offset) {
  422|  2.03k|    unsigned x;
  423|  2.03k|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 200, False: 1.83k]
  ------------------
  424|    200|      return 1;
  425|    200|    }
  426|  1.83k|    ans_.buf = buf;
  427|  1.83k|    x = buf[offset - 1] >> 6;
  428|  1.83k|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 1.11k, False: 728]
  ------------------
  429|  1.11k|      ans_.buf_offset = offset - 1;
  430|  1.11k|      ans_.state = buf[offset - 1] & 0x3F;
  431|  1.11k|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 332, False: 396]
  ------------------
  432|    332|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 70, False: 262]
  ------------------
  433|     70|        return 1;
  434|     70|      }
  435|    262|      ans_.buf_offset = offset - 2;
  436|    262|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    396|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 247, False: 149]
  ------------------
  438|    247|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 76, False: 171]
  ------------------
  439|     76|        return 1;
  440|     76|      }
  441|    171|      ans_.buf_offset = offset - 3;
  442|    171|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    171|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 149, False: 0]
  ------------------
  444|    149|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 68, False: 81]
  ------------------
  445|     68|        return 1;
  446|     68|      }
  447|     81|      ans_.buf_offset = offset - 4;
  448|     81|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     81|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|  1.62k|    ans_.state += l_rans_base;
  453|  1.62k|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  1.62k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 80, False: 1.54k]
  ------------------
  454|     80|      return 1;
  455|     80|    }
  456|  1.54k|    return 0;
  457|  1.62k|  }
symbol_decoding.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|    415|static uint32_t mem_get_le16(const void* vmem) {
   68|    415|  uint32_t val;
   69|    415|  const uint8_t* mem = (const uint8_t*)vmem;
   70|       |
   71|    415|  val = mem[1] << 8;
   72|    415|  val |= mem[0];
   73|    415|  return val;
   74|    415|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    304|static uint32_t mem_get_le24(const void* vmem) {
   77|    304|  uint32_t val;
   78|    304|  const uint8_t* mem = (const uint8_t*)vmem;
   79|       |
   80|    304|  val = mem[2] << 16;
   81|    304|  val |= mem[1] << 8;
   82|    304|  val |= mem[0];
   83|    304|  return val;
   84|    304|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le32EPKv:
   86|    360|static inline uint32_t mem_get_le32(const void* vmem) {
   87|    360|  uint32_t val;
   88|    360|  const uint8_t* mem = (const uint8_t*)vmem;
   89|       |
   90|    360|  val = mem[3] << 24;
   91|    360|  val |= mem[2] << 16;
   92|    360|  val |= mem[1] << 8;
   93|    360|  val |= mem[0];
   94|    360|  return val;
   95|    360|}
_ZN5draco11RAnsDecoderILi12EE9rans_readEv:
  465|   149M|  inline int rans_read() {
  466|   149M|    unsigned rem;
  467|   149M|    unsigned quo;
  468|   149M|    struct rans_dec_sym sym;
  469|   149M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 125M, False: 23.1M]
  |  Branch (469:40): [True: 25.8k, False: 125M]
  ------------------
  470|  25.8k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  25.8k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  25.8k|    }
  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|   149M|    quo = ans_.state / rans_precision;
  475|   149M|    rem = ans_.state % rans_precision;
  476|   149M|    fetch_sym(&sym, rem);
  477|   149M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   149M|    return sym.val;
  479|   149M|  }
_ZN5draco11RAnsDecoderILi12EE9fetch_symEPNS_12rans_dec_symEj:
  508|   149M|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   149M|    uint32_t symbol = lut_table_[rem];
  510|   149M|    out->val = symbol;
  511|   149M|    out->prob = probability_table_[symbol].prob;
  512|   149M|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   149M|  }
_ZN5draco11RAnsDecoderILi12EE8read_endEv:
  459|  1.48k|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi13EEC2Ev:
  416|    507|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi13EE24rans_build_look_up_tableEPKjj:
  484|    385|                                       uint32_t num_symbols) {
  485|    385|    lut_table_.resize(rans_precision);
  486|    385|    probability_table_.resize(num_symbols);
  487|    385|    uint32_t cum_prob = 0;
  488|    385|    uint32_t act_prob = 0;
  489|  16.9k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 16.5k, False: 358]
  ------------------
  490|  16.5k|      probability_table_[i].prob = token_probs[i];
  491|  16.5k|      probability_table_[i].cum_prob = cum_prob;
  492|  16.5k|      cum_prob += token_probs[i];
  493|  16.5k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 27, False: 16.5k]
  ------------------
  494|     27|        return false;
  495|     27|      }
  496|  2.78M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 2.76M, False: 16.5k]
  ------------------
  497|  2.76M|        lut_table_[j] = i;
  498|  2.76M|      }
  499|  16.5k|      act_prob = cum_prob;
  500|  16.5k|    }
  501|    358|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 32, False: 326]
  ------------------
  502|     32|      return false;
  503|     32|    }
  504|    326|    return true;
  505|    358|  }
_ZN5draco11RAnsDecoderILi13EE9read_initEPKhi:
  421|    305|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    305|    unsigned x;
  423|    305|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 9, False: 296]
  ------------------
  424|      9|      return 1;
  425|      9|    }
  426|    296|    ans_.buf = buf;
  427|    296|    x = buf[offset - 1] >> 6;
  428|    296|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 183, False: 113]
  ------------------
  429|    183|      ans_.buf_offset = offset - 1;
  430|    183|      ans_.state = buf[offset - 1] & 0x3F;
  431|    183|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 54, False: 59]
  ------------------
  432|     54|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 15, False: 39]
  ------------------
  433|     15|        return 1;
  434|     15|      }
  435|     39|      ans_.buf_offset = offset - 2;
  436|     39|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     59|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 33, False: 26]
  ------------------
  438|     33|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 9, False: 24]
  ------------------
  439|      9|        return 1;
  440|      9|      }
  441|     24|      ans_.buf_offset = offset - 3;
  442|     24|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     26|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 26, False: 0]
  ------------------
  444|     26|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 10, False: 16]
  ------------------
  445|     10|        return 1;
  446|     10|      }
  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|    262|    ans_.state += l_rans_base;
  453|    262|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    262|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 12, False: 250]
  ------------------
  454|     12|      return 1;
  455|     12|    }
  456|    250|    return 0;
  457|    262|  }
_ZN5draco11RAnsDecoderILi13EE9rans_readEv:
  465|  12.4M|  inline int rans_read() {
  466|  12.4M|    unsigned rem;
  467|  12.4M|    unsigned quo;
  468|  12.4M|    struct rans_dec_sym sym;
  469|  12.4M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 12.4M, False: 22.6k]
  |  Branch (469:40): [True: 2.79k, False: 12.4M]
  ------------------
  470|  2.79k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  2.79k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  2.79k|    }
  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|  12.4M|    quo = ans_.state / rans_precision;
  475|  12.4M|    rem = ans_.state % rans_precision;
  476|  12.4M|    fetch_sym(&sym, rem);
  477|  12.4M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|  12.4M|    return sym.val;
  479|  12.4M|  }
_ZN5draco11RAnsDecoderILi13EE9fetch_symEPNS_12rans_dec_symEj:
  508|  12.4M|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|  12.4M|    uint32_t symbol = lut_table_[rem];
  510|  12.4M|    out->val = symbol;
  511|  12.4M|    out->prob = probability_table_[symbol].prob;
  512|  12.4M|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|  12.4M|  }
_ZN5draco11RAnsDecoderILi13EE8read_endEv:
  459|    250|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi15EEC2Ev:
  416|    474|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi15EE24rans_build_look_up_tableEPKjj:
  484|    336|                                       uint32_t num_symbols) {
  485|    336|    lut_table_.resize(rans_precision);
  486|    336|    probability_table_.resize(num_symbols);
  487|    336|    uint32_t cum_prob = 0;
  488|    336|    uint32_t act_prob = 0;
  489|  4.04k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 3.72k, False: 318]
  ------------------
  490|  3.72k|      probability_table_[i].prob = token_probs[i];
  491|  3.72k|      probability_table_[i].cum_prob = cum_prob;
  492|  3.72k|      cum_prob += token_probs[i];
  493|  3.72k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 18, False: 3.70k]
  ------------------
  494|     18|        return false;
  495|     18|      }
  496|  8.84M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 8.83M, False: 3.70k]
  ------------------
  497|  8.83M|        lut_table_[j] = i;
  498|  8.83M|      }
  499|  3.70k|      act_prob = cum_prob;
  500|  3.70k|    }
  501|    318|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 61, False: 257]
  ------------------
  502|     61|      return false;
  503|     61|    }
  504|    257|    return true;
  505|    318|  }
_ZN5draco11RAnsDecoderILi15EE9read_initEPKhi:
  421|    124|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    124|    unsigned x;
  423|    124|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 11, False: 113]
  ------------------
  424|     11|      return 1;
  425|     11|    }
  426|    113|    ans_.buf = buf;
  427|    113|    x = buf[offset - 1] >> 6;
  428|    113|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 37, False: 76]
  ------------------
  429|     37|      ans_.buf_offset = offset - 1;
  430|     37|      ans_.state = buf[offset - 1] & 0x3F;
  431|     76|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 21, False: 55]
  ------------------
  432|     21|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 11, False: 10]
  ------------------
  433|     11|        return 1;
  434|     11|      }
  435|     10|      ans_.buf_offset = offset - 2;
  436|     10|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     55|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 23, False: 32]
  ------------------
  438|     23|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 12, False: 11]
  ------------------
  439|     12|        return 1;
  440|     12|      }
  441|     11|      ans_.buf_offset = offset - 3;
  442|     11|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     32|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 32, False: 0]
  ------------------
  444|     32|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 9, False: 23]
  ------------------
  445|      9|        return 1;
  446|      9|      }
  447|     23|      ans_.buf_offset = offset - 4;
  448|     23|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     23|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     81|    ans_.state += l_rans_base;
  453|     81|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     81|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 11, False: 70]
  ------------------
  454|     11|      return 1;
  455|     11|    }
  456|     70|    return 0;
  457|     81|  }
_ZN5draco11RAnsDecoderILi15EE9rans_readEv:
  465|   474k|  inline int rans_read() {
  466|   474k|    unsigned rem;
  467|   474k|    unsigned quo;
  468|   474k|    struct rans_dec_sym sym;
  469|   475k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 226k, False: 249k]
  |  Branch (469:40): [True: 891, False: 225k]
  ------------------
  470|    891|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    891|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|    891|    }
  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|   474k|    quo = ans_.state / rans_precision;
  475|   474k|    rem = ans_.state % rans_precision;
  476|   474k|    fetch_sym(&sym, rem);
  477|   474k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   474k|    return sym.val;
  479|   474k|  }
_ZN5draco11RAnsDecoderILi15EE9fetch_symEPNS_12rans_dec_symEj:
  508|   474k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   474k|    uint32_t symbol = lut_table_[rem];
  510|   474k|    out->val = symbol;
  511|   474k|    out->prob = probability_table_[symbol].prob;
  512|   474k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   474k|  }
_ZN5draco11RAnsDecoderILi15EE8read_endEv:
  459|     70|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi16EEC2Ev:
  416|    372|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi16EE24rans_build_look_up_tableEPKjj:
  484|    227|                                       uint32_t num_symbols) {
  485|    227|    lut_table_.resize(rans_precision);
  486|    227|    probability_table_.resize(num_symbols);
  487|    227|    uint32_t cum_prob = 0;
  488|    227|    uint32_t act_prob = 0;
  489|  6.26k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 6.05k, False: 210]
  ------------------
  490|  6.05k|      probability_table_[i].prob = token_probs[i];
  491|  6.05k|      probability_table_[i].cum_prob = cum_prob;
  492|  6.05k|      cum_prob += token_probs[i];
  493|  6.05k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 17, False: 6.03k]
  ------------------
  494|     17|        return false;
  495|     17|      }
  496|  12.2M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 12.2M, False: 6.03k]
  ------------------
  497|  12.2M|        lut_table_[j] = i;
  498|  12.2M|      }
  499|  6.03k|      act_prob = cum_prob;
  500|  6.03k|    }
  501|    210|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 34, False: 176]
  ------------------
  502|     34|      return false;
  503|     34|    }
  504|    176|    return true;
  505|    210|  }
_ZN5draco11RAnsDecoderILi16EE9read_initEPKhi:
  421|    104|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    104|    unsigned x;
  423|    104|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 8, False: 96]
  ------------------
  424|      8|      return 1;
  425|      8|    }
  426|     96|    ans_.buf = buf;
  427|     96|    x = buf[offset - 1] >> 6;
  428|     96|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 38, False: 58]
  ------------------
  429|     38|      ans_.buf_offset = offset - 1;
  430|     38|      ans_.state = buf[offset - 1] & 0x3F;
  431|     58|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 17, False: 41]
  ------------------
  432|     17|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 5, False: 12]
  ------------------
  433|      5|        return 1;
  434|      5|      }
  435|     12|      ans_.buf_offset = offset - 2;
  436|     12|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     41|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 12, False: 29]
  ------------------
  438|     12|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 0, False: 12]
  ------------------
  439|      0|        return 1;
  440|      0|      }
  441|     12|      ans_.buf_offset = offset - 3;
  442|     12|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     29|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 29, False: 0]
  ------------------
  444|     29|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 0, False: 29]
  ------------------
  445|      0|        return 1;
  446|      0|      }
  447|     29|      ans_.buf_offset = offset - 4;
  448|     29|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     29|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     91|    ans_.state += l_rans_base;
  453|     91|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     91|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 22, False: 69]
  ------------------
  454|     22|      return 1;
  455|     22|    }
  456|     69|    return 0;
  457|     91|  }
_ZN5draco11RAnsDecoderILi16EE9rans_readEv:
  465|   525k|  inline int rans_read() {
  466|   525k|    unsigned rem;
  467|   525k|    unsigned quo;
  468|   525k|    struct rans_dec_sym sym;
  469|   526k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 181k, False: 344k]
  |  Branch (469:40): [True: 937, False: 180k]
  ------------------
  470|    937|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    937|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|    937|    }
  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|   525k|    quo = ans_.state / rans_precision;
  475|   525k|    rem = ans_.state % rans_precision;
  476|   525k|    fetch_sym(&sym, rem);
  477|   525k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   525k|    return sym.val;
  479|   525k|  }
_ZN5draco11RAnsDecoderILi16EE9fetch_symEPNS_12rans_dec_symEj:
  508|   525k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   525k|    uint32_t symbol = lut_table_[rem];
  510|   525k|    out->val = symbol;
  511|   525k|    out->prob = probability_table_[symbol].prob;
  512|   525k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   525k|  }
_ZN5draco11RAnsDecoderILi16EE8read_endEv:
  459|     69|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi18EEC2Ev:
  416|    353|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi18EE24rans_build_look_up_tableEPKjj:
  484|    218|                                       uint32_t num_symbols) {
  485|    218|    lut_table_.resize(rans_precision);
  486|    218|    probability_table_.resize(num_symbols);
  487|    218|    uint32_t cum_prob = 0;
  488|    218|    uint32_t act_prob = 0;
  489|  30.2k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 30.0k, False: 192]
  ------------------
  490|  30.0k|      probability_table_[i].prob = token_probs[i];
  491|  30.0k|      probability_table_[i].cum_prob = cum_prob;
  492|  30.0k|      cum_prob += token_probs[i];
  493|  30.0k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 26, False: 30.0k]
  ------------------
  494|     26|        return false;
  495|     26|      }
  496|  45.1M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 45.0M, False: 30.0k]
  ------------------
  497|  45.0M|        lut_table_[j] = i;
  498|  45.0M|      }
  499|  30.0k|      act_prob = cum_prob;
  500|  30.0k|    }
  501|    192|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 34, False: 158]
  ------------------
  502|     34|      return false;
  503|     34|    }
  504|    158|    return true;
  505|    192|  }
_ZN5draco11RAnsDecoderILi18EE9read_initEPKhi:
  421|    109|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    109|    unsigned x;
  423|    109|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 3, False: 106]
  ------------------
  424|      3|      return 1;
  425|      3|    }
  426|    106|    ans_.buf = buf;
  427|    106|    x = buf[offset - 1] >> 6;
  428|    106|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 29, False: 77]
  ------------------
  429|     29|      ans_.buf_offset = offset - 1;
  430|     29|      ans_.state = buf[offset - 1] & 0x3F;
  431|     77|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 21, False: 56]
  ------------------
  432|     21|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 9, False: 12]
  ------------------
  433|      9|        return 1;
  434|      9|      }
  435|     12|      ans_.buf_offset = offset - 2;
  436|     12|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     56|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 19, False: 37]
  ------------------
  438|     19|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 10, False: 9]
  ------------------
  439|     10|        return 1;
  440|     10|      }
  441|      9|      ans_.buf_offset = offset - 3;
  442|      9|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     37|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 37, False: 0]
  ------------------
  444|     37|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 9, False: 28]
  ------------------
  445|      9|        return 1;
  446|      9|      }
  447|     28|      ans_.buf_offset = offset - 4;
  448|     28|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     28|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     78|    ans_.state += l_rans_base;
  453|     78|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     78|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 19, False: 59]
  ------------------
  454|     19|      return 1;
  455|     19|    }
  456|     59|    return 0;
  457|     78|  }
_ZN5draco11RAnsDecoderILi18EE9rans_readEv:
  465|  92.7k|  inline int rans_read() {
  466|  92.7k|    unsigned rem;
  467|  92.7k|    unsigned quo;
  468|  92.7k|    struct rans_dec_sym sym;
  469|  93.5k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 85.7k, False: 7.76k]
  |  Branch (469:40): [True: 718, False: 85.0k]
  ------------------
  470|    718|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    718|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|    718|    }
  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|  92.7k|    quo = ans_.state / rans_precision;
  475|  92.7k|    rem = ans_.state % rans_precision;
  476|  92.7k|    fetch_sym(&sym, rem);
  477|  92.7k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|  92.7k|    return sym.val;
  479|  92.7k|  }
_ZN5draco11RAnsDecoderILi18EE9fetch_symEPNS_12rans_dec_symEj:
  508|  92.7k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|  92.7k|    uint32_t symbol = lut_table_[rem];
  510|  92.7k|    out->val = symbol;
  511|  92.7k|    out->prob = probability_table_[symbol].prob;
  512|  92.7k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|  92.7k|  }
_ZN5draco11RAnsDecoderILi18EE8read_endEv:
  459|     59|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi19EEC2Ev:
  416|    466|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi19EE24rans_build_look_up_tableEPKjj:
  484|    311|                                       uint32_t num_symbols) {
  485|    311|    lut_table_.resize(rans_precision);
  486|    311|    probability_table_.resize(num_symbols);
  487|    311|    uint32_t cum_prob = 0;
  488|    311|    uint32_t act_prob = 0;
  489|  4.32k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 4.02k, False: 293]
  ------------------
  490|  4.02k|      probability_table_[i].prob = token_probs[i];
  491|  4.02k|      probability_table_[i].cum_prob = cum_prob;
  492|  4.02k|      cum_prob += token_probs[i];
  493|  4.02k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 18, False: 4.00k]
  ------------------
  494|     18|        return false;
  495|     18|      }
  496|   135M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 135M, False: 4.00k]
  ------------------
  497|   135M|        lut_table_[j] = i;
  498|   135M|      }
  499|  4.00k|      act_prob = cum_prob;
  500|  4.00k|    }
  501|    293|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 57, False: 236]
  ------------------
  502|     57|      return false;
  503|     57|    }
  504|    236|    return true;
  505|    293|  }
_ZN5draco11RAnsDecoderILi19EE9read_initEPKhi:
  421|    127|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    127|    unsigned x;
  423|    127|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 5, False: 122]
  ------------------
  424|      5|      return 1;
  425|      5|    }
  426|    122|    ans_.buf = buf;
  427|    122|    x = buf[offset - 1] >> 6;
  428|    122|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 33, False: 89]
  ------------------
  429|     33|      ans_.buf_offset = offset - 1;
  430|     33|      ans_.state = buf[offset - 1] & 0x3F;
  431|     89|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 26, False: 63]
  ------------------
  432|     26|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 6, False: 20]
  ------------------
  433|      6|        return 1;
  434|      6|      }
  435|     20|      ans_.buf_offset = offset - 2;
  436|     20|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     63|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 14, False: 49]
  ------------------
  438|     14|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 7, False: 7]
  ------------------
  439|      7|        return 1;
  440|      7|      }
  441|      7|      ans_.buf_offset = offset - 3;
  442|      7|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     49|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 49, False: 0]
  ------------------
  444|     49|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 9, False: 40]
  ------------------
  445|      9|        return 1;
  446|      9|      }
  447|     40|      ans_.buf_offset = offset - 4;
  448|     40|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     40|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|    100|    ans_.state += l_rans_base;
  453|    100|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    100|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 15, False: 85]
  ------------------
  454|     15|      return 1;
  455|     15|    }
  456|     85|    return 0;
  457|    100|  }
_ZN5draco11RAnsDecoderILi19EE9rans_readEv:
  465|   112k|  inline int rans_read() {
  466|   112k|    unsigned rem;
  467|   112k|    unsigned quo;
  468|   112k|    struct rans_dec_sym sym;
  469|   113k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 99.3k, False: 14.4k]
  |  Branch (469:40): [True: 976, False: 98.3k]
  ------------------
  470|    976|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    976|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|    976|    }
  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|   112k|    quo = ans_.state / rans_precision;
  475|   112k|    rem = ans_.state % rans_precision;
  476|   112k|    fetch_sym(&sym, rem);
  477|   112k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   112k|    return sym.val;
  479|   112k|  }
_ZN5draco11RAnsDecoderILi19EE9fetch_symEPNS_12rans_dec_symEj:
  508|   112k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   112k|    uint32_t symbol = lut_table_[rem];
  510|   112k|    out->val = symbol;
  511|   112k|    out->prob = probability_table_[symbol].prob;
  512|   112k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   112k|  }
_ZN5draco11RAnsDecoderILi19EE8read_endEv:
  459|     85|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi20EEC2Ev:
  416|  2.08k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi20EE24rans_build_look_up_tableEPKjj:
  484|  1.28k|                                       uint32_t num_symbols) {
  485|  1.28k|    lut_table_.resize(rans_precision);
  486|  1.28k|    probability_table_.resize(num_symbols);
  487|  1.28k|    uint32_t cum_prob = 0;
  488|  1.28k|    uint32_t act_prob = 0;
  489|  34.5k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 33.3k, False: 1.22k]
  ------------------
  490|  33.3k|      probability_table_[i].prob = token_probs[i];
  491|  33.3k|      probability_table_[i].cum_prob = cum_prob;
  492|  33.3k|      cum_prob += token_probs[i];
  493|  33.3k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 56, False: 33.2k]
  ------------------
  494|     56|        return false;
  495|     56|      }
  496|  1.19G|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 1.19G, False: 33.2k]
  ------------------
  497|  1.19G|        lut_table_[j] = i;
  498|  1.19G|      }
  499|  33.2k|      act_prob = cum_prob;
  500|  33.2k|    }
  501|  1.22k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 124, False: 1.10k]
  ------------------
  502|    124|      return false;
  503|    124|    }
  504|  1.10k|    return true;
  505|  1.22k|  }
_ZN5draco11RAnsDecoderILi20EE9read_initEPKhi:
  421|    600|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    600|    unsigned x;
  423|    600|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 53, False: 547]
  ------------------
  424|     53|      return 1;
  425|     53|    }
  426|    547|    ans_.buf = buf;
  427|    547|    x = buf[offset - 1] >> 6;
  428|    547|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 151, False: 396]
  ------------------
  429|    151|      ans_.buf_offset = offset - 1;
  430|    151|      ans_.state = buf[offset - 1] & 0x3F;
  431|    396|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 95, False: 301]
  ------------------
  432|     95|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 35, False: 60]
  ------------------
  433|     35|        return 1;
  434|     35|      }
  435|     60|      ans_.buf_offset = offset - 2;
  436|     60|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    301|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 112, False: 189]
  ------------------
  438|    112|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 42, False: 70]
  ------------------
  439|     42|        return 1;
  440|     42|      }
  441|     70|      ans_.buf_offset = offset - 3;
  442|     70|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    189|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 189, False: 0]
  ------------------
  444|    189|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 46, False: 143]
  ------------------
  445|     46|        return 1;
  446|     46|      }
  447|    143|      ans_.buf_offset = offset - 4;
  448|    143|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|    143|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|    424|    ans_.state += l_rans_base;
  453|    424|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    424|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 36, False: 388]
  ------------------
  454|     36|      return 1;
  455|     36|    }
  456|    388|    return 0;
  457|    424|  }
_ZN5draco11RAnsDecoderILi20EE9rans_readEv:
  465|   774k|  inline int rans_read() {
  466|   774k|    unsigned rem;
  467|   774k|    unsigned quo;
  468|   774k|    struct rans_dec_sym sym;
  469|   778k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 630k, False: 147k]
  |  Branch (469:40): [True: 3.96k, False: 626k]
  ------------------
  470|  3.96k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  3.96k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  3.96k|    }
  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|   774k|    quo = ans_.state / rans_precision;
  475|   774k|    rem = ans_.state % rans_precision;
  476|   774k|    fetch_sym(&sym, rem);
  477|   774k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   774k|    return sym.val;
  479|   774k|  }
_ZN5draco11RAnsDecoderILi20EE9fetch_symEPNS_12rans_dec_symEj:
  508|   774k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   774k|    uint32_t symbol = lut_table_[rem];
  510|   774k|    out->val = symbol;
  511|   774k|    out->prob = probability_table_[symbol].prob;
  512|   774k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   774k|  }
_ZN5draco11RAnsDecoderILi20EE8read_endEv:
  459|    388|  inline int read_end() { return ans_.state == l_rans_base; }

_ZN5draco17RAnsSymbolDecoderILi5EEC2Ev:
   33|  1.47k|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi5EE6CreateEPNS_13DecoderBufferE:
   59|  1.47k|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|  1.47k|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 1.47k]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|  1.47k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|  1.47k|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.47k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 171, False: 1.30k]
  ------------------
   67|    171|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 11, False: 160]
  ------------------
   68|     11|      return false;
   69|     11|    }
   70|       |
   71|    171|  } else
   72|  1.30k|#endif
   73|  1.30k|  {
   74|  1.30k|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 46, False: 1.26k]
  ------------------
   75|     46|      return false;
   76|     46|    }
   77|  1.30k|  }
   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|  1.42k|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 120, False: 1.30k]
  ------------------
   83|    120|    return false;
   84|    120|  }
   85|  1.30k|  probability_table_.resize(num_symbols_);
   86|  1.30k|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 400, False: 902]
  ------------------
   87|    400|    return true;
   88|    400|  }
   89|       |  // Decode the table.
   90|   660k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 659k, False: 610]
  ------------------
   91|   659k|    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|   659k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 77, False: 659k]
  ------------------
   95|     77|      return false;
   96|     77|    }
   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|   659k|    const int token = prob_data & 3;
  102|   659k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 148k, False: 510k]
  ------------------
  103|   148k|      const uint32_t offset = prob_data >> 2;
  104|   148k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 179, False: 148k]
  ------------------
  105|    179|        return false;
  106|    179|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  5.16M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 5.01M, False: 148k]
  ------------------
  109|  5.01M|        probability_table_[i + j] = 0;
  110|  5.01M|      }
  111|   148k|      i += offset;
  112|   510k|    } else {
  113|   510k|      const int extra_bytes = token;
  114|   510k|      uint32_t prob = prob_data >> 2;
  115|   983k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 473k, False: 510k]
  ------------------
  116|   473k|        uint8_t eb;
  117|   473k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 36, False: 473k]
  ------------------
  118|     36|          return false;
  119|     36|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   473k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   473k|      }
  124|   510k|      probability_table_[i] = prob;
  125|   510k|    }
  126|   659k|  }
  127|    610|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 145, False: 465]
  ------------------
  128|    145|    return false;
  129|    145|  }
  130|    465|  return true;
  131|    610|}
_ZN5draco17RAnsSymbolDecoderILi5EE13StartDecodingEPNS_13DecoderBufferE:
  135|    802|    DecoderBuffer* buffer) {
  136|    802|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    802|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    802|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    802|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 59, False: 743]
  ------------------
  140|     59|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 6, False: 53]
  ------------------
  141|      6|      return false;
  142|      6|    }
  143|       |
  144|     59|  } else
  145|    743|#endif
  146|    743|  {
  147|    743|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 17, False: 726]
  ------------------
  148|     17|      return false;
  149|     17|    }
  150|    743|  }
  151|    779|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 115, False: 664]
  ------------------
  152|    115|    return false;
  153|    115|  }
  154|    664|  const uint8_t* const data_head =
  155|    664|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    664|  buffer->Advance(bytes_encoded);
  158|    664|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 170, False: 494]
  ------------------
  159|    170|    return false;
  160|    170|  }
  161|    494|  return true;
  162|    664|}
_ZNK5draco17RAnsSymbolDecoderILi5EE11num_symbolsEv:
   38|    572|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi5EE12DecodeSymbolEv:
   43|  15.4M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi5EE11EndDecodingEv:
  165|    430|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    430|  ans_.read_end();
  167|    430|}
_ZN5draco17RAnsSymbolDecoderILi1EEC2Ev:
   33|    704|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi1EE6CreateEPNS_13DecoderBufferE:
   59|    704|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    704|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 704]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    704|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    704|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    704|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 85, False: 619]
  ------------------
   67|     85|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 5, False: 80]
  ------------------
   68|      5|      return false;
   69|      5|    }
   70|       |
   71|     85|  } else
   72|    619|#endif
   73|    619|  {
   74|    619|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 34, False: 585]
  ------------------
   75|     34|      return false;
   76|     34|    }
   77|    619|  }
   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|    665|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 85, False: 580]
  ------------------
   83|     85|    return false;
   84|     85|  }
   85|    580|  probability_table_.resize(num_symbols_);
   86|    580|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 38, False: 542]
  ------------------
   87|     38|    return true;
   88|     38|  }
   89|       |  // Decode the table.
   90|  1.09M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.09M, False: 397]
  ------------------
   91|  1.09M|    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.09M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 55, False: 1.09M]
  ------------------
   95|     55|      return false;
   96|     55|    }
   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.09M|    const int token = prob_data & 3;
  102|  1.09M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 586k, False: 509k]
  ------------------
  103|   586k|      const uint32_t offset = prob_data >> 2;
  104|   586k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 66, False: 585k]
  ------------------
  105|     66|        return false;
  106|     66|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  27.6M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 27.0M, False: 585k]
  ------------------
  109|  27.0M|        probability_table_[i + j] = 0;
  110|  27.0M|      }
  111|   585k|      i += offset;
  112|   585k|    } else {
  113|   509k|      const int extra_bytes = token;
  114|   509k|      uint32_t prob = prob_data >> 2;
  115|   893k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 384k, False: 509k]
  ------------------
  116|   384k|        uint8_t eb;
  117|   384k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 24, False: 384k]
  ------------------
  118|     24|          return false;
  119|     24|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   384k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   384k|      }
  124|   509k|      probability_table_[i] = prob;
  125|   509k|    }
  126|  1.09M|  }
  127|    397|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 172, False: 225]
  ------------------
  128|    172|    return false;
  129|    172|  }
  130|    225|  return true;
  131|    397|}
_ZNK5draco17RAnsSymbolDecoderILi1EE11num_symbolsEv:
   38|    263|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi1EE13StartDecodingEPNS_13DecoderBufferE:
  135|    225|    DecoderBuffer* buffer) {
  136|    225|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    225|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    225|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    225|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 2, False: 223]
  ------------------
  140|      2|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 2]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      2|  } else
  145|    223|#endif
  146|    223|  {
  147|    223|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 18, False: 205]
  ------------------
  148|     18|      return false;
  149|     18|    }
  150|    223|  }
  151|    207|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 17, False: 190]
  ------------------
  152|     17|    return false;
  153|     17|  }
  154|    190|  const uint8_t* const data_head =
  155|    190|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    190|  buffer->Advance(bytes_encoded);
  158|    190|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 45, False: 145]
  ------------------
  159|     45|    return false;
  160|     45|  }
  161|    145|  return true;
  162|    190|}
_ZN5draco17RAnsSymbolDecoderILi1EE12DecodeSymbolEv:
   43|  41.2M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi1EE11EndDecodingEv:
  165|    145|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    145|  ans_.read_end();
  167|    145|}
_ZN5draco17RAnsSymbolDecoderILi2EEC2Ev:
   33|    431|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi2EE6CreateEPNS_13DecoderBufferE:
   59|    431|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    431|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 431]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    431|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    431|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    431|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 22, False: 409]
  ------------------
   67|     22|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 22]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     22|  } else
   72|    409|#endif
   73|    409|  {
   74|    409|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 12, False: 397]
  ------------------
   75|     12|      return false;
   76|     12|    }
   77|    409|  }
   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|    419|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 27, False: 392]
  ------------------
   83|     27|    return false;
   84|     27|  }
   85|    392|  probability_table_.resize(num_symbols_);
   86|    392|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 14, False: 378]
  ------------------
   87|     14|    return true;
   88|     14|  }
   89|       |  // Decode the table.
   90|  98.0k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 97.7k, False: 282]
  ------------------
   91|  97.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|  97.7k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 58, False: 97.7k]
  ------------------
   95|     58|      return false;
   96|     58|    }
   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|  97.7k|    const int token = prob_data & 3;
  102|  97.7k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 24.2k, False: 73.4k]
  ------------------
  103|  24.2k|      const uint32_t offset = prob_data >> 2;
  104|  24.2k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 21, False: 24.2k]
  ------------------
  105|     21|        return false;
  106|     21|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   734k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 710k, False: 24.2k]
  ------------------
  109|   710k|        probability_table_[i + j] = 0;
  110|   710k|      }
  111|  24.2k|      i += offset;
  112|  73.4k|    } else {
  113|  73.4k|      const int extra_bytes = token;
  114|  73.4k|      uint32_t prob = prob_data >> 2;
  115|   110k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 36.8k, False: 73.4k]
  ------------------
  116|  36.8k|        uint8_t eb;
  117|  36.8k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 17, False: 36.8k]
  ------------------
  118|     17|          return false;
  119|     17|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  36.8k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  36.8k|      }
  124|  73.4k|      probability_table_[i] = prob;
  125|  73.4k|    }
  126|  97.7k|  }
  127|    282|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 29, False: 253]
  ------------------
  128|     29|    return false;
  129|     29|  }
  130|    253|  return true;
  131|    282|}
_ZNK5draco17RAnsSymbolDecoderILi2EE11num_symbolsEv:
   38|    267|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi2EE13StartDecodingEPNS_13DecoderBufferE:
  135|    253|    DecoderBuffer* buffer) {
  136|    253|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    253|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    253|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    253|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 5, False: 248]
  ------------------
  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|    248|#endif
  146|    248|  {
  147|    248|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 2, False: 246]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|    248|  }
  151|    251|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 25, False: 226]
  ------------------
  152|     25|    return false;
  153|     25|  }
  154|    226|  const uint8_t* const data_head =
  155|    226|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    226|  buffer->Advance(bytes_encoded);
  158|    226|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 39, False: 187]
  ------------------
  159|     39|    return false;
  160|     39|  }
  161|    187|  return true;
  162|    226|}
_ZN5draco17RAnsSymbolDecoderILi2EE12DecodeSymbolEv:
   43|  1.24M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi2EE11EndDecodingEv:
  165|    187|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    187|  ans_.read_end();
  167|    187|}
_ZN5draco17RAnsSymbolDecoderILi3EEC2Ev:
   33|    405|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi3EE6CreateEPNS_13DecoderBufferE:
   59|    405|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    405|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 405]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    405|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    405|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    405|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 29, False: 376]
  ------------------
   67|     29|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 29]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     29|  } else
   72|    376|#endif
   73|    376|  {
   74|    376|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 6, False: 370]
  ------------------
   75|      6|      return false;
   76|      6|    }
   77|    376|  }
   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|    399|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 14, False: 385]
  ------------------
   83|     14|    return false;
   84|     14|  }
   85|    385|  probability_table_.resize(num_symbols_);
   86|    385|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 17, False: 368]
  ------------------
   87|     17|    return true;
   88|     17|  }
   89|       |  // Decode the table.
   90|  51.2k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 51.0k, False: 278]
  ------------------
   91|  51.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|  51.0k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 42, False: 50.9k]
  ------------------
   95|     42|      return false;
   96|     42|    }
   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|  50.9k|    const int token = prob_data & 3;
  102|  50.9k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 16.7k, False: 34.2k]
  ------------------
  103|  16.7k|      const uint32_t offset = prob_data >> 2;
  104|  16.7k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 27, False: 16.6k]
  ------------------
  105|     27|        return false;
  106|     27|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   689k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 672k, False: 16.6k]
  ------------------
  109|   672k|        probability_table_[i + j] = 0;
  110|   672k|      }
  111|  16.6k|      i += offset;
  112|  34.2k|    } else {
  113|  34.2k|      const int extra_bytes = token;
  114|  34.2k|      uint32_t prob = prob_data >> 2;
  115|  58.3k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 24.1k, False: 34.2k]
  ------------------
  116|  24.1k|        uint8_t eb;
  117|  24.1k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 21, False: 24.1k]
  ------------------
  118|     21|          return false;
  119|     21|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  24.1k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  24.1k|      }
  124|  34.2k|      probability_table_[i] = prob;
  125|  34.2k|    }
  126|  50.9k|  }
  127|    278|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 28, False: 250]
  ------------------
  128|     28|    return false;
  129|     28|  }
  130|    250|  return true;
  131|    278|}
_ZNK5draco17RAnsSymbolDecoderILi3EE11num_symbolsEv:
   38|    267|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi3EE13StartDecodingEPNS_13DecoderBufferE:
  135|    250|    DecoderBuffer* buffer) {
  136|    250|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    250|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    250|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    250|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 14, False: 236]
  ------------------
  140|     14|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 14]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     14|  } else
  145|    236|#endif
  146|    236|  {
  147|    236|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 17, False: 219]
  ------------------
  148|     17|      return false;
  149|     17|    }
  150|    236|  }
  151|    233|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 28, False: 205]
  ------------------
  152|     28|    return false;
  153|     28|  }
  154|    205|  const uint8_t* const data_head =
  155|    205|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    205|  buffer->Advance(bytes_encoded);
  158|    205|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 65, False: 140]
  ------------------
  159|     65|    return false;
  160|     65|  }
  161|    140|  return true;
  162|    205|}
_ZN5draco17RAnsSymbolDecoderILi3EE12DecodeSymbolEv:
   43|  3.78M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi3EE11EndDecodingEv:
  165|    140|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    140|  ans_.read_end();
  167|    140|}
_ZN5draco17RAnsSymbolDecoderILi4EEC2Ev:
   33|    360|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi4EE6CreateEPNS_13DecoderBufferE:
   59|    360|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    360|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 360]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    360|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    360|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    360|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 24, False: 336]
  ------------------
   67|     24|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 24]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     24|  } else
   72|    336|#endif
   73|    336|  {
   74|    336|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 328]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    336|  }
   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|    352|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 21, False: 331]
  ------------------
   83|     21|    return false;
   84|     21|  }
   85|    331|  probability_table_.resize(num_symbols_);
   86|    331|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 13, False: 318]
  ------------------
   87|     13|    return true;
   88|     13|  }
   89|       |  // Decode the table.
   90|   791k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 791k, False: 229]
  ------------------
   91|   791k|    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|   791k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 49, False: 791k]
  ------------------
   95|     49|      return false;
   96|     49|    }
   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|   791k|    const int token = prob_data & 3;
  102|   791k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 716k, False: 74.6k]
  ------------------
  103|   716k|      const uint32_t offset = prob_data >> 2;
  104|   716k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 29, False: 716k]
  ------------------
  105|     29|        return false;
  106|     29|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  39.5M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 38.8M, False: 716k]
  ------------------
  109|  38.8M|        probability_table_[i + j] = 0;
  110|  38.8M|      }
  111|   716k|      i += offset;
  112|   716k|    } else {
  113|  74.6k|      const int extra_bytes = token;
  114|  74.6k|      uint32_t prob = prob_data >> 2;
  115|   168k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 93.3k, False: 74.6k]
  ------------------
  116|  93.3k|        uint8_t eb;
  117|  93.3k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 11, False: 93.3k]
  ------------------
  118|     11|          return false;
  119|     11|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  93.3k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  93.3k|      }
  124|  74.6k|      probability_table_[i] = prob;
  125|  74.6k|    }
  126|   791k|  }
  127|    229|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 22, False: 207]
  ------------------
  128|     22|    return false;
  129|     22|  }
  130|    207|  return true;
  131|    229|}
_ZNK5draco17RAnsSymbolDecoderILi4EE11num_symbolsEv:
   38|    220|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi4EE13StartDecodingEPNS_13DecoderBufferE:
  135|    207|    DecoderBuffer* buffer) {
  136|    207|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    207|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    207|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    207|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 4, False: 203]
  ------------------
  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|    203|#endif
  146|    203|  {
  147|    203|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 10, False: 193]
  ------------------
  148|     10|      return false;
  149|     10|    }
  150|    203|  }
  151|    197|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 28, False: 169]
  ------------------
  152|     28|    return false;
  153|     28|  }
  154|    169|  const uint8_t* const data_head =
  155|    169|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    169|  buffer->Advance(bytes_encoded);
  158|    169|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 44, False: 125]
  ------------------
  159|     44|    return false;
  160|     44|  }
  161|    125|  return true;
  162|    169|}
_ZN5draco17RAnsSymbolDecoderILi4EE12DecodeSymbolEv:
   43|  9.97M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi4EE11EndDecodingEv:
  165|    125|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    125|  ans_.read_end();
  167|    125|}
_ZN5draco17RAnsSymbolDecoderILi6EEC2Ev:
   33|    413|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi6EE6CreateEPNS_13DecoderBufferE:
   59|    413|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    413|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 413]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    413|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    413|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    413|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 39, False: 374]
  ------------------
   67|     39|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 39]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     39|  } else
   72|    374|#endif
   73|    374|  {
   74|    374|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 10, False: 364]
  ------------------
   75|     10|      return false;
   76|     10|    }
   77|    374|  }
   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|    403|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 25, False: 378]
  ------------------
   83|     25|    return false;
   84|     25|  }
   85|    378|  probability_table_.resize(num_symbols_);
   86|    378|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 12, False: 366]
  ------------------
   87|     12|    return true;
   88|     12|  }
   89|       |  // Decode the table.
   90|  13.9k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 13.6k, False: 291]
  ------------------
   91|  13.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|  13.6k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 37, False: 13.5k]
  ------------------
   95|     37|      return false;
   96|     37|    }
   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|  13.5k|    const int token = prob_data & 3;
  102|  13.5k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 6.16k, False: 7.42k]
  ------------------
  103|  6.16k|      const uint32_t offset = prob_data >> 2;
  104|  6.16k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 24, False: 6.13k]
  ------------------
  105|     24|        return false;
  106|     24|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   232k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 226k, False: 6.13k]
  ------------------
  109|   226k|        probability_table_[i + j] = 0;
  110|   226k|      }
  111|  6.13k|      i += offset;
  112|  7.42k|    } else {
  113|  7.42k|      const int extra_bytes = token;
  114|  7.42k|      uint32_t prob = prob_data >> 2;
  115|  12.1k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 4.76k, False: 7.40k]
  ------------------
  116|  4.76k|        uint8_t eb;
  117|  4.76k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 14, False: 4.75k]
  ------------------
  118|     14|          return false;
  119|     14|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  4.75k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  4.75k|      }
  124|  7.40k|      probability_table_[i] = prob;
  125|  7.40k|    }
  126|  13.5k|  }
  127|    291|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 22, False: 269]
  ------------------
  128|     22|    return false;
  129|     22|  }
  130|    269|  return true;
  131|    291|}
_ZNK5draco17RAnsSymbolDecoderILi6EE11num_symbolsEv:
   38|    281|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi6EE13StartDecodingEPNS_13DecoderBufferE:
  135|    269|    DecoderBuffer* buffer) {
  136|    269|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    269|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    269|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    269|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 20, False: 249]
  ------------------
  140|     20|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 19]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     20|  } else
  145|    249|#endif
  146|    249|  {
  147|    249|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 2, False: 247]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|    249|  }
  151|    266|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 38, False: 228]
  ------------------
  152|     38|    return false;
  153|     38|  }
  154|    228|  const uint8_t* const data_head =
  155|    228|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    228|  buffer->Advance(bytes_encoded);
  158|    228|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 47, False: 181]
  ------------------
  159|     47|    return false;
  160|     47|  }
  161|    181|  return true;
  162|    228|}
_ZN5draco17RAnsSymbolDecoderILi6EE12DecodeSymbolEv:
   43|  13.2M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi6EE11EndDecodingEv:
  165|    181|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    181|  ans_.read_end();
  167|    181|}
_ZN5draco17RAnsSymbolDecoderILi7EEC2Ev:
   33|    335|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi7EE6CreateEPNS_13DecoderBufferE:
   59|    335|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    335|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 335]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    335|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    335|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    335|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 23, False: 312]
  ------------------
   67|     23|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 23]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     23|  } else
   72|    312|#endif
   73|    312|  {
   74|    312|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 304]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    312|  }
   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|    327|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 10, False: 317]
  ------------------
   83|     10|    return false;
   84|     10|  }
   85|    317|  probability_table_.resize(num_symbols_);
   86|    317|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 9, False: 308]
  ------------------
   87|      9|    return true;
   88|      9|  }
   89|       |  // Decode the table.
   90|   677k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 677k, False: 223]
  ------------------
   91|   677k|    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|   677k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 37, False: 677k]
  ------------------
   95|     37|      return false;
   96|     37|    }
   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|   677k|    const int token = prob_data & 3;
  102|   677k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 202k, False: 474k]
  ------------------
  103|   202k|      const uint32_t offset = prob_data >> 2;
  104|   202k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 31, False: 202k]
  ------------------
  105|     31|        return false;
  106|     31|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  9.38M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 9.17M, False: 202k]
  ------------------
  109|  9.17M|        probability_table_[i + j] = 0;
  110|  9.17M|      }
  111|   202k|      i += offset;
  112|   474k|    } else {
  113|   474k|      const int extra_bytes = token;
  114|   474k|      uint32_t prob = prob_data >> 2;
  115|   772k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 297k, False: 474k]
  ------------------
  116|   297k|        uint8_t eb;
  117|   297k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 17, False: 297k]
  ------------------
  118|     17|          return false;
  119|     17|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   297k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   297k|      }
  124|   474k|      probability_table_[i] = prob;
  125|   474k|    }
  126|   677k|  }
  127|    223|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 23, False: 200]
  ------------------
  128|     23|    return false;
  129|     23|  }
  130|    200|  return true;
  131|    223|}
_ZNK5draco17RAnsSymbolDecoderILi7EE11num_symbolsEv:
   38|    209|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi7EE13StartDecodingEPNS_13DecoderBufferE:
  135|    200|    DecoderBuffer* buffer) {
  136|    200|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    200|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    200|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    200|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 20, False: 180]
  ------------------
  140|     20|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 3, False: 17]
  ------------------
  141|      3|      return false;
  142|      3|    }
  143|       |
  144|     20|  } else
  145|    180|#endif
  146|    180|  {
  147|    180|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 9, False: 171]
  ------------------
  148|      9|      return false;
  149|      9|    }
  150|    180|  }
  151|    188|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 28, False: 160]
  ------------------
  152|     28|    return false;
  153|     28|  }
  154|    160|  const uint8_t* const data_head =
  155|    160|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    160|  buffer->Advance(bytes_encoded);
  158|    160|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 42, False: 118]
  ------------------
  159|     42|    return false;
  160|     42|  }
  161|    118|  return true;
  162|    160|}
_ZN5draco17RAnsSymbolDecoderILi7EE12DecodeSymbolEv:
   43|  39.2M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi7EE11EndDecodingEv:
  165|    118|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    118|  ans_.read_end();
  167|    118|}
_ZN5draco17RAnsSymbolDecoderILi8EEC2Ev:
   33|    370|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi8EE6CreateEPNS_13DecoderBufferE:
   59|    370|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    370|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 370]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    370|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    370|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    370|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 25, False: 345]
  ------------------
   67|     25|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 23]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     25|  } else
   72|    345|#endif
   73|    345|  {
   74|    345|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 13, False: 332]
  ------------------
   75|     13|      return false;
   76|     13|    }
   77|    345|  }
   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|    355|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 21, False: 334]
  ------------------
   83|     21|    return false;
   84|     21|  }
   85|    334|  probability_table_.resize(num_symbols_);
   86|    334|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 323]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|  42.9k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 42.6k, False: 242]
  ------------------
   91|  42.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|  42.6k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 45, False: 42.6k]
  ------------------
   95|     45|      return false;
   96|     45|    }
   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|  42.6k|    const int token = prob_data & 3;
  102|  42.6k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 13.2k, False: 29.3k]
  ------------------
  103|  13.2k|      const uint32_t offset = prob_data >> 2;
  104|  13.2k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 19, False: 13.2k]
  ------------------
  105|     19|        return false;
  106|     19|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   619k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 605k, False: 13.2k]
  ------------------
  109|   605k|        probability_table_[i + j] = 0;
  110|   605k|      }
  111|  13.2k|      i += offset;
  112|  29.3k|    } else {
  113|  29.3k|      const int extra_bytes = token;
  114|  29.3k|      uint32_t prob = prob_data >> 2;
  115|  35.2k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 5.92k, False: 29.3k]
  ------------------
  116|  5.92k|        uint8_t eb;
  117|  5.92k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 17, False: 5.90k]
  ------------------
  118|     17|          return false;
  119|     17|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  5.90k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  5.90k|      }
  124|  29.3k|      probability_table_[i] = prob;
  125|  29.3k|    }
  126|  42.6k|  }
  127|    242|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 19, False: 223]
  ------------------
  128|     19|    return false;
  129|     19|  }
  130|    223|  return true;
  131|    242|}
_ZNK5draco17RAnsSymbolDecoderILi8EE11num_symbolsEv:
   38|    234|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi8EE13StartDecodingEPNS_13DecoderBufferE:
  135|    223|    DecoderBuffer* buffer) {
  136|    223|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    223|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    223|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    223|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 6, False: 217]
  ------------------
  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|    217|#endif
  146|    217|  {
  147|    217|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 5, False: 212]
  ------------------
  148|      5|      return false;
  149|      5|    }
  150|    217|  }
  151|    218|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 22, False: 196]
  ------------------
  152|     22|    return false;
  153|     22|  }
  154|    196|  const uint8_t* const data_head =
  155|    196|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    196|  buffer->Advance(bytes_encoded);
  158|    196|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 42, False: 154]
  ------------------
  159|     42|    return false;
  160|     42|  }
  161|    154|  return true;
  162|    196|}
_ZN5draco17RAnsSymbolDecoderILi8EE12DecodeSymbolEv:
   43|  24.9M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi8EE11EndDecodingEv:
  165|    154|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    154|  ans_.read_end();
  167|    154|}
_ZN5draco17RAnsSymbolDecoderILi9EEC2Ev:
   33|    507|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi9EE6CreateEPNS_13DecoderBufferE:
   59|    507|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    507|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 507]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    507|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    507|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    507|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 19, False: 488]
  ------------------
   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|    488|#endif
   73|    488|  {
   74|    488|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 9, False: 479]
  ------------------
   75|      9|      return false;
   76|      9|    }
   77|    488|  }
   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|    498|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 22, False: 476]
  ------------------
   83|     22|    return false;
   84|     22|  }
   85|    476|  probability_table_.resize(num_symbols_);
   86|    476|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 10, False: 466]
  ------------------
   87|     10|    return true;
   88|     10|  }
   89|       |  // Decode the table.
   90|  72.9k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 72.5k, False: 385]
  ------------------
   91|  72.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|  72.5k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 43, False: 72.4k]
  ------------------
   95|     43|      return false;
   96|     43|    }
   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|  72.4k|    const int token = prob_data & 3;
  102|  72.4k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 22.1k, False: 50.3k]
  ------------------
  103|  22.1k|      const uint32_t offset = prob_data >> 2;
  104|  22.1k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 20, False: 22.1k]
  ------------------
  105|     20|        return false;
  106|     20|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   824k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 802k, False: 22.1k]
  ------------------
  109|   802k|        probability_table_[i + j] = 0;
  110|   802k|      }
  111|  22.1k|      i += offset;
  112|  50.3k|    } else {
  113|  50.3k|      const int extra_bytes = token;
  114|  50.3k|      uint32_t prob = prob_data >> 2;
  115|  91.0k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 40.7k, False: 50.3k]
  ------------------
  116|  40.7k|        uint8_t eb;
  117|  40.7k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 18, False: 40.7k]
  ------------------
  118|     18|          return false;
  119|     18|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  40.7k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  40.7k|      }
  124|  50.3k|      probability_table_[i] = prob;
  125|  50.3k|    }
  126|  72.4k|  }
  127|    385|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 59, False: 326]
  ------------------
  128|     59|    return false;
  129|     59|  }
  130|    326|  return true;
  131|    385|}
_ZNK5draco17RAnsSymbolDecoderILi9EE11num_symbolsEv:
   38|    336|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi9EE13StartDecodingEPNS_13DecoderBufferE:
  135|    326|    DecoderBuffer* buffer) {
  136|    326|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    326|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    326|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    326|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 2, False: 324]
  ------------------
  140|      2|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 2]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      2|  } else
  145|    324|#endif
  146|    324|  {
  147|    324|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 4, False: 320]
  ------------------
  148|      4|      return false;
  149|      4|    }
  150|    324|  }
  151|    322|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 17, False: 305]
  ------------------
  152|     17|    return false;
  153|     17|  }
  154|    305|  const uint8_t* const data_head =
  155|    305|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    305|  buffer->Advance(bytes_encoded);
  158|    305|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 55, False: 250]
  ------------------
  159|     55|    return false;
  160|     55|  }
  161|    250|  return true;
  162|    305|}
_ZN5draco17RAnsSymbolDecoderILi9EE12DecodeSymbolEv:
   43|  12.4M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi9EE11EndDecodingEv:
  165|    250|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    250|  ans_.read_end();
  167|    250|}
_ZN5draco17RAnsSymbolDecoderILi10EEC2Ev:
   33|    474|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi10EE6CreateEPNS_13DecoderBufferE:
   59|    474|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    474|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 474]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    474|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    474|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    474|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 83, False: 391]
  ------------------
   67|     83|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 83]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     83|  } else
   72|    391|#endif
   73|    391|  {
   74|    391|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 19, False: 372]
  ------------------
   75|     19|      return false;
   76|     19|    }
   77|    391|  }
   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|    455|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 14, False: 441]
  ------------------
   83|     14|    return false;
   84|     14|  }
   85|    441|  probability_table_.resize(num_symbols_);
   86|    441|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 430]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|  96.2k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 95.9k, False: 336]
  ------------------
   91|  95.9k|    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|  95.9k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 65, False: 95.8k]
  ------------------
   95|     65|      return false;
   96|     65|    }
   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|  95.8k|    const int token = prob_data & 3;
  102|  95.8k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 6.71k, False: 89.1k]
  ------------------
  103|  6.71k|      const uint32_t offset = prob_data >> 2;
  104|  6.71k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 19, False: 6.69k]
  ------------------
  105|     19|        return false;
  106|     19|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   231k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 224k, False: 6.69k]
  ------------------
  109|   224k|        probability_table_[i + j] = 0;
  110|   224k|      }
  111|  6.69k|      i += offset;
  112|  89.1k|    } else {
  113|  89.1k|      const int extra_bytes = token;
  114|  89.1k|      uint32_t prob = prob_data >> 2;
  115|   175k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 86.4k, False: 89.1k]
  ------------------
  116|  86.4k|        uint8_t eb;
  117|  86.4k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 10, False: 86.3k]
  ------------------
  118|     10|          return false;
  119|     10|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  86.3k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  86.3k|      }
  124|  89.1k|      probability_table_[i] = prob;
  125|  89.1k|    }
  126|  95.8k|  }
  127|    336|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 79, False: 257]
  ------------------
  128|     79|    return false;
  129|     79|  }
  130|    257|  return true;
  131|    336|}
_ZNK5draco17RAnsSymbolDecoderILi10EE11num_symbolsEv:
   38|    268|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi10EE13StartDecodingEPNS_13DecoderBufferE:
  135|    257|    DecoderBuffer* buffer) {
  136|    257|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    257|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    257|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    257|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 55, False: 202]
  ------------------
  140|     55|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 54]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     55|  } else
  145|    202|#endif
  146|    202|  {
  147|    202|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 14, False: 188]
  ------------------
  148|     14|      return false;
  149|     14|    }
  150|    202|  }
  151|    242|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 118, False: 124]
  ------------------
  152|    118|    return false;
  153|    118|  }
  154|    124|  const uint8_t* const data_head =
  155|    124|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    124|  buffer->Advance(bytes_encoded);
  158|    124|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 54, False: 70]
  ------------------
  159|     54|    return false;
  160|     54|  }
  161|     70|  return true;
  162|    124|}
_ZN5draco17RAnsSymbolDecoderILi10EE12DecodeSymbolEv:
   43|   474k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi10EE11EndDecodingEv:
  165|     70|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     70|  ans_.read_end();
  167|     70|}
_ZN5draco17RAnsSymbolDecoderILi11EEC2Ev:
   33|    372|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi11EE6CreateEPNS_13DecoderBufferE:
   59|    372|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    372|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 372]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    372|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    372|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    372|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 31, False: 341]
  ------------------
   67|     31|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 31]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     31|  } else
   72|    341|#endif
   73|    341|  {
   74|    341|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 12, False: 329]
  ------------------
   75|     12|      return false;
   76|     12|    }
   77|    341|  }
   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|    360|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 32, False: 328]
  ------------------
   83|     32|    return false;
   84|     32|  }
   85|    328|  probability_table_.resize(num_symbols_);
   86|    328|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 8, False: 320]
  ------------------
   87|      8|    return true;
   88|      8|  }
   89|       |  // Decode the table.
   90|  80.9k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 80.7k, False: 227]
  ------------------
   91|  80.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|  80.7k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 49, False: 80.7k]
  ------------------
   95|     49|      return false;
   96|     49|    }
   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|  80.7k|    const int token = prob_data & 3;
  102|  80.7k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 19.0k, False: 61.6k]
  ------------------
  103|  19.0k|      const uint32_t offset = prob_data >> 2;
  104|  19.0k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 27, False: 19.0k]
  ------------------
  105|     27|        return false;
  106|     27|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   636k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 617k, False: 19.0k]
  ------------------
  109|   617k|        probability_table_[i + j] = 0;
  110|   617k|      }
  111|  19.0k|      i += offset;
  112|  61.6k|    } else {
  113|  61.6k|      const int extra_bytes = token;
  114|  61.6k|      uint32_t prob = prob_data >> 2;
  115|   105k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 43.8k, False: 61.6k]
  ------------------
  116|  43.8k|        uint8_t eb;
  117|  43.8k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 17, False: 43.8k]
  ------------------
  118|     17|          return false;
  119|     17|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  43.8k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  43.8k|      }
  124|  61.6k|      probability_table_[i] = prob;
  125|  61.6k|    }
  126|  80.7k|  }
  127|    227|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 51, False: 176]
  ------------------
  128|     51|    return false;
  129|     51|  }
  130|    176|  return true;
  131|    227|}
_ZNK5draco17RAnsSymbolDecoderILi11EE11num_symbolsEv:
   38|    184|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi11EE13StartDecodingEPNS_13DecoderBufferE:
  135|    176|    DecoderBuffer* buffer) {
  136|    176|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    176|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    176|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    176|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 176]
  ------------------
  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|    176|#endif
  146|    176|  {
  147|    176|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 15, False: 161]
  ------------------
  148|     15|      return false;
  149|     15|    }
  150|    176|  }
  151|    161|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 57, False: 104]
  ------------------
  152|     57|    return false;
  153|     57|  }
  154|    104|  const uint8_t* const data_head =
  155|    104|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    104|  buffer->Advance(bytes_encoded);
  158|    104|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 35, False: 69]
  ------------------
  159|     35|    return false;
  160|     35|  }
  161|     69|  return true;
  162|    104|}
_ZN5draco17RAnsSymbolDecoderILi11EE12DecodeSymbolEv:
   43|   525k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi11EE11EndDecodingEv:
  165|     69|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     69|  ans_.read_end();
  167|     69|}
_ZN5draco17RAnsSymbolDecoderILi12EEC2Ev:
   33|    353|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi12EE6CreateEPNS_13DecoderBufferE:
   59|    353|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    353|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 353]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    353|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    353|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    353|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 33, False: 320]
  ------------------
   67|     33|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 33]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     33|  } else
   72|    320|#endif
   73|    320|  {
   74|    320|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 312]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    320|  }
   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|    345|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 14, False: 331]
  ------------------
   83|     14|    return false;
   84|     14|  }
   85|    331|  probability_table_.resize(num_symbols_);
   86|    331|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 2, False: 329]
  ------------------
   87|      2|    return true;
   88|      2|  }
   89|       |  // Decode the table.
   90|   592k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 592k, False: 218]
  ------------------
   91|   592k|    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|   592k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 49, False: 592k]
  ------------------
   95|     49|      return false;
   96|     49|    }
   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|   592k|    const int token = prob_data & 3;
  102|   592k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 361k, False: 230k]
  ------------------
  103|   361k|      const uint32_t offset = prob_data >> 2;
  104|   361k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 41, False: 361k]
  ------------------
  105|     41|        return false;
  106|     41|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  15.5M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 15.1M, False: 361k]
  ------------------
  109|  15.1M|        probability_table_[i + j] = 0;
  110|  15.1M|      }
  111|   361k|      i += offset;
  112|   361k|    } else {
  113|   230k|      const int extra_bytes = token;
  114|   230k|      uint32_t prob = prob_data >> 2;
  115|   466k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 236k, False: 230k]
  ------------------
  116|   236k|        uint8_t eb;
  117|   236k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 21, False: 236k]
  ------------------
  118|     21|          return false;
  119|     21|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   236k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   236k|      }
  124|   230k|      probability_table_[i] = prob;
  125|   230k|    }
  126|   592k|  }
  127|    218|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 60, False: 158]
  ------------------
  128|     60|    return false;
  129|     60|  }
  130|    158|  return true;
  131|    218|}
_ZNK5draco17RAnsSymbolDecoderILi12EE11num_symbolsEv:
   38|    160|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi12EE13StartDecodingEPNS_13DecoderBufferE:
  135|    158|    DecoderBuffer* buffer) {
  136|    158|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    158|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    158|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    158|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 11, False: 147]
  ------------------
  140|     11|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 10]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     11|  } else
  145|    147|#endif
  146|    147|  {
  147|    147|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 2, False: 145]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|    147|  }
  151|    155|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 46, False: 109]
  ------------------
  152|     46|    return false;
  153|     46|  }
  154|    109|  const uint8_t* const data_head =
  155|    109|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    109|  buffer->Advance(bytes_encoded);
  158|    109|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 50, False: 59]
  ------------------
  159|     50|    return false;
  160|     50|  }
  161|     59|  return true;
  162|    109|}
_ZN5draco17RAnsSymbolDecoderILi12EE12DecodeSymbolEv:
   43|  92.7k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi12EE11EndDecodingEv:
  165|     59|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     59|  ans_.read_end();
  167|     59|}
_ZN5draco17RAnsSymbolDecoderILi13EEC2Ev:
   33|    466|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi13EE6CreateEPNS_13DecoderBufferE:
   59|    466|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    466|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 466]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    466|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    466|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    466|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 22, False: 444]
  ------------------
   67|     22|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 22]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     22|  } else
   72|    444|#endif
   73|    444|  {
   74|    444|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 6, False: 438]
  ------------------
   75|      6|      return false;
   76|      6|    }
   77|    444|  }
   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|    460|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 28, False: 432]
  ------------------
   83|     28|    return false;
   84|     28|  }
   85|    432|  probability_table_.resize(num_symbols_);
   86|    432|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 8, False: 424]
  ------------------
   87|      8|    return true;
   88|      8|  }
   89|       |  // Decode the table.
   90|  2.33M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 2.33M, False: 311]
  ------------------
   91|  2.33M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  2.33M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 62, False: 2.33M]
  ------------------
   95|     62|      return false;
   96|     62|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  2.33M|    const int token = prob_data & 3;
  102|  2.33M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 1.30M, False: 1.02M]
  ------------------
  103|  1.30M|      const uint32_t offset = prob_data >> 2;
  104|  1.30M|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 31, False: 1.30M]
  ------------------
  105|     31|        return false;
  106|     31|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  75.9M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 74.6M, False: 1.30M]
  ------------------
  109|  74.6M|        probability_table_[i + j] = 0;
  110|  74.6M|      }
  111|  1.30M|      i += offset;
  112|  1.30M|    } else {
  113|  1.02M|      const int extra_bytes = token;
  114|  1.02M|      uint32_t prob = prob_data >> 2;
  115|  1.08M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 52.9k, False: 1.02M]
  ------------------
  116|  52.9k|        uint8_t eb;
  117|  52.9k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 20, False: 52.9k]
  ------------------
  118|     20|          return false;
  119|     20|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  52.9k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  52.9k|      }
  124|  1.02M|      probability_table_[i] = prob;
  125|  1.02M|    }
  126|  2.33M|  }
  127|    311|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 75, False: 236]
  ------------------
  128|     75|    return false;
  129|     75|  }
  130|    236|  return true;
  131|    311|}
_ZNK5draco17RAnsSymbolDecoderILi13EE11num_symbolsEv:
   38|    244|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi13EE13StartDecodingEPNS_13DecoderBufferE:
  135|    236|    DecoderBuffer* buffer) {
  136|    236|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    236|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    236|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    236|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 236]
  ------------------
  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|    236|#endif
  146|    236|  {
  147|    236|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 1, False: 235]
  ------------------
  148|      1|      return false;
  149|      1|    }
  150|    236|  }
  151|    235|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 108, False: 127]
  ------------------
  152|    108|    return false;
  153|    108|  }
  154|    127|  const uint8_t* const data_head =
  155|    127|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    127|  buffer->Advance(bytes_encoded);
  158|    127|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 42, False: 85]
  ------------------
  159|     42|    return false;
  160|     42|  }
  161|     85|  return true;
  162|    127|}
_ZN5draco17RAnsSymbolDecoderILi13EE12DecodeSymbolEv:
   43|   112k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi13EE11EndDecodingEv:
  165|     85|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     85|  ans_.read_end();
  167|     85|}
_ZN5draco17RAnsSymbolDecoderILi14EEC2Ev:
   33|    413|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi14EE6CreateEPNS_13DecoderBufferE:
   59|    413|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    413|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 413]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    413|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    413|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    413|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 32, False: 381]
  ------------------
   67|     32|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 32]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     32|  } else
   72|    381|#endif
   73|    381|  {
   74|    381|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 6, False: 375]
  ------------------
   75|      6|      return false;
   76|      6|    }
   77|    381|  }
   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|    407|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 23, False: 384]
  ------------------
   83|     23|    return false;
   84|     23|  }
   85|    384|  probability_table_.resize(num_symbols_);
   86|    384|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 373]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|   350k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 350k, False: 248]
  ------------------
   91|   350k|    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|   350k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 58, False: 350k]
  ------------------
   95|     58|      return false;
   96|     58|    }
   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|   350k|    const int token = prob_data & 3;
  102|   350k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 230k, False: 120k]
  ------------------
  103|   230k|      const uint32_t offset = prob_data >> 2;
  104|   230k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 37, False: 229k]
  ------------------
  105|     37|        return false;
  106|     37|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  9.79M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 9.56M, False: 229k]
  ------------------
  109|  9.56M|        probability_table_[i + j] = 0;
  110|  9.56M|      }
  111|   229k|      i += offset;
  112|   229k|    } else {
  113|   120k|      const int extra_bytes = token;
  114|   120k|      uint32_t prob = prob_data >> 2;
  115|   212k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 91.8k, False: 120k]
  ------------------
  116|  91.8k|        uint8_t eb;
  117|  91.8k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 30, False: 91.7k]
  ------------------
  118|     30|          return false;
  119|     30|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  91.7k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  91.7k|      }
  124|   120k|      probability_table_[i] = prob;
  125|   120k|    }
  126|   350k|  }
  127|    248|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 40, False: 208]
  ------------------
  128|     40|    return false;
  129|     40|  }
  130|    208|  return true;
  131|    248|}
_ZNK5draco17RAnsSymbolDecoderILi14EE11num_symbolsEv:
   38|    219|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi14EE13StartDecodingEPNS_13DecoderBufferE:
  135|    208|    DecoderBuffer* buffer) {
  136|    208|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    208|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    208|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    208|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 14, False: 194]
  ------------------
  140|     14|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 13]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     14|  } else
  145|    194|#endif
  146|    194|  {
  147|    194|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 15, False: 179]
  ------------------
  148|     15|      return false;
  149|     15|    }
  150|    194|  }
  151|    192|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 57, False: 135]
  ------------------
  152|     57|    return false;
  153|     57|  }
  154|    135|  const uint8_t* const data_head =
  155|    135|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    135|  buffer->Advance(bytes_encoded);
  158|    135|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 55, False: 80]
  ------------------
  159|     55|    return false;
  160|     55|  }
  161|     80|  return true;
  162|    135|}
_ZN5draco17RAnsSymbolDecoderILi14EE12DecodeSymbolEv:
   43|  98.8k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi14EE11EndDecodingEv:
  165|     80|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     80|  ans_.read_end();
  167|     80|}
_ZN5draco17RAnsSymbolDecoderILi15EEC2Ev:
   33|    503|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi15EE6CreateEPNS_13DecoderBufferE:
   59|    503|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    503|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 503]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    503|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    503|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    503|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 141, False: 362]
  ------------------
   67|    141|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 139]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|    141|  } else
   72|    362|#endif
   73|    362|  {
   74|    362|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 4, False: 358]
  ------------------
   75|      4|      return false;
   76|      4|    }
   77|    362|  }
   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|    497|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 35, False: 462]
  ------------------
   83|     35|    return false;
   84|     35|  }
   85|    462|  probability_table_.resize(num_symbols_);
   86|    462|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 9, False: 453]
  ------------------
   87|      9|    return true;
   88|      9|  }
   89|       |  // Decode the table.
   90|  4.99M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 4.99M, False: 327]
  ------------------
   91|  4.99M|    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|  4.99M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 56, False: 4.99M]
  ------------------
   95|     56|      return false;
   96|     56|    }
   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|  4.99M|    const int token = prob_data & 3;
  102|  4.99M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 4.28M, False: 700k]
  ------------------
  103|  4.28M|      const uint32_t offset = prob_data >> 2;
  104|  4.28M|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 35, False: 4.28M]
  ------------------
  105|     35|        return false;
  106|     35|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   250M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 245M, False: 4.28M]
  ------------------
  109|   245M|        probability_table_[i + j] = 0;
  110|   245M|      }
  111|  4.28M|      i += offset;
  112|  4.28M|    } else {
  113|   700k|      const int extra_bytes = token;
  114|   700k|      uint32_t prob = prob_data >> 2;
  115|  1.26M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 563k, False: 700k]
  ------------------
  116|   563k|        uint8_t eb;
  117|   563k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 35, False: 563k]
  ------------------
  118|     35|          return false;
  119|     35|        }
  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|   700k|      probability_table_[i] = prob;
  125|   700k|    }
  126|  4.99M|  }
  127|    327|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 37, False: 290]
  ------------------
  128|     37|    return false;
  129|     37|  }
  130|    290|  return true;
  131|    327|}
_ZNK5draco17RAnsSymbolDecoderILi15EE11num_symbolsEv:
   38|    299|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi15EE13StartDecodingEPNS_13DecoderBufferE:
  135|    290|    DecoderBuffer* buffer) {
  136|    290|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    290|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    290|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    290|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 95, False: 195]
  ------------------
  140|     95|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 3, False: 92]
  ------------------
  141|      3|      return false;
  142|      3|    }
  143|       |
  144|     95|  } else
  145|    195|#endif
  146|    195|  {
  147|    195|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 7, False: 188]
  ------------------
  148|      7|      return false;
  149|      7|    }
  150|    195|  }
  151|    280|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 149, False: 131]
  ------------------
  152|    149|    return false;
  153|    149|  }
  154|    131|  const uint8_t* const data_head =
  155|    131|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    131|  buffer->Advance(bytes_encoded);
  158|    131|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 50, False: 81]
  ------------------
  159|     50|    return false;
  160|     50|  }
  161|     81|  return true;
  162|    131|}
_ZN5draco17RAnsSymbolDecoderILi15EE12DecodeSymbolEv:
   43|   245k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi15EE11EndDecodingEv:
  165|     81|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     81|  ans_.read_end();
  167|     81|}
_ZN5draco17RAnsSymbolDecoderILi16EEC2Ev:
   33|    369|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi16EE6CreateEPNS_13DecoderBufferE:
   59|    369|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    369|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 369]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    369|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    369|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    369|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 44, False: 325]
  ------------------
   67|     44|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 43]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     44|  } else
   72|    325|#endif
   73|    325|  {
   74|    325|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 12, False: 313]
  ------------------
   75|     12|      return false;
   76|     12|    }
   77|    325|  }
   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|    356|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 21, False: 335]
  ------------------
   83|     21|    return false;
   84|     21|  }
   85|    335|  probability_table_.resize(num_symbols_);
   86|    335|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 16, False: 319]
  ------------------
   87|     16|    return true;
   88|     16|  }
   89|       |  // Decode the table.
   90|  90.6k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 90.3k, False: 232]
  ------------------
   91|  90.3k|    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|  90.3k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 47, False: 90.3k]
  ------------------
   95|     47|      return false;
   96|     47|    }
   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|  90.3k|    const int token = prob_data & 3;
  102|  90.3k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 27.4k, False: 62.9k]
  ------------------
  103|  27.4k|      const uint32_t offset = prob_data >> 2;
  104|  27.4k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 19, False: 27.3k]
  ------------------
  105|     19|        return false;
  106|     19|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  1.12M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 1.09M, False: 27.3k]
  ------------------
  109|  1.09M|        probability_table_[i + j] = 0;
  110|  1.09M|      }
  111|  27.3k|      i += offset;
  112|  62.9k|    } else {
  113|  62.9k|      const int extra_bytes = token;
  114|  62.9k|      uint32_t prob = prob_data >> 2;
  115|   106k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 43.5k, False: 62.9k]
  ------------------
  116|  43.5k|        uint8_t eb;
  117|  43.5k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 21, False: 43.4k]
  ------------------
  118|     21|          return false;
  119|     21|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  43.4k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  43.4k|      }
  124|  62.9k|      probability_table_[i] = prob;
  125|  62.9k|    }
  126|  90.3k|  }
  127|    232|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 28, False: 204]
  ------------------
  128|     28|    return false;
  129|     28|  }
  130|    204|  return true;
  131|    232|}
_ZNK5draco17RAnsSymbolDecoderILi16EE11num_symbolsEv:
   38|    220|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi16EE13StartDecodingEPNS_13DecoderBufferE:
  135|    204|    DecoderBuffer* buffer) {
  136|    204|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    204|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    204|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    204|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 33, False: 171]
  ------------------
  140|     33|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 31]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     33|  } else
  145|    171|#endif
  146|    171|  {
  147|    171|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 171]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    171|  }
  151|    202|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 98, False: 104]
  ------------------
  152|     98|    return false;
  153|     98|  }
  154|    104|  const uint8_t* const data_head =
  155|    104|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    104|  buffer->Advance(bytes_encoded);
  158|    104|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 39, False: 65]
  ------------------
  159|     39|    return false;
  160|     39|  }
  161|     65|  return true;
  162|    104|}
_ZN5draco17RAnsSymbolDecoderILi16EE12DecodeSymbolEv:
   43|   112k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi16EE11EndDecodingEv:
  165|     65|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     65|  ans_.read_end();
  167|     65|}
_ZN5draco17RAnsSymbolDecoderILi17EEC2Ev:
   33|    391|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi17EE6CreateEPNS_13DecoderBufferE:
   59|    391|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    391|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 391]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    391|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    391|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    391|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 51, False: 340]
  ------------------
   67|     51|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 49]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     51|  } else
   72|    340|#endif
   73|    340|  {
   74|    340|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 10, False: 330]
  ------------------
   75|     10|      return false;
   76|     10|    }
   77|    340|  }
   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|    379|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 20, False: 359]
  ------------------
   83|     20|    return false;
   84|     20|  }
   85|    359|  probability_table_.resize(num_symbols_);
   86|    359|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 9, False: 350]
  ------------------
   87|      9|    return true;
   88|      9|  }
   89|       |  // Decode the table.
   90|  28.8k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 28.6k, False: 243]
  ------------------
   91|  28.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|  28.6k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 57, False: 28.5k]
  ------------------
   95|     57|      return false;
   96|     57|    }
   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|  28.5k|    const int token = prob_data & 3;
  102|  28.5k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 14.8k, False: 13.6k]
  ------------------
  103|  14.8k|      const uint32_t offset = prob_data >> 2;
  104|  14.8k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 26, False: 14.8k]
  ------------------
  105|     26|        return false;
  106|     26|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   518k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 503k, False: 14.8k]
  ------------------
  109|   503k|        probability_table_[i + j] = 0;
  110|   503k|      }
  111|  14.8k|      i += offset;
  112|  14.8k|    } else {
  113|  13.6k|      const int extra_bytes = token;
  114|  13.6k|      uint32_t prob = prob_data >> 2;
  115|  21.8k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 8.19k, False: 13.6k]
  ------------------
  116|  8.19k|        uint8_t eb;
  117|  8.19k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 24, False: 8.17k]
  ------------------
  118|     24|          return false;
  119|     24|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  8.17k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  8.17k|      }
  124|  13.6k|      probability_table_[i] = prob;
  125|  13.6k|    }
  126|  28.5k|  }
  127|    243|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 33, False: 210]
  ------------------
  128|     33|    return false;
  129|     33|  }
  130|    210|  return true;
  131|    243|}
_ZNK5draco17RAnsSymbolDecoderILi17EE11num_symbolsEv:
   38|    219|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi17EE13StartDecodingEPNS_13DecoderBufferE:
  135|    210|    DecoderBuffer* buffer) {
  136|    210|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    210|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    210|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    210|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 27, False: 183]
  ------------------
  140|     27|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 26]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     27|  } else
  145|    183|#endif
  146|    183|  {
  147|    183|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 183]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    183|  }
  151|    209|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 88, False: 121]
  ------------------
  152|     88|    return false;
  153|     88|  }
  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: 37, False: 84]
  ------------------
  159|     37|    return false;
  160|     37|  }
  161|     84|  return true;
  162|    121|}
_ZN5draco17RAnsSymbolDecoderILi17EE12DecodeSymbolEv:
   43|   172k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi17EE11EndDecodingEv:
  165|     84|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     84|  ans_.read_end();
  167|     84|}
_ZN5draco17RAnsSymbolDecoderILi18EEC2Ev:
   33|    412|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi18EE6CreateEPNS_13DecoderBufferE:
   59|    412|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    412|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 412]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    412|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    412|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    412|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 115, False: 297]
  ------------------
   67|    115|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 114]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|    115|  } else
   72|    297|#endif
   73|    297|  {
   74|    297|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 289]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    297|  }
   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|    403|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 43, False: 360]
  ------------------
   83|     43|    return false;
   84|     43|  }
   85|    360|  probability_table_.resize(num_symbols_);
   86|    360|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 12, False: 348]
  ------------------
   87|     12|    return true;
   88|     12|  }
   89|       |  // Decode the table.
   90|   397k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 397k, False: 234]
  ------------------
   91|   397k|    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|   397k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 56, False: 397k]
  ------------------
   95|     56|      return false;
   96|     56|    }
   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|   397k|    const int token = prob_data & 3;
  102|   397k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 101k, False: 296k]
  ------------------
  103|   101k|      const uint32_t offset = prob_data >> 2;
  104|   101k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 27, False: 101k]
  ------------------
  105|     27|        return false;
  106|     27|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  3.88M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 3.78M, False: 101k]
  ------------------
  109|  3.78M|        probability_table_[i + j] = 0;
  110|  3.78M|      }
  111|   101k|      i += offset;
  112|   296k|    } else {
  113|   296k|      const int extra_bytes = token;
  114|   296k|      uint32_t prob = prob_data >> 2;
  115|   577k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 281k, False: 296k]
  ------------------
  116|   281k|        uint8_t eb;
  117|   281k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 31, False: 281k]
  ------------------
  118|     31|          return false;
  119|     31|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   281k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   281k|      }
  124|   296k|      probability_table_[i] = prob;
  125|   296k|    }
  126|   397k|  }
  127|    234|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 42, False: 192]
  ------------------
  128|     42|    return false;
  129|     42|  }
  130|    192|  return true;
  131|    234|}
_ZNK5draco17RAnsSymbolDecoderILi18EE11num_symbolsEv:
   38|    204|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi18EE13StartDecodingEPNS_13DecoderBufferE:
  135|    192|    DecoderBuffer* buffer) {
  136|    192|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    192|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    192|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    192|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 36, False: 156]
  ------------------
  140|     36|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 4, False: 32]
  ------------------
  141|      4|      return false;
  142|      4|    }
  143|       |
  144|     36|  } else
  145|    156|#endif
  146|    156|  {
  147|    156|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 1, False: 155]
  ------------------
  148|      1|      return false;
  149|      1|    }
  150|    156|  }
  151|    187|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 78, False: 109]
  ------------------
  152|     78|    return false;
  153|     78|  }
  154|    109|  const uint8_t* const data_head =
  155|    109|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    109|  buffer->Advance(bytes_encoded);
  158|    109|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 31, False: 78]
  ------------------
  159|     31|    return false;
  160|     31|  }
  161|     78|  return true;
  162|    109|}
_ZN5draco17RAnsSymbolDecoderILi18EE12DecodeSymbolEv:
   43|   144k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi18EE11EndDecodingEv:
  165|     78|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     78|  ans_.read_end();
  167|     78|}

_ZN5draco13DecodeSymbolsEjiPNS_13DecoderBufferEPj:
   33|  12.7k|                   DecoderBuffer* src_buffer, uint32_t* out_values) {
   34|  12.7k|  if (num_values == 0) {
  ------------------
  |  Branch (34:7): [True: 72, False: 12.6k]
  ------------------
   35|     72|    return true;
   36|     72|  }
   37|       |  // Decode which scheme to use.
   38|  12.6k|  uint8_t scheme;
   39|  12.6k|  if (!src_buffer->Decode(&scheme)) {
  ------------------
  |  Branch (39:7): [True: 245, False: 12.3k]
  ------------------
   40|    245|    return false;
   41|    245|  }
   42|  12.3k|  if (scheme == SYMBOL_CODING_TAGGED) {
  ------------------
  |  Branch (42:7): [True: 1.28k, False: 11.1k]
  ------------------
   43|  1.28k|    return DecodeTaggedSymbols<RAnsSymbolDecoder>(num_values, num_components,
   44|  1.28k|                                                  src_buffer, out_values);
   45|  11.1k|  } else if (scheme == SYMBOL_CODING_RAW) {
  ------------------
  |  Branch (45:14): [True: 8.01k, False: 3.09k]
  ------------------
   46|  8.01k|    return DecodeRawSymbols<RAnsSymbolDecoder>(num_values, src_buffer,
   47|  8.01k|                                               out_values);
   48|  8.01k|  }
   49|  3.09k|  return false;
   50|  12.3k|}
_ZN5draco19DecodeTaggedSymbolsINS_17RAnsSymbolDecoderEEEbjiPNS_13DecoderBufferEPj:
   54|  1.28k|                         DecoderBuffer* src_buffer, uint32_t* out_values) {
   55|       |  // Decode the encoded data.
   56|  1.28k|  SymbolDecoderT<5> tag_decoder;
   57|  1.28k|  if (!tag_decoder.Create(src_buffer)) {
  ------------------
  |  Branch (57:7): [True: 570, False: 714]
  ------------------
   58|    570|    return false;
   59|    570|  }
   60|       |
   61|    714|  if (!tag_decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (61:7): [True: 293, False: 421]
  ------------------
   62|    293|    return false;
   63|    293|  }
   64|       |
   65|    421|  if (num_values > 0 && tag_decoder.num_symbols() == 0) {
  ------------------
  |  Branch (65:7): [True: 421, False: 0]
  |  Branch (65:25): [True: 51, False: 370]
  ------------------
   66|     51|    return false;  // Wrong number of symbols.
   67|     51|  }
   68|       |
   69|       |  // src_buffer now points behind the encoded tag data (to the place where the
   70|       |  // values are encoded).
   71|    370|  src_buffer->StartBitDecoding(false, nullptr);
   72|    370|  int value_id = 0;
   73|  6.82M|  for (uint32_t i = 0; i < num_values; i += num_components) {
  ------------------
  |  Branch (73:24): [True: 6.82M, False: 357]
  ------------------
   74|       |    // Decode the tag.
   75|  6.82M|    const uint32_t bit_length = tag_decoder.DecodeSymbol();
   76|       |    // Decode the actual value.
   77|  13.7M|    for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (77:21): [True: 6.92M, False: 6.82M]
  ------------------
   78|  6.92M|      uint32_t val;
   79|  6.92M|      if (!src_buffer->DecodeLeastSignificantBits32(bit_length, &val)) {
  ------------------
  |  Branch (79:11): [True: 13, False: 6.92M]
  ------------------
   80|     13|        return false;
   81|     13|      }
   82|  6.92M|      out_values[value_id++] = val;
   83|  6.92M|    }
   84|  6.82M|  }
   85|    357|  tag_decoder.EndDecoding();
   86|    357|  src_buffer->EndBitDecoding();
   87|    357|  return true;
   88|    370|}
_ZN5draco16DecodeRawSymbolsINS_17RAnsSymbolDecoderEEEbjPNS_13DecoderBufferEPj:
  116|  8.01k|                      uint32_t* out_values) {
  117|  8.01k|  uint8_t max_bit_length;
  118|  8.01k|  if (!src_buffer->Decode(&max_bit_length)) {
  ------------------
  |  Branch (118:7): [True: 73, False: 7.94k]
  ------------------
  119|     73|    return false;
  120|     73|  }
  121|  7.94k|  switch (max_bit_length) {
  122|    704|    case 1:
  ------------------
  |  Branch (122:5): [True: 704, False: 7.24k]
  ------------------
  123|    704|      return DecodeRawSymbolsInternal<SymbolDecoderT<1>>(num_values, src_buffer,
  124|    704|                                                         out_values);
  125|    431|    case 2:
  ------------------
  |  Branch (125:5): [True: 431, False: 7.51k]
  ------------------
  126|    431|      return DecodeRawSymbolsInternal<SymbolDecoderT<2>>(num_values, src_buffer,
  127|    431|                                                         out_values);
  128|    405|    case 3:
  ------------------
  |  Branch (128:5): [True: 405, False: 7.53k]
  ------------------
  129|    405|      return DecodeRawSymbolsInternal<SymbolDecoderT<3>>(num_values, src_buffer,
  130|    405|                                                         out_values);
  131|    360|    case 4:
  ------------------
  |  Branch (131:5): [True: 360, False: 7.58k]
  ------------------
  132|    360|      return DecodeRawSymbolsInternal<SymbolDecoderT<4>>(num_values, src_buffer,
  133|    360|                                                         out_values);
  134|    195|    case 5:
  ------------------
  |  Branch (134:5): [True: 195, False: 7.74k]
  ------------------
  135|    195|      return DecodeRawSymbolsInternal<SymbolDecoderT<5>>(num_values, src_buffer,
  136|    195|                                                         out_values);
  137|    413|    case 6:
  ------------------
  |  Branch (137:5): [True: 413, False: 7.53k]
  ------------------
  138|    413|      return DecodeRawSymbolsInternal<SymbolDecoderT<6>>(num_values, src_buffer,
  139|    413|                                                         out_values);
  140|    335|    case 7:
  ------------------
  |  Branch (140:5): [True: 335, False: 7.60k]
  ------------------
  141|    335|      return DecodeRawSymbolsInternal<SymbolDecoderT<7>>(num_values, src_buffer,
  142|    335|                                                         out_values);
  143|    370|    case 8:
  ------------------
  |  Branch (143:5): [True: 370, False: 7.57k]
  ------------------
  144|    370|      return DecodeRawSymbolsInternal<SymbolDecoderT<8>>(num_values, src_buffer,
  145|    370|                                                         out_values);
  146|    507|    case 9:
  ------------------
  |  Branch (146:5): [True: 507, False: 7.43k]
  ------------------
  147|    507|      return DecodeRawSymbolsInternal<SymbolDecoderT<9>>(num_values, src_buffer,
  148|    507|                                                         out_values);
  149|    474|    case 10:
  ------------------
  |  Branch (149:5): [True: 474, False: 7.47k]
  ------------------
  150|    474|      return DecodeRawSymbolsInternal<SymbolDecoderT<10>>(
  151|    474|          num_values, src_buffer, out_values);
  152|    372|    case 11:
  ------------------
  |  Branch (152:5): [True: 372, False: 7.57k]
  ------------------
  153|    372|      return DecodeRawSymbolsInternal<SymbolDecoderT<11>>(
  154|    372|          num_values, src_buffer, out_values);
  155|    353|    case 12:
  ------------------
  |  Branch (155:5): [True: 353, False: 7.59k]
  ------------------
  156|    353|      return DecodeRawSymbolsInternal<SymbolDecoderT<12>>(
  157|    353|          num_values, src_buffer, out_values);
  158|    466|    case 13:
  ------------------
  |  Branch (158:5): [True: 466, False: 7.47k]
  ------------------
  159|    466|      return DecodeRawSymbolsInternal<SymbolDecoderT<13>>(
  160|    466|          num_values, src_buffer, out_values);
  161|    413|    case 14:
  ------------------
  |  Branch (161:5): [True: 413, False: 7.53k]
  ------------------
  162|    413|      return DecodeRawSymbolsInternal<SymbolDecoderT<14>>(
  163|    413|          num_values, src_buffer, out_values);
  164|    503|    case 15:
  ------------------
  |  Branch (164:5): [True: 503, False: 7.44k]
  ------------------
  165|    503|      return DecodeRawSymbolsInternal<SymbolDecoderT<15>>(
  166|    503|          num_values, src_buffer, out_values);
  167|    369|    case 16:
  ------------------
  |  Branch (167:5): [True: 369, False: 7.57k]
  ------------------
  168|    369|      return DecodeRawSymbolsInternal<SymbolDecoderT<16>>(
  169|    369|          num_values, src_buffer, out_values);
  170|    391|    case 17:
  ------------------
  |  Branch (170:5): [True: 391, False: 7.55k]
  ------------------
  171|    391|      return DecodeRawSymbolsInternal<SymbolDecoderT<17>>(
  172|    391|          num_values, src_buffer, out_values);
  173|    412|    case 18:
  ------------------
  |  Branch (173:5): [True: 412, False: 7.53k]
  ------------------
  174|    412|      return DecodeRawSymbolsInternal<SymbolDecoderT<18>>(
  175|    412|          num_values, src_buffer, out_values);
  176|    471|    default:
  ------------------
  |  Branch (176:5): [True: 471, False: 7.47k]
  ------------------
  177|    471|      return false;
  178|  7.94k|  }
  179|  7.94k|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi1EEEEEbjPNS_13DecoderBufferEPj:
   92|    704|                              uint32_t* out_values) {
   93|    704|  SymbolDecoderT decoder;
   94|    704|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 441, False: 263]
  ------------------
   95|    441|    return false;
   96|    441|  }
   97|       |
   98|    263|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 263, False: 0]
  |  Branch (98:25): [True: 38, False: 225]
  ------------------
   99|     38|    return false;  // Wrong number of symbols.
  100|     38|  }
  101|       |
  102|    225|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 80, False: 145]
  ------------------
  103|     80|    return false;
  104|     80|  }
  105|  41.2M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 41.2M, False: 145]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  41.2M|    const uint32_t value = decoder.DecodeSymbol();
  108|  41.2M|    out_values[i] = value;
  109|  41.2M|  }
  110|    145|  decoder.EndDecoding();
  111|    145|  return true;
  112|    225|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi2EEEEEbjPNS_13DecoderBufferEPj:
   92|    431|                              uint32_t* out_values) {
   93|    431|  SymbolDecoderT decoder;
   94|    431|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 164, False: 267]
  ------------------
   95|    164|    return false;
   96|    164|  }
   97|       |
   98|    267|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 267, False: 0]
  |  Branch (98:25): [True: 14, False: 253]
  ------------------
   99|     14|    return false;  // Wrong number of symbols.
  100|     14|  }
  101|       |
  102|    253|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 66, False: 187]
  ------------------
  103|     66|    return false;
  104|     66|  }
  105|  1.24M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 1.24M, False: 187]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  1.24M|    const uint32_t value = decoder.DecodeSymbol();
  108|  1.24M|    out_values[i] = value;
  109|  1.24M|  }
  110|    187|  decoder.EndDecoding();
  111|    187|  return true;
  112|    253|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi3EEEEEbjPNS_13DecoderBufferEPj:
   92|    405|                              uint32_t* out_values) {
   93|    405|  SymbolDecoderT decoder;
   94|    405|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 138, False: 267]
  ------------------
   95|    138|    return false;
   96|    138|  }
   97|       |
   98|    267|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 267, False: 0]
  |  Branch (98:25): [True: 17, False: 250]
  ------------------
   99|     17|    return false;  // Wrong number of symbols.
  100|     17|  }
  101|       |
  102|    250|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 110, False: 140]
  ------------------
  103|    110|    return false;
  104|    110|  }
  105|  3.78M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 3.78M, False: 140]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  3.78M|    const uint32_t value = decoder.DecodeSymbol();
  108|  3.78M|    out_values[i] = value;
  109|  3.78M|  }
  110|    140|  decoder.EndDecoding();
  111|    140|  return true;
  112|    250|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi4EEEEEbjPNS_13DecoderBufferEPj:
   92|    360|                              uint32_t* out_values) {
   93|    360|  SymbolDecoderT decoder;
   94|    360|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 140, False: 220]
  ------------------
   95|    140|    return false;
   96|    140|  }
   97|       |
   98|    220|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 220, False: 0]
  |  Branch (98:25): [True: 13, False: 207]
  ------------------
   99|     13|    return false;  // Wrong number of symbols.
  100|     13|  }
  101|       |
  102|    207|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 82, False: 125]
  ------------------
  103|     82|    return false;
  104|     82|  }
  105|  9.97M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 9.97M, False: 125]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  9.97M|    const uint32_t value = decoder.DecodeSymbol();
  108|  9.97M|    out_values[i] = value;
  109|  9.97M|  }
  110|    125|  decoder.EndDecoding();
  111|    125|  return true;
  112|    207|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi5EEEEEbjPNS_13DecoderBufferEPj:
   92|    195|                              uint32_t* out_values) {
   93|    195|  SymbolDecoderT decoder;
   94|    195|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 44, False: 151]
  ------------------
   95|     44|    return false;
   96|     44|  }
   97|       |
   98|    151|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 151, False: 0]
  |  Branch (98:25): [True: 63, False: 88]
  ------------------
   99|     63|    return false;  // Wrong number of symbols.
  100|     63|  }
  101|       |
  102|     88|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 15, False: 73]
  ------------------
  103|     15|    return false;
  104|     15|  }
  105|  8.59M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 8.59M, False: 73]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  8.59M|    const uint32_t value = decoder.DecodeSymbol();
  108|  8.59M|    out_values[i] = value;
  109|  8.59M|  }
  110|     73|  decoder.EndDecoding();
  111|     73|  return true;
  112|     88|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi6EEEEEbjPNS_13DecoderBufferEPj:
   92|    413|                              uint32_t* out_values) {
   93|    413|  SymbolDecoderT decoder;
   94|    413|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 132, False: 281]
  ------------------
   95|    132|    return false;
   96|    132|  }
   97|       |
   98|    281|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 281, False: 0]
  |  Branch (98:25): [True: 12, False: 269]
  ------------------
   99|     12|    return false;  // Wrong number of symbols.
  100|     12|  }
  101|       |
  102|    269|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 88, False: 181]
  ------------------
  103|     88|    return false;
  104|     88|  }
  105|  13.2M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 13.2M, False: 181]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  13.2M|    const uint32_t value = decoder.DecodeSymbol();
  108|  13.2M|    out_values[i] = value;
  109|  13.2M|  }
  110|    181|  decoder.EndDecoding();
  111|    181|  return true;
  112|    269|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi7EEEEEbjPNS_13DecoderBufferEPj:
   92|    335|                              uint32_t* out_values) {
   93|    335|  SymbolDecoderT decoder;
   94|    335|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 126, False: 209]
  ------------------
   95|    126|    return false;
   96|    126|  }
   97|       |
   98|    209|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 209, False: 0]
  |  Branch (98:25): [True: 9, False: 200]
  ------------------
   99|      9|    return false;  // Wrong number of symbols.
  100|      9|  }
  101|       |
  102|    200|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 82, False: 118]
  ------------------
  103|     82|    return false;
  104|     82|  }
  105|  39.2M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 39.2M, False: 118]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  39.2M|    const uint32_t value = decoder.DecodeSymbol();
  108|  39.2M|    out_values[i] = value;
  109|  39.2M|  }
  110|    118|  decoder.EndDecoding();
  111|    118|  return true;
  112|    200|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi8EEEEEbjPNS_13DecoderBufferEPj:
   92|    370|                              uint32_t* out_values) {
   93|    370|  SymbolDecoderT decoder;
   94|    370|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 136, False: 234]
  ------------------
   95|    136|    return false;
   96|    136|  }
   97|       |
   98|    234|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 234, False: 0]
  |  Branch (98:25): [True: 11, False: 223]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    223|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 69, False: 154]
  ------------------
  103|     69|    return false;
  104|     69|  }
  105|  24.9M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 24.9M, False: 154]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  24.9M|    const uint32_t value = decoder.DecodeSymbol();
  108|  24.9M|    out_values[i] = value;
  109|  24.9M|  }
  110|    154|  decoder.EndDecoding();
  111|    154|  return true;
  112|    223|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi9EEEEEbjPNS_13DecoderBufferEPj:
   92|    507|                              uint32_t* out_values) {
   93|    507|  SymbolDecoderT decoder;
   94|    507|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 171, False: 336]
  ------------------
   95|    171|    return false;
   96|    171|  }
   97|       |
   98|    336|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 336, False: 0]
  |  Branch (98:25): [True: 10, False: 326]
  ------------------
   99|     10|    return false;  // Wrong number of symbols.
  100|     10|  }
  101|       |
  102|    326|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 76, False: 250]
  ------------------
  103|     76|    return false;
  104|     76|  }
  105|  12.4M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 12.4M, False: 250]
  ------------------
  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|    250|  decoder.EndDecoding();
  111|    250|  return true;
  112|    326|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi10EEEEEbjPNS_13DecoderBufferEPj:
   92|    474|                              uint32_t* out_values) {
   93|    474|  SymbolDecoderT decoder;
   94|    474|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 206, False: 268]
  ------------------
   95|    206|    return false;
   96|    206|  }
   97|       |
   98|    268|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 268, False: 0]
  |  Branch (98:25): [True: 11, False: 257]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    257|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 187, False: 70]
  ------------------
  103|    187|    return false;
  104|    187|  }
  105|   474k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 474k, False: 70]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   474k|    const uint32_t value = decoder.DecodeSymbol();
  108|   474k|    out_values[i] = value;
  109|   474k|  }
  110|     70|  decoder.EndDecoding();
  111|     70|  return true;
  112|    257|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi11EEEEEbjPNS_13DecoderBufferEPj:
   92|    372|                              uint32_t* out_values) {
   93|    372|  SymbolDecoderT decoder;
   94|    372|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 188, False: 184]
  ------------------
   95|    188|    return false;
   96|    188|  }
   97|       |
   98|    184|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 184, False: 0]
  |  Branch (98:25): [True: 8, False: 176]
  ------------------
   99|      8|    return false;  // Wrong number of symbols.
  100|      8|  }
  101|       |
  102|    176|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 107, False: 69]
  ------------------
  103|    107|    return false;
  104|    107|  }
  105|   525k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 525k, False: 69]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   525k|    const uint32_t value = decoder.DecodeSymbol();
  108|   525k|    out_values[i] = value;
  109|   525k|  }
  110|     69|  decoder.EndDecoding();
  111|     69|  return true;
  112|    176|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi12EEEEEbjPNS_13DecoderBufferEPj:
   92|    353|                              uint32_t* out_values) {
   93|    353|  SymbolDecoderT decoder;
   94|    353|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 193, False: 160]
  ------------------
   95|    193|    return false;
   96|    193|  }
   97|       |
   98|    160|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 160, False: 0]
  |  Branch (98:25): [True: 2, False: 158]
  ------------------
   99|      2|    return false;  // Wrong number of symbols.
  100|      2|  }
  101|       |
  102|    158|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 99, False: 59]
  ------------------
  103|     99|    return false;
  104|     99|  }
  105|  92.8k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 92.7k, False: 59]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  92.7k|    const uint32_t value = decoder.DecodeSymbol();
  108|  92.7k|    out_values[i] = value;
  109|  92.7k|  }
  110|     59|  decoder.EndDecoding();
  111|     59|  return true;
  112|    158|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi13EEEEEbjPNS_13DecoderBufferEPj:
   92|    466|                              uint32_t* out_values) {
   93|    466|  SymbolDecoderT decoder;
   94|    466|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 222, False: 244]
  ------------------
   95|    222|    return false;
   96|    222|  }
   97|       |
   98|    244|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 244, False: 0]
  |  Branch (98:25): [True: 8, False: 236]
  ------------------
   99|      8|    return false;  // Wrong number of symbols.
  100|      8|  }
  101|       |
  102|    236|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 151, False: 85]
  ------------------
  103|    151|    return false;
  104|    151|  }
  105|   112k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 112k, False: 85]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   112k|    const uint32_t value = decoder.DecodeSymbol();
  108|   112k|    out_values[i] = value;
  109|   112k|  }
  110|     85|  decoder.EndDecoding();
  111|     85|  return true;
  112|    236|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi14EEEEEbjPNS_13DecoderBufferEPj:
   92|    413|                              uint32_t* out_values) {
   93|    413|  SymbolDecoderT decoder;
   94|    413|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 194, False: 219]
  ------------------
   95|    194|    return false;
   96|    194|  }
   97|       |
   98|    219|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 219, False: 0]
  |  Branch (98:25): [True: 11, False: 208]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    208|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 128, False: 80]
  ------------------
  103|    128|    return false;
  104|    128|  }
  105|  98.9k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 98.8k, False: 80]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  98.8k|    const uint32_t value = decoder.DecodeSymbol();
  108|  98.8k|    out_values[i] = value;
  109|  98.8k|  }
  110|     80|  decoder.EndDecoding();
  111|     80|  return true;
  112|    208|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi15EEEEEbjPNS_13DecoderBufferEPj:
   92|    503|                              uint32_t* out_values) {
   93|    503|  SymbolDecoderT decoder;
   94|    503|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 204, False: 299]
  ------------------
   95|    204|    return false;
   96|    204|  }
   97|       |
   98|    299|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 299, False: 0]
  |  Branch (98:25): [True: 9, False: 290]
  ------------------
   99|      9|    return false;  // Wrong number of symbols.
  100|      9|  }
  101|       |
  102|    290|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 209, False: 81]
  ------------------
  103|    209|    return false;
  104|    209|  }
  105|   245k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 245k, False: 81]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   245k|    const uint32_t value = decoder.DecodeSymbol();
  108|   245k|    out_values[i] = value;
  109|   245k|  }
  110|     81|  decoder.EndDecoding();
  111|     81|  return true;
  112|    290|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi16EEEEEbjPNS_13DecoderBufferEPj:
   92|    369|                              uint32_t* out_values) {
   93|    369|  SymbolDecoderT decoder;
   94|    369|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 149, False: 220]
  ------------------
   95|    149|    return false;
   96|    149|  }
   97|       |
   98|    220|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 220, False: 0]
  |  Branch (98:25): [True: 16, False: 204]
  ------------------
   99|     16|    return false;  // Wrong number of symbols.
  100|     16|  }
  101|       |
  102|    204|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 139, False: 65]
  ------------------
  103|    139|    return false;
  104|    139|  }
  105|   112k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 112k, False: 65]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   112k|    const uint32_t value = decoder.DecodeSymbol();
  108|   112k|    out_values[i] = value;
  109|   112k|  }
  110|     65|  decoder.EndDecoding();
  111|     65|  return true;
  112|    204|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi17EEEEEbjPNS_13DecoderBufferEPj:
   92|    391|                              uint32_t* out_values) {
   93|    391|  SymbolDecoderT decoder;
   94|    391|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 172, False: 219]
  ------------------
   95|    172|    return false;
   96|    172|  }
   97|       |
   98|    219|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 219, False: 0]
  |  Branch (98:25): [True: 9, False: 210]
  ------------------
   99|      9|    return false;  // Wrong number of symbols.
  100|      9|  }
  101|       |
  102|    210|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 126, False: 84]
  ------------------
  103|    126|    return false;
  104|    126|  }
  105|   172k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 172k, False: 84]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   172k|    const uint32_t value = decoder.DecodeSymbol();
  108|   172k|    out_values[i] = value;
  109|   172k|  }
  110|     84|  decoder.EndDecoding();
  111|     84|  return true;
  112|    210|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi18EEEEEbjPNS_13DecoderBufferEPj:
   92|    412|                              uint32_t* out_values) {
   93|    412|  SymbolDecoderT decoder;
   94|    412|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 208, False: 204]
  ------------------
   95|    208|    return false;
   96|    208|  }
   97|       |
   98|    204|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 204, False: 0]
  |  Branch (98:25): [True: 12, False: 192]
  ------------------
   99|     12|    return false;  // Wrong number of symbols.
  100|     12|  }
  101|       |
  102|    192|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 114, False: 78]
  ------------------
  103|    114|    return false;
  104|    114|  }
  105|   144k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 144k, False: 78]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   144k|    const uint32_t value = decoder.DecodeSymbol();
  108|   144k|    out_values[i] = value;
  109|   144k|  }
  110|     78|  decoder.EndDecoding();
  111|     78|  return true;
  112|    192|}

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

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

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

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

_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEEC2Ev:
   48|  4.50k|    : decoder_(nullptr),
   49|  4.50k|      last_symbol_id_(-1),
   50|  4.50k|      last_vert_id_(-1),
   51|  4.50k|      last_face_id_(-1),
   52|  4.50k|      num_new_vertices_(0),
   53|  4.50k|      num_encoded_vertices_(0),
   54|  4.50k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  4.50k|    MeshEdgebreakerDecoder* decoder) {
   59|  4.50k|  decoder_ = decoder;
   60|  4.50k|  return true;
   61|  4.50k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE23GetAttributeCornerTableEi:
   66|  4.42k|    int att_id) const {
   67|  6.23k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 5.03k, False: 1.20k]
  ------------------
   68|  5.03k|    const int decoder_id = attribute_data_[i].decoder_id;
   69|  5.03k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 1.80k, False: 3.22k]
  |  Branch (69:27): [True: 0, False: 3.22k]
  ------------------
   70|  1.80k|      continue;
   71|  1.80k|    }
   72|  3.22k|    const AttributesDecoderInterface* const dec =
   73|  3.22k|        decoder_->attributes_decoder(decoder_id);
   74|  6.06k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 6.05k, False: 6]
  ------------------
   75|  6.05k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 3.21k, False: 2.84k]
  ------------------
   76|  3.21k|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 2.09k, False: 1.12k]
  ------------------
   77|  2.09k|          return &attribute_data_[i].connectivity_data;
   78|  2.09k|        }
   79|  1.12k|        return nullptr;
   80|  3.21k|      }
   81|  6.05k|    }
   82|  3.22k|  }
   83|  1.20k|  return nullptr;
   84|  4.42k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE24GetAttributeEncodingDataEi:
   89|  4.42k|    int att_id) const {
   90|  6.23k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 5.03k, False: 1.20k]
  ------------------
   91|  5.03k|    const int decoder_id = attribute_data_[i].decoder_id;
   92|  5.03k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 1.80k, False: 3.22k]
  |  Branch (92:27): [True: 0, False: 3.22k]
  ------------------
   93|  1.80k|      continue;
   94|  1.80k|    }
   95|  3.22k|    const AttributesDecoderInterface* const dec =
   96|  3.22k|        decoder_->attributes_decoder(decoder_id);
   97|  6.06k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 6.05k, False: 6]
  ------------------
   98|  6.05k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 3.21k, False: 2.84k]
  ------------------
   99|  3.21k|        return &attribute_data_[i].encoding_data;
  100|  3.21k|      }
  101|  6.05k|    }
  102|  3.22k|  }
  103|  1.20k|  return &pos_encoding_data_;
  104|  4.42k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE23CreateAttributesDecoderEi:
  130|  3.83k|    int32_t att_decoder_id) {
  131|  3.83k|  int8_t att_data_id;
  132|  3.83k|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 14, False: 3.82k]
  ------------------
  133|     14|    return false;
  134|     14|  }
  135|  3.82k|  uint8_t decoder_type;
  136|  3.82k|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 14, False: 3.80k]
  ------------------
  137|     14|    return false;
  138|     14|  }
  139|       |
  140|  3.80k|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 2.80k, False: 997]
  ------------------
  141|  2.80k|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 76, False: 2.73k]
  ------------------
  142|     76|      return false;  // Unexpected attribute data.
  143|     76|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|  2.73k|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 4, False: 2.72k]
  ------------------
  148|      4|      return false;
  149|      4|    }
  150|       |
  151|  2.72k|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|  2.72k|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    997|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 5, False: 992]
  ------------------
  155|      5|      return false;  // Some other decoder is already using the data. Error.
  156|      5|    }
  157|    992|    pos_data_decoder_id_ = att_decoder_id;
  158|    992|  }
  159|       |
  160|  3.72k|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|  3.72k|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  3.72k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 3.71k, False: 6]
  ------------------
  162|  3.71k|    uint8_t traversal_method_encoded;
  163|  3.71k|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 6, False: 3.70k]
  ------------------
  164|      6|      return false;
  165|      6|    }
  166|       |    // Check that decoded traversal method is valid.
  167|  3.70k|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 34, False: 3.67k]
  ------------------
  168|     34|      return false;
  169|     34|    }
  170|  3.67k|    traversal_method =
  171|  3.67k|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|  3.67k|  }
  173|       |
  174|  3.68k|  const Mesh* mesh = decoder_->mesh();
  175|  3.68k|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|  3.68k|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 1.94k, False: 1.73k]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|  1.94k|    MeshAttributeIndicesEncodingData* encoding_data = nullptr;
  181|  1.94k|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 964, False: 983]
  ------------------
  182|    964|      encoding_data = &pos_encoding_data_;
  183|    983|    } else {
  184|    983|      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|    983|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|    983|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|  1.94k|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 327, False: 1.62k]
  ------------------
  191|    327|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|    327|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|    327|          AttTraverser;
  194|    327|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|  1.62k|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 1.62k, False: 0]
  ------------------
  196|  1.62k|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|  1.62k|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|  1.62k|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|  1.62k|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|  1.94k|  } else {
  203|  1.73k|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 10, False: 1.72k]
  ------------------
  204|     10|      return false;  // Unsupported method.
  205|     10|    }
  206|  1.72k|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 9, False: 1.71k]
  ------------------
  207|      9|      return false;  // Attribute data must be specified.
  208|      9|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|  1.71k|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|  1.71k|        AttObserver;
  214|  1.71k|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|  1.71k|        AttTraverser;
  216|       |
  217|  1.71k|    MeshAttributeIndicesEncodingData* const encoding_data =
  218|  1.71k|        &attribute_data_[att_data_id].encoding_data;
  219|  1.71k|    const MeshAttributeCornerTable* const corner_table =
  220|  1.71k|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|  1.71k|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|  1.71k|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|  1.71k|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|  1.71k|                             encoding_data);
  227|       |
  228|  1.71k|    AttTraverser att_traverser;
  229|  1.71k|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|  1.71k|    traversal_sequencer->SetTraverser(att_traverser);
  232|  1.71k|    sequencer = std::move(traversal_sequencer);
  233|  1.71k|  }
  234|       |
  235|  3.66k|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 3.66k]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|  3.66k|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|  3.66k|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|  3.66k|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|  3.66k|                                        std::move(att_controller));
  244|  3.66k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18DecodeConnectivityEv:
  247|  4.50k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  4.50k|  num_new_vertices_ = 0;
  249|  4.50k|  new_to_parent_vertex_map_.clear();
  250|  4.50k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  4.50k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  4.50k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 596, False: 3.90k]
  ------------------
  252|    596|    uint32_t num_new_verts;
  253|    596|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    596|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 213, False: 383]
  ------------------
  254|    213|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 213]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    383|    } else {
  258|    383|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 383]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    383|    }
  262|    596|    num_new_vertices_ = num_new_verts;
  263|    596|  }
  264|  4.50k|#endif
  265|       |
  266|  4.50k|  uint32_t num_encoded_vertices;
  267|  4.50k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  4.50k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  4.50k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 213, False: 4.28k]
  ------------------
  269|    213|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 213]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    213|  } else
  274|  4.28k|#endif
  275|  4.28k|  {
  276|  4.28k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 4.28k]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|  4.28k|  }
  280|  4.50k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  4.50k|  uint32_t num_faces;
  283|  4.50k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  4.50k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  4.50k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 213, False: 4.28k]
  ------------------
  285|    213|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 213]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    213|  } else
  290|  4.28k|#endif
  291|  4.28k|  {
  292|  4.28k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 4.28k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  4.28k|  }
  296|  4.50k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 1, False: 4.50k]
  ------------------
  297|      1|    return false;  // Draco cannot handle this many faces.
  298|      1|  }
  299|       |
  300|  4.50k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 2, False: 4.49k]
  ------------------
  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|  4.49k|  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|  4.49k|  const uint64_t num_encoded_vertices_64 =
  311|  4.49k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  4.49k|  const uint64_t max_num_vertex_edges =
  313|  4.49k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  4.49k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 1, False: 4.49k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      1|    return false;
  317|      1|  }
  318|       |
  319|  4.49k|  uint8_t num_attribute_data;
  320|  4.49k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 4.49k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  4.49k|  uint32_t num_encoded_symbols;
  325|  4.49k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  4.49k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  4.49k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 209, False: 4.28k]
  ------------------
  327|    209|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 209]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    209|  } else
  332|  4.28k|#endif
  333|  4.28k|  {
  334|  4.28k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 4.28k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  4.28k|  }
  338|       |
  339|  4.49k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 2, False: 4.49k]
  ------------------
  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|  4.49k|  const uint32_t max_encoded_faces =
  346|  4.49k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  4.49k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 10, False: 4.48k]
  ------------------
  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|     10|    return false;
  352|     10|  }
  353|       |
  354|  4.48k|  uint32_t num_encoded_split_symbols;
  355|  4.48k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  4.48k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  4.48k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 198, False: 4.28k]
  ------------------
  357|    198|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 198]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    198|  } else
  362|  4.28k|#endif
  363|  4.28k|  {
  364|  4.28k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 4.28k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  4.28k|  }
  368|       |
  369|  4.48k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 5, False: 4.48k]
  ------------------
  370|      5|    return false;  // Split symbols are a sub-set of all symbols.
  371|      5|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  4.48k|  vertex_traversal_length_.clear();
  375|  4.48k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  4.48k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 4.48k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  4.48k|  processed_corner_ids_.clear();
  380|  4.48k|  processed_corner_ids_.reserve(num_faces);
  381|  4.48k|  processed_connectivity_corners_.clear();
  382|  4.48k|  processed_connectivity_corners_.reserve(num_faces);
  383|  4.48k|  topology_split_data_.clear();
  384|  4.48k|  hole_event_data_.clear();
  385|  4.48k|  init_face_configurations_.clear();
  386|  4.48k|  init_corners_.clear();
  387|       |
  388|  4.48k|  last_symbol_id_ = -1;
  389|  4.48k|  last_face_id_ = -1;
  390|  4.48k|  last_vert_id_ = -1;
  391|       |
  392|  4.48k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  4.48k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  4.48k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 1, False: 4.48k]
  ------------------
  397|  4.48k|          num_faces, num_encoded_vertices_ + num_encoded_split_symbols)) {
  398|      1|    return false;
  399|      1|  }
  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|  4.48k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  4.48k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  4.48k|  int32_t topology_split_decoded_bytes = -1;
  410|  4.48k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  4.48k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 575, False: 3.90k]
  ------------------
  411|    575|    uint32_t encoded_connectivity_size;
  412|    575|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    575|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 192, False: 383]
  ------------------
  413|    192|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 5, False: 187]
  ------------------
  414|      5|        return false;
  415|      5|      }
  416|    383|    } else {
  417|    383|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 383]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|    383|    }
  421|    570|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 0, False: 570]
  ------------------
  422|    570|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 27, False: 543]
  ------------------
  423|     27|      return false;
  424|     27|    }
  425|    543|    DecoderBuffer event_buffer;
  426|    543|    event_buffer.Init(
  427|    543|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    543|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    543|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    543|    topology_split_decoded_bytes =
  432|    543|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    543|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 170, False: 373]
  ------------------
  434|    170|      return false;
  435|    170|    }
  436|       |
  437|    543|  } else
  438|  3.90k|#endif
  439|  3.90k|  {
  440|  3.90k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 13, False: 3.89k]
  ------------------
  441|     13|      return false;
  442|     13|    }
  443|  3.90k|  }
  444|       |
  445|  4.26k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  4.26k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  4.26k|                                           num_encoded_split_symbols);
  449|  4.26k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  4.26k|  DecoderBuffer traversal_end_buffer;
  452|  4.26k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 112, False: 4.15k]
  ------------------
  453|    112|    return false;
  454|    112|  }
  455|       |
  456|  4.15k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  4.15k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 343, False: 3.81k]
  ------------------
  458|    343|    return false;
  459|    343|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|  3.81k|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|  3.81k|                           traversal_end_buffer.remaining_size(),
  464|  3.81k|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|  3.81k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|  3.81k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.81k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 266, False: 3.54k]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|    266|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|    266|  }
  471|  3.81k|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|  3.81k|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 3.74k, False: 66]
  ------------------
  475|  3.74k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|  3.74k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  3.74k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 252, False: 3.49k]
  ------------------
  477|  1.64k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 1.39k, False: 252]
  ------------------
  478|  1.39k|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 1.39k]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|  1.39k|      }
  482|       |
  483|    252|    } else
  484|  3.49k|#endif
  485|  3.49k|    {
  486|   301k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 297k, False: 3.49k]
  ------------------
  487|   297k|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 297k]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|   297k|      }
  491|  3.49k|    }
  492|  3.74k|  }
  493|  3.81k|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  10.6k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 6.82k, False: 3.81k]
  ------------------
  498|  6.82k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  1.21M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 1.21M, False: 6.82k]
  ------------------
  501|  1.21M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  1.21M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  6.82k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 6.82k]
  ------------------
  505|  6.82k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  6.82k|  }
  509|       |
  510|  3.81k|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  10.6k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 6.82k, False: 3.81k]
  ------------------
  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|  6.82k|    int32_t att_connectivity_verts =
  517|  6.82k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  6.82k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 563, False: 6.25k]
  ------------------
  519|    563|      att_connectivity_verts = corner_table_->num_vertices();
  520|    563|    }
  521|  6.82k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  6.82k|  }
  523|  3.81k|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 5, False: 3.80k]
  ------------------
  524|      5|    return false;
  525|      5|  }
  526|  3.80k|  return true;
  527|  3.81k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE19OnAttributesDecodedEv:
  530|    957|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|    957|  return true;
  532|    957|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18DecodeConnectivityEi:
  536|  4.15k|    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|  4.15k|  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|  4.15k|  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|  4.15k|  std::vector<VertexIndex> invalid_vertices;
  558|  4.15k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  4.15k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  4.15k|  int num_faces = 0;
  562|  35.4M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 35.4M, False: 3.90k]
  ------------------
  563|  35.4M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  35.4M|    bool check_topology_split = false;
  566|  35.4M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  35.4M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 15.8M, False: 19.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|  15.8M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 2, False: 15.8M]
  ------------------
  588|      2|        return -1;
  589|      2|      }
  590|       |
  591|  15.8M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  15.8M|      const VertexIndex vertex_x =
  593|  15.8M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  15.8M|      const CornerIndex corner_b =
  595|  15.8M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  15.8M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 168, False: 15.8M]
  ------------------
  598|       |        // All matched corners must be different.
  599|    168|        return -1;
  600|    168|      }
  601|  15.8M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 15.8M]
  |  Branch (601:11): [True: 0, False: 15.8M]
  ------------------
  602|  15.8M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 15.8M]
  ------------------
  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|  15.8M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  15.8M|      SetOppositeCorners(corner_a, corner + 1);
  612|  15.8M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  15.8M|      const VertexIndex vert_a_prev =
  616|  15.8M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  15.8M|      const VertexIndex vert_b_next =
  618|  15.8M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  15.8M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 15.8M]
  |  Branch (619:38): [True: 0, False: 15.8M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  15.8M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  15.8M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  15.8M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  15.8M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  15.8M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  15.8M|      active_corner_stack.back() = corner;
  631|  19.6M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 6.79M, False: 12.8M]
  |  Branch (631:40): [True: 4.53M, False: 8.27M]
  ------------------
  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|  11.3M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 0, False: 11.3M]
  ------------------
  647|      0|        return -1;
  648|      0|      }
  649|  11.3M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  11.3M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 11.3M]
  ------------------
  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|  11.3M|      const CornerIndex corner(3 * face.value());
  658|  11.3M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  11.3M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 6.79M, False: 4.53M]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  6.79M|        opp_corner = corner + 2;
  662|  6.79M|        corner_l = corner + 1;
  663|  6.79M|        corner_r = corner;
  664|  6.79M|      } else {
  665|       |        // "l" is the new first corner.
  666|  4.53M|        opp_corner = corner + 1;
  667|  4.53M|        corner_l = corner;
  668|  4.53M|        corner_r = corner + 2;
  669|  4.53M|      }
  670|  11.3M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  11.3M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  11.3M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 0, False: 11.3M]
  ------------------
  675|      0|        return -1;  // Unexpected number of decoded vertices.
  676|      0|      }
  677|       |
  678|  11.3M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  11.3M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  11.3M|      const VertexIndex vertex_r =
  682|  11.3M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  11.3M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  11.3M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  11.3M|      corner_table_->MapCornerToVertex(
  688|  11.3M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  11.3M|      active_corner_stack.back() = corner;
  690|  11.3M|      check_topology_split = true;
  691|  11.3M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 4.04M, False: 4.23M]
  ------------------
  692|       |      // Create a new face that merges two last active edges from the active
  693|       |      // stack. No new vertex is created, but two vertices at corners "p" and
  694|       |      // "n" need to be merged into a single vertex.
  695|       |      //
  696|       |      // *-------v-------*
  697|       |      //  \a   p/x\n   b/
  698|       |      //   \   /   \   /
  699|       |      //    \ /  S  \ /
  700|       |      //     *.......*
  701|       |      //
  702|  4.04M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 0, False: 4.04M]
  ------------------
  703|      0|        return -1;
  704|      0|      }
  705|  4.04M|      const CornerIndex corner_b = active_corner_stack.back();
  706|  4.04M|      active_corner_stack.pop_back();
  707|       |
  708|       |      // Corner "a" can correspond either to a normal active edge, or to an edge
  709|       |      // created from the topology split event.
  710|  4.04M|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  4.04M|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 128, False: 4.04M]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|    128|        active_corner_stack.push_back(it->second);
  714|    128|      }
  715|  4.04M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 18, False: 4.04M]
  ------------------
  716|     18|        return -1;
  717|     18|      }
  718|  4.04M|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  4.04M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 4.04M]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  4.04M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 6, False: 4.04M]
  |  Branch (724:11): [True: 6, False: 4.04M]
  ------------------
  725|  4.04M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 4.04M]
  ------------------
  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|  4.04M|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  4.04M|      SetOppositeCorners(corner_a, corner + 2);
  735|  4.04M|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  4.04M|      const VertexIndex vertex_p =
  739|  4.04M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  4.04M|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  4.04M|      corner_table_->MapCornerToVertex(
  742|  4.04M|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  4.04M|      const VertexIndex vert_b_prev =
  744|  4.04M|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  4.04M|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  4.04M|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  4.04M|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  4.04M|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  4.04M|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  4.04M|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  4.04M|                                       corner_table_->LeftMostCorner(vertex_n));
  753|       |
  754|       |      // Also update the vertex id at corner "n" and all corners that are
  755|       |      // connected to it in the CCW direction.
  756|  4.04M|      const CornerIndex first_corner = corner_n;
  757|  13.5M|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 9.52M, False: 4.04M]
  ------------------
  758|  9.52M|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|  9.52M|        corner_n = corner_table_->SwingLeft(corner_n);
  760|  9.52M|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 5, False: 9.52M]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      5|          return -1;
  764|      5|        }
  765|  9.52M|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  4.04M|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  4.04M|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 974k, False: 3.07M]
  ------------------
  770|   974k|        invalid_vertices.push_back(vertex_n);
  771|   974k|      }
  772|  4.04M|      active_corner_stack.back() = corner;
  773|  4.23M|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 4.23M, False: 0]
  ------------------
  774|  4.23M|      const CornerIndex corner(3 * face.value());
  775|  4.23M|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  4.23M|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  4.23M|      corner_table_->MapCornerToVertex(corner + 1,
  779|  4.23M|                                       corner_table_->AddNewVertex());
  780|  4.23M|      corner_table_->MapCornerToVertex(corner + 2,
  781|  4.23M|                                       corner_table_->AddNewVertex());
  782|       |
  783|  4.23M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 3, False: 4.23M]
  ------------------
  784|      3|        return -1;  // Unexpected number of decoded vertices.
  785|      3|      }
  786|       |
  787|  4.23M|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  4.23M|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  4.23M|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  4.23M|      active_corner_stack.push_back(corner);
  792|  4.23M|      check_topology_split = true;
  793|  4.23M|    } 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|  35.4M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  35.4M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 15.5M, False: 19.8M]
  ------------------
  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|  15.5M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  15.5M|      EdgeFaceName split_edge;
  812|  15.5M|      int encoder_split_symbol_id;
  813|  15.5M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 2.68k, False: 15.5M]
  ------------------
  814|  15.5M|                             &encoder_split_symbol_id)) {
  815|  2.68k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 43, False: 2.64k]
  ------------------
  816|     43|          return -1;  // Wrong split symbol id.
  817|     43|        }
  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.64k|        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.64k|        CornerIndex new_active_corner;
  831|  2.64k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 1.26k, False: 1.37k]
  ------------------
  832|  1.26k|          new_active_corner = corner_table_->Next(act_top_corner);
  833|  1.37k|        } else {
  834|  1.37k|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|  1.37k|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  2.64k|        const int decoder_split_symbol_id =
  839|  2.64k|            num_symbols - encoder_split_symbol_id - 1;
  840|  2.64k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  2.64k|            new_active_corner;
  842|  2.64k|      }
  843|  15.5M|    }
  844|  35.4M|  }
  845|  3.90k|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 3.90k]
  ------------------
  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|  49.8k|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 46.0k, False: 3.82k]
  ------------------
  850|  46.0k|    const CornerIndex corner = active_corner_stack.back();
  851|  46.0k|    active_corner_stack.pop_back();
  852|  46.0k|    const bool interior_face =
  853|  46.0k|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  46.0k|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 33.6k, False: 12.3k]
  ------------------
  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|  33.6k|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 17, False: 33.6k]
  ------------------
  877|     17|        return -1;  // More faces than expected added to the mesh.
  878|     17|      }
  879|       |
  880|  33.6k|      const CornerIndex corner_a = corner;
  881|  33.6k|      const VertexIndex vert_n =
  882|  33.6k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  33.6k|      const CornerIndex corner_b =
  884|  33.6k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  33.6k|      const VertexIndex vert_x =
  887|  33.6k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  33.6k|      const CornerIndex corner_c =
  889|  33.6k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  33.6k|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 9, False: 33.6k]
  |  Branch (891:33): [True: 48, False: 33.5k]
  |  Branch (891:55): [True: 0, False: 33.5k]
  ------------------
  892|       |        // All matched corners must be different.
  893|     57|        return -1;
  894|     57|      }
  895|  33.5k|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 5, False: 33.5k]
  |  Branch (895:11): [True: 7, False: 33.5k]
  ------------------
  896|  33.5k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 1, False: 33.5k]
  ------------------
  897|  33.5k|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 1, False: 33.5k]
  ------------------
  898|       |        // One of the corners is already opposite to an existing face, which
  899|       |        // should not happen unless the input was tampered with.
  900|      7|        return -1;
  901|      7|      }
  902|       |
  903|  33.5k|      const VertexIndex vert_p =
  904|  33.5k|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  33.5k|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  33.5k|      const CornerIndex new_corner(3 * face.value());
  909|  33.5k|      SetOppositeCorners(new_corner, corner);
  910|  33.5k|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  33.5k|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  33.5k|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  33.5k|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  33.5k|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|   134k|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 100k, False: 33.5k]
  ------------------
  920|   100k|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|   100k|      }
  922|       |
  923|  33.5k|      init_face_configurations_.push_back(true);
  924|  33.5k|      init_corners_.push_back(new_corner);
  925|  33.5k|    } 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|  12.3k|      init_face_configurations_.push_back(false);
  930|  12.3k|      init_corners_.push_back(corner);
  931|  12.3k|    }
  932|  46.0k|  }
  933|  3.82k|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 14, False: 3.81k]
  ------------------
  934|     14|    return -1;  // Unexpected number of decoded faces.
  935|     14|  }
  936|       |
  937|  3.81k|  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|  5.35k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 5.35k, False: 3.81k]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  5.35k|    VertexIndex src_vert(num_vertices - 1);
  943|  6.39k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 1.04k, False: 5.35k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|  1.04k|      src_vert = VertexIndex(--num_vertices - 1);
  946|  1.04k|    }
  947|  5.35k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 1.04k, False: 4.30k]
  ------------------
  948|  1.04k|      continue;  // No need to swap anything.
  949|  1.04k|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  4.30k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  63.6k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 59.3k, False: 4.30k]
  ------------------
  954|  59.3k|      const CornerIndex cid = vcit.Corner();
  955|  59.3k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 3, False: 59.3k]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      3|        return -1;
  959|      3|      }
  960|  59.3k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  59.3k|    }
  962|  4.30k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  4.30k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  4.30k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  4.30k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  4.30k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  4.30k|    num_vertices--;
  972|  4.30k|  }
  973|  3.81k|  return num_vertices;
  974|  3.81k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  4.44k|    DecoderBuffer* decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  4.44k|  uint32_t num_topology_splits;
  982|  4.44k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  4.44k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  4.44k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 165, False: 4.28k]
  ------------------
  984|    165|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 1, False: 164]
  ------------------
  985|      1|      return -1;
  986|      1|    }
  987|       |
  988|    165|  } else
  989|  4.28k|#endif
  990|  4.28k|  {
  991|  4.28k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 4.28k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  4.28k|  }
  995|  4.44k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 1.99k, False: 2.44k]
  ------------------
  996|  1.99k|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 26, False: 1.97k]
  ------------------
  997|  1.99k|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|     26|      return -1;
  999|     26|    }
 1000|  1.97k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|  1.97k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  1.97k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 83, False: 1.89k]
  ------------------
 1002|  81.6k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 81.5k, False: 31]
  ------------------
 1003|  81.5k|        TopologySplitEventData event_data;
 1004|  81.5k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 25, False: 81.5k]
  ------------------
 1005|     25|          return -1;
 1006|     25|        }
 1007|  81.5k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 18, False: 81.5k]
  ------------------
 1008|     18|          return -1;
 1009|     18|        }
 1010|  81.5k|        uint8_t edge_data;
 1011|  81.5k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 9, False: 81.5k]
  ------------------
 1012|      9|          return -1;
 1013|      9|        }
 1014|  81.5k|        event_data.source_edge = edge_data & 1;
 1015|  81.5k|        topology_split_data_.push_back(event_data);
 1016|  81.5k|      }
 1017|       |
 1018|     83|    } else
 1019|  1.89k|#endif
 1020|  1.89k|    {
 1021|       |      // Decode source and split symbol ids using delta and varint coding. See
 1022|       |      // description in mesh_edgebreaker_encoder_impl.cc for more details.
 1023|  1.89k|      int last_source_symbol_id = 0;
 1024|  7.85k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 5.97k, False: 1.88k]
  ------------------
 1025|  5.97k|        TopologySplitEventData event_data;
 1026|  5.97k|        uint32_t delta;
 1027|  5.97k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 4, False: 5.97k]
  ------------------
 1028|      4|          return -1;
 1029|      4|        }
 1030|  5.97k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  5.97k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 3, False: 5.96k]
  ------------------
 1032|      3|          return -1;
 1033|      3|        }
 1034|  5.96k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 3, False: 5.96k]
  ------------------
 1035|      3|          return -1;
 1036|      3|        }
 1037|  5.96k|        event_data.split_symbol_id =
 1038|  5.96k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  5.96k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  5.96k|        topology_split_data_.push_back(event_data);
 1041|  5.96k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|  1.88k|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  7.39k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 5.51k, False: 1.88k]
  ------------------
 1045|  5.51k|        uint32_t edge_data;
 1046|  5.51k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  5.51k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 778, False: 4.73k]
  ------------------
 1047|    778|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  4.73k|        } else {
 1049|  4.73k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  4.73k|        }
 1051|  5.51k|        TopologySplitEventData& event_data = topology_split_data_[i];
 1052|  5.51k|        event_data.source_edge = edge_data & 1;
 1053|  5.51k|      }
 1054|  1.88k|      decoder_buffer->EndBitDecoding();
 1055|  1.88k|    }
 1056|  1.97k|  }
 1057|  4.35k|  uint32_t num_hole_events = 0;
 1058|  4.35k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  4.35k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  4.35k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 92, False: 4.26k]
  ------------------
 1060|     92|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 2, False: 90]
  ------------------
 1061|      2|      return -1;
 1062|      2|    }
 1063|  4.26k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  4.26k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 317, False: 3.95k]
  ------------------
 1064|    317|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 6, False: 311]
  ------------------
 1065|      6|      return -1;
 1066|      6|    }
 1067|    317|  }
 1068|  4.35k|#endif
 1069|  4.35k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 114, False: 4.23k]
  ------------------
 1070|    114|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|    114|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    114|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 73, False: 41]
  ------------------
 1072|   582k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 582k, False: 9]
  ------------------
 1073|   582k|        HoleEventData event_data;
 1074|   582k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 64, False: 582k]
  ------------------
 1075|     64|          return -1;
 1076|     64|        }
 1077|   582k|        hole_event_data_.push_back(event_data);
 1078|   582k|      }
 1079|       |
 1080|     73|    } else
 1081|     41|#endif
 1082|     41|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     41|      int last_symbol_id = 0;
 1085|  50.4k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 50.4k, False: 19]
  ------------------
 1086|  50.4k|        HoleEventData event_data;
 1087|  50.4k|        uint32_t delta;
 1088|  50.4k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 22, False: 50.3k]
  ------------------
 1089|     22|          return -1;
 1090|     22|        }
 1091|  50.3k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  50.3k|        last_symbol_id = event_data.symbol_id;
 1093|  50.3k|        hole_event_data_.push_back(event_data);
 1094|  50.3k|      }
 1095|     41|    }
 1096|    114|  }
 1097|  4.26k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  4.35k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|  1.39k|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|  1.39k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|  1.39k|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|  5.58k|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 4.18k, False: 1.39k]
  ------------------
 1109|  4.18k|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|  4.18k|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 1.45k, False: 2.73k]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|  3.27k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 1.82k, False: 1.45k]
  ------------------
 1114|  1.82k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|  1.82k|      }
 1116|  1.45k|      continue;
 1117|  1.45k|    }
 1118|       |
 1119|  7.08k|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 4.34k, False: 2.73k]
  ------------------
 1120|  4.34k|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|  4.34k|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 2.64k, False: 1.70k]
  ------------------
 1122|  2.64k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|  2.64k|      }
 1124|  4.34k|    }
 1125|  2.73k|  }
 1126|  1.39k|  return true;
 1127|  1.39k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|   297k|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|   297k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|   297k|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|   297k|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  1.19M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 893k, False: 297k]
  ------------------
 1139|   893k|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|   893k|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 47.7k, False: 845k]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   177k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 129k, False: 47.7k]
  ------------------
 1144|   129k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   129k|      }
 1146|  47.7k|      continue;
 1147|  47.7k|    }
 1148|   845k|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|   845k|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 422k, False: 422k]
  ------------------
 1151|   422k|      continue;
 1152|   422k|    }
 1153|       |
 1154|  1.70M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 1.28M, False: 422k]
  ------------------
 1155|  1.28M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  1.28M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 1.08M, False: 196k]
  ------------------
 1157|  1.08M|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|  1.08M|      }
 1159|  1.28M|    }
 1160|   422k|  }
 1161|   297k|  return true;
 1162|   297k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE21AssignPointsToCornersEi:
 1166|  3.81k|    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|  3.81k|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|  3.81k|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 66, False: 3.74k]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|   139k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 139k, False: 66]
  ------------------
 1176|   139k|      Mesh::Face face;
 1177|   139k|      const CornerIndex start_corner(3 * f.value());
 1178|   559k|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 419k, False: 139k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|   419k|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|   419k|        face[c] = vert_id;
 1182|   419k|      }
 1183|   139k|      decoder_->mesh()->SetFace(f, face);
 1184|   139k|    }
 1185|     66|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|     66|    return true;
 1187|     66|  }
 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|  3.74k|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|  3.74k|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|   194k|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 190k, False: 3.73k]
  ------------------
 1197|   190k|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|   190k|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 8.15k, False: 182k]
  ------------------
 1199|  8.15k|      continue;  // Isolated vertex.
 1200|  8.15k|    }
 1201|   182k|    CornerIndex deduplication_first_corner = c;
 1202|   182k|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 49.1k, False: 132k]
  ------------------
 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|  49.1k|      deduplication_first_corner = c;
 1206|   132k|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|   174k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 150k, False: 24.3k]
  ------------------
 1210|   150k|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 24.9k, False: 125k]
  ------------------
 1211|  24.9k|          continue;  // No seam for this attribute, ignore it.
 1212|  24.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|   125k|        const VertexIndex vert_id =
 1217|   125k|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|   125k|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|   125k|        bool seam_found = false;
 1220|   198k|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 180k, False: 17.0k]
  ------------------
 1221|   180k|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 5, False: 180k]
  ------------------
 1222|      5|            return false;
 1223|      5|          }
 1224|   180k|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 108k, False: 72.3k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|   108k|            deduplication_first_corner = act_c;
 1227|   108k|            seam_found = true;
 1228|   108k|            break;
 1229|   108k|          }
 1230|  72.3k|          act_c = corner_table_->SwingRight(act_c);
 1231|  72.3k|        }
 1232|   125k|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 108k, False: 17.0k]
  ------------------
 1233|   108k|          break;  // No reason to process other attributes if we found a seam.
 1234|   108k|        }
 1235|   125k|      }
 1236|   132k|    }
 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|   182k|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|   182k|    corner_to_point_map[c.value()] =
 1246|   182k|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|   182k|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|   182k|    CornerIndex prev_c = c;
 1250|   182k|    c = corner_table_->SwingRight(c);
 1251|   906k|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 856k, False: 49.9k]
  |  Branch (1251:40): [True: 723k, False: 132k]
  ------------------
 1252|   723k|      bool attribute_seam = false;
 1253|   938k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 821k, False: 117k]
  ------------------
 1254|   821k|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 606k, False: 215k]
  ------------------
 1255|   821k|            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|   606k|          attribute_seam = true;
 1259|   606k|          break;
 1260|   606k|        }
 1261|   821k|      }
 1262|   723k|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 606k, False: 117k]
  ------------------
 1263|   606k|        corner_to_point_map[c.value()] =
 1264|   606k|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|   606k|        point_to_corner_map.push_back(c.value());
 1266|   606k|      } else {
 1267|   117k|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|   117k|      }
 1269|   723k|      prev_c = c;
 1270|   723k|      c = corner_table_->SwingRight(c);
 1271|   723k|    }
 1272|   182k|  }
 1273|       |  // Add faces.
 1274|   302k|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 299k, False: 3.73k]
  ------------------
 1275|   299k|    Mesh::Face face;
 1276|  1.19M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 897k, False: 299k]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|   897k|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|   897k|    }
 1280|   299k|    decoder_->mesh()->SetFace(f, face);
 1281|   299k|  }
 1282|  3.73k|  decoder_->point_cloud()->set_num_points(
 1283|  3.73k|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|  3.73k|  return true;
 1285|  3.74k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEEC2Ev:
   48|  2.39k|    : decoder_(nullptr),
   49|  2.39k|      last_symbol_id_(-1),
   50|  2.39k|      last_vert_id_(-1),
   51|  2.39k|      last_face_id_(-1),
   52|  2.39k|      num_new_vertices_(0),
   53|  2.39k|      num_encoded_vertices_(0),
   54|  2.39k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  2.39k|    MeshEdgebreakerDecoder* decoder) {
   59|  2.39k|  decoder_ = decoder;
   60|  2.39k|  return true;
   61|  2.39k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE23GetAttributeCornerTableEi:
   66|  2.20k|    int att_id) const {
   67|  3.38k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 2.50k, False: 882]
  ------------------
   68|  2.50k|    const int decoder_id = attribute_data_[i].decoder_id;
   69|  2.50k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 1.18k, False: 1.32k]
  |  Branch (69:27): [True: 0, False: 1.32k]
  ------------------
   70|  1.18k|      continue;
   71|  1.18k|    }
   72|  1.32k|    const AttributesDecoderInterface* const dec =
   73|  1.32k|        decoder_->attributes_decoder(decoder_id);
   74|  4.64k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 4.64k, False: 3]
  ------------------
   75|  4.64k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 1.32k, False: 3.32k]
  ------------------
   76|  1.32k|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 961, False: 360]
  ------------------
   77|    961|          return &attribute_data_[i].connectivity_data;
   78|    961|        }
   79|    360|        return nullptr;
   80|  1.32k|      }
   81|  4.64k|    }
   82|  1.32k|  }
   83|    882|  return nullptr;
   84|  2.20k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE24GetAttributeEncodingDataEi:
   89|  2.20k|    int att_id) const {
   90|  3.38k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 2.50k, False: 882]
  ------------------
   91|  2.50k|    const int decoder_id = attribute_data_[i].decoder_id;
   92|  2.50k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 1.18k, False: 1.32k]
  |  Branch (92:27): [True: 0, False: 1.32k]
  ------------------
   93|  1.18k|      continue;
   94|  1.18k|    }
   95|  1.32k|    const AttributesDecoderInterface* const dec =
   96|  1.32k|        decoder_->attributes_decoder(decoder_id);
   97|  4.64k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 4.64k, False: 3]
  ------------------
   98|  4.64k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 1.32k, False: 3.32k]
  ------------------
   99|  1.32k|        return &attribute_data_[i].encoding_data;
  100|  1.32k|      }
  101|  4.64k|    }
  102|  1.32k|  }
  103|    882|  return &pos_encoding_data_;
  104|  2.20k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE23CreateAttributesDecoderEi:
  130|  1.71k|    int32_t att_decoder_id) {
  131|  1.71k|  int8_t att_data_id;
  132|  1.71k|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 45, False: 1.67k]
  ------------------
  133|     45|    return false;
  134|     45|  }
  135|  1.67k|  uint8_t decoder_type;
  136|  1.67k|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 27, False: 1.64k]
  ------------------
  137|     27|    return false;
  138|     27|  }
  139|       |
  140|  1.64k|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 1.01k, False: 633]
  ------------------
  141|  1.01k|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 67, False: 945]
  ------------------
  142|     67|      return false;  // Unexpected attribute data.
  143|     67|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|    945|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 6, False: 939]
  ------------------
  148|      6|      return false;
  149|      6|    }
  150|       |
  151|    939|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|    939|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    633|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 1, False: 632]
  ------------------
  155|      1|      return false;  // Some other decoder is already using the data. Error.
  156|      1|    }
  157|    632|    pos_data_decoder_id_ = att_decoder_id;
  158|    632|  }
  159|       |
  160|  1.57k|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|  1.57k|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  1.57k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 1.57k, False: 0]
  ------------------
  162|  1.57k|    uint8_t traversal_method_encoded;
  163|  1.57k|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 17, False: 1.55k]
  ------------------
  164|     17|      return false;
  165|     17|    }
  166|       |    // Check that decoded traversal method is valid.
  167|  1.55k|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 23, False: 1.53k]
  ------------------
  168|     23|      return false;
  169|     23|    }
  170|  1.53k|    traversal_method =
  171|  1.53k|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|  1.53k|  }
  173|       |
  174|  1.53k|  const Mesh* mesh = decoder_->mesh();
  175|  1.53k|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|  1.53k|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 823, False: 708]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|    823|    MeshAttributeIndicesEncodingData* encoding_data = nullptr;
  181|    823|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 599, False: 224]
  ------------------
  182|    599|      encoding_data = &pos_encoding_data_;
  183|    599|    } else {
  184|    224|      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|    224|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|    224|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|    823|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 310, False: 513]
  ------------------
  191|    310|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|    310|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|    310|          AttTraverser;
  194|    310|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|    513|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 513, False: 0]
  ------------------
  196|    513|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|    513|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|    513|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|    513|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|    823|  } else {
  203|    708|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 4, False: 704]
  ------------------
  204|      4|      return false;  // Unsupported method.
  205|      4|    }
  206|    704|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 6, False: 698]
  ------------------
  207|      6|      return false;  // Attribute data must be specified.
  208|      6|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|    698|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|    698|        AttObserver;
  214|    698|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|    698|        AttTraverser;
  216|       |
  217|    698|    MeshAttributeIndicesEncodingData* const encoding_data =
  218|    698|        &attribute_data_[att_data_id].encoding_data;
  219|    698|    const MeshAttributeCornerTable* const corner_table =
  220|    698|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|    698|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|    698|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|    698|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|    698|                             encoding_data);
  227|       |
  228|    698|    AttTraverser att_traverser;
  229|    698|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|    698|    traversal_sequencer->SetTraverser(att_traverser);
  232|    698|    sequencer = std::move(traversal_sequencer);
  233|    698|  }
  234|       |
  235|  1.52k|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 1.52k]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|  1.52k|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|  1.52k|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|  1.52k|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|  1.52k|                                        std::move(att_controller));
  244|  1.52k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18DecodeConnectivityEv:
  247|  2.39k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  2.39k|  num_new_vertices_ = 0;
  249|  2.39k|  new_to_parent_vertex_map_.clear();
  250|  2.39k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  2.39k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.39k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 620, False: 1.77k]
  ------------------
  252|    620|    uint32_t num_new_verts;
  253|    620|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    620|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 193, False: 427]
  ------------------
  254|    193|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 193]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    427|    } else {
  258|    427|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 427]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    427|    }
  262|    620|    num_new_vertices_ = num_new_verts;
  263|    620|  }
  264|  2.39k|#endif
  265|       |
  266|  2.39k|  uint32_t num_encoded_vertices;
  267|  2.39k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  2.39k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.39k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 193, False: 2.20k]
  ------------------
  269|    193|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 193]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    193|  } else
  274|  2.20k|#endif
  275|  2.20k|  {
  276|  2.20k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 2.20k]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|  2.20k|  }
  280|  2.39k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  2.39k|  uint32_t num_faces;
  283|  2.39k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  2.39k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.39k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 193, False: 2.20k]
  ------------------
  285|    193|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 193]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    193|  } else
  290|  2.20k|#endif
  291|  2.20k|  {
  292|  2.20k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 2.20k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  2.20k|  }
  296|  2.39k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 0, False: 2.39k]
  ------------------
  297|      0|    return false;  // Draco cannot handle this many faces.
  298|      0|  }
  299|       |
  300|  2.39k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 2, False: 2.39k]
  ------------------
  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|  2.39k|  const uint32_t min_num_face_edges = 3 * num_faces / 2;
  307|       |
  308|       |  // Maximum number of edges that can exist between |num_encoded_vertices_|.
  309|       |  // This is based on graph theory assuming simple connected graph.
  310|  2.39k|  const uint64_t num_encoded_vertices_64 =
  311|  2.39k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  2.39k|  const uint64_t max_num_vertex_edges =
  313|  2.39k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  2.39k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 0, False: 2.39k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      0|    return false;
  317|      0|  }
  318|       |
  319|  2.39k|  uint8_t num_attribute_data;
  320|  2.39k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 2.39k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  2.39k|  uint32_t num_encoded_symbols;
  325|  2.39k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  2.39k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.39k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 191, False: 2.20k]
  ------------------
  327|    191|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 191]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    191|  } else
  332|  2.20k|#endif
  333|  2.20k|  {
  334|  2.20k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 2.20k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  2.20k|  }
  338|       |
  339|  2.39k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 4, False: 2.39k]
  ------------------
  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|      4|    return false;
  344|      4|  }
  345|  2.39k|  const uint32_t max_encoded_faces =
  346|  2.39k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  2.39k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 3, False: 2.39k]
  ------------------
  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|      3|    return false;
  352|      3|  }
  353|       |
  354|  2.39k|  uint32_t num_encoded_split_symbols;
  355|  2.39k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  2.39k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.39k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 186, False: 2.20k]
  ------------------
  357|    186|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 186]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    186|  } else
  362|  2.20k|#endif
  363|  2.20k|  {
  364|  2.20k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 2.20k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  2.20k|  }
  368|       |
  369|  2.39k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 5, False: 2.38k]
  ------------------
  370|      5|    return false;  // Split symbols are a sub-set of all symbols.
  371|      5|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  2.38k|  vertex_traversal_length_.clear();
  375|  2.38k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  2.38k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 2.38k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  2.38k|  processed_corner_ids_.clear();
  380|  2.38k|  processed_corner_ids_.reserve(num_faces);
  381|  2.38k|  processed_connectivity_corners_.clear();
  382|  2.38k|  processed_connectivity_corners_.reserve(num_faces);
  383|  2.38k|  topology_split_data_.clear();
  384|  2.38k|  hole_event_data_.clear();
  385|  2.38k|  init_face_configurations_.clear();
  386|  2.38k|  init_corners_.clear();
  387|       |
  388|  2.38k|  last_symbol_id_ = -1;
  389|  2.38k|  last_face_id_ = -1;
  390|  2.38k|  last_vert_id_ = -1;
  391|       |
  392|  2.38k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  2.38k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  2.38k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 1, False: 2.38k]
  ------------------
  397|  2.38k|          num_faces, num_encoded_vertices_ + num_encoded_split_symbols)) {
  398|      1|    return false;
  399|      1|  }
  400|       |
  401|       |  // Start with all vertices marked as holes (boundaries).
  402|       |  // Only vertices decoded with TOPOLOGY_C symbol (and the initial face) will
  403|       |  // be marked as non hole vertices. We need to allocate the array larger
  404|       |  // because split symbols can create extra vertices during the decoding
  405|       |  // process (these extra vertices are then eliminated during deduplication).
  406|  2.38k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  2.38k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  2.38k|  int32_t topology_split_decoded_bytes = -1;
  410|  2.38k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.38k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 606, False: 1.77k]
  ------------------
  411|    606|    uint32_t encoded_connectivity_size;
  412|    606|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    606|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 180, False: 426]
  ------------------
  413|    180|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 1, False: 179]
  ------------------
  414|      1|        return false;
  415|      1|      }
  416|    426|    } else {
  417|    426|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 426]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|    426|    }
  421|    605|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 1, False: 604]
  ------------------
  422|    604|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 34, False: 570]
  ------------------
  423|     35|      return false;
  424|     35|    }
  425|    570|    DecoderBuffer event_buffer;
  426|    570|    event_buffer.Init(
  427|    570|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    570|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    570|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    570|    topology_split_decoded_bytes =
  432|    570|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    570|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 160, False: 410]
  ------------------
  434|    160|      return false;
  435|    160|    }
  436|       |
  437|    570|  } else
  438|  1.77k|#endif
  439|  1.77k|  {
  440|  1.77k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 28, False: 1.75k]
  ------------------
  441|     28|      return false;
  442|     28|    }
  443|  1.77k|  }
  444|       |
  445|  2.16k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  2.16k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  2.16k|                                           num_encoded_split_symbols);
  449|  2.16k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  2.16k|  DecoderBuffer traversal_end_buffer;
  452|  2.16k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 130, False: 2.03k]
  ------------------
  453|    130|    return false;
  454|    130|  }
  455|       |
  456|  2.03k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  2.03k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 241, False: 1.78k]
  ------------------
  458|    241|    return false;
  459|    241|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|  1.78k|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|  1.78k|                           traversal_end_buffer.remaining_size(),
  464|  1.78k|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|  1.78k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|  1.78k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.78k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 329, False: 1.46k]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|    329|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|    329|  }
  471|  1.78k|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|  1.78k|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 1.52k, False: 263]
  ------------------
  475|  1.52k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|  1.52k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  1.52k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 259, False: 1.26k]
  ------------------
  477|   598k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 598k, False: 259]
  ------------------
  478|   598k|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 598k]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|   598k|      }
  482|       |
  483|    259|    } else
  484|  1.26k|#endif
  485|  1.26k|    {
  486|  10.2M|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 10.2M, False: 1.26k]
  ------------------
  487|  10.2M|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 10.2M]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|  10.2M|      }
  491|  1.26k|    }
  492|  1.52k|  }
  493|  1.78k|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  3.86k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 2.07k, False: 1.78k]
  ------------------
  498|  2.07k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  15.9M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 15.9M, False: 2.07k]
  ------------------
  501|  15.9M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  15.9M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  2.07k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 2.07k]
  ------------------
  505|  2.07k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  2.07k|  }
  509|       |
  510|  1.78k|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  3.86k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 2.07k, False: 1.78k]
  ------------------
  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|  2.07k|    int32_t att_connectivity_verts =
  517|  2.07k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  2.07k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 324, False: 1.75k]
  ------------------
  519|    324|      att_connectivity_verts = corner_table_->num_vertices();
  520|    324|    }
  521|  2.07k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  2.07k|  }
  523|  1.78k|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 9, False: 1.78k]
  ------------------
  524|      9|    return false;
  525|      9|  }
  526|  1.78k|  return true;
  527|  1.78k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE19OnAttributesDecodedEv:
  530|    451|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|    451|  return true;
  532|    451|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18DecodeConnectivityEi:
  536|  2.03k|    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|  2.03k|  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|  2.03k|  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|  2.03k|  std::vector<VertexIndex> invalid_vertices;
  558|  2.03k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  2.03k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  2.03k|  int num_faces = 0;
  562|  96.1M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 96.1M, False: 1.91k]
  ------------------
  563|  96.1M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  96.1M|    bool check_topology_split = false;
  566|  96.1M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  96.1M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 47.3M, False: 48.8M]
  ------------------
  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|  47.3M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 0, False: 47.3M]
  ------------------
  588|      0|        return -1;
  589|      0|      }
  590|       |
  591|  47.3M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  47.3M|      const VertexIndex vertex_x =
  593|  47.3M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  47.3M|      const CornerIndex corner_b =
  595|  47.3M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  47.3M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 38, False: 47.3M]
  ------------------
  598|       |        // All matched corners must be different.
  599|     38|        return -1;
  600|     38|      }
  601|  47.3M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 47.3M]
  |  Branch (601:11): [True: 0, False: 47.3M]
  ------------------
  602|  47.3M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 47.3M]
  ------------------
  603|       |        // One of the corners is already opposite to an existing face, which
  604|       |        // should not happen unless the input was tampered with.
  605|      0|        return -1;
  606|      0|      }
  607|       |
  608|       |      // New tip corner.
  609|  47.3M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  47.3M|      SetOppositeCorners(corner_a, corner + 1);
  612|  47.3M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  47.3M|      const VertexIndex vert_a_prev =
  616|  47.3M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  47.3M|      const VertexIndex vert_b_next =
  618|  47.3M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  47.3M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 47.3M]
  |  Branch (619:38): [True: 0, False: 47.3M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  47.3M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  47.3M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  47.3M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  47.3M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  47.3M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  47.3M|      active_corner_stack.back() = corner;
  631|  48.8M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 48.7M, False: 107k]
  |  Branch (631:40): [True: 23.9k, False: 83.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|  48.7M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 0, False: 48.7M]
  ------------------
  647|      0|        return -1;
  648|      0|      }
  649|  48.7M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  48.7M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 48.7M]
  ------------------
  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|  48.7M|      const CornerIndex corner(3 * face.value());
  658|  48.7M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  48.7M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 48.7M, False: 23.9k]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  48.7M|        opp_corner = corner + 2;
  662|  48.7M|        corner_l = corner + 1;
  663|  48.7M|        corner_r = corner;
  664|  48.7M|      } else {
  665|       |        // "l" is the new first corner.
  666|  23.9k|        opp_corner = corner + 1;
  667|  23.9k|        corner_l = corner;
  668|  23.9k|        corner_r = corner + 2;
  669|  23.9k|      }
  670|  48.7M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  48.7M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  48.7M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 8, False: 48.7M]
  ------------------
  675|      8|        return -1;  // Unexpected number of decoded vertices.
  676|      8|      }
  677|       |
  678|  48.7M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  48.7M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  48.7M|      const VertexIndex vertex_r =
  682|  48.7M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  48.7M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  48.7M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  48.7M|      corner_table_->MapCornerToVertex(
  688|  48.7M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  48.7M|      active_corner_stack.back() = corner;
  690|  48.7M|      check_topology_split = true;
  691|  48.7M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 26.6k, False: 57.2k]
  ------------------
  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|  26.6k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 0, False: 26.6k]
  ------------------
  703|      0|        return -1;
  704|      0|      }
  705|  26.6k|      const CornerIndex corner_b = active_corner_stack.back();
  706|  26.6k|      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|  26.6k|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  26.6k|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 47, False: 26.5k]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|     47|        active_corner_stack.push_back(it->second);
  714|     47|      }
  715|  26.6k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 20, False: 26.6k]
  ------------------
  716|     20|        return -1;
  717|     20|      }
  718|  26.6k|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  26.6k|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 26.6k]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  26.6k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 10, False: 26.6k]
  |  Branch (724:11): [True: 10, False: 26.6k]
  ------------------
  725|  26.6k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 26.6k]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|     10|        return -1;
  729|     10|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  26.6k|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  26.6k|      SetOppositeCorners(corner_a, corner + 2);
  735|  26.6k|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  26.6k|      const VertexIndex vertex_p =
  739|  26.6k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  26.6k|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  26.6k|      corner_table_->MapCornerToVertex(
  742|  26.6k|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  26.6k|      const VertexIndex vert_b_prev =
  744|  26.6k|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  26.6k|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  26.6k|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  26.6k|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  26.6k|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  26.6k|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  26.6k|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  26.6k|                                       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|  26.6k|      const CornerIndex first_corner = corner_n;
  757|   136k|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 110k, False: 26.6k]
  ------------------
  758|   110k|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|   110k|        corner_n = corner_table_->SwingLeft(corner_n);
  760|   110k|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 3, False: 110k]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      3|          return -1;
  764|      3|        }
  765|   110k|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  26.6k|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  26.6k|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 9.93k, False: 16.6k]
  ------------------
  770|  9.93k|        invalid_vertices.push_back(vertex_n);
  771|  9.93k|      }
  772|  26.6k|      active_corner_stack.back() = corner;
  773|  57.2k|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 57.2k, False: 0]
  ------------------
  774|  57.2k|      const CornerIndex corner(3 * face.value());
  775|  57.2k|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  57.2k|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  57.2k|      corner_table_->MapCornerToVertex(corner + 1,
  779|  57.2k|                                       corner_table_->AddNewVertex());
  780|  57.2k|      corner_table_->MapCornerToVertex(corner + 2,
  781|  57.2k|                                       corner_table_->AddNewVertex());
  782|       |
  783|  57.2k|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 3, False: 57.2k]
  ------------------
  784|      3|        return -1;  // Unexpected number of decoded vertices.
  785|      3|      }
  786|       |
  787|  57.2k|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  57.2k|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  57.2k|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  57.2k|      active_corner_stack.push_back(corner);
  792|  57.2k|      check_topology_split = true;
  793|  57.2k|    } 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|  96.1M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  96.1M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 48.8M, False: 47.3M]
  ------------------
  801|       |      // Check for topology splits happens only for TOPOLOGY_L, TOPOLOGY_R and
  802|       |      // TOPOLOGY_E symbols because those are the symbols that correspond to
  803|       |      // faces that can be directly connected a TOPOLOGY_S face through the
  804|       |      // topology split event.
  805|       |      // If a topology split is detected, we need to add a new active edge
  806|       |      // onto the active_corner_stack because it will be used later when the
  807|       |      // corresponding TOPOLOGY_S event is decoded.
  808|       |
  809|       |      // Symbol id used by the encoder (reverse).
  810|  48.8M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  48.8M|      EdgeFaceName split_edge;
  812|  48.8M|      int encoder_split_symbol_id;
  813|  48.8M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 2.88k, False: 48.8M]
  ------------------
  814|  48.8M|                             &encoder_split_symbol_id)) {
  815|  2.88k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 32, False: 2.85k]
  ------------------
  816|     32|          return -1;  // Wrong split symbol id.
  817|     32|        }
  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.85k|        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.85k|        CornerIndex new_active_corner;
  831|  2.85k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 1.09k, False: 1.75k]
  ------------------
  832|  1.09k|          new_active_corner = corner_table_->Next(act_top_corner);
  833|  1.75k|        } else {
  834|  1.75k|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|  1.75k|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  2.85k|        const int decoder_split_symbol_id =
  839|  2.85k|            num_symbols - encoder_split_symbol_id - 1;
  840|  2.85k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  2.85k|            new_active_corner;
  842|  2.85k|      }
  843|  48.8M|    }
  844|  96.1M|  }
  845|  1.91k|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 1.91k]
  ------------------
  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|  27.1k|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 25.2k, False: 1.86k]
  ------------------
  850|  25.2k|    const CornerIndex corner = active_corner_stack.back();
  851|  25.2k|    active_corner_stack.pop_back();
  852|  25.2k|    const bool interior_face =
  853|  25.2k|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  25.2k|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 17.2k, False: 8.02k]
  ------------------
  855|       |      // The start face is interior, we need to find three corners that are
  856|       |      // opposite to it. The first opposite corner "a" is the corner from the
  857|       |      // top of the active corner stack and the remaining two corners "b" and
  858|       |      // "c" are then the next corners from the left-most corners of vertices
  859|       |      // "n" and "x" respectively.
  860|       |      //
  861|       |      //           *-------*
  862|       |      //          / \     / \
  863|       |      //         /   \   /   \
  864|       |      //        /     \ /     \
  865|       |      //       *-------p-------*
  866|       |      //      / \a    . .    c/ \
  867|       |      //     /   \   .   .   /   \
  868|       |      //    /     \ .  I  . /     \
  869|       |      //   *-------n.......x------*
  870|       |      //    \     / \     / \     /
  871|       |      //     \   /   \   /   \   /
  872|       |      //      \ /     \b/     \ /
  873|       |      //       *-------*-------*
  874|       |      //
  875|       |
  876|  17.2k|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 20, False: 17.2k]
  ------------------
  877|     20|        return -1;  // More faces than expected added to the mesh.
  878|     20|      }
  879|       |
  880|  17.2k|      const CornerIndex corner_a = corner;
  881|  17.2k|      const VertexIndex vert_n =
  882|  17.2k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  17.2k|      const CornerIndex corner_b =
  884|  17.2k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  17.2k|      const VertexIndex vert_x =
  887|  17.2k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  17.2k|      const CornerIndex corner_c =
  889|  17.2k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  17.2k|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 9, False: 17.2k]
  |  Branch (891:33): [True: 13, False: 17.2k]
  |  Branch (891:55): [True: 0, False: 17.2k]
  ------------------
  892|       |        // All matched corners must be different.
  893|     22|        return -1;
  894|     22|      }
  895|  17.2k|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 5, False: 17.1k]
  |  Branch (895:11): [True: 5, False: 17.1k]
  ------------------
  896|  17.1k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 0, False: 17.1k]
  ------------------
  897|  17.1k|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 0, False: 17.1k]
  ------------------
  898|       |        // One of the corners is already opposite to an existing face, which
  899|       |        // should not happen unless the input was tampered with.
  900|      5|        return -1;
  901|      5|      }
  902|       |
  903|  17.1k|      const VertexIndex vert_p =
  904|  17.1k|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  17.1k|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  17.1k|      const CornerIndex new_corner(3 * face.value());
  909|  17.1k|      SetOppositeCorners(new_corner, corner);
  910|  17.1k|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  17.1k|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  17.1k|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  17.1k|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  17.1k|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|  68.7k|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 51.5k, False: 17.1k]
  ------------------
  920|  51.5k|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|  51.5k|      }
  922|       |
  923|  17.1k|      init_face_configurations_.push_back(true);
  924|  17.1k|      init_corners_.push_back(new_corner);
  925|  17.1k|    } 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|  8.02k|      init_face_configurations_.push_back(false);
  930|  8.02k|      init_corners_.push_back(corner);
  931|  8.02k|    }
  932|  25.2k|  }
  933|  1.86k|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 76, False: 1.79k]
  ------------------
  934|     76|    return -1;  // Unexpected number of decoded faces.
  935|     76|  }
  936|       |
  937|  1.79k|  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.93k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 1.93k, False: 1.78k]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  1.93k|    VertexIndex src_vert(num_vertices - 1);
  943|  2.10k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 172, False: 1.93k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|    172|      src_vert = VertexIndex(--num_vertices - 1);
  946|    172|    }
  947|  1.93k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 172, False: 1.76k]
  ------------------
  948|    172|      continue;  // No need to swap anything.
  949|    172|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  1.76k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  8.56k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 6.80k, False: 1.76k]
  ------------------
  954|  6.80k|      const CornerIndex cid = vcit.Corner();
  955|  6.80k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 4, False: 6.79k]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      4|        return -1;
  959|      4|      }
  960|  6.79k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  6.79k|    }
  962|  1.76k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  1.76k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  1.76k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  1.76k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  1.76k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  1.76k|    num_vertices--;
  972|  1.76k|  }
  973|  1.78k|  return num_vertices;
  974|  1.79k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  2.34k|    DecoderBuffer* decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  2.34k|  uint32_t num_topology_splits;
  982|  2.34k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  2.34k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.34k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 144, False: 2.20k]
  ------------------
  984|    144|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 1, False: 143]
  ------------------
  985|      1|      return -1;
  986|      1|    }
  987|       |
  988|    144|  } else
  989|  2.20k|#endif
  990|  2.20k|  {
  991|  2.20k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 2.20k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  2.20k|  }
  995|  2.34k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 889, False: 1.45k]
  ------------------
  996|    889|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 39, False: 850]
  ------------------
  997|    889|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|     39|      return -1;
  999|     39|    }
 1000|    850|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|    850|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    850|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 53, False: 797]
  ------------------
 1002|  78.8k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 78.8k, False: 20]
  ------------------
 1003|  78.8k|        TopologySplitEventData event_data;
 1004|  78.8k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 24, False: 78.7k]
  ------------------
 1005|     24|          return -1;
 1006|     24|        }
 1007|  78.7k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 6, False: 78.7k]
  ------------------
 1008|      6|          return -1;
 1009|      6|        }
 1010|  78.7k|        uint8_t edge_data;
 1011|  78.7k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 3, False: 78.7k]
  ------------------
 1012|      3|          return -1;
 1013|      3|        }
 1014|  78.7k|        event_data.source_edge = edge_data & 1;
 1015|  78.7k|        topology_split_data_.push_back(event_data);
 1016|  78.7k|      }
 1017|       |
 1018|     53|    } else
 1019|    797|#endif
 1020|    797|    {
 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|    797|      int last_source_symbol_id = 0;
 1024|   136k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 135k, False: 772]
  ------------------
 1025|   135k|        TopologySplitEventData event_data;
 1026|   135k|        uint32_t delta;
 1027|   135k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 9, False: 135k]
  ------------------
 1028|      9|          return -1;
 1029|      9|        }
 1030|   135k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|   135k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 8, False: 135k]
  ------------------
 1032|      8|          return -1;
 1033|      8|        }
 1034|   135k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 8, False: 135k]
  ------------------
 1035|      8|          return -1;
 1036|      8|        }
 1037|   135k|        event_data.split_symbol_id =
 1038|   135k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|   135k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|   135k|        topology_split_data_.push_back(event_data);
 1041|   135k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|    772|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  15.8k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 15.0k, False: 772]
  ------------------
 1045|  15.0k|        uint32_t edge_data;
 1046|  15.0k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  15.0k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 2.93k, False: 12.1k]
  ------------------
 1047|  2.93k|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  12.1k|        } else {
 1049|  12.1k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  12.1k|        }
 1051|  15.0k|        TopologySplitEventData& event_data = topology_split_data_[i];
 1052|  15.0k|        event_data.source_edge = edge_data & 1;
 1053|  15.0k|      }
 1054|    772|      decoder_buffer->EndBitDecoding();
 1055|    772|    }
 1056|    850|  }
 1057|  2.25k|  uint32_t num_hole_events = 0;
 1058|  2.25k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  2.25k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.25k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 83, False: 2.16k]
  ------------------
 1060|     83|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 4, False: 79]
  ------------------
 1061|      4|      return -1;
 1062|      4|    }
 1063|  2.16k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  2.16k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 326, False: 1.84k]
  ------------------
 1064|    326|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 9, False: 317]
  ------------------
 1065|      9|      return -1;
 1066|      9|    }
 1067|    326|  }
 1068|  2.23k|#endif
 1069|  2.23k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 95, False: 2.14k]
  ------------------
 1070|     95|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     95|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     95|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 59, False: 36]
  ------------------
 1072|  1.00M|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 1.00M, False: 2]
  ------------------
 1073|  1.00M|        HoleEventData event_data;
 1074|  1.00M|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 57, False: 1.00M]
  ------------------
 1075|     57|          return -1;
 1076|     57|        }
 1077|  1.00M|        hole_event_data_.push_back(event_data);
 1078|  1.00M|      }
 1079|       |
 1080|     59|    } else
 1081|     36|#endif
 1082|     36|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     36|      int last_symbol_id = 0;
 1085|  19.4k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 19.4k, False: 16]
  ------------------
 1086|  19.4k|        HoleEventData event_data;
 1087|  19.4k|        uint32_t delta;
 1088|  19.4k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 20, False: 19.4k]
  ------------------
 1089|     20|          return -1;
 1090|     20|        }
 1091|  19.4k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  19.4k|        last_symbol_id = event_data.symbol_id;
 1093|  19.4k|        hole_event_data_.push_back(event_data);
 1094|  19.4k|      }
 1095|     36|    }
 1096|     95|  }
 1097|  2.16k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  2.23k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|   598k|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|   598k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|   598k|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|  2.39M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 1.79M, False: 598k]
  ------------------
 1109|  1.79M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|  1.79M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 6.76k, False: 1.78M]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|  13.8k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 7.13k, False: 6.76k]
  ------------------
 1114|  7.13k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|  7.13k|      }
 1116|  6.76k|      continue;
 1117|  6.76k|    }
 1118|       |
 1119|  3.57M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 1.79M, False: 1.78M]
  ------------------
 1120|  1.79M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|  1.79M|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 378k, False: 1.41M]
  ------------------
 1122|   378k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|   378k|      }
 1124|  1.79M|    }
 1125|  1.78M|  }
 1126|   598k|  return true;
 1127|   598k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|  10.2M|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|  10.2M|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|  10.2M|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|  10.2M|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  40.9M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 30.7M, False: 10.2M]
  ------------------
 1139|  30.7M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  30.7M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 124k, False: 30.5M]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   294k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 169k, False: 124k]
  ------------------
 1144|   169k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   169k|      }
 1146|   124k|      continue;
 1147|   124k|    }
 1148|  30.5M|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|  30.5M|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 15.2M, False: 15.2M]
  ------------------
 1151|  15.2M|      continue;
 1152|  15.2M|    }
 1153|       |
 1154|  33.2M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 17.9M, False: 15.2M]
  ------------------
 1155|  17.9M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  17.9M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 15.3M, False: 2.62M]
  ------------------
 1157|  15.3M|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|  15.3M|      }
 1159|  17.9M|    }
 1160|  15.2M|  }
 1161|  10.2M|  return true;
 1162|  10.2M|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE21AssignPointsToCornersEi:
 1166|  1.78k|    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.78k|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|  1.78k|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 263, False: 1.52k]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|  2.65M|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 2.65M, False: 263]
  ------------------
 1176|  2.65M|      Mesh::Face face;
 1177|  2.65M|      const CornerIndex start_corner(3 * f.value());
 1178|  10.6M|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 7.97M, False: 2.65M]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|  7.97M|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|  7.97M|        face[c] = vert_id;
 1182|  7.97M|      }
 1183|  2.65M|      decoder_->mesh()->SetFace(f, face);
 1184|  2.65M|    }
 1185|    263|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|    263|    return true;
 1187|    263|  }
 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.52k|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|  1.52k|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|  5.49M|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 5.49M, False: 1.51k]
  ------------------
 1197|  5.49M|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|  5.49M|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 3.65k, False: 5.48M]
  ------------------
 1199|  3.65k|      continue;  // Isolated vertex.
 1200|  3.65k|    }
 1201|  5.48M|    CornerIndex deduplication_first_corner = c;
 1202|  5.48M|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 131k, False: 5.35M]
  ------------------
 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|   131k|      deduplication_first_corner = c;
 1206|  5.35M|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|  6.18M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 5.47M, False: 707k]
  ------------------
 1210|  5.47M|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 814k, False: 4.66M]
  ------------------
 1211|   814k|          continue;  // No seam for this attribute, ignore it.
 1212|   814k|        }
 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|  4.66M|        const VertexIndex vert_id =
 1217|  4.66M|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|  4.66M|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|  4.66M|        bool seam_found = false;
 1220|  4.78M|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 4.77M, False: 13.0k]
  ------------------
 1221|  4.77M|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 9, False: 4.77M]
  ------------------
 1222|      9|            return false;
 1223|      9|          }
 1224|  4.77M|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 4.65M, False: 124k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|  4.65M|            deduplication_first_corner = act_c;
 1227|  4.65M|            seam_found = true;
 1228|  4.65M|            break;
 1229|  4.65M|          }
 1230|   124k|          act_c = corner_table_->SwingRight(act_c);
 1231|   124k|        }
 1232|  4.66M|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 4.65M, False: 13.0k]
  ------------------
 1233|  4.65M|          break;  // No reason to process other attributes if we found a seam.
 1234|  4.65M|        }
 1235|  4.66M|      }
 1236|  5.35M|    }
 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|  5.48M|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|  5.48M|    corner_to_point_map[c.value()] =
 1246|  5.48M|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|  5.48M|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|  5.48M|    CornerIndex prev_c = c;
 1250|  5.48M|    c = corner_table_->SwingRight(c);
 1251|  32.5M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 32.3M, False: 132k]
  |  Branch (1251:40): [True: 27.0M, False: 5.35M]
  ------------------
 1252|  27.0M|      bool attribute_seam = false;
 1253|  31.2M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 27.6M, False: 3.64M]
  ------------------
 1254|  27.6M|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 23.3M, False: 4.26M]
  ------------------
 1255|  27.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|  23.3M|          attribute_seam = true;
 1259|  23.3M|          break;
 1260|  23.3M|        }
 1261|  27.6M|      }
 1262|  27.0M|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 23.3M, False: 3.64M]
  ------------------
 1263|  23.3M|        corner_to_point_map[c.value()] =
 1264|  23.3M|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|  23.3M|        point_to_corner_map.push_back(c.value());
 1266|  23.3M|      } else {
 1267|  3.64M|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|  3.64M|      }
 1269|  27.0M|      prev_c = c;
 1270|  27.0M|      c = corner_table_->SwingRight(c);
 1271|  27.0M|    }
 1272|  5.48M|  }
 1273|       |  // Add faces.
 1274|  10.8M|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 10.8M, False: 1.51k]
  ------------------
 1275|  10.8M|    Mesh::Face face;
 1276|  43.2M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 32.4M, False: 10.8M]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|  32.4M|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|  32.4M|    }
 1280|  10.8M|    decoder_->mesh()->SetFace(f, face);
 1281|  10.8M|  }
 1282|  1.51k|  decoder_->point_cloud()->set_num_points(
 1283|  1.51k|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|  1.51k|  return true;
 1285|  1.52k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEEC2Ev:
   48|  3.07k|    : decoder_(nullptr),
   49|  3.07k|      last_symbol_id_(-1),
   50|  3.07k|      last_vert_id_(-1),
   51|  3.07k|      last_face_id_(-1),
   52|  3.07k|      num_new_vertices_(0),
   53|  3.07k|      num_encoded_vertices_(0),
   54|  3.07k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  3.07k|    MeshEdgebreakerDecoder* decoder) {
   59|  3.07k|  decoder_ = decoder;
   60|  3.07k|  return true;
   61|  3.07k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE23GetAttributeCornerTableEi:
   66|    269|    int att_id) const {
   67|    451|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 229, False: 222]
  ------------------
   68|    229|    const int decoder_id = attribute_data_[i].decoder_id;
   69|    229|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 169, False: 60]
  |  Branch (69:27): [True: 0, False: 60]
  ------------------
   70|    169|      continue;
   71|    169|    }
   72|     60|    const AttributesDecoderInterface* const dec =
   73|     60|        decoder_->attributes_decoder(decoder_id);
   74|     99|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 86, False: 13]
  ------------------
   75|     86|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 47, False: 39]
  ------------------
   76|     47|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 33, False: 14]
  ------------------
   77|     33|          return &attribute_data_[i].connectivity_data;
   78|     33|        }
   79|     14|        return nullptr;
   80|     47|      }
   81|     86|    }
   82|     60|  }
   83|    222|  return nullptr;
   84|    269|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE24GetAttributeEncodingDataEi:
   89|    269|    int att_id) const {
   90|    451|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 229, False: 222]
  ------------------
   91|    229|    const int decoder_id = attribute_data_[i].decoder_id;
   92|    229|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 169, False: 60]
  |  Branch (92:27): [True: 0, False: 60]
  ------------------
   93|    169|      continue;
   94|    169|    }
   95|     60|    const AttributesDecoderInterface* const dec =
   96|     60|        decoder_->attributes_decoder(decoder_id);
   97|     99|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 86, False: 13]
  ------------------
   98|     86|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 47, False: 39]
  ------------------
   99|     47|        return &attribute_data_[i].encoding_data;
  100|     47|      }
  101|     86|    }
  102|     60|  }
  103|    222|  return &pos_encoding_data_;
  104|    269|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE23CreateAttributesDecoderEi:
  130|    355|    int32_t att_decoder_id) {
  131|    355|  int8_t att_data_id;
  132|    355|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 27, False: 328]
  ------------------
  133|     27|    return false;
  134|     27|  }
  135|    328|  uint8_t decoder_type;
  136|    328|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 9, False: 319]
  ------------------
  137|      9|    return false;
  138|      9|  }
  139|       |
  140|    319|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 176, False: 143]
  ------------------
  141|    176|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 36, False: 140]
  ------------------
  142|     36|      return false;  // Unexpected attribute data.
  143|     36|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|    140|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 8, False: 132]
  ------------------
  148|      8|      return false;
  149|      8|    }
  150|       |
  151|    132|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|    143|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    143|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 5, False: 138]
  ------------------
  155|      5|      return false;  // Some other decoder is already using the data. Error.
  156|      5|    }
  157|    138|    pos_data_decoder_id_ = att_decoder_id;
  158|    138|  }
  159|       |
  160|    270|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|    270|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    270|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 270, False: 0]
  ------------------
  162|    270|    uint8_t traversal_method_encoded;
  163|    270|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 2, False: 268]
  ------------------
  164|      2|      return false;
  165|      2|    }
  166|       |    // Check that decoded traversal method is valid.
  167|    268|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 11, False: 257]
  ------------------
  168|     11|      return false;
  169|     11|    }
  170|    257|    traversal_method =
  171|    257|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|    257|  }
  173|       |
  174|    257|  const Mesh* mesh = decoder_->mesh();
  175|    257|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|    257|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 178, False: 79]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|    178|    MeshAttributeIndicesEncodingData* encoding_data = nullptr;
  181|    178|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 124, False: 54]
  ------------------
  182|    124|      encoding_data = &pos_encoding_data_;
  183|    124|    } else {
  184|     54|      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|     54|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|     54|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|    178|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 55, False: 123]
  ------------------
  191|     55|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|     55|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|     55|          AttTraverser;
  194|     55|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|    123|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 123, False: 0]
  ------------------
  196|    123|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|    123|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|    123|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|    123|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|    178|  } else {
  203|     79|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 6, False: 73]
  ------------------
  204|      6|      return false;  // Unsupported method.
  205|      6|    }
  206|     73|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 4, False: 69]
  ------------------
  207|      4|      return false;  // Attribute data must be specified.
  208|      4|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|     69|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|     69|        AttObserver;
  214|     69|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|     69|        AttTraverser;
  216|       |
  217|     69|    MeshAttributeIndicesEncodingData* const encoding_data =
  218|     69|        &attribute_data_[att_data_id].encoding_data;
  219|     69|    const MeshAttributeCornerTable* const corner_table =
  220|     69|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|     69|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|     69|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|     69|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|     69|                             encoding_data);
  227|       |
  228|     69|    AttTraverser att_traverser;
  229|     69|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|     69|    traversal_sequencer->SetTraverser(att_traverser);
  232|     69|    sequencer = std::move(traversal_sequencer);
  233|     69|  }
  234|       |
  235|    247|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 247]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|    247|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|    247|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|    247|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|    247|                                        std::move(att_controller));
  244|    247|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18DecodeConnectivityEv:
  247|  3.07k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  3.07k|  num_new_vertices_ = 0;
  249|  3.07k|  new_to_parent_vertex_map_.clear();
  250|  3.07k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  3.07k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.07k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 634, False: 2.44k]
  ------------------
  252|    634|    uint32_t num_new_verts;
  253|    634|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    634|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 443, False: 191]
  ------------------
  254|    443|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 443]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    443|    } else {
  258|    191|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 191]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    191|    }
  262|    634|    num_new_vertices_ = num_new_verts;
  263|    634|  }
  264|  3.07k|#endif
  265|       |
  266|  3.07k|  uint32_t num_encoded_vertices;
  267|  3.07k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  3.07k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.07k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 443, False: 2.63k]
  ------------------
  269|    443|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 443]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    443|  } else
  274|  2.63k|#endif
  275|  2.63k|  {
  276|  2.63k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 2.63k]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|  2.63k|  }
  280|  3.07k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  3.07k|  uint32_t num_faces;
  283|  3.07k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  3.07k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.07k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 443, False: 2.63k]
  ------------------
  285|    443|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 443]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    443|  } else
  290|  2.63k|#endif
  291|  2.63k|  {
  292|  2.63k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 2.63k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  2.63k|  }
  296|  3.07k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 1, False: 3.07k]
  ------------------
  297|      1|    return false;  // Draco cannot handle this many faces.
  298|      1|  }
  299|       |
  300|  3.07k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 0, False: 3.07k]
  ------------------
  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|  3.07k|  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|  3.07k|  const uint64_t num_encoded_vertices_64 =
  311|  3.07k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  3.07k|  const uint64_t max_num_vertex_edges =
  313|  3.07k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  3.07k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 1, False: 3.07k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      1|    return false;
  317|      1|  }
  318|       |
  319|  3.07k|  uint8_t num_attribute_data;
  320|  3.07k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 3.07k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  3.07k|  uint32_t num_encoded_symbols;
  325|  3.07k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  3.07k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.07k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 442, False: 2.63k]
  ------------------
  327|    442|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 442]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    442|  } else
  332|  2.63k|#endif
  333|  2.63k|  {
  334|  2.63k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 2.63k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  2.63k|  }
  338|       |
  339|  3.07k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 3, False: 3.07k]
  ------------------
  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|      3|    return false;
  344|      3|  }
  345|  3.07k|  const uint32_t max_encoded_faces =
  346|  3.07k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  3.07k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 7, False: 3.06k]
  ------------------
  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|      7|    return false;
  352|      7|  }
  353|       |
  354|  3.06k|  uint32_t num_encoded_split_symbols;
  355|  3.06k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  3.06k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.06k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 438, False: 2.62k]
  ------------------
  357|    438|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 438]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    438|  } else
  362|  2.62k|#endif
  363|  2.62k|  {
  364|  2.62k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 2.62k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  2.62k|  }
  368|       |
  369|  3.06k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 6, False: 3.05k]
  ------------------
  370|      6|    return false;  // Split symbols are a sub-set of all symbols.
  371|      6|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  3.05k|  vertex_traversal_length_.clear();
  375|  3.05k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  3.05k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 3.05k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  3.05k|  processed_corner_ids_.clear();
  380|  3.05k|  processed_corner_ids_.reserve(num_faces);
  381|  3.05k|  processed_connectivity_corners_.clear();
  382|  3.05k|  processed_connectivity_corners_.reserve(num_faces);
  383|  3.05k|  topology_split_data_.clear();
  384|  3.05k|  hole_event_data_.clear();
  385|  3.05k|  init_face_configurations_.clear();
  386|  3.05k|  init_corners_.clear();
  387|       |
  388|  3.05k|  last_symbol_id_ = -1;
  389|  3.05k|  last_face_id_ = -1;
  390|  3.05k|  last_vert_id_ = -1;
  391|       |
  392|  3.05k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  3.05k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  3.05k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 1, False: 3.05k]
  ------------------
  397|  3.05k|          num_faces, num_encoded_vertices_ + num_encoded_split_symbols)) {
  398|      1|    return false;
  399|      1|  }
  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|  3.05k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  3.05k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  3.05k|  int32_t topology_split_decoded_bytes = -1;
  410|  3.05k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.05k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 624, False: 2.43k]
  ------------------
  411|    624|    uint32_t encoded_connectivity_size;
  412|    624|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    624|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 435, False: 189]
  ------------------
  413|    435|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 4, False: 431]
  ------------------
  414|      4|        return false;
  415|      4|      }
  416|    435|    } else {
  417|    189|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 189]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|    189|    }
  421|    620|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 1, False: 619]
  ------------------
  422|    619|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 17, False: 602]
  ------------------
  423|     18|      return false;
  424|     18|    }
  425|    602|    DecoderBuffer event_buffer;
  426|    602|    event_buffer.Init(
  427|    602|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    602|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    602|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    602|    topology_split_decoded_bytes =
  432|    602|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    602|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 141, False: 461]
  ------------------
  434|    141|      return false;
  435|    141|    }
  436|       |
  437|    602|  } else
  438|  2.43k|#endif
  439|  2.43k|  {
  440|  2.43k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 19, False: 2.41k]
  ------------------
  441|     19|      return false;
  442|     19|    }
  443|  2.43k|  }
  444|       |
  445|  2.87k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  2.87k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  2.87k|                                           num_encoded_split_symbols);
  449|  2.87k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  2.87k|  DecoderBuffer traversal_end_buffer;
  452|  2.87k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 1.54k, False: 1.33k]
  ------------------
  453|  1.54k|    return false;
  454|  1.54k|  }
  455|       |
  456|  1.33k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  1.33k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 984, False: 348]
  ------------------
  458|    984|    return false;
  459|    984|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|    348|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|    348|                           traversal_end_buffer.remaining_size(),
  464|    348|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|    348|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|    348|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    348|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 6, False: 342]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|      6|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|      6|  }
  471|    348|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|    348|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 238, False: 110]
  ------------------
  475|    238|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|    238|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|    238|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 5, False: 233]
  ------------------
  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|    233|#endif
  485|    233|    {
  486|   814k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 814k, False: 233]
  ------------------
  487|   814k|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 814k]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|   814k|      }
  491|    233|    }
  492|    238|  }
  493|    348|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  1.32k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 980, False: 348]
  ------------------
  498|    980|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  2.13M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 2.13M, False: 980]
  ------------------
  501|  2.13M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  2.13M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|    980|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 980]
  ------------------
  505|    980|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|    980|  }
  509|       |
  510|    348|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  1.32k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 980, False: 348]
  ------------------
  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|    980|    int32_t att_connectivity_verts =
  517|    980|        attribute_data_[i].connectivity_data.num_vertices();
  518|    980|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 3, False: 977]
  ------------------
  519|      3|      att_connectivity_verts = corner_table_->num_vertices();
  520|      3|    }
  521|    980|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|    980|  }
  523|    348|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 14, False: 334]
  ------------------
  524|     14|    return false;
  525|     14|  }
  526|    334|  return true;
  527|    348|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE19OnAttributesDecodedEv:
  530|     39|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|     39|  return true;
  532|     39|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18DecodeConnectivityEi:
  536|  1.33k|    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.33k|  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.33k|  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.33k|  std::vector<VertexIndex> invalid_vertices;
  558|  1.33k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  1.33k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  1.33k|  int num_faces = 0;
  562|  78.6M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 78.6M, False: 504]
  ------------------
  563|  78.6M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  78.6M|    bool check_topology_split = false;
  566|  78.6M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  78.6M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 6.94M, False: 71.7M]
  ------------------
  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|  6.94M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 168, False: 6.94M]
  ------------------
  588|    168|        return -1;
  589|    168|      }
  590|       |
  591|  6.94M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  6.94M|      const VertexIndex vertex_x =
  593|  6.94M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  6.94M|      const CornerIndex corner_b =
  595|  6.94M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  6.94M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 244, False: 6.94M]
  ------------------
  598|       |        // All matched corners must be different.
  599|    244|        return -1;
  600|    244|      }
  601|  6.94M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 6.94M]
  |  Branch (601:11): [True: 0, False: 6.94M]
  ------------------
  602|  6.94M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 6.94M]
  ------------------
  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|  6.94M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  6.94M|      SetOppositeCorners(corner_a, corner + 1);
  612|  6.94M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  6.94M|      const VertexIndex vert_a_prev =
  616|  6.94M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  6.94M|      const VertexIndex vert_b_next =
  618|  6.94M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  6.94M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 6.94M]
  |  Branch (619:38): [True: 0, False: 6.94M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  6.94M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  6.94M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  6.94M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  6.94M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  6.94M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  6.94M|      active_corner_stack.back() = corner;
  631|  71.7M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 4.87k, False: 71.7M]
  |  Branch (631:40): [True: 57.2M, False: 14.4M]
  ------------------
  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|  57.2M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 1, False: 57.2M]
  ------------------
  647|      1|        return -1;
  648|      1|      }
  649|  57.2M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  57.2M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 57.2M]
  ------------------
  651|       |        // Active corner is already opposite to an existing face, which should
  652|       |        // not happen unless the input was tampered with.
  653|      0|        return -1;
  654|      0|      }
  655|       |
  656|       |      // First corner on the new face is either corner "l" or "r".
  657|  57.2M|      const CornerIndex corner(3 * face.value());
  658|  57.2M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  57.2M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 4.87k, False: 57.2M]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  4.87k|        opp_corner = corner + 2;
  662|  4.87k|        corner_l = corner + 1;
  663|  4.87k|        corner_r = corner;
  664|  57.2M|      } else {
  665|       |        // "l" is the new first corner.
  666|  57.2M|        opp_corner = corner + 1;
  667|  57.2M|        corner_l = corner;
  668|  57.2M|        corner_r = corner + 2;
  669|  57.2M|      }
  670|  57.2M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  57.2M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  57.2M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 8, False: 57.2M]
  ------------------
  675|      8|        return -1;  // Unexpected number of decoded vertices.
  676|      8|      }
  677|       |
  678|  57.2M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  57.2M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  57.2M|      const VertexIndex vertex_r =
  682|  57.2M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  57.2M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  57.2M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  57.2M|      corner_table_->MapCornerToVertex(
  688|  57.2M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  57.2M|      active_corner_stack.back() = corner;
  690|  57.2M|      check_topology_split = true;
  691|  57.2M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 45.1k, False: 14.3M]
  ------------------
  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|  45.1k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 1, False: 45.1k]
  ------------------
  703|      1|        return -1;
  704|      1|      }
  705|  45.1k|      const CornerIndex corner_b = active_corner_stack.back();
  706|  45.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|  45.1k|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  45.1k|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 46, False: 45.1k]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|     46|        active_corner_stack.push_back(it->second);
  714|     46|      }
  715|  45.1k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 46, False: 45.1k]
  ------------------
  716|     46|        return -1;
  717|     46|      }
  718|  45.1k|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  45.1k|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 45.1k]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  45.1k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 2, False: 45.1k]
  |  Branch (724:11): [True: 2, False: 45.1k]
  ------------------
  725|  45.1k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 45.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|      2|        return -1;
  729|      2|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  45.1k|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  45.1k|      SetOppositeCorners(corner_a, corner + 2);
  735|  45.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|  45.1k|      const VertexIndex vertex_p =
  739|  45.1k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  45.1k|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  45.1k|      corner_table_->MapCornerToVertex(
  742|  45.1k|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  45.1k|      const VertexIndex vert_b_prev =
  744|  45.1k|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  45.1k|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  45.1k|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  45.1k|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  45.1k|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  45.1k|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  45.1k|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  45.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|  45.1k|      const CornerIndex first_corner = corner_n;
  757|  12.2M|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 12.2M, False: 45.1k]
  ------------------
  758|  12.2M|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|  12.2M|        corner_n = corner_table_->SwingLeft(corner_n);
  760|  12.2M|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 2, False: 12.2M]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      2|          return -1;
  764|      2|        }
  765|  12.2M|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  45.1k|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  45.1k|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 44.6k, False: 520]
  ------------------
  770|  44.6k|        invalid_vertices.push_back(vertex_n);
  771|  44.6k|      }
  772|  45.1k|      active_corner_stack.back() = corner;
  773|  14.3M|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 14.3M, False: 283]
  ------------------
  774|  14.3M|      const CornerIndex corner(3 * face.value());
  775|  14.3M|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  14.3M|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  14.3M|      corner_table_->MapCornerToVertex(corner + 1,
  779|  14.3M|                                       corner_table_->AddNewVertex());
  780|  14.3M|      corner_table_->MapCornerToVertex(corner + 2,
  781|  14.3M|                                       corner_table_->AddNewVertex());
  782|       |
  783|  14.3M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 8, False: 14.3M]
  ------------------
  784|      8|        return -1;  // Unexpected number of decoded vertices.
  785|      8|      }
  786|       |
  787|  14.3M|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  14.3M|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  14.3M|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  14.3M|      active_corner_stack.push_back(corner);
  792|  14.3M|      check_topology_split = true;
  793|  14.3M|    } else {
  794|       |      // Error. Unknown symbol decoded.
  795|    283|      return -1;
  796|    283|    }
  797|       |    // Inform the traversal decoder that a new corner has been reached.
  798|  78.6M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  78.6M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 71.6M, False: 6.98M]
  ------------------
  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|  71.6M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  71.6M|      EdgeFaceName split_edge;
  812|  71.6M|      int encoder_split_symbol_id;
  813|  71.6M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 2.07k, False: 71.6M]
  ------------------
  814|  71.6M|                             &encoder_split_symbol_id)) {
  815|  2.07k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 65, False: 2.01k]
  ------------------
  816|     65|          return -1;  // Wrong split symbol id.
  817|     65|        }
  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.01k|        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.01k|        CornerIndex new_active_corner;
  831|  2.01k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 981, False: 1.03k]
  ------------------
  832|    981|          new_active_corner = corner_table_->Next(act_top_corner);
  833|  1.03k|        } else {
  834|  1.03k|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|  1.03k|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  2.01k|        const int decoder_split_symbol_id =
  839|  2.01k|            num_symbols - encoder_split_symbol_id - 1;
  840|  2.01k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  2.01k|            new_active_corner;
  842|  2.01k|      }
  843|  71.6M|    }
  844|  78.6M|  }
  845|    504|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 504]
  ------------------
  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|  7.31M|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 7.31M, False: 447]
  ------------------
  850|  7.31M|    const CornerIndex corner = active_corner_stack.back();
  851|  7.31M|    active_corner_stack.pop_back();
  852|  7.31M|    const bool interior_face =
  853|  7.31M|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  7.31M|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 5.39M, False: 1.91M]
  ------------------
  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|  5.39M|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 51, False: 5.39M]
  ------------------
  877|     51|        return -1;  // More faces than expected added to the mesh.
  878|     51|      }
  879|       |
  880|  5.39M|      const CornerIndex corner_a = corner;
  881|  5.39M|      const VertexIndex vert_n =
  882|  5.39M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  5.39M|      const CornerIndex corner_b =
  884|  5.39M|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  5.39M|      const VertexIndex vert_x =
  887|  5.39M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  5.39M|      const CornerIndex corner_c =
  889|  5.39M|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  5.39M|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 3, False: 5.39M]
  |  Branch (891:33): [True: 3, False: 5.39M]
  |  Branch (891:55): [True: 0, False: 5.39M]
  ------------------
  892|       |        // All matched corners must be different.
  893|      6|        return -1;
  894|      6|      }
  895|  5.39M|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 0, False: 5.39M]
  |  Branch (895:11): [True: 0, False: 5.39M]
  ------------------
  896|  5.39M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 0, False: 5.39M]
  ------------------
  897|  5.39M|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 0, False: 5.39M]
  ------------------
  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|  5.39M|      const VertexIndex vert_p =
  904|  5.39M|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  5.39M|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  5.39M|      const CornerIndex new_corner(3 * face.value());
  909|  5.39M|      SetOppositeCorners(new_corner, corner);
  910|  5.39M|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  5.39M|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  5.39M|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  5.39M|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  5.39M|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|  21.5M|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 16.1M, False: 5.39M]
  ------------------
  920|  16.1M|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|  16.1M|      }
  922|       |
  923|  5.39M|      init_face_configurations_.push_back(true);
  924|  5.39M|      init_corners_.push_back(new_corner);
  925|  5.39M|    } else {
  926|       |      // The initial face wasn't interior and the traversal had to start from
  927|       |      // an open boundary. In this case no new face is added, but we need to
  928|       |      // keep record about the first opposite corner to this boundary.
  929|  1.91M|      init_face_configurations_.push_back(false);
  930|  1.91M|      init_corners_.push_back(corner);
  931|  1.91M|    }
  932|  7.31M|  }
  933|    447|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 93, False: 354]
  ------------------
  934|     93|    return -1;  // Unexpected number of decoded faces.
  935|     93|  }
  936|       |
  937|    354|  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.62k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 4.62k, False: 348]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  4.62k|    VertexIndex src_vert(num_vertices - 1);
  943|  5.40k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 780, False: 4.62k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|    780|      src_vert = VertexIndex(--num_vertices - 1);
  946|    780|    }
  947|  4.62k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 554, False: 4.07k]
  ------------------
  948|    554|      continue;  // No need to swap anything.
  949|    554|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  4.07k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  16.6k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 12.6k, False: 4.06k]
  ------------------
  954|  12.6k|      const CornerIndex cid = vcit.Corner();
  955|  12.6k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 6, False: 12.5k]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      6|        return -1;
  959|      6|      }
  960|  12.5k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  12.5k|    }
  962|  4.06k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  4.06k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  4.06k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  4.06k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  4.06k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  4.06k|    num_vertices--;
  972|  4.06k|  }
  973|    348|  return num_vertices;
  974|    354|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  3.03k|    DecoderBuffer* decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  3.03k|  uint32_t num_topology_splits;
  982|  3.03k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  3.03k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.03k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 415, False: 2.62k]
  ------------------
  984|    415|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 1, False: 414]
  ------------------
  985|      1|      return -1;
  986|      1|    }
  987|       |
  988|    415|  } else
  989|  2.62k|#endif
  990|  2.62k|  {
  991|  2.62k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 2.62k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  2.62k|  }
  995|  3.03k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 699, False: 2.33k]
  ------------------
  996|    699|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 28, False: 671]
  ------------------
  997|    699|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|     28|      return -1;
  999|     28|    }
 1000|    671|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|    671|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    671|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 45, False: 626]
  ------------------
 1002|   182k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 182k, False: 9]
  ------------------
 1003|   182k|        TopologySplitEventData event_data;
 1004|   182k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 26, False: 182k]
  ------------------
 1005|     26|          return -1;
 1006|     26|        }
 1007|   182k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 8, False: 182k]
  ------------------
 1008|      8|          return -1;
 1009|      8|        }
 1010|   182k|        uint8_t edge_data;
 1011|   182k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 2, False: 182k]
  ------------------
 1012|      2|          return -1;
 1013|      2|        }
 1014|   182k|        event_data.source_edge = edge_data & 1;
 1015|   182k|        topology_split_data_.push_back(event_data);
 1016|   182k|      }
 1017|       |
 1018|     45|    } else
 1019|    626|#endif
 1020|    626|    {
 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|    626|      int last_source_symbol_id = 0;
 1024|  6.02k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 5.41k, False: 610]
  ------------------
 1025|  5.41k|        TopologySplitEventData event_data;
 1026|  5.41k|        uint32_t delta;
 1027|  5.41k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 12, False: 5.40k]
  ------------------
 1028|     12|          return -1;
 1029|     12|        }
 1030|  5.40k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  5.40k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 2, False: 5.40k]
  ------------------
 1032|      2|          return -1;
 1033|      2|        }
 1034|  5.40k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 2, False: 5.40k]
  ------------------
 1035|      2|          return -1;
 1036|      2|        }
 1037|  5.40k|        event_data.split_symbol_id =
 1038|  5.40k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  5.40k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  5.40k|        topology_split_data_.push_back(event_data);
 1041|  5.40k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|    610|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  4.47k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 3.86k, False: 610]
  ------------------
 1045|  3.86k|        uint32_t edge_data;
 1046|  3.86k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.86k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 642, False: 3.22k]
  ------------------
 1047|    642|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  3.22k|        } else {
 1049|  3.22k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  3.22k|        }
 1051|  3.86k|        TopologySplitEventData& event_data = topology_split_data_[i];
 1052|  3.86k|        event_data.source_edge = edge_data & 1;
 1053|  3.86k|      }
 1054|    610|      decoder_buffer->EndBitDecoding();
 1055|    610|    }
 1056|    671|  }
 1057|  2.95k|  uint32_t num_hole_events = 0;
 1058|  2.95k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  2.95k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.95k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 354, False: 2.60k]
  ------------------
 1060|    354|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 3, False: 351]
  ------------------
 1061|      3|      return -1;
 1062|      3|    }
 1063|  2.60k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  2.60k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 168, False: 2.43k]
  ------------------
 1064|    168|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 5, False: 163]
  ------------------
 1065|      5|      return -1;
 1066|      5|    }
 1067|    168|  }
 1068|  2.94k|#endif
 1069|  2.94k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 80, False: 2.86k]
  ------------------
 1070|     80|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     80|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     80|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 45, False: 35]
  ------------------
 1072|   291k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 291k, False: 2]
  ------------------
 1073|   291k|        HoleEventData event_data;
 1074|   291k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 43, False: 291k]
  ------------------
 1075|     43|          return -1;
 1076|     43|        }
 1077|   291k|        hole_event_data_.push_back(event_data);
 1078|   291k|      }
 1079|       |
 1080|     45|    } else
 1081|     35|#endif
 1082|     35|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     35|      int last_symbol_id = 0;
 1085|  99.4k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 99.3k, False: 7]
  ------------------
 1086|  99.3k|        HoleEventData event_data;
 1087|  99.3k|        uint32_t delta;
 1088|  99.3k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 28, False: 99.3k]
  ------------------
 1089|     28|          return -1;
 1090|     28|        }
 1091|  99.3k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  99.3k|        last_symbol_id = event_data.symbol_id;
 1093|  99.3k|        hole_event_data_.push_back(event_data);
 1094|  99.3k|      }
 1095|     35|    }
 1096|     80|  }
 1097|  2.87k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  2.94k|}
_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: 7, False: 13]
  ------------------
 1122|      7|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|      7|      }
 1124|     20|    }
 1125|     20|  }
 1126|     10|  return true;
 1127|     10|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|   814k|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|   814k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|   814k|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|   814k|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  3.25M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 2.44M, False: 814k]
  ------------------
 1139|  2.44M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  2.44M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 422k, False: 2.02M]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|  1.26M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 846k, False: 422k]
  ------------------
 1144|   846k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   846k|      }
 1146|   422k|      continue;
 1147|   422k|    }
 1148|  2.02M|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|  2.02M|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 1.01M, False: 1.01M]
  ------------------
 1151|  1.01M|      continue;
 1152|  1.01M|    }
 1153|       |
 1154|  3.03M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 2.01M, False: 1.01M]
  ------------------
 1155|  2.01M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  2.01M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 1.28M, False: 731k]
  ------------------
 1157|  1.28M|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|  1.28M|      }
 1159|  2.01M|    }
 1160|  1.01M|  }
 1161|   814k|  return true;
 1162|   814k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE21AssignPointsToCornersEi:
 1166|    348|    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|    348|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|    348|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 110, False: 238]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|   141k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 141k, False: 110]
  ------------------
 1176|   141k|      Mesh::Face face;
 1177|   141k|      const CornerIndex start_corner(3 * f.value());
 1178|   564k|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 423k, False: 141k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|   423k|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|   423k|        face[c] = vert_id;
 1182|   423k|      }
 1183|   141k|      decoder_->mesh()->SetFace(f, face);
 1184|   141k|    }
 1185|    110|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|    110|    return true;
 1187|    110|  }
 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|    238|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|    238|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|   612k|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 612k, False: 224]
  ------------------
 1197|   612k|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|   612k|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 94, False: 612k]
  ------------------
 1199|     94|      continue;  // Isolated vertex.
 1200|     94|    }
 1201|   612k|    CornerIndex deduplication_first_corner = c;
 1202|   612k|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 422k, False: 189k]
  ------------------
 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|   422k|      deduplication_first_corner = c;
 1206|   422k|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|   319k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 267k, False: 51.0k]
  ------------------
 1210|   267k|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 126k, False: 141k]
  ------------------
 1211|   126k|          continue;  // No seam for this attribute, ignore it.
 1212|   126k|        }
 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|   141k|        const VertexIndex vert_id =
 1217|   141k|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|   141k|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|   141k|        bool seam_found = false;
 1220|   158k|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 155k, False: 2.92k]
  ------------------
 1221|   155k|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 14, False: 155k]
  ------------------
 1222|     14|            return false;
 1223|     14|          }
 1224|   155k|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 138k, False: 16.3k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|   138k|            deduplication_first_corner = act_c;
 1227|   138k|            seam_found = true;
 1228|   138k|            break;
 1229|   138k|          }
 1230|  16.3k|          act_c = corner_table_->SwingRight(act_c);
 1231|  16.3k|        }
 1232|   141k|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 138k, False: 2.92k]
  ------------------
 1233|   138k|          break;  // No reason to process other attributes if we found a seam.
 1234|   138k|        }
 1235|   141k|      }
 1236|   189k|    }
 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|   612k|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|   612k|    corner_to_point_map[c.value()] =
 1246|   612k|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|   612k|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|   612k|    CornerIndex prev_c = c;
 1250|   612k|    c = corner_table_->SwingRight(c);
 1251|  2.47M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 2.05M, False: 422k]
  |  Branch (1251:40): [True: 1.86M, False: 189k]
  ------------------
 1252|  1.86M|      bool attribute_seam = false;
 1253|  3.12M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 2.63M, False: 492k]
  ------------------
 1254|  2.63M|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 1.36M, False: 1.26M]
  ------------------
 1255|  2.63M|            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|  1.36M|          attribute_seam = true;
 1259|  1.36M|          break;
 1260|  1.36M|        }
 1261|  2.63M|      }
 1262|  1.86M|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 1.36M, False: 492k]
  ------------------
 1263|  1.36M|        corner_to_point_map[c.value()] =
 1264|  1.36M|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|  1.36M|        point_to_corner_map.push_back(c.value());
 1266|  1.36M|      } else {
 1267|   492k|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|   492k|      }
 1269|  1.86M|      prev_c = c;
 1270|  1.86M|      c = corner_table_->SwingRight(c);
 1271|  1.86M|    }
 1272|   612k|  }
 1273|       |  // Add faces.
 1274|   775k|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 775k, False: 224]
  ------------------
 1275|   775k|    Mesh::Face face;
 1276|  3.10M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 2.32M, False: 775k]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|  2.32M|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|  2.32M|    }
 1280|   775k|    decoder_->mesh()->SetFace(f, face);
 1281|   775k|  }
 1282|    224|  decoder_->point_cloud()->set_num_points(
 1283|    224|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|    224|  return true;
 1285|    238|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    327|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|    327|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    327|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    327|  const Mesh* mesh = decoder_->mesh();
  115|    327|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    327|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    327|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    327|                           encoding_data);
  120|       |
  121|    327|  TraverserT att_traverser;
  122|    327|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    327|  traversal_sequencer->SetTraverser(att_traverser);
  125|    327|  return std::move(traversal_sequencer);
  126|    327|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|  1.62k|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|  1.62k|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|  1.62k|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|  1.62k|  const Mesh* mesh = decoder_->mesh();
  115|  1.62k|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|  1.62k|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|  1.62k|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|  1.62k|                           encoding_data);
  120|       |
  121|  1.62k|  TraverserT att_traverser;
  122|  1.62k|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|  1.62k|  traversal_sequencer->SetTraverser(att_traverser);
  125|  1.62k|  return std::move(traversal_sequencer);
  126|  1.62k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    310|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|    310|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    310|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    310|  const Mesh* mesh = decoder_->mesh();
  115|    310|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    310|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    310|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    310|                           encoding_data);
  120|       |
  121|    310|  TraverserT att_traverser;
  122|    310|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    310|  traversal_sequencer->SetTraverser(att_traverser);
  125|    310|  return std::move(traversal_sequencer);
  126|    310|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    513|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|    513|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    513|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    513|  const Mesh* mesh = decoder_->mesh();
  115|    513|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    513|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    513|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    513|                           encoding_data);
  120|       |
  121|    513|  TraverserT att_traverser;
  122|    513|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    513|  traversal_sequencer->SetTraverser(att_traverser);
  125|    513|  return std::move(traversal_sequencer);
  126|    513|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|     55|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|     55|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|     55|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|     55|  const Mesh* mesh = decoder_->mesh();
  115|     55|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|     55|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|     55|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|     55|                           encoding_data);
  120|       |
  121|     55|  TraverserT att_traverser;
  122|     55|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|     55|  traversal_sequencer->SetTraverser(att_traverser);
  125|     55|  return std::move(traversal_sequencer);
  126|     55|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    123|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|    123|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    123|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    123|  const Mesh* mesh = decoder_->mesh();
  115|    123|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    123|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    123|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    123|                           encoding_data);
  120|       |
  121|    123|  TraverserT att_traverser;
  122|    123|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    123|  traversal_sequencer->SetTraverser(att_traverser);
  125|    123|  return std::move(traversal_sequencer);
  126|    123|}

_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE10GetDecoderEv:
   65|  12.7k|  MeshEdgebreakerDecoder* GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE14GetCornerTableEv:
   66|  4.42k|  const CornerTable* GetCornerTable() const override {
   67|  4.42k|    return corner_table_.get();
   68|  4.42k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  15.5M|                       int* out_encoder_split_symbol_id) {
   87|  15.5M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 1.47M, False: 14.0M]
  ------------------
   88|  1.47M|      return false;
   89|  1.47M|    }
   90|  14.0M|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 43, False: 14.0M]
  ------------------
   91|  14.0M|        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|     43|      *out_encoder_split_symbol_id = -1;
   98|     43|      return true;
   99|     43|    }
  100|  14.0M|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 14.0M, False: 2.64k]
  ------------------
  101|  14.0M|      return false;
  102|  14.0M|    }
  103|  2.64k|    *out_face_edge =
  104|  2.64k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  2.64k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  2.64k|    topology_split_data_.pop_back();
  108|  2.64k|    return true;
  109|  14.0M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  51.2M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  51.2M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  51.2M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  51.2M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE13AttributeDataC2Ev:
  210|  14.4k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE10GetDecoderEv:
   65|  6.48k|  MeshEdgebreakerDecoder* GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE14GetCornerTableEv:
   66|  4.36k|  const CornerTable* GetCornerTable() const override {
   67|  4.36k|    return corner_table_.get();
   68|  4.36k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  48.8M|                       int* out_encoder_split_symbol_id) {
   87|  48.8M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 48.1M, False: 703k]
  ------------------
   88|  48.1M|      return false;
   89|  48.1M|    }
   90|   703k|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 32, False: 703k]
  ------------------
   91|   703k|        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|     32|      *out_encoder_split_symbol_id = -1;
   98|     32|      return true;
   99|     32|    }
  100|   703k|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 700k, False: 2.85k]
  ------------------
  101|   700k|      return false;
  102|   700k|    }
  103|  2.85k|    *out_face_edge =
  104|  2.85k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  2.85k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  2.85k|    topology_split_data_.pop_back();
  108|  2.85k|    return true;
  109|   703k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|   143M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|   143M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|   143M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|   143M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE13AttributeDataC2Ev:
  210|  14.9k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE10GetDecoderEv:
   65|  15.8k|  MeshEdgebreakerDecoder* GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE14GetCornerTableEv:
   66|  3.14k|  const CornerTable* GetCornerTable() const override {
   67|  3.14k|    return corner_table_.get();
   68|  3.14k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  71.6M|                       int* out_encoder_split_symbol_id) {
   87|  71.6M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 65.3M, False: 6.30M]
  ------------------
   88|  65.3M|      return false;
   89|  65.3M|    }
   90|  6.30M|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 65, False: 6.30M]
  ------------------
   91|  6.30M|        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|     65|      *out_encoder_split_symbol_id = -1;
   98|     65|      return true;
   99|     65|    }
  100|  6.30M|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 6.30M, False: 2.01k]
  ------------------
  101|  6.30M|      return false;
  102|  6.30M|    }
  103|  2.01k|    *out_face_edge =
  104|  2.01k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  2.01k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  2.01k|    topology_split_data_.pop_back();
  108|  2.01k|    return true;
  109|  6.30M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  87.4M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  87.4M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  87.4M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  87.4M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE13AttributeDataC2Ev:
  210|  9.15k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}

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

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

_ZN5draco31MeshEdgebreakerTraversalDecoderC2Ev:
   33|  9.97k|      : attribute_connectivity_decoders_(nullptr),
   34|  9.97k|        num_attribute_data_(0),
   35|  9.97k|        decoder_impl_(nullptr) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder4InitEPNS_35MeshEdgebreakerDecoderImplInterfaceE:
   36|  9.30k|  void Init(MeshEdgebreakerDecoderImplInterface* decoder) {
   37|  9.30k|    decoder_impl_ = decoder;
   38|  9.30k|    buffer_.Init(decoder->GetDecoder()->buffer()->data_head(),
   39|  9.30k|                 decoder->GetDecoder()->buffer()->remaining_size(),
   40|  9.30k|                 decoder->GetDecoder()->buffer()->bitstream_version());
   41|  9.30k|  }
_ZNK5draco31MeshEdgebreakerTraversalDecoder16BitstreamVersionEv:
   44|  7.17k|  uint16_t BitstreamVersion() const {
   45|  7.17k|    return decoder_impl_->GetDecoder()->bitstream_version();
   46|  7.17k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder21SetNumEncodedVerticesEi:
   50|  4.26k|  void SetNumEncodedVertices(int /* num_vertices */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19SetNumAttributeDataEi:
   54|  9.30k|  void SetNumAttributeData(int num_data) { num_attribute_data_ = num_data; }
_ZN5draco31MeshEdgebreakerTraversalDecoder5StartEPNS_13DecoderBufferE:
   59|  6.42k|  bool Start(DecoderBuffer* out_buffer) {
   60|       |    // Decode symbols from the main buffer decoder and face configurations from
   61|       |    // the start_face_buffer decoder.
   62|  6.42k|    if (!DecodeTraversalSymbols()) {
  ------------------
  |  Branch (62:9): [True: 51, False: 6.37k]
  ------------------
   63|     51|      return false;
   64|     51|    }
   65|       |
   66|  6.37k|    if (!DecodeStartFaces()) {
  ------------------
  |  Branch (66:9): [True: 113, False: 6.26k]
  ------------------
   67|    113|      return false;
   68|    113|    }
   69|       |
   70|  6.26k|    if (!DecodeAttributeSeams()) {
  ------------------
  |  Branch (70:9): [True: 17, False: 6.24k]
  ------------------
   71|     17|      return false;
   72|     17|    }
   73|  6.24k|    *out_buffer = buffer_;
   74|  6.24k|    return true;
   75|  6.26k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder28DecodeStartFaceConfigurationEv:
   78|  7.38M|  inline bool DecodeStartFaceConfiguration() {
   79|  7.38M|    uint32_t face_configuration;
   80|  7.38M|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   81|  7.38M|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  7.38M|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (81:9): [True: 1.65k, False: 7.38M]
  ------------------
   82|  1.65k|      start_face_buffer_.DecodeLeastSignificantBits32(1, &face_configuration);
   83|       |
   84|  1.65k|    } else
   85|  7.38M|#endif
   86|  7.38M|    {
   87|  7.38M|      face_configuration = start_face_decoder_.DecodeNextBit();
   88|  7.38M|    }
   89|  7.38M|    return face_configuration;
   90|  7.38M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder12DecodeSymbolEv:
   93|  35.7M|  inline uint32_t DecodeSymbol() {
   94|  35.7M|    uint32_t symbol;
   95|  35.7M|    symbol_buffer_.DecodeLeastSignificantBits32(1, &symbol);
   96|  35.7M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (96:9): [True: 15.9M, False: 19.7M]
  ------------------
   97|  15.9M|      return symbol;
   98|  15.9M|    }
   99|       |    // Else decode two additional bits.
  100|  19.7M|    uint32_t symbol_suffix;
  101|  19.7M|    symbol_buffer_.DecodeLeastSignificantBits32(2, &symbol_suffix);
  102|  19.7M|    symbol |= (symbol_suffix << 1);
  103|  19.7M|    return symbol;
  104|  35.7M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder22NewActiveCornerReachedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  35.4M|  inline void NewActiveCornerReached(CornerIndex /* corner */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder13MergeVerticesENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_:
  111|  4.04M|  inline void MergeVertices(VertexIndex /* dest */, VertexIndex /* source */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19DecodeAttributeSeamEi:
  117|  23.0M|  inline bool DecodeAttributeSeam(int attribute) {
  118|  23.0M|    return attribute_connectivity_decoders_[attribute].DecodeNextBit();
  119|  23.0M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder4DoneEv:
  122|  5.94k|  void Done() {
  123|  5.94k|    if (symbol_buffer_.bit_decoder_active()) {
  ------------------
  |  Branch (123:9): [True: 5.60k, False: 342]
  ------------------
  124|  5.60k|      symbol_buffer_.EndBitDecoding();
  125|  5.60k|    }
  126|  5.94k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  127|  5.94k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  5.94k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (127:9): [True: 601, False: 5.34k]
  ------------------
  128|    601|      start_face_buffer_.EndBitDecoding();
  129|       |
  130|    601|    } else
  131|  5.34k|#endif
  132|  5.34k|    {
  133|  5.34k|      start_face_decoder_.EndDecoding();
  134|  5.34k|    }
  135|  5.94k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder6bufferEv:
  138|  2.68k|  DecoderBuffer* buffer() { return &buffer_; }
_ZN5draco31MeshEdgebreakerTraversalDecoder22DecodeTraversalSymbolsEv:
  140|  6.88k|  bool DecodeTraversalSymbols() {
  141|  6.88k|    uint64_t traversal_size;
  142|  6.88k|    symbol_buffer_ = buffer_;
  143|  6.88k|    if (!symbol_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (143:9): [True: 25, False: 6.86k]
  ------------------
  144|     25|      return false;
  145|     25|    }
  146|  6.86k|    buffer_ = symbol_buffer_;
  147|  6.86k|    if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (147:9): [True: 74, False: 6.78k]
  ------------------
  148|     74|      return false;
  149|     74|    }
  150|  6.78k|    buffer_.Advance(traversal_size);
  151|  6.78k|    return true;
  152|  6.86k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder16DecodeStartFacesEv:
  154|  9.20k|  bool DecodeStartFaces() {
  155|       |    // Create a decoder that is set to the end of the encoded traversal data.
  156|  9.20k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  157|  9.20k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  9.20k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (157:9): [True: 1.17k, False: 8.02k]
  ------------------
  158|  1.17k|      start_face_buffer_ = buffer_;
  159|  1.17k|      uint64_t traversal_size;
  160|  1.17k|      if (!start_face_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (160:11): [True: 6, False: 1.16k]
  ------------------
  161|      6|        return false;
  162|      6|      }
  163|  1.16k|      buffer_ = start_face_buffer_;
  164|  1.16k|      if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (164:11): [True: 212, False: 957]
  ------------------
  165|    212|        return false;
  166|    212|      }
  167|    957|      buffer_.Advance(traversal_size);
  168|    957|      return true;
  169|  1.16k|    }
  170|  8.02k|#endif
  171|  8.02k|    return start_face_decoder_.StartDecoding(&buffer_);
  172|  9.20k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder20DecodeAttributeSeamsEv:
  174|  8.96k|  bool DecodeAttributeSeams() {
  175|       |    // Prepare attribute decoding.
  176|  8.96k|    if (num_attribute_data_ > 0) {
  ------------------
  |  Branch (176:9): [True: 5.95k, False: 3.01k]
  ------------------
  177|  5.95k|      attribute_connectivity_decoders_ = std::unique_ptr<BinaryDecoder[]>(
  178|  5.95k|          new BinaryDecoder[num_attribute_data_]);
  179|  17.2k|      for (int i = 0; i < num_attribute_data_; ++i) {
  ------------------
  |  Branch (179:23): [True: 11.3k, False: 5.91k]
  ------------------
  180|  11.3k|        if (!attribute_connectivity_decoders_[i].StartDecoding(&buffer_)) {
  ------------------
  |  Branch (180:13): [True: 39, False: 11.2k]
  ------------------
  181|     39|          return false;
  182|     39|        }
  183|  11.3k|      }
  184|  5.95k|    }
  185|  8.92k|    return true;
  186|  8.96k|  }

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

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

_ZN5draco21MeshSequentialDecoderC2Ev:
   27|  3.76k|MeshSequentialDecoder::MeshSequentialDecoder() = default;
_ZN5draco21MeshSequentialDecoder18DecodeConnectivityEv:
   29|  3.38k|bool MeshSequentialDecoder::DecodeConnectivity() {
   30|  3.38k|  uint32_t num_faces;
   31|  3.38k|  uint32_t num_points;
   32|  3.38k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   33|  3.38k|  if (bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.38k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (33:7): [True: 308, False: 3.08k]
  ------------------
   34|    308|    if (!buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (34:9): [True: 1, False: 307]
  ------------------
   35|      1|      return false;
   36|      1|    }
   37|    307|    if (!buffer()->Decode(&num_points)) {
  ------------------
  |  Branch (37:9): [True: 0, False: 307]
  ------------------
   38|      0|      return false;
   39|      0|    }
   40|       |
   41|    307|  } else
   42|  3.08k|#endif
   43|  3.08k|  {
   44|  3.08k|    if (!DecodeVarint(&num_faces, buffer())) {
  ------------------
  |  Branch (44:9): [True: 0, False: 3.08k]
  ------------------
   45|      0|      return false;
   46|      0|    }
   47|  3.08k|    if (!DecodeVarint(&num_points, buffer())) {
  ------------------
  |  Branch (47:9): [True: 0, False: 3.08k]
  ------------------
   48|      0|      return false;
   49|      0|    }
   50|  3.08k|  }
   51|       |
   52|       |  // Check that num_faces and num_points are valid values.
   53|  3.38k|  const uint64_t faces_64 = static_cast<uint64_t>(num_faces);
   54|       |  // Compressed sequential encoding can only handle (2^32 - 1) / 3 indices.
   55|  3.38k|  if (faces_64 > 0xffffffff / 3) {
  ------------------
  |  Branch (55:7): [True: 1, False: 3.38k]
  ------------------
   56|      1|    return false;
   57|      1|  }
   58|  3.38k|  if (faces_64 > buffer()->remaining_size() / 3) {
  ------------------
  |  Branch (58:7): [True: 5, False: 3.38k]
  ------------------
   59|       |    // The number of faces is unreasonably high, because face indices do not
   60|       |    // fit in the remaining size of the buffer.
   61|      5|    return false;
   62|      5|  }
   63|  3.38k|  uint8_t connectivity_method;
   64|  3.38k|  if (!buffer()->Decode(&connectivity_method)) {
  ------------------
  |  Branch (64:7): [True: 0, False: 3.38k]
  ------------------
   65|      0|    return false;
   66|      0|  }
   67|  3.38k|  if (connectivity_method == 0) {
  ------------------
  |  Branch (67:7): [True: 2.25k, False: 1.12k]
  ------------------
   68|  2.25k|    if (!DecodeAndDecompressIndices(num_faces, num_points)) {
  ------------------
  |  Branch (68:9): [True: 2.09k, False: 159]
  ------------------
   69|  2.09k|      return false;
   70|  2.09k|    }
   71|  2.25k|  } else {
   72|  1.12k|    if (num_points < 256) {
  ------------------
  |  Branch (72:9): [True: 915, False: 213]
  ------------------
   73|       |      // Decode indices as uint8_t.
   74|  1.43k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (74:28): [True: 533, False: 902]
  ------------------
   75|    533|        Mesh::Face face;
   76|  2.10k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (76:25): [True: 1.58k, False: 520]
  ------------------
   77|  1.58k|          uint8_t val;
   78|  1.58k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (78:15): [True: 5, False: 1.58k]
  ------------------
   79|      5|            return false;
   80|      5|          }
   81|  1.58k|          if (val >= num_points) {
  ------------------
  |  Branch (81:15): [True: 8, False: 1.57k]
  ------------------
   82|      8|            return false;
   83|      8|          }
   84|  1.57k|          face[j] = val;
   85|  1.57k|        }
   86|    520|        mesh()->AddFace(face);
   87|    520|      }
   88|    915|    } else if (num_points < (1 << 16)) {
  ------------------
  |  Branch (88:16): [True: 73, False: 140]
  ------------------
   89|       |      // Decode indices as uint16_t.
   90|    481|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:28): [True: 438, False: 43]
  ------------------
   91|    438|        Mesh::Face face;
   92|  1.68k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (92:25): [True: 1.27k, False: 408]
  ------------------
   93|  1.27k|          uint16_t val;
   94|  1.27k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (94:15): [True: 12, False: 1.26k]
  ------------------
   95|     12|            return false;
   96|     12|          }
   97|  1.26k|          if (val >= num_points) {
  ------------------
  |  Branch (97:15): [True: 18, False: 1.24k]
  ------------------
   98|     18|            return false;
   99|     18|          }
  100|  1.24k|          face[j] = val;
  101|  1.24k|        }
  102|    408|        mesh()->AddFace(face);
  103|    408|      }
  104|    140|    } else if (num_points < (1 << 21) &&
  ------------------
  |  Branch (104:16): [True: 53, False: 87]
  ------------------
  105|     53|               bitstream_version() >= DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|     53|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (105:16): [True: 50, False: 3]
  ------------------
  106|       |      // Decode indices as uint32_t.
  107|    909|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (107:28): [True: 894, False: 15]
  ------------------
  108|    894|        Mesh::Face face;
  109|  3.50k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (109:25): [True: 2.64k, False: 859]
  ------------------
  110|  2.64k|          uint32_t val;
  111|  2.64k|          if (!DecodeVarint(&val, buffer())) {
  ------------------
  |  Branch (111:15): [True: 12, False: 2.63k]
  ------------------
  112|     12|            return false;
  113|     12|          }
  114|  2.63k|          if (val >= num_points) {
  ------------------
  |  Branch (114:15): [True: 23, False: 2.61k]
  ------------------
  115|     23|            return false;
  116|     23|          }
  117|  2.61k|          face[j] = val;
  118|  2.61k|        }
  119|    859|        mesh()->AddFace(face);
  120|    859|      }
  121|     90|    } else {
  122|       |      // Decode faces as uint32_t (default).
  123|  2.07k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (123:28): [True: 2.03k, False: 39]
  ------------------
  124|  2.03k|        Mesh::Face face;
  125|  8.02k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (125:25): [True: 6.04k, False: 1.98k]
  ------------------
  126|  6.04k|          uint32_t val;
  127|  6.04k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (127:15): [True: 26, False: 6.01k]
  ------------------
  128|     26|            return false;
  129|     26|          }
  130|  6.01k|          if (val >= num_points) {
  ------------------
  |  Branch (130:15): [True: 25, False: 5.99k]
  ------------------
  131|     25|            return false;
  132|     25|          }
  133|  5.99k|          face[j] = val;
  134|  5.99k|        }
  135|  1.98k|        mesh()->AddFace(face);
  136|  1.98k|      }
  137|     90|    }
  138|  1.12k|  }
  139|  1.15k|  point_cloud()->set_num_points(num_points);
  140|  1.15k|  return true;
  141|  3.38k|}
_ZN5draco21MeshSequentialDecoder23CreateAttributesDecoderEi:
  143|  22.7k|bool MeshSequentialDecoder::CreateAttributesDecoder(int32_t att_decoder_id) {
  144|       |  // Always create the basic attribute decoder.
  145|  22.7k|  return SetAttributesDecoder(
  146|  22.7k|      att_decoder_id,
  147|  22.7k|      std::unique_ptr<AttributesDecoder>(
  148|  22.7k|          new SequentialAttributeDecodersController(
  149|  22.7k|              std::unique_ptr<PointsSequencer>(
  150|  22.7k|                  new LinearSequencer(point_cloud()->num_points())))));
  151|  22.7k|}
_ZN5draco21MeshSequentialDecoder26DecodeAndDecompressIndicesEjj:
  154|  2.25k|                                                       uint32_t num_points) {
  155|       |  // Get decoded indices differences that were encoded with an entropy code.
  156|  2.25k|  std::vector<uint32_t> indices_buffer(num_faces * 3);
  157|  2.25k|  if (!DecodeSymbols(num_faces * 3, 1, buffer(), indices_buffer.data())) {
  ------------------
  |  Branch (157:7): [True: 1.89k, False: 363]
  ------------------
  158|  1.89k|    return false;
  159|  1.89k|  }
  160|       |  // Reconstruct the indices from the differences.
  161|       |  // See MeshSequentialEncoder::CompressAndEncodeIndices() for more details.
  162|    363|  int32_t last_index_value = 0;  // This will always be >= 0.
  163|    363|  int vertex_index = 0;
  164|  7.89k|  for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (164:24): [True: 7.73k, False: 159]
  ------------------
  165|  7.73k|    Mesh::Face face;
  166|  30.4k|    for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (166:21): [True: 22.9k, False: 7.53k]
  ------------------
  167|  22.9k|      const uint32_t encoded_val = indices_buffer[vertex_index++];
  168|  22.9k|      int32_t index_diff = (encoded_val >> 1);
  169|  22.9k|      if (encoded_val & 1) {
  ------------------
  |  Branch (169:11): [True: 807, False: 22.1k]
  ------------------
  170|    807|        if (index_diff > last_index_value) {
  ------------------
  |  Branch (170:13): [True: 62, False: 745]
  ------------------
  171|       |          // Subtracting index_diff would result in a negative index.
  172|     62|          return false;
  173|     62|        }
  174|    745|        index_diff = -index_diff;
  175|  22.1k|      } else {
  176|  22.1k|        if (index_diff >
  ------------------
  |  Branch (176:13): [True: 24, False: 22.1k]
  ------------------
  177|  22.1k|            (std::numeric_limits<int32_t>::max() - last_index_value)) {
  178|       |          // Adding index_diff to last_index_value would overflow.
  179|     24|          return false;
  180|     24|        }
  181|  22.1k|      }
  182|  22.8k|      const int32_t index_value = index_diff + last_index_value;
  183|  22.8k|      if (index_value < 0 || static_cast<uint32_t>(index_value) >= num_points) {
  ------------------
  |  Branch (183:11): [True: 0, False: 22.8k]
  |  Branch (183:30): [True: 118, False: 22.7k]
  ------------------
  184|    118|        return false;
  185|    118|      }
  186|  22.7k|      face[j] = index_value;
  187|  22.7k|      last_index_value = index_value;
  188|  22.7k|    }
  189|  7.53k|    mesh()->AddFace(face);
  190|  7.53k|  }
  191|    159|  return true;
  192|    363|}

_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  2.11k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  2.21M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  2.21M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 2.17M, False: 44.6k]
  ------------------
   61|  2.17M|      return true;  // Already traversed.
   62|  2.17M|    }
   63|       |
   64|  44.6k|    corner_traversal_stack_.clear();
   65|  44.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|  44.6k|    const VertexIndex next_vert =
   69|  44.6k|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  44.6k|    const VertexIndex prev_vert =
   71|  44.6k|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  44.6k|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 44.6k]
  |  Branch (72:45): [True: 0, False: 44.6k]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  44.6k|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 43.7k, False: 924]
  ------------------
   76|  43.7k|      this->MarkVertexVisited(next_vert);
   77|  43.7k|      this->traversal_observer().OnNewVertexVisited(
   78|  43.7k|          next_vert, this->corner_table()->Next(corner_id));
   79|  43.7k|    }
   80|  44.6k|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 4.28k, False: 40.4k]
  ------------------
   81|  4.28k|      this->MarkVertexVisited(prev_vert);
   82|  4.28k|      this->traversal_observer().OnNewVertexVisited(
   83|  4.28k|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  4.28k|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|   102k|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 57.8k, False: 44.6k]
  ------------------
   88|       |      // Currently processed corner.
   89|  57.8k|      corner_id = corner_traversal_stack_.back();
   90|  57.8k|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  57.8k|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 57.8k]
  |  Branch (92:47): [True: 833, False: 57.0k]
  ------------------
   93|       |        // This face has been already traversed.
   94|    833|        corner_traversal_stack_.pop_back();
   95|    833|        continue;
   96|    833|      }
   97|  2.21M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 2.21M, Folded]
  ------------------
   98|  2.21M|        this->MarkFaceVisited(face_id);
   99|  2.21M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  2.21M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  2.21M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 2.21M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  2.21M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 1.09M, False: 1.11M]
  ------------------
  105|  1.09M|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|  1.09M|          this->MarkVertexVisited(vert_id);
  107|  1.09M|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|  1.09M|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 1.07M, False: 23.6k]
  ------------------
  109|  1.07M|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|  1.07M|            face_id = FaceIndex(corner_id.value() / 3);
  111|  1.07M|            continue;
  112|  1.07M|          }
  113|  1.09M|        }
  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.14M|        const CornerIndex right_corner_id =
  118|  1.14M|            this->corner_table()->GetRightCorner(corner_id);
  119|  1.14M|        const CornerIndex left_corner_id =
  120|  1.14M|            this->corner_table()->GetLeftCorner(corner_id);
  121|  1.14M|        const FaceIndex right_face_id(
  122|  1.14M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 17.8k, False: 1.12M]
  ------------------
  123|  1.14M|                 ? kInvalidFaceIndex
  124|  1.14M|                 : FaceIndex(right_corner_id.value() / 3)));
  125|  1.14M|        const FaceIndex left_face_id(
  126|  1.14M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 49.0k, False: 1.09M]
  ------------------
  127|  1.14M|                 ? kInvalidFaceIndex
  128|  1.14M|                 : FaceIndex(left_corner_id.value() / 3)));
  129|  1.14M|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 1.09M, False: 46.0k]
  ------------------
  130|       |          // Right face has been already visited.
  131|  1.09M|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 50.4k, False: 1.04M]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  50.4k|            corner_traversal_stack_.pop_back();
  134|  50.4k|            break;  // Break from the while (true) loop.
  135|  1.04M|          } else {
  136|       |            // Go to the left face.
  137|  1.04M|            corner_id = left_corner_id;
  138|  1.04M|            face_id = left_face_id;
  139|  1.04M|          }
  140|  1.09M|        } else {
  141|       |          // Right face was not visited.
  142|  46.0k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 39.4k, False: 6.60k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  39.4k|            corner_id = right_corner_id;
  145|  39.4k|            face_id = right_face_id;
  146|  39.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|  6.60k|            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|  6.60k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  6.60k|            break;
  159|  6.60k|          }
  160|  46.0k|        }
  161|  1.14M|      }
  162|  57.0k|    }
  163|  44.6k|    return true;
  164|  44.6k|  }
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  2.11k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  4.51k|  DepthFirstTraverser() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  2.38k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  5.39M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  5.39M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 1.43M, False: 3.96M]
  ------------------
   61|  1.43M|      return true;  // Already traversed.
   62|  1.43M|    }
   63|       |
   64|  3.96M|    corner_traversal_stack_.clear();
   65|  3.96M|    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|  3.96M|    const VertexIndex next_vert =
   69|  3.96M|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  3.96M|    const VertexIndex prev_vert =
   71|  3.96M|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  3.96M|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 3.96M]
  |  Branch (72:45): [True: 0, False: 3.96M]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  3.96M|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 3.96M, False: 1.51k]
  ------------------
   76|  3.96M|      this->MarkVertexVisited(next_vert);
   77|  3.96M|      this->traversal_observer().OnNewVertexVisited(
   78|  3.96M|          next_vert, this->corner_table()->Next(corner_id));
   79|  3.96M|    }
   80|  3.96M|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 3.92M, False: 36.9k]
  ------------------
   81|  3.92M|      this->MarkVertexVisited(prev_vert);
   82|  3.92M|      this->traversal_observer().OnNewVertexVisited(
   83|  3.92M|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  3.92M|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|  7.98M|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 4.02M, False: 3.96M]
  ------------------
   88|       |      // Currently processed corner.
   89|  4.02M|      corner_id = corner_traversal_stack_.back();
   90|  4.02M|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  4.02M|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 4.02M]
  |  Branch (92:47): [True: 4.79k, False: 4.01M]
  ------------------
   93|       |        // This face has been already traversed.
   94|  4.79k|        corner_traversal_stack_.pop_back();
   95|  4.79k|        continue;
   96|  4.79k|      }
   97|  5.39M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 5.39M, Folded]
  ------------------
   98|  5.39M|        this->MarkFaceVisited(face_id);
   99|  5.39M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  5.39M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  5.39M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 5.39M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  5.39M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 4.66M, False: 727k]
  ------------------
  105|  4.66M|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|  4.66M|          this->MarkVertexVisited(vert_id);
  107|  4.66M|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|  4.66M|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 678k, False: 3.98M]
  ------------------
  109|   678k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   678k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   678k|            continue;
  112|   678k|          }
  113|  4.66M|        }
  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|  4.71M|        const CornerIndex right_corner_id =
  118|  4.71M|            this->corner_table()->GetRightCorner(corner_id);
  119|  4.71M|        const CornerIndex left_corner_id =
  120|  4.71M|            this->corner_table()->GetLeftCorner(corner_id);
  121|  4.71M|        const FaceIndex right_face_id(
  122|  4.71M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 3.96M, False: 753k]
  ------------------
  123|  4.71M|                 ? kInvalidFaceIndex
  124|  4.71M|                 : FaceIndex(right_corner_id.value() / 3)));
  125|  4.71M|        const FaceIndex left_face_id(
  126|  4.71M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 3.98M, False: 727k]
  ------------------
  127|  4.71M|                 ? kInvalidFaceIndex
  128|  4.71M|                 : FaceIndex(left_corner_id.value() / 3)));
  129|  4.71M|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 4.63M, False: 78.5k]
  ------------------
  130|       |          // Right face has been already visited.
  131|  4.63M|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 3.98M, False: 646k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  3.98M|            corner_traversal_stack_.pop_back();
  134|  3.98M|            break;  // Break from the while (true) loop.
  135|  3.98M|          } else {
  136|       |            // Go to the left face.
  137|   646k|            corner_id = left_corner_id;
  138|   646k|            face_id = left_face_id;
  139|   646k|          }
  140|  4.63M|        } else {
  141|       |          // Right face was not visited.
  142|  78.5k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 47.1k, False: 31.3k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  47.1k|            corner_id = right_corner_id;
  145|  47.1k|            face_id = right_face_id;
  146|  47.1k|          } 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|  31.3k|            corner_traversal_stack_.back() = left_corner_id;
  154|       |            // Add a new corner to the top of the stack (right face needs to
  155|       |            // be traversed first).
  156|  31.3k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  31.3k|            break;
  159|  31.3k|          }
  160|  78.5k|        }
  161|  4.71M|      }
  162|  4.01M|    }
  163|  3.96M|    return true;
  164|  3.96M|  }
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  2.38k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  4.96k|  DepthFirstTraverser() {}

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

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

_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|    692|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  3.17k|  bool UpdatePointToAttributeIndexMapping(PointAttribute* attribute) override {
   49|  3.17k|    const auto* corner_table = traverser_.corner_table();
   50|  3.17k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  3.17k|    const size_t num_faces = mesh_->num_faces();
   52|  3.17k|    const size_t num_points = mesh_->num_points();
   53|  5.67M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 5.66M, False: 3.17k]
  ------------------
   54|  5.66M|      const auto& face = mesh_->face(f);
   55|  22.6M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 17.0M, False: 5.66M]
  ------------------
   56|  17.0M|        const PointIndex point_id = face[p];
   57|  17.0M|        const VertexIndex vert_id =
   58|  17.0M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  17.0M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 17.0M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  17.0M|        const AttributeValueIndex att_entry_id(
   63|  17.0M|            encoding_data_
   64|  17.0M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  17.0M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 17.0M]
  |  Branch (65:13): [True: 0, False: 17.0M]
  |  Branch (65:39): [True: 0, False: 17.0M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|  17.0M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  17.0M|      }
   71|  5.66M|    }
   72|  3.17k|    return true;
   73|  3.17k|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|    648|  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|    648|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|    648|    traverser_.OnTraversalStart();
   82|    648|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 648]
  ------------------
   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|    648|    } else {
   89|    648|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  3.37M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 3.37M, False: 648]
  ------------------
   91|  3.37M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 3.37M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  3.37M|      }
   95|    648|    }
   96|    648|    traverser_.OnTraversalEnd();
   97|    648|    return true;
   98|    648|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  3.37M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  3.37M|    return traverser_.TraverseFromCorner(corner_id);
  103|  3.37M|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|    692|  void SetTraverser(const TraverserT& t) { traverser_ = t; }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|  2.25k|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  6.72k|  bool UpdatePointToAttributeIndexMapping(PointAttribute* attribute) override {
   49|  6.72k|    const auto* corner_table = traverser_.corner_table();
   50|  6.72k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  6.72k|    const size_t num_faces = mesh_->num_faces();
   52|  6.72k|    const size_t num_points = mesh_->num_points();
   53|  4.12M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 4.12M, False: 6.72k]
  ------------------
   54|  4.12M|      const auto& face = mesh_->face(f);
   55|  16.4M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 12.3M, False: 4.12M]
  ------------------
   56|  12.3M|        const PointIndex point_id = face[p];
   57|  12.3M|        const VertexIndex vert_id =
   58|  12.3M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  12.3M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 12.3M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  12.3M|        const AttributeValueIndex att_entry_id(
   63|  12.3M|            encoding_data_
   64|  12.3M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  12.3M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 12.3M]
  |  Branch (65:13): [True: 0, False: 12.3M]
  |  Branch (65:39): [True: 0, False: 12.3M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|  12.3M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  12.3M|      }
   71|  4.12M|    }
   72|  6.72k|    return true;
   73|  6.72k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|  2.11k|  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|  2.11k|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|  2.11k|    traverser_.OnTraversalStart();
   82|  2.11k|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 2.11k]
  ------------------
   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|  2.11k|    } else {
   89|  2.11k|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  2.21M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 2.21M, False: 2.11k]
  ------------------
   91|  2.21M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 2.21M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  2.21M|      }
   95|  2.11k|    }
   96|  2.11k|    traverser_.OnTraversalEnd();
   97|  2.11k|    return true;
   98|  2.11k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  2.21M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  2.21M|    return traverser_.TraverseFromCorner(corner_id);
  103|  2.21M|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|  2.25k|  void SetTraverser(const TraverserT& t) { traverser_ = t; }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|  2.48k|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  6.88k|  bool UpdatePointToAttributeIndexMapping(PointAttribute* attribute) override {
   49|  6.88k|    const auto* corner_table = traverser_.corner_table();
   50|  6.88k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  6.88k|    const size_t num_faces = mesh_->num_faces();
   52|  6.88k|    const size_t num_points = mesh_->num_points();
   53|  8.76M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 8.75M, False: 6.88k]
  ------------------
   54|  8.75M|      const auto& face = mesh_->face(f);
   55|  35.0M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 26.2M, False: 8.75M]
  ------------------
   56|  26.2M|        const PointIndex point_id = face[p];
   57|  26.2M|        const VertexIndex vert_id =
   58|  26.2M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  26.2M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 26.2M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  26.2M|        const AttributeValueIndex att_entry_id(
   63|  26.2M|            encoding_data_
   64|  26.2M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  26.2M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 26.2M]
  |  Branch (65:13): [True: 3, False: 26.2M]
  |  Branch (65:39): [True: 3, False: 26.2M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      3|          return false;
   68|      3|        }
   69|  26.2M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  26.2M|      }
   71|  8.75M|    }
   72|  6.88k|    return true;
   73|  6.88k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|  2.38k|  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|  2.38k|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|  2.38k|    traverser_.OnTraversalStart();
   82|  2.38k|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 2.38k]
  ------------------
   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|  2.38k|    } else {
   89|  2.38k|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  5.39M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 5.39M, False: 2.38k]
  ------------------
   91|  5.39M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 5.39M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  5.39M|      }
   95|  2.38k|    }
   96|  2.38k|    traverser_.OnTraversalEnd();
   97|  2.38k|    return true;
   98|  2.38k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  5.39M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  5.39M|    return traverser_.TraverseFromCorner(corner_id);
  103|  5.39M|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|  2.48k|  void SetTraverser(const TraverserT& t) { traverser_ = t; }

_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  4.96k|  virtual ~TraverserBase() = default;
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  38.9M|  inline const CornerTable* corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  20.8M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  20.8M|    return is_vertex_visited_[vert_id.value()];
   65|  20.8M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  2.87M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  2.87M|    is_vertex_visited_[vert_id.value()] = true;
   68|  2.87M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  8.46M|  inline TraversalObserverT& traversal_observer() {
   75|  8.46M|    return traversal_observer_;
   76|  8.46M|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  15.6M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  15.6M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 133k, False: 15.4M]
  ------------------
   47|   133k|      return true;  // Invalid faces are always considered as visited.
   48|   133k|    }
   49|  15.4M|    return is_face_visited_[face_id.value()];
   50|  15.6M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  5.59M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  5.59M|    is_face_visited_[face_id.value()] = true;
   62|  5.59M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  5.89k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  5.89k|  virtual ~TraverserBase() = default;
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  2.94k|                    TraversalObserver traversal_observer) {
   37|  2.94k|    corner_table_ = corner_table;
   38|  2.94k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  2.94k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  2.94k|    traversal_observer_ = traversal_observer;
   41|  2.94k|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  2.21M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  2.21M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 2.21M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  2.21M|    return is_face_visited_[corner_id.value() / 3];
   58|  2.21M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  43.9M|  inline const CornerTable* corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  5.39M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  5.39M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 5.39M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  5.39M|    return is_face_visited_[corner_id.value() / 3];
   58|  5.39M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  13.3M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  13.3M|    return is_vertex_visited_[vert_id.value()];
   65|  13.3M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  12.5M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  12.5M|    is_vertex_visited_[vert_id.value()] = true;
   68|  12.5M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  17.9M|  inline TraversalObserverT& traversal_observer() {
   75|  17.9M|    return traversal_observer_;
   76|  17.9M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  13.4M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  13.4M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 7.94M, False: 5.50M]
  ------------------
   47|  7.94M|      return true;  // Invalid faces are always considered as visited.
   48|  7.94M|    }
   49|  5.50M|    return is_face_visited_[face_id.value()];
   50|  13.4M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  5.39M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  5.39M|    is_face_visited_[face_id.value()] = true;
   62|  5.39M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  4.96k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  2.48k|                    TraversalObserver traversal_observer) {
   37|  2.48k|    corner_table_ = corner_table;
   38|  2.48k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  2.48k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  2.48k|    traversal_observer_ = traversal_observer;
   41|  2.48k|  }

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

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

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

_ZN5draco18MostSignificantBitEj:
   58|  1.30k|inline int MostSignificantBit(uint32_t n) {
   59|  1.30k|#if defined(__GNUC__)
   60|  1.30k|  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|  1.30k|}
_ZN5draco24ConvertSymbolToSignedIntIjEENSt3__111make_signedIT_E4typeES3_:
  127|  1.54G|    IntTypeT val) {
  128|  1.54G|  static_assert(std::is_integral<IntTypeT>::value, "IntTypeT is not integral.");
  129|  1.54G|  typedef typename std::make_signed<IntTypeT>::type SignedType;
  130|  1.54G|  const bool is_positive = !static_cast<bool>(val & 1);
  131|  1.54G|  val >>= 1;
  132|  1.54G|  if (is_positive) {
  ------------------
  |  Branch (132:7): [True: 1.53G, False: 13.3M]
  ------------------
  133|  1.53G|    return static_cast<SignedType>(val);
  134|  1.53G|  }
  135|  13.3M|  SignedType ret = static_cast<SignedType>(val);
  136|  13.3M|  ret = -ret - 1;
  137|  13.3M|  return ret;
  138|  1.54G|}

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

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

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

_ZN5draco13DecoderBuffer28DecodeLeastSignificantBits32EjPj:
   57|  62.3M|  bool DecodeLeastSignificantBits32(uint32_t nbits, uint32_t* out_value) {
   58|  62.3M|    if (!bit_decoder_active()) {
  ------------------
  |  Branch (58:9): [True: 0, False: 62.3M]
  ------------------
   59|      0|      return false;
   60|      0|    }
   61|  62.3M|    return bit_decoder_.GetBits(nbits, out_value);
   62|  62.3M|  }
_ZN5draco13DecoderBuffer6DecodeEPvm:
   76|  1.50G|  bool Decode(void* out_data, size_t size_to_decode) {
   77|  1.50G|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (77:9): [True: 613, False: 1.50G]
  ------------------
   78|    613|      return false;  // Buffer overflow.
   79|    613|    }
   80|  1.50G|    memcpy(out_data, (data_ + pos_), size_to_decode);
   81|  1.50G|    pos_ += size_to_decode;
   82|  1.50G|    return true;
   83|  1.50G|  }
_ZN5draco13DecoderBuffer7AdvanceEl:
  105|  36.8k|  void Advance(int64_t bytes) { pos_ += bytes; }
_ZN5draco13DecoderBuffer21set_bitstream_versionEt:
  111|  14.2k|  void set_bitstream_version(uint16_t version) { bitstream_version_ = version; }
_ZNK5draco13DecoderBuffer9data_headEv:
  114|  57.1k|  const char* data_head() const { return data_ + pos_; }
_ZNK5draco13DecoderBuffer14remaining_sizeEv:
  115|   296k|  int64_t remaining_size() const { return data_size_ - pos_; }
_ZNK5draco13DecoderBuffer12decoded_sizeEv:
  116|  9.30k|  int64_t decoded_size() const { return pos_; }
_ZNK5draco13DecoderBuffer18bit_decoder_activeEv:
  117|  62.4M|  bool bit_decoder_active() const { return bit_mode_; }
_ZNK5draco13DecoderBuffer17bitstream_versionEv:
  120|  7.46M|  uint16_t bitstream_version() const { return bitstream_version_; }
_ZN5draco13DecoderBuffer10BitDecoder5resetEPKvm:
  130|  11.6k|    void reset(const void* b, size_t s) {
  131|  11.6k|      bit_offset_ = 0;
  132|  11.6k|      bit_buffer_ = static_cast<const uint8_t*>(b);
  133|  11.6k|      bit_buffer_end_ = bit_buffer_ + s;
  134|  11.6k|    }
_ZNK5draco13DecoderBuffer10BitDecoder11BitsDecodedEv:
  137|  9.82k|    uint64_t BitsDecoded() const { return static_cast<uint64_t>(bit_offset_); }
_ZN5draco13DecoderBuffer10BitDecoder7GetBitsEjPj:
  158|  62.3M|    bool GetBits(uint32_t nbits, uint32_t* x) {
  159|  62.3M|      if (nbits > 32) {
  ------------------
  |  Branch (159:11): [True: 13, False: 62.3M]
  ------------------
  160|     13|        return false;
  161|     13|      }
  162|  62.3M|      uint32_t value = 0;
  163|   143M|      for (uint32_t bit = 0; bit < nbits; ++bit) {
  ------------------
  |  Branch (163:30): [True: 80.7M, False: 62.3M]
  ------------------
  164|  80.7M|        value |= GetBit() << bit;
  165|  80.7M|      }
  166|  62.3M|      *x = value;
  167|  62.3M|      return true;
  168|  62.3M|    }
_ZN5draco13DecoderBuffer10BitDecoder6GetBitEv:
  173|  80.7M|    int GetBit() {
  174|  80.7M|      const size_t off = bit_offset_;
  175|  80.7M|      const size_t byte_offset = off >> 3;
  176|  80.7M|      const int bit_shift = static_cast<int>(off & 0x7);
  177|  80.7M|      if (bit_buffer_ + byte_offset < bit_buffer_end_) {
  ------------------
  |  Branch (177:11): [True: 70.0M, False: 10.6M]
  ------------------
  178|  70.0M|        const int bit = (bit_buffer_[byte_offset] >> bit_shift) & 1;
  179|  70.0M|        bit_offset_ = off + 1;
  180|  70.0M|        return bit;
  181|  70.0M|      }
  182|  10.6M|      return 0;
  183|  80.7M|    }
_ZN5draco13DecoderBuffer6DecodeIhEEbPT_:
   68|  17.0M|  bool Decode(T* out_val) {
   69|  17.0M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 4.36k, False: 17.0M]
  ------------------
   70|  4.36k|      return false;
   71|  4.36k|    }
   72|  17.0M|    pos_ += sizeof(T);
   73|  17.0M|    return true;
   74|  17.0M|  }
_ZN5draco13DecoderBuffer4PeekIhEEbPT_:
   87|  17.0M|  bool Peek(T* out_val) {
   88|  17.0M|    const size_t size_to_decode = sizeof(T);
   89|  17.0M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 4.36k, False: 17.0M]
  ------------------
   90|  4.36k|      return false;  // Buffer overflow.
   91|  4.36k|    }
   92|  17.0M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  17.0M|    return true;
   94|  17.0M|  }
_ZN5draco13DecoderBuffer6DecodeIiEEbPT_:
   68|  16.2k|  bool Decode(T* out_val) {
   69|  16.2k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 164, False: 16.1k]
  ------------------
   70|    164|      return false;
   71|    164|    }
   72|  16.1k|    pos_ += sizeof(T);
   73|  16.1k|    return true;
   74|  16.2k|  }
_ZN5draco13DecoderBuffer4PeekIiEEbPT_:
   87|  16.2k|  bool Peek(T* out_val) {
   88|  16.2k|    const size_t size_to_decode = sizeof(T);
   89|  16.2k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 164, False: 16.1k]
  ------------------
   90|    164|      return false;  // Buffer overflow.
   91|    164|    }
   92|  16.1k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  16.1k|    return true;
   94|  16.2k|  }
_ZN5draco13DecoderBuffer6DecodeIjEEbPT_:
   68|   701k|  bool Decode(T* out_val) {
   69|   701k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 198, False: 701k]
  ------------------
   70|    198|      return false;
   71|    198|    }
   72|   701k|    pos_ += sizeof(T);
   73|   701k|    return true;
   74|   701k|  }
_ZN5draco13DecoderBuffer4PeekIjEEbPT_:
   87|   701k|  bool Peek(T* out_val) {
   88|   701k|    const size_t size_to_decode = sizeof(T);
   89|   701k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 198, False: 701k]
  ------------------
   90|    198|      return false;  // Buffer overflow.
   91|    198|    }
   92|   701k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|   701k|    return true;
   94|   701k|  }
_ZN5draco13DecoderBuffer6DecodeIaEEbPT_:
   68|  28.8k|  bool Decode(T* out_val) {
   69|  28.8k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 402, False: 28.4k]
  ------------------
   70|    402|      return false;
   71|    402|    }
   72|  28.4k|    pos_ += sizeof(T);
   73|  28.4k|    return true;
   74|  28.8k|  }
_ZN5draco13DecoderBuffer4PeekIaEEbPT_:
   87|  28.8k|  bool Peek(T* out_val) {
   88|  28.8k|    const size_t size_to_decode = sizeof(T);
   89|  28.8k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 402, False: 28.4k]
  ------------------
   90|    402|      return false;  // Buffer overflow.
   91|    402|    }
   92|  28.4k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  28.4k|    return true;
   94|  28.8k|  }
_ZN5draco13DecoderBuffer6DecodeINS_13HoleEventDataEEEbPT_:
   68|  1.87M|  bool Decode(T* out_val) {
   69|  1.87M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 164, False: 1.87M]
  ------------------
   70|    164|      return false;
   71|    164|    }
   72|  1.87M|    pos_ += sizeof(T);
   73|  1.87M|    return true;
   74|  1.87M|  }
_ZN5draco13DecoderBuffer4PeekINS_13HoleEventDataEEEbPT_:
   87|  1.87M|  bool Peek(T* out_val) {
   88|  1.87M|    const size_t size_to_decode = sizeof(T);
   89|  1.87M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 164, False: 1.87M]
  ------------------
   90|    164|      return false;  // Buffer overflow.
   91|    164|    }
   92|  1.87M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.87M|    return true;
   94|  1.87M|  }
_ZN5draco13DecoderBuffer6DecodeItEEbPT_:
   68|  30.7k|  bool Decode(T* out_val) {
   69|  30.7k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 17, False: 30.7k]
  ------------------
   70|     17|      return false;
   71|     17|    }
   72|  30.7k|    pos_ += sizeof(T);
   73|  30.7k|    return true;
   74|  30.7k|  }
_ZN5draco13DecoderBuffer4PeekItEEbPT_:
   87|  30.7k|  bool Peek(T* out_val) {
   88|  30.7k|    const size_t size_to_decode = sizeof(T);
   89|  30.7k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 17, False: 30.7k]
  ------------------
   90|     17|      return false;  // Buffer overflow.
   91|     17|    }
   92|  30.7k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  30.7k|    return true;
   94|  30.7k|  }
_ZN5draco13DecoderBuffer6DecodeImEEbPT_:
   68|  2.82k|  bool Decode(T* out_val) {
   69|  2.82k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 29, False: 2.79k]
  ------------------
   70|     29|      return false;
   71|     29|    }
   72|  2.79k|    pos_ += sizeof(T);
   73|  2.79k|    return true;
   74|  2.82k|  }
_ZN5draco13DecoderBuffer4PeekImEEbPT_:
   87|  2.82k|  bool Peek(T* out_val) {
   88|  2.82k|    const size_t size_to_decode = sizeof(T);
   89|  2.82k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 29, False: 2.79k]
  ------------------
   90|     29|      return false;  // Buffer overflow.
   91|     29|    }
   92|  2.79k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  2.79k|    return true;
   94|  2.82k|  }
_ZN5draco13DecoderBuffer6DecodeIfEEbPT_:
   68|    231|  bool Decode(T* out_val) {
   69|    231|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 52, False: 179]
  ------------------
   70|     52|      return false;
   71|     52|    }
   72|    179|    pos_ += sizeof(T);
   73|    179|    return true;
   74|    231|  }
_ZN5draco13DecoderBuffer4PeekIfEEbPT_:
   87|    231|  bool Peek(T* out_val) {
   88|    231|    const size_t size_to_decode = sizeof(T);
   89|    231|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 52, False: 179]
  ------------------
   90|     52|      return false;  // Buffer overflow.
   91|     52|    }
   92|    179|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|    179|    return true;
   94|    231|  }

_ZNK5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EE5valueEv:
   73|   120M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EE5valueEv:
   73|   130M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEgeERKj:
   98|  14.8M|  constexpr bool operator>=(const ValueTypeT& val) const {
   99|  14.8M|    return value_ >= val;
  100|  14.8M|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EE5valueEv:
   73|   390M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EE5valueEv:
   73|  4.99G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKj:
   90|  33.4M|  constexpr bool operator<(const ValueTypeT& val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEaSERKS2_:
  151|   121M|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|   121M|    value_ = i.value_;
  153|   121M|    return *this;
  154|   121M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKS2_:
  151|   453M|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|   453M|    value_ = i.value_;
  153|   453M|    return *this;
  154|   453M|  }
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEppEv:
  102|  33.3M|  inline ThisIndexType& operator++() {
  103|  33.3M|    ++value_;
  104|  33.3M|    return *this;
  105|  33.3M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEeqERKS2_:
   75|  3.64G|  constexpr bool operator==(const IndexType& i) const {
   76|  3.64G|    return value_ == i.value_;
   77|  3.64G|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EE5valueEv:
   73|  1.47G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKS2_:
   87|  11.9k|  constexpr bool operator<(const IndexType& i) const {
   88|  11.9k|    return value_ < i.value_;
   89|  11.9k|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEeqERKS2_:
   75|   211M|  constexpr bool operator==(const IndexType& i) const {
   76|   211M|    return value_ == i.value_;
   77|   211M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEmiERKj:
  131|   239M|  constexpr ThisIndexType operator-(const ValueTypeT& val) const {
  132|   239M|    return ThisIndexType(value_ - val);
  133|   239M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEplERKj:
  125|  1.21G|  constexpr ThisIndexType operator+(const ValueTypeT& val) const {
  126|  1.21G|    return ThisIndexType(value_ + val);
  127|  1.21G|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEeqERKS2_:
   75|  29.0M|  constexpr bool operator==(const IndexType& i) const {
   76|  29.0M|    return value_ == i.value_;
   77|  29.0M|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEneERKS2_:
   81|   405M|  constexpr bool operator!=(const IndexType& i) const {
   82|   405M|    return value_ != i.value_;
   83|   405M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEneERKS2_:
   81|   526M|  constexpr bool operator!=(const IndexType& i) const {
   82|   526M|    return value_ != i.value_;
   83|   526M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEppEv:
  102|   831M|  inline ThisIndexType& operator++() {
  103|   831M|    ++value_;
  104|   831M|    return *this;
  105|   831M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEaSERKS2_:
  151|   714M|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|   714M|    value_ = i.value_;
  153|   714M|    return *this;
  154|   714M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEaSERKS2_:
  151|  1.69G|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|  1.69G|    value_ = i.value_;
  153|  1.69G|    return *this;
  154|  1.69G|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEgeERKj:
   98|  55.6M|  constexpr bool operator>=(const ValueTypeT& val) const {
   99|  55.6M|    return value_ >= val;
  100|  55.6M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEltERKj:
   90|  11.9M|  constexpr bool operator<(const ValueTypeT& val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ej:
   71|  1.76G|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2ERKS2_:
   70|  38.9G|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2Ej:
   71|   302M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2ERKS2_:
   70|  31.2G|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ev:
   69|   366M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEplERKj:
  125|  37.3M|  constexpr ThisIndexType operator+(const ValueTypeT& val) const {
  126|  37.3M|    return ThisIndexType(value_ + val);
  127|  37.3M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2Ej:
   71|   262M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKS2_:
   87|  33.4M|  constexpr bool operator<(const IndexType& i) const {
   88|  33.4M|    return value_ < i.value_;
   89|  33.4M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2ERKS2_:
   70|   296M|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ev:
   69|   453M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2ERKS2_:
   70|  92.4M|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2Ej:
   71|  94.0M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2ERKS2_:
   70|   348M|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEaSERKS2_:
  151|  6.90M|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|  6.90M|    value_ = i.value_;
  153|  6.90M|    return *this;
  154|  6.90M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEpLERKj:
  139|  11.9M|  inline ThisIndexType operator+=(const ValueTypeT& val) {
  140|  11.9M|    value_ += val;
  141|  11.9M|    return *this;
  142|  11.9M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKj:
  155|  44.5M|  inline ThisIndexType& operator=(const ValueTypeT& val) {
  156|  44.5M|    value_ = val;
  157|  44.5M|    return *this;
  158|  44.5M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ej:
   71|   408M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKj:
   90|  8.22M|  constexpr bool operator<(const ValueTypeT& val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEppEv:
  102|  8.21M|  inline ThisIndexType& operator++() {
  103|  8.21M|    ++value_;
  104|  8.21M|    return *this;
  105|  8.21M|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEltERKj:
   90|  27.9M|  constexpr bool operator<(const ValueTypeT& val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEppEv:
  102|  27.9M|  inline ThisIndexType& operator++() {
  103|  27.9M|    ++value_;
  104|  27.9M|    return *this;
  105|  27.9M|  }

_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   73|  46.8M|  inline const_reference operator[](const IndexTypeT& index) const {
   74|  46.8M|    return vector_[index.value()];
   75|  46.8M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE4sizeEv:
   59|  27.9M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE5clearEv:
   48|  12.3k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE6resizeEmRKS5_:
   51|  22.3k|  void resize(size_t size, const ValueTypeT& val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   70|  83.6M|  inline reference operator[](const IndexTypeT& index) {
   71|  83.6M|    return vector_[index.value()];
   72|  83.6M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE9push_backERKS8_:
   62|  11.3k|  void push_back(const ValueTypeT& val) { vector_.push_back(val); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE4sizeEv:
   59|  29.6M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE6resizeEmRKS8_:
   51|  5.94k|  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|  14.8M|  inline reference operator[](const IndexTypeT& index) {
   71|  14.8M|    return vector_[index.value()];
   72|  14.8M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEixERKS3_:
   73|  33.9M|  inline const_reference operator[](const IndexTypeT& index) const {
   74|  33.9M|    return vector_[index.value()];
   75|  33.9M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE4sizeEv:
   59|   324M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE4sizeEv:
   59|  17.4M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   73|   480M|  inline const_reference operator[](const IndexTypeT& index) const {
   74|   480M|    return vector_[index.value()];
   75|   480M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   73|  1.30G|  inline const_reference operator[](const IndexTypeT& index) const {
   74|  1.30G|    return vector_[index.value()];
   75|  1.30G|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   70|   669M|  inline reference operator[](const IndexTypeT& index) {
   71|   669M|    return vector_[index.value()];
   72|   669M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   73|   100M|  inline const_reference operator[](const IndexTypeT& index) const {
   74|   100M|    return vector_[index.value()];
   75|   100M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   70|   564M|  inline reference operator[](const IndexTypeT& index) {
   71|   564M|    return vector_[index.value()];
   72|   564M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE9push_backERKS5_:
   62|   173M|  void push_back(const ValueTypeT& val) { vector_.push_back(val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   70|   373M|  inline reference operator[](const IndexTypeT& index) {
   71|   373M|    return vector_[index.value()];
   72|   373M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE6resizeEmRKi:
   51|  3.31k|  void resize(size_t size, const ValueTypeT& val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEixERKS3_:
   70|   311M|  inline reference operator[](const IndexTypeT& index) {
   71|   311M|    return vector_[index.value()];
   72|   311M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEC2Ev:
   39|  72.7k|  IndexTypeVector() {}
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4sizeEv:
   59|  3.37M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaEC2Ev:
   39|  68.2k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEC2Ev:
   39|  9.92k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EC2Ev:
   39|  9.92k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEC2Ev:
   39|  9.92k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_EC2Ev:
   39|  9.92k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE5clearEv:
   48|  19.8k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4swapERS4_:
   55|  19.8k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT>& arg) {
   56|  19.8k|    vector_.swap(arg.vector_);
   57|  19.8k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE5clearEv:
   48|  19.8k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE4swapERS4_:
   55|  19.8k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT>& arg) {
   56|  19.8k|    vector_.swap(arg.vector_);
   57|  19.8k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE6assignEmRKS5_:
   52|  9.92k|  void assign(size_t size, const ValueTypeT& val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_E6assignEmRKS3_:
   52|  9.92k|  void assign(size_t size, const ValueTypeT& val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE7reserveEm:
   49|  9.92k|  void reserve(size_t size) { vector_.reserve(size); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEC2Ev:
   39|  14.2k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEC2Ev:
   39|  34.9k|  IndexTypeVector() {}

_ZN5draco14DataTypeLengthENS_8DataTypeE:
   19|  69.1k|int32_t DataTypeLength(DataType dt) {
   20|  69.1k|  switch (dt) {
   21|  20.5k|    case DT_INT8:
  ------------------
  |  Branch (21:5): [True: 20.5k, False: 48.5k]
  ------------------
   22|  23.8k|    case DT_UINT8:
  ------------------
  |  Branch (22:5): [True: 3.34k, False: 65.7k]
  ------------------
   23|  23.8k|      return 1;
   24|  3.12k|    case DT_INT16:
  ------------------
  |  Branch (24:5): [True: 3.12k, False: 65.9k]
  ------------------
   25|  3.60k|    case DT_UINT16:
  ------------------
  |  Branch (25:5): [True: 483, False: 68.6k]
  ------------------
   26|  3.60k|      return 2;
   27|  33.5k|    case DT_INT32:
  ------------------
  |  Branch (27:5): [True: 33.5k, False: 35.6k]
  ------------------
   28|  34.6k|    case DT_UINT32:
  ------------------
  |  Branch (28:5): [True: 1.12k, False: 67.9k]
  ------------------
   29|  34.6k|      return 4;
   30|    607|    case DT_INT64:
  ------------------
  |  Branch (30:5): [True: 607, False: 68.4k]
  ------------------
   31|  1.13k|    case DT_UINT64:
  ------------------
  |  Branch (31:5): [True: 526, False: 68.5k]
  ------------------
   32|  1.13k|      return 8;
   33|  5.06k|    case DT_FLOAT32:
  ------------------
  |  Branch (33:5): [True: 5.06k, False: 64.0k]
  ------------------
   34|  5.06k|      return 4;
   35|    215|    case DT_FLOAT64:
  ------------------
  |  Branch (35:5): [True: 215, False: 68.8k]
  ------------------
   36|    215|      return 8;
   37|    605|    case DT_BOOL:
  ------------------
  |  Branch (37:5): [True: 605, False: 68.4k]
  ------------------
   38|    605|      return 1;
   39|      0|    default:
  ------------------
  |  Branch (39:5): [True: 0, False: 69.1k]
  ------------------
   40|      0|      return -1;
   41|  69.1k|  }
   42|  69.1k|}

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

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

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

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

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

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

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

_ZN5draco8StatusOrINSt3__110unique_ptrINS_11MeshDecoderENS1_14default_deleteIS3_EEEEEC2EOS6_:
   39|  14.2k|  StatusOr(T&& value) : status_(OkStatus()), value_(std::move(value)) {}
_ZN5draco8StatusOrINSt3__110unique_ptrINS_11MeshDecoderENS1_14default_deleteIS3_EEEEEC2ERKNS_6StatusE:
   37|      1|  StatusOr(const Status& status) : status_(status) {}
_ZN5draco8StatusOrINSt3__110unique_ptrINS_4MeshENS1_14default_deleteIS3_EEEEEC2ERKNS_6StatusE:
   37|  12.4k|  StatusOr(const Status& status) : status_(status) {}
_ZN5draco8StatusOrINSt3__110unique_ptrINS_4MeshENS1_14default_deleteIS3_EEEEEC2EOS6_:
   39|  1.82k|  StatusOr(T&& value) : status_(OkStatus()), value_(std::move(value)) {}
_ZNK5draco8StatusOrINSt3__110unique_ptrINS_11MeshDecoderENS1_14default_deleteIS3_EEEEE2okEv:
   53|  14.2k|  bool ok() const { return status_.ok(); }
_ZNK5draco8StatusOrINSt3__110unique_ptrINS_11MeshDecoderENS1_14default_deleteIS3_EEEEE6statusEv:
   43|      1|  const Status& status() const { return status_; }
_ZNO5draco8StatusOrINSt3__110unique_ptrINS_11MeshDecoderENS1_14default_deleteIS3_EEEEE5valueEv:
   46|  14.2k|  T&& value() && { return std::move(value_); }

_ZN5draco12DecodeVarintIjEEbPT_PNS_13DecoderBufferE:
   63|   866k|bool DecodeVarint(IntTypeT* out_val, DecoderBuffer* buffer) {
   64|   866k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 866k, Folded]
  ------------------
   65|   866k|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 1.75k, False: 865k]
  ------------------
   66|  1.75k|      return false;
   67|  1.75k|    }
   68|   866k|  } 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|   865k|  return true;
   77|   866k|}
mesh_edgebreaker_decoder_impl.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   551k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|   551k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   551k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 132, False: 551k]
  ------------------
   33|    132|    return false;
   34|    132|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   551k|  uint8_t in;
   39|   551k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 1.12k, False: 550k]
  ------------------
   40|  1.12k|    return false;
   41|  1.12k|  }
   42|   550k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 26.5k, False: 523k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  26.5k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 763, False: 25.8k]
  ------------------
   45|    763|      return false;
   46|    763|    }
   47|       |    // Append decoded info from this byte.
   48|  25.8k|    *out_val <<= 7;
   49|  25.8k|    *out_val |= in & ((1 << 7) - 1);
   50|   523k|  } else {
   51|       |    // Last byte reached
   52|   523k|    *out_val = in;
   53|   523k|  }
   54|   549k|  return true;
   55|   550k|}
mesh_sequential_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  9.87k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  9.87k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  9.87k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 0, False: 9.87k]
  ------------------
   33|      0|    return false;
   34|      0|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  9.87k|  uint8_t in;
   39|  9.87k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 12, False: 9.86k]
  ------------------
   40|     12|    return false;
   41|     12|  }
   42|  9.86k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.07k, False: 8.79k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.07k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 7, False: 1.06k]
  ------------------
   45|      7|      return false;
   46|      7|    }
   47|       |    // Append decoded info from this byte.
   48|  1.06k|    *out_val <<= 7;
   49|  1.06k|    *out_val |= in & ((1 << 7) - 1);
   50|  8.79k|  } else {
   51|       |    // Last byte reached
   52|  8.79k|    *out_val = in;
   53|  8.79k|  }
   54|  9.85k|  return true;
   55|  9.86k|}
_ZN5draco12DecodeVarintImEEbPT_PNS_13DecoderBufferE:
   63|  9.92k|bool DecodeVarint(IntTypeT* out_val, DecoderBuffer* buffer) {
   64|  9.92k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 9.92k, Folded]
  ------------------
   65|  9.92k|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 164, False: 9.76k]
  ------------------
   66|    164|      return false;
   67|    164|    }
   68|  9.92k|  } 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|  9.76k|  return true;
   77|  9.92k|}
decoder_buffer.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  5.66k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  5.66k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  5.66k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 0, False: 5.66k]
  ------------------
   33|      0|    return false;
   34|      0|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  5.66k|  uint8_t in;
   39|  5.66k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 25, False: 5.64k]
  ------------------
   40|     25|    return false;
   41|     25|  }
   42|  5.64k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 27, False: 5.61k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|     27|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 2, False: 25]
  ------------------
   45|      2|      return false;
   46|      2|    }
   47|       |    // Append decoded info from this byte.
   48|     25|    *out_val <<= 7;
   49|     25|    *out_val |= in & ((1 << 7) - 1);
   50|  5.61k|  } else {
   51|       |    // Last byte reached
   52|  5.61k|    *out_val = in;
   53|  5.61k|  }
   54|  5.64k|  return true;
   55|  5.64k|}
metadata_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   267k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|   267k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   267k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 17, False: 267k]
  ------------------
   33|     17|    return false;
   34|     17|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   267k|  uint8_t in;
   39|   267k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 127, False: 267k]
  ------------------
   40|    127|    return false;
   41|    127|  }
   42|   267k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.54k, False: 265k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.54k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 113, False: 1.42k]
  ------------------
   45|    113|      return false;
   46|    113|    }
   47|       |    // Append decoded info from this byte.
   48|  1.42k|    *out_val <<= 7;
   49|  1.42k|    *out_val |= in & ((1 << 7) - 1);
   50|   265k|  } else {
   51|       |    // Last byte reached
   52|   265k|    *out_val = in;
   53|   265k|  }
   54|   267k|  return true;
   55|   267k|}
sequential_integer_attribute_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  5.34k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  5.34k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  5.34k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 1, False: 5.34k]
  ------------------
   33|      1|    return false;
   34|      1|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  5.34k|  uint8_t in;
   39|  5.34k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 54, False: 5.28k]
  ------------------
   40|     54|    return false;
   41|     54|  }
   42|  5.28k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 808, False: 4.48k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    808|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 46, False: 762]
  ------------------
   45|     46|      return false;
   46|     46|    }
   47|       |    // Append decoded info from this byte.
   48|    762|    *out_val <<= 7;
   49|    762|    *out_val |= in & ((1 << 7) - 1);
   50|  4.48k|  } else {
   51|       |    // Last byte reached
   52|  4.48k|    *out_val = in;
   53|  4.48k|  }
   54|  5.24k|  return true;
   55|  5.28k|}
rans_bit_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  23.8k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  23.8k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  23.8k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 1, False: 23.8k]
  ------------------
   33|      1|    return false;
   34|      1|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  23.8k|  uint8_t in;
   39|  23.8k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 30, False: 23.8k]
  ------------------
   40|     30|    return false;
   41|     30|  }
   42|  23.8k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 220, False: 23.6k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    220|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 16, False: 204]
  ------------------
   45|     16|      return false;
   46|     16|    }
   47|       |    // Append decoded info from this byte.
   48|    204|    *out_val <<= 7;
   49|    204|    *out_val |= in & ((1 << 7) - 1);
   50|  23.6k|  } else {
   51|       |    // Last byte reached
   52|  23.6k|    *out_val = in;
   53|  23.6k|  }
   54|  23.8k|  return true;
   55|  23.8k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  10.2k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  10.2k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  10.2k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 118, False: 10.1k]
  ------------------
   33|    118|    return false;
   34|    118|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  10.1k|  uint8_t in;
   39|  10.1k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 113, False: 10.0k]
  ------------------
   40|    113|    return false;
   41|    113|  }
   42|  10.0k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 2.52k, False: 7.53k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  2.52k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 636, False: 1.89k]
  ------------------
   45|    636|      return false;
   46|    636|    }
   47|       |    // Append decoded info from this byte.
   48|  1.89k|    *out_val <<= 7;
   49|  1.89k|    *out_val |= in & ((1 << 7) - 1);
   50|  7.53k|  } else {
   51|       |    // Last byte reached
   52|  7.53k|    *out_val = in;
   53|  7.53k|  }
   54|  9.42k|  return true;
   55|  10.0k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  8.39k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  8.39k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  8.39k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 86, False: 8.31k]
  ------------------
   33|     86|    return false;
   34|     86|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  8.31k|  uint8_t in;
   39|  8.31k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 53, False: 8.25k]
  ------------------
   40|     53|    return false;
   41|     53|  }
   42|  8.25k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 4.11k, False: 4.14k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  4.11k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 969, False: 3.14k]
  ------------------
   45|    969|      return false;
   46|    969|    }
   47|       |    // Append decoded info from this byte.
   48|  3.14k|    *out_val <<= 7;
   49|  3.14k|    *out_val |= in & ((1 << 7) - 1);
   50|  4.14k|  } else {
   51|       |    // Last byte reached
   52|  4.14k|    *out_val = in;
   53|  4.14k|  }
   54|  7.29k|  return true;
   55|  8.25k|}
attributes_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  32.8k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  32.8k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  32.8k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 4, False: 32.8k]
  ------------------
   33|      4|    return false;
   34|      4|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  32.8k|  uint8_t in;
   39|  32.8k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 24, False: 32.8k]
  ------------------
   40|     24|    return false;
   41|     24|  }
   42|  32.8k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.43k, False: 31.4k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.43k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 25, False: 1.41k]
  ------------------
   45|     25|      return false;
   46|     25|    }
   47|       |    // Append decoded info from this byte.
   48|  1.41k|    *out_val <<= 7;
   49|  1.41k|    *out_val |= in & ((1 << 7) - 1);
   50|  31.4k|  } else {
   51|       |    // Last byte reached
   52|  31.4k|    *out_val = in;
   53|  31.4k|  }
   54|  32.8k|  return true;
   55|  32.8k|}

_ZN5draco7VectorDIfLi3EEC2Ev:
   42|  42.8k|  VectorD() {
   43|   171k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 128k, False: 42.8k]
  ------------------
   44|   128k|      (*this)[i] = Scalar(0);
   45|   128k|    }
   46|  42.8k|  }
_ZN5draco7VectorDIfLi3EEixEi:
  114|   207k|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIfLi3EEixEi:
  115|   164k|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIlLi3EEixEi:
  115|   140M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIlLi3EEmiERKS1_:
  139|  15.4M|  Self operator-(const Self& o) const {
  140|  15.4M|    Self ret;
  141|  61.8M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 46.4M, False: 15.4M]
  ------------------
  142|  46.4M|      ret[i] = (*this)[i] - o[i];
  143|  46.4M|    }
  144|  15.4M|    return ret;
  145|  15.4M|  }
_ZN5draco12CrossProductIlTnPNSt3__19enable_ifIXaasr3std11is_integralIT_EE5valuesr3std9is_signedIS3_EE5valueEvE4typeELPv0EEENS_7VectorDIS3_Li3EEERKS9_SB_:
  325|  7.69M|                                 const VectorD<ScalarT, 3>& v) {
  326|       |  // Preventing accidental use with uint32_t and the like.
  327|  7.69M|  static_assert(std::is_signed<ScalarT>::value,
  328|  7.69M|                "ScalarT must be a signed type. ");
  329|  7.69M|  VectorD<ScalarT, 3> r;
  330|  7.69M|  typedef typename std::make_unsigned<ScalarT>::type ScalarUT;
  331|  7.69M|  const ScalarUT u0 = static_cast<ScalarUT>(u[0]);
  332|  7.69M|  const ScalarUT u1 = static_cast<ScalarUT>(u[1]);
  333|  7.69M|  const ScalarUT u2 = static_cast<ScalarUT>(u[2]);
  334|  7.69M|  const ScalarUT v0 = static_cast<ScalarUT>(v[0]);
  335|  7.69M|  const ScalarUT v1 = static_cast<ScalarUT>(v[1]);
  336|  7.69M|  const ScalarUT v2 = static_cast<ScalarUT>(v[2]);
  337|  7.69M|  r[0] = static_cast<ScalarT>((u1 * v2) - (u2 * v1));
  338|  7.69M|  r[1] = static_cast<ScalarT>((u2 * v0) - (u0 * v2));
  339|  7.69M|  r[2] = static_cast<ScalarT>((u0 * v1) - (u1 * v0));
  340|  7.69M|  return r;
  341|  7.69M|}
_ZN5draco7VectorDIlLi3EE4dataEv:
  284|  7.69M|  Scalar* data() { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE4dataEv:
  285|  7.69M|  const Scalar* data() const { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE6AbsSumEv:
  239|  3.24M|  Scalar AbsSum() const {
  240|  3.24M|    Scalar result(0);
  241|  12.9M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (241:21): [True: 9.74M, False: 3.23M]
  ------------------
  242|  9.74M|      Scalar next_value = std::abs(v_[i]);
  243|  9.74M|      if (result > std::numeric_limits<Scalar>::max() - next_value) {
  ------------------
  |  Branch (243:11): [True: 14.3k, False: 9.72M]
  ------------------
  244|       |        // Return the max if adding would have caused an overflow.
  245|  14.3k|        return std::numeric_limits<Scalar>::max();
  246|  14.3k|      }
  247|  9.72M|      result += next_value;
  248|  9.72M|    }
  249|  3.23M|    return result;
  250|  3.24M|  }
_ZNK5draco7VectorDIlLi3EEdvERKl:
  184|   243k|  Self operator/(const Scalar& o) const {
  185|   243k|    Self ret;
  186|   974k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (186:21): [True: 730k, False: 243k]
  ------------------
  187|   730k|      ret[i] = (*this)[i] / o;
  188|   730k|    }
  189|   243k|    return ret;
  190|   243k|  }
_ZN5draco7VectorDIlLi3EEixEi:
  114|   235M|  Scalar& operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEixEi:
  114|  11.1M|  Scalar& operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EE4dataEv:
  284|  9.74M|  Scalar* data() { return &(v_[0]); }
_ZNK5draco7VectorDIiLi3EEngEv:
  122|  1.85M|  Self operator-() const {
  123|  1.85M|    Self ret;
  124|  7.43M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (124:21): [True: 5.57M, False: 1.85M]
  ------------------
  125|  5.57M|      ret[i] = -(*this)[i];
  126|  5.57M|    }
  127|  1.85M|    return ret;
  128|  1.85M|  }
_ZNK5draco7VectorDIiLi3EEixEi:
  115|  5.57M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEmiERKS1_:
  139|   870k|  Self operator-(const Self& o) const {
  140|   870k|    Self ret;
  141|  2.61M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 1.74M, False: 870k]
  ------------------
  142|  1.74M|      ret[i] = (*this)[i] - o[i];
  143|  1.74M|    }
  144|   870k|    return ret;
  145|   870k|  }
_ZN5draco7VectorDIjLi2EEixEi:
  114|  10.4M|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEixEi:
  115|  15.6M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIiLi2EEixEi:
  114|  37.7M|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEplERKS1_:
  131|  1.74M|  Self operator+(const Self& o) const {
  132|  1.74M|    Self ret;
  133|  5.22M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (133:21): [True: 3.48M, False: 1.74M]
  ------------------
  134|  3.48M|      ret[i] = (*this)[i] + o[i];
  135|  3.48M|    }
  136|  1.74M|    return ret;
  137|  1.74M|  }
_ZNK5draco7VectorDIiLi2EEixEi:
  115|  35.1M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIiLi2EEmiERKS1_:
  139|  1.14M|  Self operator-(const Self& o) const {
  140|  1.14M|    Self ret;
  141|  3.44M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 2.29M, False: 1.14M]
  ------------------
  142|  2.29M|      ret[i] = (*this)[i] - o[i];
  143|  2.29M|    }
  144|  1.14M|    return ret;
  145|  1.14M|  }
_ZNK5draco7VectorDIiLi2EEplERKS1_:
  131|  1.14M|  Self operator+(const Self& o) const {
  132|  1.14M|    Self ret;
  133|  3.44M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (133:21): [True: 2.29M, False: 1.14M]
  ------------------
  134|  2.29M|      ret[i] = (*this)[i] + o[i];
  135|  2.29M|    }
  136|  1.14M|    return ret;
  137|  1.14M|  }
_ZNK5draco7VectorDIfLi2EEeqERKS1_:
  208|   505k|  bool operator==(const Self& o) const {
  209|  1.50M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (209:21): [True: 1.00M, False: 497k]
  ------------------
  210|  1.00M|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (210:11): [True: 8.27k, False: 996k]
  ------------------
  211|  8.27k|        return false;
  212|  8.27k|      }
  213|  1.00M|    }
  214|   497k|    return true;
  215|   505k|  }
_ZNK5draco7VectorDIfLi2EEixEi:
  115|  5.89M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIfLi3EEmiERKS1_:
  139|  17.3k|  Self operator-(const Self& o) const {
  140|  17.3k|    Self ret;
  141|  69.2k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 51.9k, False: 17.3k]
  ------------------
  142|  51.9k|      ret[i] = (*this)[i] - o[i];
  143|  51.9k|    }
  144|  17.3k|    return ret;
  145|  17.3k|  }
_ZNK5draco7VectorDIfLi3EE11SquaredNormEv:
  236|  9.03k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIfLi3EE3DotERKS1_:
  252|  9.79k|  Scalar Dot(const Self& o) const {
  253|  9.79k|    Scalar ret(0);
  254|  39.1k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (254:21): [True: 29.3k, False: 9.79k]
  ------------------
  255|  29.3k|      ret += (*this)[i] * o[i];
  256|  29.3k|    }
  257|  9.79k|    return ret;
  258|  9.79k|  }
_ZNK5draco7VectorDIfLi3EEmlERKf:
  176|    758|  Self operator*(const Scalar& o) const {
  177|    758|    Self ret;
  178|  3.03k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (178:21): [True: 2.27k, False: 758]
  ------------------
  179|  2.27k|      ret[i] = (*this)[i] * o;
  180|  2.27k|    }
  181|    758|    return ret;
  182|    758|  }
_ZNK5draco7VectorDIfLi2EEmiERKS1_:
  139|  8.27k|  Self operator-(const Self& o) const {
  140|  8.27k|    Self ret;
  141|  24.8k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 16.5k, False: 8.27k]
  ------------------
  142|  16.5k|      ret[i] = (*this)[i] - o[i];
  143|  16.5k|    }
  144|  8.27k|    return ret;
  145|  8.27k|  }
_ZN5draco7VectorDIfLi2EEC2Ev:
   42|  16.5k|  VectorD() {
   43|  49.6k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 33.1k, False: 16.5k]
  ------------------
   44|  33.1k|      (*this)[i] = Scalar(0);
   45|  33.1k|    }
   46|  16.5k|  }
_ZN5draco7VectorDIfLi2EEC2ERKfS3_:
   54|  1.01M|  VectorD(const Scalar& c0, const Scalar& c1) : v_({{c0, c1}}) {
   55|  1.01M|    DRACO_DCHECK_EQ(dimension, 2);
   56|  1.01M|    v_[0] = c0;
   57|  1.01M|    v_[1] = c1;
   58|  1.01M|  }
_ZN5draco7VectorDIfLi2EEixEi:
  114|  66.0k|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIlLi2EEeqERKS1_:
  208|   616k|  bool operator==(const Self& o) const {
  209|  1.70M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (209:21): [True: 1.16M, False: 543k]
  ------------------
  210|  1.16M|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (210:11): [True: 73.0k, False: 1.08M]
  ------------------
  211|  73.0k|        return false;
  212|  73.0k|      }
  213|  1.16M|    }
  214|   543k|    return true;
  215|   616k|  }
_ZNK5draco7VectorDIlLi2EEixEi:
  115|  3.42M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIlLi3EEC2Ev:
   42|  45.5M|  VectorD() {
   43|   182M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 136M, False: 45.5M]
  ------------------
   44|   136M|      (*this)[i] = Scalar(0);
   45|   136M|    }
   46|  45.5M|  }
_ZNK5draco7VectorDIlLi3EE11SquaredNormEv:
  236|  73.7k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIlLi3EE3DotERKS1_:
  252|  74.5k|  Scalar Dot(const Self& o) const {
  253|  74.5k|    Scalar ret(0);
  254|   298k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (254:21): [True: 223k, False: 74.5k]
  ------------------
  255|   223k|      ret += (*this)[i] * o[i];
  256|   223k|    }
  257|  74.5k|    return ret;
  258|  74.5k|  }
_ZNK5draco7VectorDIlLi2EEmiERKS1_:
  139|    758|  Self operator-(const Self& o) const {
  140|    758|    Self ret;
  141|  2.27k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 1.51k, False: 758]
  ------------------
  142|  1.51k|      ret[i] = (*this)[i] - o[i];
  143|  1.51k|    }
  144|    758|    return ret;
  145|    758|  }
_ZN5draco7VectorDImLi2EEC2IlLi2EEERKNS0_IT_XT0_EEE:
  104|  2.64k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t>& src_vector) {
  105|  7.93k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (105:21): [True: 5.29k, False: 2.64k]
  ------------------
  106|  5.29k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (106:11): [True: 5.29k, False: 0]
  ------------------
  107|  5.29k|        v_[i] = Scalar(src_vector[i]);
  108|  5.29k|      } else {
  109|      0|        v_[i] = Scalar(0);
  110|      0|      }
  111|  5.29k|    }
  112|  2.64k|  }
_ZNK5draco7VectorDImLi2EEmlERKm:
  176|  1.41k|  Self operator*(const Scalar& o) const {
  177|  1.41k|    Self ret;
  178|  4.25k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (178:21): [True: 2.83k, False: 1.41k]
  ------------------
  179|  2.83k|      ret[i] = (*this)[i] * o;
  180|  2.83k|    }
  181|  1.41k|    return ret;
  182|  1.41k|  }
_ZN5draco7VectorDImLi2EEC2Ev:
   42|  2.74k|  VectorD() {
   43|  8.22k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 5.48k, False: 2.74k]
  ------------------
   44|  5.48k|      (*this)[i] = Scalar(0);
   45|  5.48k|    }
   46|  2.74k|  }
_ZNK5draco7VectorDImLi2EEixEi:
  115|  10.7k|  const Scalar& operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDImLi2EEixEi:
  114|  10.9k|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDImLi2EEplERKS1_:
  131|  1.21k|  Self operator+(const Self& o) const {
  132|  1.21k|    Self ret;
  133|  3.65k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (133:21): [True: 2.43k, False: 1.21k]
  ------------------
  134|  2.43k|      ret[i] = (*this)[i] + o[i];
  135|  2.43k|    }
  136|  1.21k|    return ret;
  137|  1.21k|  }
_ZN5draco7VectorDIlLi2EEC2ImLi2EEERKNS0_IT_XT0_EEE:
  104|  1.32k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t>& src_vector) {
  105|  3.96k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (105:21): [True: 2.64k, False: 1.32k]
  ------------------
  106|  2.64k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (106:11): [True: 2.64k, False: 0]
  ------------------
  107|  2.64k|        v_[i] = Scalar(src_vector[i]);
  108|  2.64k|      } else {
  109|      0|        v_[i] = Scalar(0);
  110|      0|      }
  111|  2.64k|    }
  112|  1.32k|  }
_ZNK5draco7VectorDIlLi3EEplERKS1_:
  131|    702|  Self operator+(const Self& o) const {
  132|    702|    Self ret;
  133|  2.80k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (133:21): [True: 2.10k, False: 702]
  ------------------
  134|  2.10k|      ret[i] = (*this)[i] + o[i];
  135|  2.10k|    }
  136|    702|    return ret;
  137|    702|  }
_ZN5dracomlIlLi3EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  294|    702|    const ScalarT& o, const VectorD<ScalarT, dimension_t>& v) {
  295|    702|  return v * o;
  296|    702|}
_ZNK5draco7VectorDIlLi3EEmlERKl:
  176|    702|  Self operator*(const Scalar& o) const {
  177|    702|    Self ret;
  178|  2.80k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (178:21): [True: 2.10k, False: 702]
  ------------------
  179|  2.10k|      ret[i] = (*this)[i] * o;
  180|  2.10k|    }
  181|    702|    return ret;
  182|    702|  }
_ZN5draco7VectorDIlLi2EEC2ERKlS3_:
   54|  1.23M|  VectorD(const Scalar& c0, const Scalar& c1) : v_({{c0, c1}}) {
   55|  1.23M|    DRACO_DCHECK_EQ(dimension, 2);
   56|  1.23M|    v_[0] = c0;
   57|  1.23M|    v_[1] = c1;
   58|  1.23M|  }
_ZNK5draco7VectorDIlLi2EEmlERKl:
  176|    702|  Self operator*(const Scalar& o) const {
  177|    702|    Self ret;
  178|  2.10k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (178:21): [True: 1.40k, False: 702]
  ------------------
  179|  1.40k|      ret[i] = (*this)[i] * o;
  180|  1.40k|    }
  181|    702|    return ret;
  182|    702|  }
_ZN5draco7VectorDIlLi2EEC2Ev:
   42|  2.77k|  VectorD() {
   43|  8.32k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 5.55k, False: 2.77k]
  ------------------
   44|  5.55k|      (*this)[i] = Scalar(0);
   45|  5.55k|    }
   46|  2.77k|  }
_ZNK5draco7VectorDIlLi2EEdvERKl:
  184|    614|  Self operator/(const Scalar& o) const {
  185|    614|    Self ret;
  186|  1.84k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (186:21): [True: 1.22k, False: 614]
  ------------------
  187|  1.22k|      ret[i] = (*this)[i] / o;
  188|  1.22k|    }
  189|    614|    return ret;
  190|    614|  }
_ZNK5draco7VectorDImLi2EEmiERKS1_:
  139|    104|  Self operator-(const Self& o) const {
  140|    104|    Self ret;
  141|    312|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 208, False: 104]
  ------------------
  142|    208|      ret[i] = (*this)[i] - o[i];
  143|    208|    }
  144|    104|    return ret;
  145|    104|  }
_ZN5draco7VectorDIlLi2EEixEi:
  114|  10.9k|  Scalar& operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEC2Ev:
   42|  1.86M|  VectorD() {
   43|  7.44M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 5.58M, False: 1.86M]
  ------------------
   44|  5.58M|      (*this)[i] = Scalar(0);
   45|  5.58M|    }
   46|  1.86M|  }
_ZN5draco7VectorDIiLi2EEC2ERKiS3_:
   54|  7.45M|  VectorD(const Scalar& c0, const Scalar& c1) : v_({{c0, c1}}) {
   55|  7.45M|    DRACO_DCHECK_EQ(dimension, 2);
   56|  7.45M|    v_[0] = c0;
   57|  7.45M|    v_[1] = c1;
   58|  7.45M|  }
_ZN5draco7VectorDIjLi2EEC2IiLi2EEERKNS0_IT_XT0_EEE:
  104|  5.22M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t>& src_vector) {
  105|  15.6M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (105:21): [True: 10.4M, False: 5.22M]
  ------------------
  106|  10.4M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (106:11): [True: 10.4M, False: 0]
  ------------------
  107|  10.4M|        v_[i] = Scalar(src_vector[i]);
  108|  10.4M|      } else {
  109|      0|        v_[i] = Scalar(0);
  110|      0|      }
  111|  10.4M|    }
  112|  5.22M|  }
_ZN5draco7VectorDIjLi2EEC2Ev:
   42|  2.61M|  VectorD() {
   43|  7.83M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 5.22M, False: 2.61M]
  ------------------
   44|  5.22M|      (*this)[i] = Scalar(0);
   45|  5.22M|    }
   46|  2.61M|  }
_ZN5draco7VectorDIiLi2EEC2IjLi2EEERKNS0_IT_XT0_EEE:
  104|  2.61M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t>& src_vector) {
  105|  7.83M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (105:21): [True: 5.22M, False: 2.61M]
  ------------------
  106|  5.22M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (106:11): [True: 5.22M, False: 0]
  ------------------
  107|  5.22M|        v_[i] = Scalar(src_vector[i]);
  108|  5.22M|      } else {
  109|      0|        v_[i] = Scalar(0);
  110|      0|      }
  111|  5.22M|    }
  112|  2.61M|  }
_ZN5draco7VectorDIiLi2EEC2ERKS1_:
   90|  4.56M|  VectorD(const Self& o) {
   91|  13.6M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (91:21): [True: 9.12M, False: 4.56M]
  ------------------
   92|  9.12M|      (*this)[i] = o[i];
   93|  9.12M|    }
   94|  4.56M|  }
_ZN5draco7VectorDIiLi2EEC2Ev:
   42|  2.29M|  VectorD() {
   43|  6.88M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 4.58M, False: 2.29M]
  ------------------
   44|  4.58M|      (*this)[i] = Scalar(0);
   45|  4.58M|    }
   46|  2.29M|  }

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

_ZNK5draco11CornerTable12num_verticesEv:
   73|   150M|  inline int num_vertices() const {
   74|   150M|    return static_cast<int>(vertex_corners_.size());
   75|   150M|  }
_ZNK5draco11CornerTable11num_cornersEv:
   76|  11.9M|  inline int num_corners() const {
   77|  11.9M|    return static_cast<int>(corner_to_vertex_map_.size());
   78|  11.9M|  }
_ZNK5draco11CornerTable9num_facesEv:
   79|  5.48M|  inline int num_faces() const {
   80|  5.48M|    return static_cast<int>(corner_to_vertex_map_.size() / 3);
   81|  5.48M|  }
_ZNK5draco11CornerTable8OppositeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   83|   480M|  inline CornerIndex Opposite(CornerIndex corner) const {
   84|   480M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (84:9): [True: 0, False: 480M]
  ------------------
   85|      0|      return corner;
   86|      0|    }
   87|   480M|    return opposite_corners_[corner];
   88|   480M|  }
_ZNK5draco11CornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   89|   850M|  inline CornerIndex Next(CornerIndex corner) const {
   90|   850M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (90:9): [True: 18.4M, False: 831M]
  ------------------
   91|  18.4M|      return corner;
   92|  18.4M|    }
   93|   831M|    return LocalIndex(++corner) ? corner : corner - 3;
  ------------------
  |  Branch (93:12): [True: 752M, False: 79.6M]
  ------------------
   94|   850M|  }
_ZNK5draco11CornerTable8PreviousENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   95|   656M|  inline CornerIndex Previous(CornerIndex corner) const {
   96|   656M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (96:9): [True: 7.85M, False: 648M]
  ------------------
   97|  7.85M|      return corner;
   98|  7.85M|    }
   99|   648M|    return LocalIndex(corner) ? corner - 1 : corner + 2;
  ------------------
  |  Branch (99:12): [True: 160M, False: 488M]
  ------------------
  100|   656M|  }
_ZNK5draco11CornerTable6VertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  1.30G|  inline VertexIndex Vertex(CornerIndex corner) const {
  102|  1.30G|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (102:9): [True: 0, False: 1.30G]
  ------------------
  103|      0|      return kInvalidVertexIndex;
  104|      0|    }
  105|  1.30G|    return ConfidentVertex(corner);
  106|  1.30G|  }
_ZNK5draco11CornerTable15ConfidentVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  1.30G|  inline VertexIndex ConfidentVertex(CornerIndex corner) const {
  108|  1.30G|    DRACO_DCHECK_GE(corner.value(), 0);
  109|  1.30G|    DRACO_DCHECK_LT(corner.value(), num_corners());
  110|  1.30G|    return corner_to_vertex_map_[corner];
  111|  1.30G|  }
_ZNK5draco11CornerTable4FaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  112|  44.8M|  inline FaceIndex Face(CornerIndex corner) const {
  113|  44.8M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (113:9): [True: 0, False: 44.8M]
  ------------------
  114|      0|      return kInvalidFaceIndex;
  115|      0|    }
  116|  44.8M|    return FaceIndex(corner.value() / 3);
  117|  44.8M|  }
_ZNK5draco11CornerTable10LocalIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  128|  1.48G|  inline int LocalIndex(CornerIndex corner) const { return corner.value() % 3; }
_ZNK5draco11CornerTable14LeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  150|   100M|  inline CornerIndex LeftMostCorner(VertexIndex v) const {
  151|   100M|    return vertex_corners_[v];
  152|   100M|  }
_ZNK5draco11CornerTable12IsOnBoundaryENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  185|  1.09M|  inline bool IsOnBoundary(VertexIndex vert) const {
  186|  1.09M|    const CornerIndex corner = LeftMostCorner(vert);
  187|  1.09M|    if (SwingLeft(corner) == kInvalidCornerIndex) {
  ------------------
  |  Branch (187:9): [True: 23.6k, False: 1.07M]
  ------------------
  188|  23.6k|      return true;
  189|  23.6k|    }
  190|  1.07M|    return false;
  191|  1.09M|  }
_ZNK5draco11CornerTable10SwingRightENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  200|  92.2M|  inline CornerIndex SwingRight(CornerIndex corner) const {
  201|  92.2M|    return Previous(Opposite(Previous(corner)));
  202|  92.2M|  }
_ZNK5draco11CornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  205|  28.5M|  inline CornerIndex SwingLeft(CornerIndex corner) const {
  206|  28.5M|    return Next(Opposite(Next(corner)));
  207|  28.5M|  }
_ZNK5draco11CornerTable13GetLeftCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  217|  4.51M|  inline CornerIndex GetLeftCorner(CornerIndex corner_id) const {
  218|  4.51M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (218:9): [True: 0, False: 4.51M]
  ------------------
  219|      0|      return kInvalidCornerIndex;
  220|      0|    }
  221|  4.51M|    return Opposite(Previous(corner_id));
  222|  4.51M|  }
_ZNK5draco11CornerTable14GetRightCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  223|  5.59M|  inline CornerIndex GetRightCorner(CornerIndex corner_id) const {
  224|  5.59M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (224:9): [True: 0, False: 5.59M]
  ------------------
  225|      0|      return kInvalidCornerIndex;
  226|      0|    }
  227|  5.59M|    return Opposite(Next(corner_id));
  228|  5.59M|  }
_ZN5draco11CornerTable17SetOppositeCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_:
  248|   564M|                                CornerIndex opp_corner_id) {
  249|   564M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  250|   564M|    opposite_corners_[corner_id] = opp_corner_id;
  251|   564M|  }
_ZN5draco11CornerTable17MapCornerToVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEE:
  265|   669M|  inline void MapCornerToVertex(CornerIndex corner_id, VertexIndex vert_id) {
  266|   669M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  267|   669M|    corner_to_vertex_map_[corner_id] = vert_id;
  268|   669M|  }
_ZN5draco11CornerTable12AddNewVertexEv:
  270|   173M|  VertexIndex AddNewVertex() {
  271|   173M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  272|       |    // Add a new invalid vertex.
  273|   173M|    vertex_corners_.push_back(kInvalidCornerIndex);
  274|   173M|    return VertexIndex(static_cast<uint32_t>(vertex_corners_.size() - 1));
  275|   173M|  }
_ZN5draco11CornerTable17SetLeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEE:
  292|   369M|  void SetLeftMostCorner(VertexIndex vert, CornerIndex corner) {
  293|   369M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  294|   369M|    if (vert != kInvalidVertexIndex) {
  ------------------
  |  Branch (294:9): [True: 369M, False: 0]
  ------------------
  295|   369M|      vertex_corners_[vert] = corner;
  296|   369M|    }
  297|   369M|  }
_ZN5draco11CornerTable18MakeVertexIsolatedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  328|  4.12M|  void MakeVertexIsolated(VertexIndex vert) {
  329|  4.12M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  330|  4.12M|    vertex_corners_[vert] = kInvalidCornerIndex;
  331|  4.12M|  }

_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  228|  10.1k|      : corner_table_(table),
  229|  10.1k|        start_corner_(table->LeftMostCorner(vert_id)),
  230|  10.1k|        corner_(start_corner_),
  231|  10.1k|        left_traversal_(true) {}
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE3EndEv:
  244|  5.35M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEppEv:
  267|  78.7k|  VertexCornersIterator& operator++() {
  268|  78.7k|    Next();
  269|  78.7k|    return *this;
  270|  78.7k|  }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEE4NextEv:
  247|  4.58M|  void Next() {
  248|  4.58M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 4.51M, False: 70.4k]
  ------------------
  249|  4.51M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  4.51M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 22.9k, False: 4.48M]
  ------------------
  251|       |        // Open boundary reached.
  252|  22.9k|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  22.9k|        left_traversal_ = false;
  254|  4.48M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 747k, False: 3.74M]
  ------------------
  255|       |        // End reached.
  256|   747k|        corner_ = kInvalidCornerIndex;
  257|   747k|      }
  258|  4.51M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  70.4k|      corner_ = corner_table_->SwingRight(corner_);
  262|  70.4k|    }
  263|  4.58M|  }
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE6CornerEv:
  241|  8.18M|  CornerIndex Corner() const { return corner_; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE3EndEv:
  244|  5.68M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE6CornerEv:
  241|  5.52M|  CornerIndex Corner() const { return corner_; }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE4NextEv:
  247|  3.19M|  void Next() {
  248|  3.19M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 3.17M, False: 20.9k]
  ------------------
  249|  3.17M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  3.17M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 2.35M, False: 820k]
  ------------------
  251|       |        // Open boundary reached.
  252|  2.35M|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  2.35M|        left_traversal_ = false;
  254|  2.35M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 134k, False: 685k]
  ------------------
  255|       |        // End reached.
  256|   134k|        corner_ = kInvalidCornerIndex;
  257|   134k|      }
  258|  3.17M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  20.9k|      corner_ = corner_table_->SwingRight(corner_);
  262|  20.9k|    }
  263|  3.19M|  }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|  2.48M|      : corner_table_(table),
  236|  2.48M|        start_corner_(corner_id),
  237|  2.48M|        corner_(start_corner_),
  238|  2.48M|        left_traversal_(true) {}
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|   760k|      : corner_table_(table),
  236|   760k|        start_corner_(corner_id),
  237|   760k|        corner_(start_corner_),
  238|   760k|        left_traversal_(true) {}

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

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

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

_ZNK5draco24MeshAttributeCornerTable26IsCornerOppositeToSeamEdgeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   45|  76.3M|  inline bool IsCornerOppositeToSeamEdge(CornerIndex corner) const {
   46|  76.3M|    return is_edge_on_seam_[corner.value()];
   47|  76.3M|  }
_ZNK5draco24MeshAttributeCornerTable8OppositeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   49|  38.8M|  inline CornerIndex Opposite(CornerIndex corner) const {
   50|  38.8M|    if (corner == kInvalidCornerIndex || IsCornerOppositeToSeamEdge(corner)) {
  ------------------
  |  Branch (50:9): [True: 0, False: 38.8M]
  |  Branch (50:42): [True: 33.0M, False: 5.74M]
  ------------------
   51|  33.0M|      return kInvalidCornerIndex;
   52|  33.0M|    }
   53|  5.74M|    return corner_table_->Opposite(corner);
   54|  38.8M|  }
_ZNK5draco24MeshAttributeCornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   56|  51.3M|  inline CornerIndex Next(CornerIndex corner) const {
   57|  51.3M|    return corner_table_->Next(corner);
   58|  51.3M|  }
_ZNK5draco24MeshAttributeCornerTable8PreviousENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   60|  32.2M|  inline CornerIndex Previous(CornerIndex corner) const {
   61|  32.2M|    return corner_table_->Previous(corner);
   62|  32.2M|  }
_ZNK5draco24MeshAttributeCornerTable14IsCornerOnSeamENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   65|  5.89M|  inline bool IsCornerOnSeam(CornerIndex corner) const {
   66|  5.89M|    return is_vertex_on_seam_[corner_table_->Vertex(corner).value()];
   67|  5.89M|  }
_ZNK5draco24MeshAttributeCornerTable13GetLeftCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  4.71M|  inline CornerIndex GetLeftCorner(CornerIndex corner) const {
   72|  4.71M|    return Opposite(Previous(corner));
   73|  4.71M|  }
_ZNK5draco24MeshAttributeCornerTable14GetRightCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   74|  5.39M|  inline CornerIndex GetRightCorner(CornerIndex corner) const {
   75|  5.39M|    return Opposite(Next(corner));
   76|  5.39M|  }
_ZNK5draco24MeshAttributeCornerTable10SwingRightENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   79|  6.74M|  inline CornerIndex SwingRight(CornerIndex corner) const {
   80|  6.74M|    return Previous(Opposite(Previous(corner)));
   81|  6.74M|  }
_ZNK5draco24MeshAttributeCornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   84|  15.9M|  inline CornerIndex SwingLeft(CornerIndex corner) const {
   85|  15.9M|    return Next(Opposite(Next(corner)));
   86|  15.9M|  }
_ZNK5draco24MeshAttributeCornerTable12num_verticesEv:
   88|  14.7k|  int num_vertices() const {
   89|  14.7k|    return static_cast<int>(vertex_to_attribute_entry_id_map_.size());
   90|  14.7k|  }
_ZNK5draco24MeshAttributeCornerTable9num_facesEv:
   91|  4.87k|  int num_faces() const { return static_cast<int>(corner_table_->num_faces()); }
_ZNK5draco24MeshAttributeCornerTable11num_cornersEv:
   92|  1.99k|  int num_corners() const { return corner_table_->num_corners(); }
_ZNK5draco24MeshAttributeCornerTable6VertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   94|   127M|  VertexIndex Vertex(CornerIndex corner) const {
   95|   127M|    DRACO_DCHECK_LT(corner.value(), corner_to_vertex_map_.size());
   96|   127M|    return ConfidentVertex(corner);
   97|   127M|  }
_ZNK5draco24MeshAttributeCornerTable15ConfidentVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   98|   127M|  VertexIndex ConfidentVertex(CornerIndex corner) const {
   99|   127M|    return corner_to_vertex_map_[corner.value()];
  100|   127M|  }
_ZNK5draco24MeshAttributeCornerTable14LeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  106|  4.66M|  inline CornerIndex LeftMostCorner(VertexIndex v) const {
  107|  4.66M|    return vertex_to_left_most_corner_map_[v.value()];
  108|  4.66M|  }
_ZNK5draco24MeshAttributeCornerTable12IsOnBoundaryENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  122|  4.66M|  inline bool IsOnBoundary(VertexIndex vert) const {
  123|  4.66M|    const CornerIndex corner = LeftMostCorner(vert);
  124|  4.66M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (124:9): [True: 0, False: 4.66M]
  ------------------
  125|      0|      return true;
  126|      0|    }
  127|  4.66M|    if (SwingLeft(corner) == kInvalidCornerIndex) {
  ------------------
  |  Branch (127:9): [True: 3.98M, False: 678k]
  ------------------
  128|  3.98M|      return true;
  129|  3.98M|    }
  130|   678k|    return false;
  131|  4.66M|  }

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

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

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

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

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

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

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

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

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

