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

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

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

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

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

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

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

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

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

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

_ZNK5draco14PointAttribute4sizeEv:
   55|  16.8k|  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|   379M|  DataBuffer* buffer() const { return attribute_buffer_.get(); }
_ZNK5draco14PointAttribute19is_mapping_identityEv:
   63|  28.8M|  bool is_mapping_identity() const { return identity_mapping_; }
_ZNK5draco14PointAttribute16indices_map_sizeEv:
   64|  28.8M|  size_t indices_map_size() const {
   65|  28.8M|    if (is_mapping_identity()) {
  ------------------
  |  Branch (65:9): [True: 0, False: 28.8M]
  ------------------
   66|      0|      return 0;
   67|      0|    }
   68|  28.8M|    return indices_map_.size();
   69|  28.8M|  }
_ZN5draco14PointAttribute18SetIdentityMappingEv:
   88|  15.5k|  void SetIdentityMapping() {
   89|  15.5k|    identity_mapping_ = true;
   90|  15.5k|    indices_map_.clear();
   91|  15.5k|  }
_ZN5draco14PointAttribute18SetExplicitMappingEm:
   94|  26.9k|  void SetExplicitMapping(size_t num_points) {
   95|  26.9k|    identity_mapping_ = false;
   96|  26.9k|    indices_map_.resize(num_points, kInvalidAttributeValueIndex);
   97|  26.9k|  }
_ZN5draco14PointAttribute16SetPointMapEntryENS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEE:
  101|  85.1M|                        AttributeValueIndex entry_index) {
  102|  85.1M|    DRACO_DCHECK(!identity_mapping_);
  103|  85.1M|    indices_map_[point_index] = entry_index;
  104|  85.1M|  }
_ZN5draco14PointAttribute25SetAttributeTransformDataENSt3__110unique_ptrINS_22AttributeTransformDataENS1_14default_deleteIS3_EEEE:
  129|    884|      std::unique_ptr<AttributeTransformData> transform_data) {
  130|    884|    attribute_transform_data_ = std::move(transform_data);
  131|    884|  }

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

_ZNK5draco17AttributesDecoder14GetAttributeIdEi:
   44|   143k|  int32_t GetAttributeId(int i) const override {
   45|   143k|    return point_attribute_ids_[i];
   46|   143k|  }
_ZNK5draco17AttributesDecoder16GetNumAttributesEv:
   47|  78.7k|  int32_t GetNumAttributes() const override {
   48|  78.7k|    return static_cast<int32_t>(point_attribute_ids_.size());
   49|  78.7k|  }
_ZNK5draco17AttributesDecoder10GetDecoderEv:
   50|  74.3k|  PointCloudDecoder* GetDecoder() const override {
   51|  74.3k|    return point_cloud_decoder_;
   52|  74.3k|  }
_ZN5draco17AttributesDecoder16DecodeAttributesEPNS_13DecoderBufferE:
   55|  7.44k|  bool DecodeAttributes(DecoderBuffer* in_buffer) override {
   56|  7.44k|    if (!DecodePortableAttributes(in_buffer)) {
  ------------------
  |  Branch (56:9): [True: 3.55k, False: 3.89k]
  ------------------
   57|  3.55k|      return false;
   58|  3.55k|    }
   59|  3.89k|    if (!DecodeDataNeededByPortableTransforms(in_buffer)) {
  ------------------
  |  Branch (59:9): [True: 1.15k, False: 2.73k]
  ------------------
   60|  1.15k|      return false;
   61|  1.15k|    }
   62|  2.73k|    if (!TransformAttributesToOriginalFormat()) {
  ------------------
  |  Branch (62:9): [True: 610, False: 2.12k]
  ------------------
   63|    610|      return false;
   64|    610|    }
   65|  2.12k|    return true;
   66|  2.73k|  }
_ZNK5draco17AttributesDecoder27GetLocalIdForPointAttributeEi:
   69|  3.72k|  int32_t GetLocalIdForPointAttribute(int32_t point_attribute_id) const {
   70|  3.72k|    const int id_map_size =
   71|  3.72k|        static_cast<int>(point_attribute_to_local_id_map_.size());
   72|  3.72k|    if (point_attribute_id >= id_map_size) {
  ------------------
  |  Branch (72:9): [True: 0, False: 3.72k]
  ------------------
   73|      0|      return -1;
   74|      0|    }
   75|  3.72k|    return point_attribute_to_local_id_map_[point_attribute_id];
   76|  3.72k|  }
_ZN5draco17AttributesDecoderD2Ev:
   35|  39.7k|  virtual ~AttributesDecoder() = default;

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

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

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

_ZN5draco17OctahedronToolBoxC2Ev:
   53|  4.29k|      : quantization_bits_(-1),
   54|  4.29k|        max_quantized_value_(-1),
   55|  4.29k|        max_value_(-1),
   56|  4.29k|        dequantization_scale_(1.f),
   57|  4.29k|        center_value_(-1) {}
_ZN5draco17OctahedronToolBox19SetQuantizationBitsEi:
   59|  3.96k|  bool SetQuantizationBits(int32_t q) {
   60|  3.96k|    if (q < 2 || q > 30) {
  ------------------
  |  Branch (60:9): [True: 1.30k, False: 2.66k]
  |  Branch (60:18): [True: 236, False: 2.43k]
  ------------------
   61|  1.53k|      return false;
   62|  1.53k|    }
   63|  2.43k|    quantization_bits_ = q;
   64|  2.43k|    max_quantized_value_ = (1u << quantization_bits_) - 1;
   65|  2.43k|    max_value_ = max_quantized_value_ - 1;
   66|  2.43k|    dequantization_scale_ = 2.f / max_value_;
   67|  2.43k|    center_value_ = max_value_ / 2;
   68|  2.43k|    return true;
   69|  3.96k|  }
_ZNK5draco17OctahedronToolBox28CanonicalizeOctahedralCoordsEiiPiS1_:
   76|  3.37M|                                           int32_t* out_t) const {
   77|  3.37M|    if ((s == 0 && t == 0) || (s == 0 && t == max_value_) ||
  ------------------
  |  Branch (77:10): [True: 3.13k, False: 3.37M]
  |  Branch (77:20): [True: 0, False: 3.13k]
  |  Branch (77:32): [True: 3.13k, False: 3.37M]
  |  Branch (77:42): [True: 0, False: 3.13k]
  ------------------
   78|  3.37M|        (s == max_value_ && t == 0)) {
  ------------------
  |  Branch (78:10): [True: 2.95M, False: 422k]
  |  Branch (78:29): [True: 7.25k, False: 2.94M]
  ------------------
   79|  7.25k|      s = max_value_;
   80|  7.25k|      t = max_value_;
   81|  3.37M|    } else if (s == 0 && t > center_value_) {
  ------------------
  |  Branch (81:16): [True: 3.13k, False: 3.36M]
  |  Branch (81:26): [True: 863, False: 2.27k]
  ------------------
   82|    863|      t = center_value_ - (t - center_value_);
   83|  3.37M|    } else if (s == max_value_ && t < center_value_) {
  ------------------
  |  Branch (83:16): [True: 2.94M, False: 421k]
  |  Branch (83:35): [True: 7.59k, False: 2.94M]
  ------------------
   84|  7.59k|      t = center_value_ + (center_value_ - t);
   85|  3.36M|    } else if (t == max_value_ && s < center_value_) {
  ------------------
  |  Branch (85:16): [True: 2.94M, False: 417k]
  |  Branch (85:35): [True: 386, False: 2.94M]
  ------------------
   86|    386|      s = center_value_ + (center_value_ - s);
   87|  3.36M|    } else if (t == 0 && s > center_value_) {
  ------------------
  |  Branch (87:16): [True: 7.06k, False: 3.35M]
  |  Branch (87:26): [True: 1.56k, False: 5.49k]
  ------------------
   88|  1.56k|      s = center_value_ - (s - center_value_);
   89|  1.56k|    }
   90|       |
   91|  3.37M|    *out_s = s;
   92|  3.37M|    *out_t = t;
   93|  3.37M|  }
_ZNK5draco17OctahedronToolBox40IntegerVectorToQuantizedOctahedralCoordsEPKiPiS3_:
   99|  3.37M|                                                       int32_t* out_t) const {
  100|  3.37M|    DRACO_DCHECK_EQ(
  101|  3.37M|        std::abs(int_vec[0]) + std::abs(int_vec[1]) + std::abs(int_vec[2]),
  102|  3.37M|        center_value_);
  103|  3.37M|    int32_t s, t;
  104|  3.37M|    if (int_vec[0] >= 0) {
  ------------------
  |  Branch (104:9): [True: 1.52M, False: 1.85M]
  ------------------
  105|       |      // Right hemisphere.
  106|  1.52M|      s = (int_vec[1] + center_value_);
  107|  1.52M|      t = (int_vec[2] + center_value_);
  108|  1.85M|    } else {
  109|       |      // Left hemisphere.
  110|  1.85M|      if (int_vec[1] < 0) {
  ------------------
  |  Branch (110:11): [True: 31.7k, False: 1.82M]
  ------------------
  111|  31.7k|        s = std::abs(int_vec[2]);
  112|  1.82M|      } else {
  113|  1.82M|        s = (max_value_ - std::abs(int_vec[2]));
  114|  1.82M|      }
  115|  1.85M|      if (int_vec[2] < 0) {
  ------------------
  |  Branch (115:11): [True: 34.9k, False: 1.82M]
  ------------------
  116|  34.9k|        t = std::abs(int_vec[1]);
  117|  1.82M|      } else {
  118|  1.82M|        t = (max_value_ - std::abs(int_vec[1]));
  119|  1.82M|      }
  120|  1.85M|    }
  121|  3.37M|    CanonicalizeOctahedralCoords(s, t, out_s, out_t);
  122|  3.37M|  }
_ZNK5draco17OctahedronToolBox37QuantizedOctahedralCoordsToUnitVectorEiiPf:
  198|   384k|                                                    float* out_vector) const {
  199|   384k|    OctahedralCoordsToUnitVector(in_s * dequantization_scale_ - 1.f,
  200|   384k|                                 in_t * dequantization_scale_ - 1.f,
  201|   384k|                                 out_vector);
  202|   384k|  }
_ZNK5draco17OctahedronToolBox11IsInDiamondERKiS2_:
  205|  44.9M|  inline bool IsInDiamond(const int32_t& s, const int32_t& t) const {
  206|       |    // Expect center already at origin.
  207|  44.9M|    DRACO_DCHECK_LE(s, center_value_);
  208|  44.9M|    DRACO_DCHECK_LE(t, center_value_);
  209|  44.9M|    DRACO_DCHECK_GE(s, -center_value_);
  210|  44.9M|    DRACO_DCHECK_GE(t, -center_value_);
  211|  44.9M|    const uint32_t st =
  212|  44.9M|        static_cast<uint32_t>(std::abs(s)) + static_cast<uint32_t>(std::abs(t));
  213|  44.9M|    return st <= center_value_;
  214|  44.9M|  }
_ZNK5draco17OctahedronToolBox13InvertDiamondEPiS1_:
  216|  89.1M|  void InvertDiamond(int32_t* s, int32_t* t) const {
  217|       |    // Expect center already at origin.
  218|  89.1M|    DRACO_DCHECK_LE(*s, center_value_);
  219|  89.1M|    DRACO_DCHECK_LE(*t, center_value_);
  220|  89.1M|    DRACO_DCHECK_GE(*s, -center_value_);
  221|  89.1M|    DRACO_DCHECK_GE(*t, -center_value_);
  222|  89.1M|    int32_t sign_s = 0;
  223|  89.1M|    int32_t sign_t = 0;
  224|  89.1M|    if (*s >= 0 && *t >= 0) {
  ------------------
  |  Branch (224:9): [True: 88.9M, False: 104k]
  |  Branch (224:20): [True: 88.9M, False: 55.9k]
  ------------------
  225|  88.9M|      sign_s = 1;
  226|  88.9M|      sign_t = 1;
  227|  88.9M|    } else if (*s <= 0 && *t <= 0) {
  ------------------
  |  Branch (227:16): [True: 107k, False: 53.1k]
  |  Branch (227:27): [True: 58.2k, False: 48.8k]
  ------------------
  228|  58.2k|      sign_s = -1;
  229|  58.2k|      sign_t = -1;
  230|   102k|    } else {
  231|   102k|      sign_s = (*s > 0) ? 1 : -1;
  ------------------
  |  Branch (231:16): [True: 53.1k, False: 48.8k]
  ------------------
  232|   102k|      sign_t = (*t > 0) ? 1 : -1;
  ------------------
  |  Branch (232:16): [True: 48.8k, False: 53.1k]
  ------------------
  233|   102k|    }
  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|  89.1M|    const uint32_t corner_point_s = sign_s * center_value_;
  239|  89.1M|    const uint32_t corner_point_t = sign_t * center_value_;
  240|  89.1M|    uint32_t us = *s;
  241|  89.1M|    uint32_t ut = *t;
  242|  89.1M|    us = us + us - corner_point_s;
  243|  89.1M|    ut = ut + ut - corner_point_t;
  244|  89.1M|    if (sign_s * sign_t >= 0) {
  ------------------
  |  Branch (244:9): [True: 89.0M, False: 102k]
  ------------------
  245|  89.0M|      uint32_t temp = us;
  246|  89.0M|      us = -ut;
  247|  89.0M|      ut = -temp;
  248|  89.0M|    } else {
  249|   102k|      std::swap(us, ut);
  250|   102k|    }
  251|  89.1M|    us = us + corner_point_s;
  252|  89.1M|    ut = ut + corner_point_t;
  253|       |
  254|  89.1M|    *s = us;
  255|  89.1M|    *t = ut;
  256|  89.1M|    *s /= 2;
  257|  89.1M|    *t /= 2;
  258|  89.1M|  }
_ZNK5draco17OctahedronToolBox6ModMaxEi:
  272|  89.8M|  int32_t ModMax(int32_t x) const {
  273|  89.8M|    if (x > this->center_value()) {
  ------------------
  |  Branch (273:9): [True: 24.5k, False: 89.7M]
  ------------------
  274|  24.5k|      return x - this->max_quantized_value();
  275|  24.5k|    }
  276|  89.7M|    if (x < -this->center_value()) {
  ------------------
  |  Branch (276:9): [True: 7.82k, False: 89.7M]
  ------------------
  277|  7.82k|      return x + this->max_quantized_value();
  278|  7.82k|    }
  279|  89.7M|    return x;
  280|  89.7M|  }
_ZNK5draco17OctahedronToolBox17quantization_bitsEv:
  291|  2.37k|  int32_t quantization_bits() const { return quantization_bits_; }
_ZNK5draco17OctahedronToolBox19max_quantized_valueEv:
  292|  32.3k|  int32_t max_quantized_value() const { return max_quantized_value_; }
_ZNK5draco17OctahedronToolBox12center_valueEv:
  294|   269M|  int32_t center_value() const { return center_value_; }
_ZNK5draco17OctahedronToolBox28OctahedralCoordsToUnitVectorEffPf:
  298|   384k|                                           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|   384k|    float y = in_s_scaled;
  329|   384k|    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|   384k|    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|   384k|    float x_offset = -x;
  342|   384k|    x_offset = x_offset < 0 ? 0 : x_offset;
  ------------------
  |  Branch (342:16): [True: 39, False: 384k]
  ------------------
  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|   384k|    y += y < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (347:10): [True: 1.97k, False: 382k]
  ------------------
  348|   384k|    z += z < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (348:10): [True: 2.04k, False: 382k]
  ------------------
  349|       |
  350|       |    // Normalize the computed vector.
  351|   384k|    const float norm_squared = x * x + y * y + z * z;
  352|   384k|    if (norm_squared < 1e-6) {
  ------------------
  |  Branch (352:9): [True: 0, False: 384k]
  ------------------
  353|      0|      out_vector[0] = 0;
  354|      0|      out_vector[1] = 0;
  355|      0|      out_vector[2] = 0;
  356|   384k|    } else {
  357|   384k|      const float d = 1.0f / std::sqrt(norm_squared);
  358|   384k|      out_vector[0] = x * d;
  359|   384k|      out_vector[1] = y * d;
  360|   384k|      out_vector[2] = z * d;
  361|   384k|    }
  362|   384k|  }
_ZNK5draco17OctahedronToolBox25CanonicalizeIntegerVectorIiEEvPT_:
  173|  3.37M|  void CanonicalizeIntegerVector(T* vec) const {
  174|  3.37M|    static_assert(std::is_integral<T>::value, "T must be an integral type.");
  175|  3.37M|    static_assert(std::is_signed<T>::value, "T must be a signed type.");
  176|  3.37M|    const int64_t abs_sum = static_cast<int64_t>(std::abs(vec[0])) +
  177|  3.37M|                            static_cast<int64_t>(std::abs(vec[1])) +
  178|  3.37M|                            static_cast<int64_t>(std::abs(vec[2]));
  179|       |
  180|  3.37M|    if (abs_sum == 0) {
  ------------------
  |  Branch (180:9): [True: 3.19M, False: 180k]
  ------------------
  181|  3.19M|      vec[0] = center_value_;  // vec[1] == v[2] == 0
  182|  3.19M|    } else {
  183|   180k|      vec[0] =
  184|   180k|          (static_cast<int64_t>(vec[0]) * static_cast<int64_t>(center_value_)) /
  185|   180k|          abs_sum;
  186|   180k|      vec[1] =
  187|   180k|          (static_cast<int64_t>(vec[1]) * static_cast<int64_t>(center_value_)) /
  188|   180k|          abs_sum;
  189|   180k|      if (vec[2] >= 0) {
  ------------------
  |  Branch (189:11): [True: 98.0k, False: 82.7k]
  ------------------
  190|  98.0k|        vec[2] = center_value_ - std::abs(vec[0]) - std::abs(vec[1]);
  191|  98.0k|      } else {
  192|  82.7k|        vec[2] = -(center_value_ - std::abs(vec[0]) - std::abs(vec[1]));
  193|  82.7k|      }
  194|   180k|    }
  195|  3.37M|  }

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

_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    635|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    635|            attribute, transform, mesh_data),
   52|    635|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  196|    628|                                                                buffer) {
  197|    628|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  198|    628|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    628|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (198:7): [True: 26, False: 602]
  ------------------
  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: 22, False: 3]
  ------------------
  206|       |      // Unsupported mode.
  207|     22|      return false;
  208|     22|    }
  209|     25|  }
  210|    605|#endif
  211|       |
  212|       |  // Encode selected edges using separate rans bit coder for each context.
  213|  2.74k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (213:19): [True: 2.26k, False: 484]
  ------------------
  214|  2.26k|    uint32_t num_flags;
  215|  2.26k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (215:9): [True: 29, False: 2.23k]
  ------------------
  216|     29|      return false;
  217|     29|    }
  218|  2.23k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (218:9): [True: 47, False: 2.18k]
  ------------------
  219|     47|      return false;
  220|     47|    }
  221|  2.18k|    if (num_flags > 0) {
  ------------------
  |  Branch (221:9): [True: 676, False: 1.50k]
  ------------------
  222|    676|      is_crease_edge_[i].resize(num_flags);
  223|    676|      RAnsBitDecoder decoder;
  224|    676|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (224:11): [True: 45, False: 631]
  ------------------
  225|     45|        return false;
  226|     45|      }
  227|  1.10M|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (227:28): [True: 1.10M, False: 631]
  ------------------
  228|  1.10M|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  229|  1.10M|      }
  230|    631|      decoder.EndDecoding();
  231|    631|    }
  232|  2.18k|  }
  233|    484|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  234|    484|                                     MeshDataT>::DecodePredictionData(buffer);
  235|    605|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    456|                          const PointIndex* /* entry_to_point_id_map */) {
   87|    456|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    456|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  2.28k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 1.82k, False: 456]
  ------------------
   93|  1.82k|    pred_vals[i].resize(num_components, 0);
   94|  1.82k|  }
   95|    456|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    456|                                         out_data);
   97|       |
   98|    456|  const CornerTable* const table = this->mesh_data().corner_table();
   99|    456|  const std::vector<int32_t>* const vertex_to_data_map =
  100|    456|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    456|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    456|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    456|  const int corner_map_size =
  109|    456|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|    456|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (110:7): [True: 0, False: 456]
  ------------------
  111|      0|    return false;
  112|      0|  }
  113|   954k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (113:19): [True: 954k, False: 311]
  ------------------
  114|   954k|    const CornerIndex start_corner_id =
  115|   954k|        this->mesh_data().data_to_corner_map()->at(p);
  116|       |
  117|   954k|    CornerIndex corner_id(start_corner_id);
  118|   954k|    int num_parallelograms = 0;
  119|   954k|    bool first_pass = true;
  120|  2.02M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (120:12): [True: 1.08M, False: 938k]
  ------------------
  121|  1.08M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (121:11): [True: 47.9k, False: 1.03M]
  ------------------
  122|  1.08M|              p, corner_id, table, *vertex_to_data_map, out_data,
  123|  1.08M|              num_components, &(pred_vals[num_parallelograms][0]))) {
  124|       |        // Parallelogram prediction applied and stored in
  125|       |        // |pred_vals[num_parallelograms]|
  126|  47.9k|        ++num_parallelograms;
  127|       |        // Stop processing when we reach the maximum number of allowed
  128|       |        // parallelograms.
  129|  47.9k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (129:13): [True: 314, False: 47.6k]
  ------------------
  130|    314|          break;
  131|    314|        }
  132|  47.9k|      }
  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.08M|      if (first_pass) {
  ------------------
  |  Branch (136:11): [True: 1.05M, False: 24.6k]
  ------------------
  137|  1.05M|        corner_id = table->SwingLeft(corner_id);
  138|  1.05M|      } else {
  139|  24.6k|        corner_id = table->SwingRight(corner_id);
  140|  24.6k|      }
  141|  1.08M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (141:11): [True: 15.8k, False: 1.06M]
  ------------------
  142|  15.8k|        break;
  143|  15.8k|      }
  144|  1.06M|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (144:11): [True: 954k, False: 111k]
  |  Branch (144:47): [True: 938k, False: 15.7k]
  ------------------
  145|   938k|        first_pass = false;
  146|   938k|        corner_id = table->SwingRight(start_corner_id);
  147|   938k|      }
  148|  1.06M|    }
  149|       |
  150|       |    // Check which of the available parallelograms are actually used and compute
  151|       |    // the final predicted value.
  152|   954k|    int num_used_parallelograms = 0;
  153|   954k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (153:9): [True: 32.6k, False: 921k]
  ------------------
  154|  4.27M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (154:23): [True: 4.24M, False: 32.6k]
  ------------------
  155|  4.24M|        multi_pred_vals[i] = 0;
  156|  4.24M|      }
  157|       |      // Check which parallelograms are actually used.
  158|  80.3k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (158:23): [True: 47.9k, False: 32.4k]
  ------------------
  159|  47.9k|        const int context = num_parallelograms - 1;
  160|  47.9k|        const int pos = is_crease_edge_pos[context]++;
  161|  47.9k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (161:13): [True: 145, False: 47.7k]
  ------------------
  162|    145|          return false;
  163|    145|        }
  164|  47.7k|        const bool is_crease = is_crease_edge_[context][pos];
  165|  47.7k|        if (!is_crease) {
  ------------------
  |  Branch (165:13): [True: 4.22k, False: 43.5k]
  ------------------
  166|  4.22k|          ++num_used_parallelograms;
  167|   380k|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (167:27): [True: 376k, False: 4.22k]
  ------------------
  168|   376k|            multi_pred_vals[j] =
  169|   376k|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  170|   376k|          }
  171|  4.22k|        }
  172|  47.7k|      }
  173|  32.6k|    }
  174|   954k|    const int dst_offset = p * num_components;
  175|   954k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (175:9): [True: 952k, False: 2.42k]
  ------------------
  176|       |      // No parallelogram was valid.
  177|       |      // We use the last decoded point as a reference.
  178|   952k|      const int src_offset = (p - 1) * num_components;
  179|   952k|      this->transform().ComputeOriginalValue(
  180|   952k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  181|   952k|    } else {
  182|       |      // Compute the correction from the predicted value.
  183|   175k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (183:23): [True: 172k, False: 2.42k]
  ------------------
  184|   172k|        multi_pred_vals[c] /= num_used_parallelograms;
  185|   172k|      }
  186|  2.42k|      this->transform().ComputeOriginalValue(
  187|  2.42k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  188|  2.42k|    }
  189|   954k|  }
  190|    311|  return true;
  191|    456|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    726|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    726|            attribute, transform, mesh_data),
   52|    726|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  196|    711|                                                                buffer) {
  197|    711|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  198|    711|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    711|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (198:7): [True: 21, False: 690]
  ------------------
  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: 5, False: 15]
  ------------------
  206|       |      // Unsupported mode.
  207|      5|      return false;
  208|      5|    }
  209|     20|  }
  210|    705|#endif
  211|       |
  212|       |  // Encode selected edges using separate rans bit coder for each context.
  213|  3.06k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (213:19): [True: 2.55k, False: 519]
  ------------------
  214|  2.55k|    uint32_t num_flags;
  215|  2.55k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (215:9): [True: 27, False: 2.52k]
  ------------------
  216|     27|      return false;
  217|     27|    }
  218|  2.52k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (218:9): [True: 108, False: 2.41k]
  ------------------
  219|    108|      return false;
  220|    108|    }
  221|  2.41k|    if (num_flags > 0) {
  ------------------
  |  Branch (221:9): [True: 701, False: 1.71k]
  ------------------
  222|    701|      is_crease_edge_[i].resize(num_flags);
  223|    701|      RAnsBitDecoder decoder;
  224|    701|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (224:11): [True: 51, False: 650]
  ------------------
  225|     51|        return false;
  226|     51|      }
  227|  1.21M|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (227:28): [True: 1.21M, False: 650]
  ------------------
  228|  1.21M|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  229|  1.21M|      }
  230|    650|      decoder.EndDecoding();
  231|    650|    }
  232|  2.41k|  }
  233|    519|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  234|    519|                                     MeshDataT>::DecodePredictionData(buffer);
  235|    705|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    469|                          const PointIndex* /* entry_to_point_id_map */) {
   87|    469|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    469|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  2.34k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 1.87k, False: 469]
  ------------------
   93|  1.87k|    pred_vals[i].resize(num_components, 0);
   94|  1.87k|  }
   95|    469|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    469|                                         out_data);
   97|       |
   98|    469|  const CornerTable* const table = this->mesh_data().corner_table();
   99|    469|  const std::vector<int32_t>* const vertex_to_data_map =
  100|    469|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    469|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    469|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    469|  const int corner_map_size =
  109|    469|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|    469|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (110:7): [True: 0, False: 469]
  ------------------
  111|      0|    return false;
  112|      0|  }
  113|   145k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (113:19): [True: 145k, False: 211]
  ------------------
  114|   145k|    const CornerIndex start_corner_id =
  115|   145k|        this->mesh_data().data_to_corner_map()->at(p);
  116|       |
  117|   145k|    CornerIndex corner_id(start_corner_id);
  118|   145k|    int num_parallelograms = 0;
  119|   145k|    bool first_pass = true;
  120|   879k|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (120:12): [True: 844k, False: 34.7k]
  ------------------
  121|   844k|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (121:11): [True: 252k, False: 591k]
  ------------------
  122|   844k|              p, corner_id, table, *vertex_to_data_map, out_data,
  123|   844k|              num_components, &(pred_vals[num_parallelograms][0]))) {
  124|       |        // Parallelogram prediction applied and stored in
  125|       |        // |pred_vals[num_parallelograms]|
  126|   252k|        ++num_parallelograms;
  127|       |        // Stop processing when we reach the maximum number of allowed
  128|       |        // parallelograms.
  129|   252k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (129:13): [True: 589, False: 251k]
  ------------------
  130|    589|          break;
  131|    589|        }
  132|   252k|      }
  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|   843k|      if (first_pass) {
  ------------------
  |  Branch (136:11): [True: 773k, False: 70.3k]
  ------------------
  137|   773k|        corner_id = table->SwingLeft(corner_id);
  138|   773k|      } else {
  139|  70.3k|        corner_id = table->SwingRight(corner_id);
  140|  70.3k|      }
  141|   843k|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (141:11): [True: 110k, False: 733k]
  ------------------
  142|   110k|        break;
  143|   110k|      }
  144|   733k|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (144:11): [True: 66.2k, False: 667k]
  |  Branch (144:47): [True: 34.7k, False: 31.4k]
  ------------------
  145|  34.7k|        first_pass = false;
  146|  34.7k|        corner_id = table->SwingRight(start_corner_id);
  147|  34.7k|      }
  148|   733k|    }
  149|       |
  150|       |    // Check which of the available parallelograms are actually used and compute
  151|       |    // the final predicted value.
  152|   145k|    int num_used_parallelograms = 0;
  153|   145k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (153:9): [True: 143k, False: 2.30k]
  ------------------
  154|  17.7M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (154:23): [True: 17.5M, False: 143k]
  ------------------
  155|  17.5M|        multi_pred_vals[i] = 0;
  156|  17.5M|      }
  157|       |      // Check which parallelograms are actually used.
  158|   394k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (158:23): [True: 252k, False: 142k]
  ------------------
  159|   252k|        const int context = num_parallelograms - 1;
  160|   252k|        const int pos = is_crease_edge_pos[context]++;
  161|   252k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (161:13): [True: 258, False: 251k]
  ------------------
  162|    258|          return false;
  163|    258|        }
  164|   251k|        const bool is_crease = is_crease_edge_[context][pos];
  165|   251k|        if (!is_crease) {
  ------------------
  |  Branch (165:13): [True: 5.62k, False: 246k]
  ------------------
  166|  5.62k|          ++num_used_parallelograms;
  167|   526k|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (167:27): [True: 520k, False: 5.62k]
  ------------------
  168|   520k|            multi_pred_vals[j] =
  169|   520k|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  170|   520k|          }
  171|  5.62k|        }
  172|   251k|      }
  173|   143k|    }
  174|   145k|    const int dst_offset = p * num_components;
  175|   145k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (175:9): [True: 141k, False: 3.22k]
  ------------------
  176|       |      // No parallelogram was valid.
  177|       |      // We use the last decoded point as a reference.
  178|   141k|      const int src_offset = (p - 1) * num_components;
  179|   141k|      this->transform().ComputeOriginalValue(
  180|   141k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  181|   141k|    } else {
  182|       |      // Compute the correction from the predicted value.
  183|   359k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (183:23): [True: 356k, False: 3.22k]
  ------------------
  184|   356k|        multi_pred_vals[c] /= num_used_parallelograms;
  185|   356k|      }
  186|  3.22k|      this->transform().ComputeOriginalValue(
  187|  3.22k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  188|  3.22k|    }
  189|   145k|  }
  190|    211|  return true;
  191|    469|}

_ZN5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE3SetEPKNS_4MeshEPKS1_PKNSt3__16vectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS8_9allocatorISC_EEEEPKNS9_IiNSD_IiEEEE:
   37|  4.19k|           const std::vector<int32_t>* vertex_to_data_map) {
   38|  4.19k|    mesh_ = mesh;
   39|  4.19k|    corner_table_ = table;
   40|  4.19k|    data_to_corner_map_ = data_to_corner_map;
   41|  4.19k|    vertex_to_data_map_ = vertex_to_data_map;
   42|  4.19k|  }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE12corner_tableEv:
   45|  21.4M|  const CornerTable* corner_table() const { return corner_table_; }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE18vertex_to_data_mapEv:
   46|  14.0M|  const std::vector<int32_t>* vertex_to_data_map() const {
   47|  14.0M|    return vertex_to_data_map_;
   48|  14.0M|  }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE18data_to_corner_mapEv:
   49|  10.1M|  const std::vector<CornerIndex>* data_to_corner_map() const {
   50|  10.1M|    return data_to_corner_map_;
   51|  10.1M|  }
_ZN5draco24MeshPredictionSchemeDataINS_11CornerTableEE3SetEPKNS_4MeshEPKS1_PKNSt3__16vectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS8_9allocatorISC_EEEEPKNS9_IiNSD_IiEEEE:
   37|  4.35k|           const std::vector<int32_t>* vertex_to_data_map) {
   38|  4.35k|    mesh_ = mesh;
   39|  4.35k|    corner_table_ = table;
   40|  4.35k|    data_to_corner_map_ = data_to_corner_map;
   41|  4.35k|    vertex_to_data_map_ = vertex_to_data_map;
   42|  4.35k|  }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE12corner_tableEv:
   45|  11.3M|  const CornerTable* corner_table() const { return corner_table_; }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE18vertex_to_data_mapEv:
   46|  9.56M|  const std::vector<int32_t>* vertex_to_data_map() const {
   47|  9.56M|    return vertex_to_data_map_;
   48|  9.56M|  }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE18data_to_corner_mapEv:
   49|  2.25M|  const std::vector<CornerIndex>* data_to_corner_map() const {
   50|  2.25M|    return data_to_corner_map_;
   51|  2.25M|  }
_ZN5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEC2Ev:
   30|  4.19k|      : mesh_(nullptr),
   31|  4.19k|        corner_table_(nullptr),
   32|  4.19k|        vertex_to_data_map_(nullptr),
   33|  4.19k|        data_to_corner_map_(nullptr) {}
_ZN5draco24MeshPredictionSchemeDataINS_11CornerTableEEC2Ev:
   30|  4.35k|      : mesh_(nullptr),
   31|  4.35k|        corner_table_(nullptr),
   32|  4.35k|        vertex_to_data_map_(nullptr),
   33|  4.35k|        data_to_corner_map_(nullptr) {}

_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|   699k|  const MeshData& mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   189k|  const MeshData& mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|   876k|  const MeshData& mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   202k|  const MeshData& mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  3.79k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  3.79k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|  13.9M|  const MeshData& mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  3.89k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  3.89k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|  3.30M|  const MeshData& mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    189|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    189|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    220|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    220|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    201|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    201|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    233|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    233|        mesh_data_(mesh_data) {}

_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    376|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    189|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    189|    DRACO_DCHECK_EQ(i, 0);
   70|    189|    (void)i;
   71|    189|    return GeometryAttribute::POSITION;
   72|    189|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    188|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    188|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 188]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    188|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 187]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    187|    predictor_.SetPositionAttribute(*att);
   82|    187|    return true;
   83|    188|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    187|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    187|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 8, False: 179]
  ------------------
  148|      8|    return false;
  149|      8|  }
  150|       |
  151|    179|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    179|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    179|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 36, False: 143]
  ------------------
  153|     36|    uint8_t prediction_mode;
  154|     36|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 35]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     35|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 1, False: 34]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      1|      return false;
  160|      1|    }
  161|       |
  162|     34|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 34]
  ------------------
  163|     34|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     34|  }
  167|    177|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    177|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 5, False: 172]
  ------------------
  171|      5|    return false;
  172|      5|  }
  173|       |
  174|    172|  return true;
  175|    177|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    172|                                      const PointIndex* entry_to_point_id_map) {
  103|    172|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    172|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    172|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    172|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    172|  const int corner_map_size =
  111|    172|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    172|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 172]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    172|  VectorD<int32_t, 3> pred_normal_3d;
  117|    172|  int32_t pred_normal_oct[2];
  118|       |
  119|   699k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 699k, False: 172]
  ------------------
  120|   699k|    const CornerIndex corner_id =
  121|   699k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   699k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   699k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   699k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   699k|                    octahedron_tool_box_.center_value());
  128|   699k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 601k, False: 98.4k]
  ------------------
  129|   601k|      pred_normal_3d = -pred_normal_3d;
  130|   601k|    }
  131|   699k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   699k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   699k|    const int data_offset = data_id * 2;
  135|   699k|    this->transform().ComputeOriginalValue(
  136|   699k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   699k|  }
  138|    172|  flip_normal_bit_decoder_.EndDecoding();
  139|    172|  return true;
  140|    172|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    172|  void SetQuantizationBits(int q) {
   85|    172|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    172|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    438|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    220|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    220|    DRACO_DCHECK_EQ(i, 0);
   70|    220|    (void)i;
   71|    220|    return GeometryAttribute::POSITION;
   72|    220|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    219|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    219|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 219]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    219|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 218]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    218|    predictor_.SetPositionAttribute(*att);
   82|    218|    return true;
   83|    219|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    218|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    218|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 10, False: 208]
  ------------------
  148|     10|    return false;
  149|     10|  }
  150|       |
  151|    208|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    208|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    208|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 40, False: 168]
  ------------------
  153|     40|    uint8_t prediction_mode;
  154|     40|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 39]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     39|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 1, False: 38]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      1|      return false;
  160|      1|    }
  161|       |
  162|     38|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 38]
  ------------------
  163|     38|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     38|  }
  167|    206|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    206|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 14, False: 192]
  ------------------
  171|     14|    return false;
  172|     14|  }
  173|       |
  174|    192|  return true;
  175|    206|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    192|                                      const PointIndex* entry_to_point_id_map) {
  103|    192|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    192|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    192|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    192|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    192|  const int corner_map_size =
  111|    192|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    192|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 192]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    192|  VectorD<int32_t, 3> pred_normal_3d;
  117|    192|  int32_t pred_normal_oct[2];
  118|       |
  119|   189k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 189k, False: 192]
  ------------------
  120|   189k|    const CornerIndex corner_id =
  121|   189k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   189k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   189k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   189k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   189k|                    octahedron_tool_box_.center_value());
  128|   189k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 134k, False: 55.1k]
  ------------------
  129|   134k|      pred_normal_3d = -pred_normal_3d;
  130|   134k|    }
  131|   189k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   189k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   189k|    const int data_offset = data_id * 2;
  135|   189k|    this->transform().ComputeOriginalValue(
  136|   189k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   189k|  }
  138|    192|  flip_normal_bit_decoder_.EndDecoding();
  139|    192|  return true;
  140|    192|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    192|  void SetQuantizationBits(int q) {
   85|    192|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    192|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    400|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    201|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    201|    DRACO_DCHECK_EQ(i, 0);
   70|    201|    (void)i;
   71|    201|    return GeometryAttribute::POSITION;
   72|    201|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    200|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    200|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 200]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    200|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 199]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    199|    predictor_.SetPositionAttribute(*att);
   82|    199|    return true;
   83|    200|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    198|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    198|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 5, False: 193]
  ------------------
  148|      5|    return false;
  149|      5|  }
  150|       |
  151|    193|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    193|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    193|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 60, False: 133]
  ------------------
  153|     60|    uint8_t prediction_mode;
  154|     60|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 59]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     59|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 8, False: 51]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      8|      return false;
  160|      8|    }
  161|       |
  162|     51|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 51]
  ------------------
  163|     51|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     51|  }
  167|    184|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    184|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 7, False: 177]
  ------------------
  171|      7|    return false;
  172|      7|  }
  173|       |
  174|    177|  return true;
  175|    184|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    177|                                      const PointIndex* entry_to_point_id_map) {
  103|    177|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    177|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    177|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    177|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    177|  const int corner_map_size =
  111|    177|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    177|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 177]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    177|  VectorD<int32_t, 3> pred_normal_3d;
  117|    177|  int32_t pred_normal_oct[2];
  118|       |
  119|   876k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 876k, False: 177]
  ------------------
  120|   876k|    const CornerIndex corner_id =
  121|   876k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   876k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   876k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   876k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   876k|                    octahedron_tool_box_.center_value());
  128|   876k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 794k, False: 82.2k]
  ------------------
  129|   794k|      pred_normal_3d = -pred_normal_3d;
  130|   794k|    }
  131|   876k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   876k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   876k|    const int data_offset = data_id * 2;
  135|   876k|    this->transform().ComputeOriginalValue(
  136|   876k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   876k|  }
  138|    177|  flip_normal_bit_decoder_.EndDecoding();
  139|    177|  return true;
  140|    177|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    177|  void SetQuantizationBits(int q) {
   85|    177|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    177|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    465|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    233|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    233|    DRACO_DCHECK_EQ(i, 0);
   70|    233|    (void)i;
   71|    233|    return GeometryAttribute::POSITION;
   72|    233|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    233|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    233|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 233]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    233|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 232]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    232|    predictor_.SetPositionAttribute(*att);
   82|    232|    return true;
   83|    233|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    231|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    231|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 6, False: 225]
  ------------------
  148|      6|    return false;
  149|      6|  }
  150|       |
  151|    225|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    225|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    225|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 62, False: 163]
  ------------------
  153|     62|    uint8_t prediction_mode;
  154|     62|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 61]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     61|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 5, False: 56]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      5|      return false;
  160|      5|    }
  161|       |
  162|     56|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 56]
  ------------------
  163|     56|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     56|  }
  167|    219|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    219|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 9, False: 210]
  ------------------
  171|      9|    return false;
  172|      9|  }
  173|       |
  174|    210|  return true;
  175|    219|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    210|                                      const PointIndex* entry_to_point_id_map) {
  103|    210|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    210|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    210|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    210|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    210|  const int corner_map_size =
  111|    210|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    210|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 210]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    210|  VectorD<int32_t, 3> pred_normal_3d;
  117|    210|  int32_t pred_normal_oct[2];
  118|       |
  119|   202k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 202k, False: 210]
  ------------------
  120|   202k|    const CornerIndex corner_id =
  121|   202k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   202k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   202k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   202k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   202k|                    octahedron_tool_box_.center_value());
  128|   202k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 174k, False: 28.4k]
  ------------------
  129|   174k|      pred_normal_3d = -pred_normal_3d;
  130|   174k|    }
  131|   202k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   202k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   202k|    const int data_offset = data_id * 2;
  135|   202k|    this->transform().ComputeOriginalValue(
  136|   202k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   202k|  }
  138|    210|  flip_normal_bit_decoder_.EndDecoding();
  139|    210|  return true;
  140|    210|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    210|  void SetQuantizationBits(int q) {
   85|    210|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    210|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    548|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    548|            attribute, transform, mesh_data),
   37|    548|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|  1.09k|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    548|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    548|    DRACO_DCHECK_EQ(i, 0);
   70|    548|    (void)i;
   71|    548|    return GeometryAttribute::POSITION;
   72|    548|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    547|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    547|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 547]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    547|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 3, False: 544]
  ------------------
   79|      3|      return false;  // Currently works only for 3 component positions.
   80|      3|    }
   81|    544|    predictor_.SetPositionAttribute(*att);
   82|    544|    return true;
   83|    547|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    542|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    542|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 27, False: 515]
  ------------------
  148|     27|    return false;
  149|     27|  }
  150|       |
  151|    515|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    515|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    515|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 250, False: 265]
  ------------------
  153|    250|    uint8_t prediction_mode;
  154|    250|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 249]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|    249|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 2, False: 247]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      2|      return false;
  160|      2|    }
  161|       |
  162|    247|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 247]
  ------------------
  163|    247|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|    247|  }
  167|    512|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    512|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 24, False: 488]
  ------------------
  171|     24|    return false;
  172|     24|  }
  173|       |
  174|    488|  return true;
  175|    512|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    488|                                      const PointIndex* entry_to_point_id_map) {
  103|    488|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    488|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    488|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    488|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    488|  const int corner_map_size =
  111|    488|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    488|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 488]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    488|  VectorD<int32_t, 3> pred_normal_3d;
  117|    488|  int32_t pred_normal_oct[2];
  118|       |
  119|  1.14M|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 1.14M, False: 488]
  ------------------
  120|  1.14M|    const CornerIndex corner_id =
  121|  1.14M|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|  1.14M|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|  1.14M|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|  1.14M|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|  1.14M|                    octahedron_tool_box_.center_value());
  128|  1.14M|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 931k, False: 212k]
  ------------------
  129|   931k|      pred_normal_3d = -pred_normal_3d;
  130|   931k|    }
  131|  1.14M|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|  1.14M|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|  1.14M|    const int data_offset = data_id * 2;
  135|  1.14M|    this->transform().ComputeOriginalValue(
  136|  1.14M|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|  1.14M|  }
  138|    488|  flip_normal_bit_decoder_.EndDecoding();
  139|    488|  return true;
  140|    488|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    488|  void SetQuantizationBits(int q) {
   85|    488|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    488|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    642|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    642|            attribute, transform, mesh_data),
   37|    642|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|  1.28k|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    642|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    642|    DRACO_DCHECK_EQ(i, 0);
   70|    642|    (void)i;
   71|    642|    return GeometryAttribute::POSITION;
   72|    642|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    640|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    640|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 640]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    640|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 2, False: 638]
  ------------------
   79|      2|      return false;  // Currently works only for 3 component positions.
   80|      2|    }
   81|    638|    predictor_.SetPositionAttribute(*att);
   82|    638|    return true;
   83|    640|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    636|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    636|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 51, False: 585]
  ------------------
  148|     51|    return false;
  149|     51|  }
  150|       |
  151|    585|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    585|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    585|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 269, False: 316]
  ------------------
  153|    269|    uint8_t prediction_mode;
  154|    269|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 268]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|    268|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 2, False: 266]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      2|      return false;
  160|      2|    }
  161|       |
  162|    266|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 266]
  ------------------
  163|    266|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|    266|  }
  167|    582|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    582|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 49, False: 533]
  ------------------
  171|     49|    return false;
  172|     49|  }
  173|       |
  174|    533|  return true;
  175|    582|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    533|                                      const PointIndex* entry_to_point_id_map) {
  103|    533|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    533|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    533|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    533|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    533|  const int corner_map_size =
  111|    533|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    533|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 533]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    533|  VectorD<int32_t, 3> pred_normal_3d;
  117|    533|  int32_t pred_normal_oct[2];
  118|       |
  119|   267k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 267k, False: 533]
  ------------------
  120|   267k|    const CornerIndex corner_id =
  121|   267k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   267k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   267k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   267k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   267k|                    octahedron_tool_box_.center_value());
  128|   267k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 232k, False: 34.3k]
  ------------------
  129|   232k|      pred_normal_3d = -pred_normal_3d;
  130|   232k|    }
  131|   267k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   267k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   267k|    const int data_offset = data_id * 2;
  135|   267k|    this->transform().ComputeOriginalValue(
  136|   267k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   267k|  }
  138|    533|  flip_normal_bit_decoder_.EndDecoding();
  139|    533|  return true;
  140|    533|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    533|  void SetQuantizationBits(int q) {
   85|    533|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    533|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    189|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    189|            attribute, transform, mesh_data),
   37|    189|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    220|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    220|            attribute, transform, mesh_data),
   37|    220|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    201|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    201|            attribute, transform, mesh_data),
   37|    201|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    233|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    233|            attribute, transform, mesh_data),
   37|    233|        predictor_(mesh_data) {}

_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    223|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    223|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 32, False: 191]
  ------------------
  105|     32|      this->normal_prediction_mode_ = mode;
  106|     32|      return true;
  107|    191|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 191, False: 0]
  ------------------
  108|    191|      this->normal_prediction_mode_ = mode;
  109|    191|      return true;
  110|    191|    }
  111|      0|    return false;
  112|    223|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   699k|                             DataTypeT* prediction) override {
   42|   699k|    DRACO_DCHECK(this->IsInitialized());
   43|   699k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   699k|    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|   699k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   699k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   699k|    VectorD<int64_t, 3> normal;
   53|   699k|    CornerIndex c_next, c_prev;
   54|  1.42M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 725k, False: 699k]
  ------------------
   55|       |      // Getting corners.
   56|   725k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 186, False: 724k]
  ------------------
   57|    186|        c_next = corner_table->Next(corner_id);
   58|    186|        c_prev = corner_table->Previous(corner_id);
   59|   724k|      } else {
   60|   724k|        c_next = corner_table->Next(cit.Corner());
   61|   724k|        c_prev = corner_table->Previous(cit.Corner());
   62|   724k|      }
   63|   725k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   725k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   725k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   725k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   725k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   725k|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|   725k|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|   725k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   725k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   725k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   725k|      cit.Next();
   81|   725k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   699k|    constexpr int64_t upper_bound = 1 << 29;
   85|   699k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 124, False: 699k]
  ------------------
   86|    124|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    124|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 32, False: 92]
  ------------------
   88|     32|        const int64_t quotient = abs_sum / upper_bound;
   89|     32|        normal = normal / quotient;
   90|     32|      }
   91|   699k|    } else {
   92|   699k|      const int64_t abs_sum = normal.AbsSum();
   93|   699k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 1.34k, False: 698k]
  ------------------
   94|  1.34k|        const int64_t quotient = abs_sum / upper_bound;
   95|  1.34k|        normal = normal / quotient;
   96|  1.34k|      }
   97|   699k|    }
   98|   699k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   699k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   699k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   699k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   699k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    258|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    258|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 37, False: 221]
  ------------------
  105|     37|      this->normal_prediction_mode_ = mode;
  106|     37|      return true;
  107|    221|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 221, False: 0]
  ------------------
  108|    221|      this->normal_prediction_mode_ = mode;
  109|    221|      return true;
  110|    221|    }
  111|      0|    return false;
  112|    258|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   189k|                             DataTypeT* prediction) override {
   42|   189k|    DRACO_DCHECK(this->IsInitialized());
   43|   189k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   189k|    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|   189k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   189k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   189k|    VectorD<int64_t, 3> normal;
   53|   189k|    CornerIndex c_next, c_prev;
   54|  1.31M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.12M, False: 189k]
  ------------------
   55|       |      // Getting corners.
   56|  1.12M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 204, False: 1.12M]
  ------------------
   57|    204|        c_next = corner_table->Next(corner_id);
   58|    204|        c_prev = corner_table->Previous(corner_id);
   59|  1.12M|      } else {
   60|  1.12M|        c_next = corner_table->Next(cit.Corner());
   61|  1.12M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.12M|      }
   63|  1.12M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.12M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.12M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.12M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.12M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.12M|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|  1.12M|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|  1.12M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.12M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.12M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.12M|      cit.Next();
   81|  1.12M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   189k|    constexpr int64_t upper_bound = 1 << 29;
   85|   189k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 136, False: 189k]
  ------------------
   86|    136|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    136|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 36, False: 100]
  ------------------
   88|     36|        const int64_t quotient = abs_sum / upper_bound;
   89|     36|        normal = normal / quotient;
   90|     36|      }
   91|   189k|    } else {
   92|   189k|      const int64_t abs_sum = normal.AbsSum();
   93|   189k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 77.4k, False: 111k]
  ------------------
   94|  77.4k|        const int64_t quotient = abs_sum / upper_bound;
   95|  77.4k|        normal = normal / quotient;
   96|  77.4k|      }
   97|   189k|    }
   98|   189k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   189k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   189k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   189k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   189k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    252|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    252|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 49, False: 203]
  ------------------
  105|     49|      this->normal_prediction_mode_ = mode;
  106|     49|      return true;
  107|    203|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 203, False: 0]
  ------------------
  108|    203|      this->normal_prediction_mode_ = mode;
  109|    203|      return true;
  110|    203|    }
  111|      0|    return false;
  112|    252|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   876k|                             DataTypeT* prediction) override {
   42|   876k|    DRACO_DCHECK(this->IsInitialized());
   43|   876k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   876k|    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|   876k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   876k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   876k|    VectorD<int64_t, 3> normal;
   53|   876k|    CornerIndex c_next, c_prev;
   54|  1.87M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.00M, False: 876k]
  ------------------
   55|       |      // Getting corners.
   56|  1.00M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 288, False: 1.00M]
  ------------------
   57|    288|        c_next = corner_table->Next(corner_id);
   58|    288|        c_prev = corner_table->Previous(corner_id);
   59|  1.00M|      } else {
   60|  1.00M|        c_next = corner_table->Next(cit.Corner());
   61|  1.00M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.00M|      }
   63|  1.00M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.00M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.00M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.00M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.00M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.00M|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|  1.00M|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|  1.00M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.00M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.00M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.00M|      cit.Next();
   81|  1.00M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   876k|    constexpr int64_t upper_bound = 1 << 29;
   85|   876k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 192, False: 876k]
  ------------------
   86|    192|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    192|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 52, False: 140]
  ------------------
   88|     52|        const int64_t quotient = abs_sum / upper_bound;
   89|     52|        normal = normal / quotient;
   90|     52|      }
   91|   876k|    } else {
   92|   876k|      const int64_t abs_sum = normal.AbsSum();
   93|   876k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 1.12k, False: 875k]
  ------------------
   94|  1.12k|        const int64_t quotient = abs_sum / upper_bound;
   95|  1.12k|        normal = normal / quotient;
   96|  1.12k|      }
   97|   876k|    }
   98|   876k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   876k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   876k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   876k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   876k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    289|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    289|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 55, False: 234]
  ------------------
  105|     55|      this->normal_prediction_mode_ = mode;
  106|     55|      return true;
  107|    234|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 234, False: 0]
  ------------------
  108|    234|      this->normal_prediction_mode_ = mode;
  109|    234|      return true;
  110|    234|    }
  111|      0|    return false;
  112|    289|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   202k|                             DataTypeT* prediction) override {
   42|   202k|    DRACO_DCHECK(this->IsInitialized());
   43|   202k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   202k|    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|   202k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   202k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   202k|    VectorD<int64_t, 3> normal;
   53|   202k|    CornerIndex c_next, c_prev;
   54|  1.40M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.20M, False: 202k]
  ------------------
   55|       |      // Getting corners.
   56|  1.20M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 324, False: 1.20M]
  ------------------
   57|    324|        c_next = corner_table->Next(corner_id);
   58|    324|        c_prev = corner_table->Previous(corner_id);
   59|  1.20M|      } else {
   60|  1.20M|        c_next = corner_table->Next(cit.Corner());
   61|  1.20M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.20M|      }
   63|  1.20M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.20M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.20M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.20M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.20M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.20M|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|  1.20M|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|  1.20M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.20M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.20M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.20M|      cit.Next();
   81|  1.20M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   202k|    constexpr int64_t upper_bound = 1 << 29;
   85|   202k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 216, False: 202k]
  ------------------
   86|    216|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    216|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 54, False: 162]
  ------------------
   88|     54|        const int64_t quotient = abs_sum / upper_bound;
   89|     54|        normal = normal / quotient;
   90|     54|      }
   91|   202k|    } else {
   92|   202k|      const int64_t abs_sum = normal.AbsSum();
   93|   202k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 74.9k, False: 127k]
  ------------------
   94|  74.9k|        const int64_t quotient = abs_sum / upper_bound;
   95|  74.9k|        normal = normal / quotient;
   96|  74.9k|      }
   97|   202k|    }
   98|   202k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   202k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   202k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   202k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   202k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    548|      : Base(md) {
   35|    548|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    548|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    795|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    795|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 233, False: 562]
  ------------------
  105|    233|      this->normal_prediction_mode_ = mode;
  106|    233|      return true;
  107|    562|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 562, False: 0]
  ------------------
  108|    562|      this->normal_prediction_mode_ = mode;
  109|    562|      return true;
  110|    562|    }
  111|      0|    return false;
  112|    795|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|  1.14M|                             DataTypeT* prediction) override {
   42|  1.14M|    DRACO_DCHECK(this->IsInitialized());
   43|  1.14M|    typedef typename MeshDataT::CornerTable CornerTable;
   44|  1.14M|    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.14M|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|  1.14M|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|  1.14M|    VectorD<int64_t, 3> normal;
   53|  1.14M|    CornerIndex c_next, c_prev;
   54|  2.70M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.56M, False: 1.14M]
  ------------------
   55|       |      // Getting corners.
   56|  1.56M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 417k, False: 1.14M]
  ------------------
   57|   417k|        c_next = corner_table->Next(corner_id);
   58|   417k|        c_prev = corner_table->Previous(corner_id);
   59|  1.14M|      } else {
   60|  1.14M|        c_next = corner_table->Next(cit.Corner());
   61|  1.14M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.14M|      }
   63|  1.56M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.56M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.56M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.56M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.56M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.56M|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|  1.56M|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|  1.56M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.56M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.56M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.56M|      cit.Next();
   81|  1.56M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|  1.14M|    constexpr int64_t upper_bound = 1 << 29;
   85|  1.14M|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 70.7k, False: 1.07M]
  ------------------
   86|  70.7k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  70.7k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 828, False: 69.9k]
  ------------------
   88|    828|        const int64_t quotient = abs_sum / upper_bound;
   89|    828|        normal = normal / quotient;
   90|    828|      }
   91|  1.07M|    } else {
   92|  1.07M|      const int64_t abs_sum = normal.AbsSum();
   93|  1.07M|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 2.76k, False: 1.07M]
  ------------------
   94|  2.76k|        const int64_t quotient = abs_sum / upper_bound;
   95|  2.76k|        normal = normal / quotient;
   96|  2.76k|      }
   97|  1.07M|    }
   98|  1.14M|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|  1.14M|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|  1.14M|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|  1.14M|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|  1.14M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    642|      : Base(md) {
   35|    642|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    642|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    908|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    908|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 254, False: 654]
  ------------------
  105|    254|      this->normal_prediction_mode_ = mode;
  106|    254|      return true;
  107|    654|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 654, False: 0]
  ------------------
  108|    654|      this->normal_prediction_mode_ = mode;
  109|    654|      return true;
  110|    654|    }
  111|      0|    return false;
  112|    908|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   267k|                             DataTypeT* prediction) override {
   42|   267k|    DRACO_DCHECK(this->IsInitialized());
   43|   267k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   267k|    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|   267k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   267k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   267k|    VectorD<int64_t, 3> normal;
   53|   267k|    CornerIndex c_next, c_prev;
   54|  1.82M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.56M, False: 267k]
  ------------------
   55|       |      // Getting corners.
   56|  1.56M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 472k, False: 1.08M]
  ------------------
   57|   472k|        c_next = corner_table->Next(corner_id);
   58|   472k|        c_prev = corner_table->Previous(corner_id);
   59|  1.08M|      } else {
   60|  1.08M|        c_next = corner_table->Next(cit.Corner());
   61|  1.08M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.08M|      }
   63|  1.56M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.56M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.56M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.56M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.56M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.56M|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|  1.56M|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|  1.56M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.56M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.56M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.56M|      cit.Next();
   81|  1.56M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   267k|    constexpr int64_t upper_bound = 1 << 29;
   85|   267k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 80.1k, False: 186k]
  ------------------
   86|  80.1k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  80.1k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 632, False: 79.5k]
  ------------------
   88|    632|        const int64_t quotient = abs_sum / upper_bound;
   89|    632|        normal = normal / quotient;
   90|    632|      }
   91|   186k|    } else {
   92|   186k|      const int64_t abs_sum = normal.AbsSum();
   93|   186k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 4.01k, False: 182k]
  ------------------
   94|  4.01k|        const int64_t quotient = abs_sum / upper_bound;
   95|  4.01k|        normal = normal / quotient;
   96|  4.01k|      }
   97|   186k|    }
   98|   267k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   267k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   267k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   267k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   267k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    189|      : Base(md) {
   35|    189|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    189|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    220|      : Base(md) {
   35|    220|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    220|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    201|      : Base(md) {
   35|    201|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    201|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    233|      : Base(md) {
   35|    233|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    233|  };

_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.15M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.15M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.15M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.15M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.15M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.15M|    return GetPositionForDataId(data_id);
   77|  2.15M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  2.15M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.15M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.15M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.15M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.15M|    VectorD<int64_t, 3> pos;
   68|  2.15M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.15M|    return pos;
   70|  2.15M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    187|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    187|    pos_attribute_ = &position_attribute;
   43|    187|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    172|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    172|    entry_to_point_id_map_ = map;
   46|    172|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.44M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.44M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.44M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.44M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.44M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.44M|    return GetPositionForDataId(data_id);
   77|  2.44M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  2.44M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.44M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.44M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.44M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.44M|    VectorD<int64_t, 3> pos;
   68|  2.44M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.44M|    return pos;
   70|  2.44M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    218|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    218|    pos_attribute_ = &position_attribute;
   43|    218|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    192|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    192|    entry_to_point_id_map_ = map;
   46|    192|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_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_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   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_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    199|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    199|    pos_attribute_ = &position_attribute;
   43|    199|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    177|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    177|    entry_to_point_id_map_ = map;
   46|    177|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.61M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.61M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.61M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.61M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.61M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.61M|    return GetPositionForDataId(data_id);
   77|  2.61M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  2.61M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.61M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.61M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.61M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.61M|    VectorD<int64_t, 3> pos;
   68|  2.61M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.61M|    return pos;
   70|  2.61M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    232|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    232|    pos_attribute_ = &position_attribute;
   43|    232|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    210|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    210|    entry_to_point_id_map_ = map;
   46|    210|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    548|      : pos_attribute_(nullptr),
   36|    548|        entry_to_point_id_map_(nullptr),
   37|    548|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    548|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  4.27M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  4.27M|    DRACO_DCHECK(this->IsInitialized());
   73|  4.27M|    const auto corner_table = mesh_data_.corner_table();
   74|  4.27M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  4.27M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  4.27M|    return GetPositionForDataId(data_id);
   77|  4.27M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  4.27M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  4.27M|    DRACO_DCHECK(this->IsInitialized());
   65|  4.27M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  4.27M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  4.27M|    VectorD<int64_t, 3> pos;
   68|  4.27M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  4.27M|    return pos;
   70|  4.27M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    544|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    544|    pos_attribute_ = &position_attribute;
   43|    544|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    488|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    488|    entry_to_point_id_map_ = map;
   46|    488|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    642|      : pos_attribute_(nullptr),
   36|    642|        entry_to_point_id_map_(nullptr),
   37|    642|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    642|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.39M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.39M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.39M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.39M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.39M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.39M|    return GetPositionForDataId(data_id);
   77|  3.39M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  3.39M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.39M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.39M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.39M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.39M|    VectorD<int64_t, 3> pos;
   68|  3.39M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.39M|    return pos;
   70|  3.39M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    638|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    638|    pos_attribute_ = &position_attribute;
   43|    638|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    533|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    533|    entry_to_point_id_map_ = map;
   46|    533|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    189|      : pos_attribute_(nullptr),
   36|    189|        entry_to_point_id_map_(nullptr),
   37|    189|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    189|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    220|      : pos_attribute_(nullptr),
   36|    220|        entry_to_point_id_map_(nullptr),
   37|    220|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    220|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    201|      : pos_attribute_(nullptr),
   36|    201|        entry_to_point_id_map_(nullptr),
   37|    201|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    201|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    233|      : pos_attribute_(nullptr),
   36|    233|        entry_to_point_id_map_(nullptr),
   37|    233|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    233|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}

_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    653|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    653|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    637|                          const PointIndex* /* entry_to_point_id_map */) {
   64|    637|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    637|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    637|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    637|      new DataTypeT[num_components]());
   70|       |
   71|    637|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    637|  const CornerTable* const table = this->mesh_data().corner_table();
   74|    637|  const std::vector<int32_t>* const vertex_to_data_map =
   75|    637|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    637|  const int corner_map_size =
   78|    637|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|    637|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (79:7): [True: 0, False: 637]
  ------------------
   80|      0|    return false;
   81|      0|  }
   82|  3.14M|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (82:19): [True: 3.14M, False: 637]
  ------------------
   83|  3.14M|    const CornerIndex start_corner_id =
   84|  3.14M|        this->mesh_data().data_to_corner_map()->at(p);
   85|       |
   86|  3.14M|    CornerIndex corner_id(start_corner_id);
   87|  3.14M|    int num_parallelograms = 0;
   88|   126M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (88:21): [True: 123M, False: 3.14M]
  ------------------
   89|   123M|      pred_vals[i] = static_cast<DataTypeT>(0);
   90|   123M|    }
   91|  6.66M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (91:12): [True: 3.51M, False: 3.14M]
  ------------------
   92|  3.51M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (92:11): [True: 154k, False: 3.36M]
  ------------------
   93|  3.51M|              p, corner_id, table, *vertex_to_data_map, out_data,
   94|  3.51M|              num_components, parallelogram_pred_vals.get())) {
   95|  5.59M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (95:25): [True: 5.43M, False: 154k]
  ------------------
   96|  5.43M|          pred_vals[c] =
   97|  5.43M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   98|  5.43M|        }
   99|   154k|        ++num_parallelograms;
  100|   154k|      }
  101|       |
  102|       |      // Proceed to the next corner attached to the vertex.
  103|  3.51M|      corner_id = table->SwingRight(corner_id);
  104|  3.51M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (104:11): [True: 71.0k, False: 3.44M]
  ------------------
  105|  71.0k|        corner_id = kInvalidCornerIndex;
  106|  71.0k|      }
  107|  3.51M|    }
  108|       |
  109|  3.14M|    const int dst_offset = p * num_components;
  110|  3.14M|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (110:9): [True: 3.06M, False: 85.2k]
  ------------------
  111|       |      // No parallelogram was valid.
  112|       |      // We use the last decoded point as a reference.
  113|  3.06M|      const int src_offset = (p - 1) * num_components;
  114|  3.06M|      this->transform().ComputeOriginalValue(
  115|  3.06M|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  116|  3.06M|    } else {
  117|       |      // Compute the correction from the predicted value.
  118|  3.00M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (118:23): [True: 2.92M, False: 85.2k]
  ------------------
  119|  2.92M|        pred_vals[c] /= num_parallelograms;
  120|  2.92M|      }
  121|  85.2k|      this->transform().ComputeOriginalValue(
  122|  85.2k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  123|  85.2k|    }
  124|  3.14M|  }
  125|    637|  return true;
  126|    637|}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    724|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    724|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    698|                          const PointIndex* /* entry_to_point_id_map */) {
   64|    698|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    698|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    698|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    698|      new DataTypeT[num_components]());
   70|       |
   71|    698|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    698|  const CornerTable* const table = this->mesh_data().corner_table();
   74|    698|  const std::vector<int32_t>* const vertex_to_data_map =
   75|    698|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    698|  const int corner_map_size =
   78|    698|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|    698|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (79:7): [True: 0, False: 698]
  ------------------
   80|      0|    return false;
   81|      0|  }
   82|   565k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (82:19): [True: 565k, False: 698]
  ------------------
   83|   565k|    const CornerIndex start_corner_id =
   84|   565k|        this->mesh_data().data_to_corner_map()->at(p);
   85|       |
   86|   565k|    CornerIndex corner_id(start_corner_id);
   87|   565k|    int num_parallelograms = 0;
   88|  14.2M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (88:21): [True: 13.6M, False: 565k]
  ------------------
   89|  13.6M|      pred_vals[i] = static_cast<DataTypeT>(0);
   90|  13.6M|    }
   91|  3.88M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (91:12): [True: 3.31M, False: 565k]
  ------------------
   92|  3.31M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (92:11): [True: 1.08M, False: 2.23M]
  ------------------
   93|  3.31M|              p, corner_id, table, *vertex_to_data_map, out_data,
   94|  3.31M|              num_components, parallelogram_pred_vals.get())) {
   95|  27.2M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (95:25): [True: 26.2M, False: 1.08M]
  ------------------
   96|  26.2M|          pred_vals[c] =
   97|  26.2M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   98|  26.2M|        }
   99|  1.08M|        ++num_parallelograms;
  100|  1.08M|      }
  101|       |
  102|       |      // Proceed to the next corner attached to the vertex.
  103|  3.31M|      corner_id = table->SwingRight(corner_id);
  104|  3.31M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (104:11): [True: 548k, False: 2.76M]
  ------------------
  105|   548k|        corner_id = kInvalidCornerIndex;
  106|   548k|      }
  107|  3.31M|    }
  108|       |
  109|   565k|    const int dst_offset = p * num_components;
  110|   565k|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (110:9): [True: 3.19k, False: 562k]
  ------------------
  111|       |      // No parallelogram was valid.
  112|       |      // We use the last decoded point as a reference.
  113|  3.19k|      const int src_offset = (p - 1) * num_components;
  114|  3.19k|      this->transform().ComputeOriginalValue(
  115|  3.19k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  116|   562k|    } else {
  117|       |      // Compute the correction from the predicted value.
  118|  14.1M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (118:23): [True: 13.5M, False: 562k]
  ------------------
  119|  13.5M|        pred_vals[c] /= num_parallelograms;
  120|  13.5M|      }
  121|   562k|      this->transform().ComputeOriginalValue(
  122|   562k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  123|   562k|    }
  124|   565k|  }
  125|    698|  return true;
  126|    698|}

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

_ZN5draco30ComputeParallelogramPredictionINS_24MeshAttributeCornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  5.60M|    int num_components, DataTypeT* out_prediction) {
   49|  5.60M|  const CornerIndex oci = table->Opposite(ci);
   50|  5.60M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 4.80M, False: 799k]
  ------------------
   51|  4.80M|    return false;
   52|  4.80M|  }
   53|   799k|  int vert_opp, vert_next, vert_prev;
   54|   799k|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|   799k|                                        &vert_opp, &vert_next, &vert_prev);
   56|   799k|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 496k, False: 303k]
  |  Branch (56:35): [True: 416k, False: 79.9k]
  ------------------
   57|   416k|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 404k, False: 11.9k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|   404k|    const int v_opp_off = vert_opp * num_components;
   60|   404k|    const int v_next_off = vert_next * num_components;
   61|   404k|    const int v_prev_off = vert_prev * num_components;
   62|  14.9M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 14.5M, False: 404k]
  ------------------
   63|  14.5M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  14.5M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  14.5M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  14.5M|      const int64_t result =
   67|  14.5M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  14.5M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  14.5M|    }
   71|   404k|    return true;
   72|   404k|  }
   73|   395k|  return false;  // Not all data is available for prediction
   74|   799k|}
_ZN5draco23GetParallelogramEntriesINS_24MeshAttributeCornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|   799k|    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|   799k|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|   799k|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|   799k|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|   799k|}
_ZN5draco30ComputeParallelogramPredictionINS_11CornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  4.48M|    int num_components, DataTypeT* out_prediction) {
   49|  4.48M|  const CornerIndex oci = table->Opposite(ci);
   50|  4.48M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 54.1k, False: 4.42M]
  ------------------
   51|  54.1k|    return false;
   52|  54.1k|  }
   53|  4.42M|  int vert_opp, vert_next, vert_prev;
   54|  4.42M|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  4.42M|                                        &vert_opp, &vert_next, &vert_prev);
   56|  4.42M|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 2.33M, False: 2.09M]
  |  Branch (56:35): [True: 1.82M, False: 510k]
  ------------------
   57|  1.82M|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 1.65M, False: 170k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|  1.65M|    const int v_opp_off = vert_opp * num_components;
   60|  1.65M|    const int v_next_off = vert_next * num_components;
   61|  1.65M|    const int v_prev_off = vert_prev * num_components;
   62|  65.6M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 64.0M, False: 1.65M]
  ------------------
   63|  64.0M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  64.0M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  64.0M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  64.0M|      const int64_t result =
   67|  64.0M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  64.0M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  64.0M|    }
   71|  1.65M|    return true;
   72|  1.65M|  }
   73|  2.77M|  return false;  // Not all data is available for prediction
   74|  4.42M|}
_ZN5draco23GetParallelogramEntriesINS_11CornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  4.42M|    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|  4.42M|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  4.42M|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  4.42M|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  4.42M|}

_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_i:
   44|    310|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   45|    310|            attribute, transform, mesh_data),
   46|    310|        pos_attribute_(nullptr),
   47|    310|        entry_to_point_id_map_(nullptr),
   48|    310|        num_components_(0),
   49|    310|        version_(version) {}
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   71|    614|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   73|    310|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   74|    310|    DRACO_DCHECK_EQ(i, 0);
   75|    310|    (void)i;
   76|    310|    return GeometryAttribute::POSITION;
   77|    310|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   79|    306|  bool SetParentAttribute(const PointAttribute* att) override {
   80|    306|    if (att == nullptr) {
  ------------------
  |  Branch (80:9): [True: 0, False: 306]
  ------------------
   81|      0|      return false;
   82|      0|    }
   83|    306|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (83:9): [True: 0, False: 306]
  ------------------
   84|      0|      return false;  // Invalid attribute type.
   85|      0|    }
   86|    306|    if (att->num_components() != 3) {
  ------------------
  |  Branch (86:9): [True: 2, False: 304]
  ------------------
   87|      2|      return false;  // Currently works only for 3 component positions.
   88|      2|    }
   89|    304|    pos_attribute_ = att;
   90|    304|    return true;
   91|    306|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_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: 37, False: 260]
  ------------------
  160|     37|    if (!buffer->Decode(&num_orientations)) {
  ------------------
  |  Branch (160:9): [True: 1, False: 36]
  ------------------
  161|      1|      return false;
  162|      1|    }
  163|    260|  } else {
  164|    260|    if (!DecodeVarint(&num_orientations, buffer)) {
  ------------------
  |  Branch (164:9): [True: 2, False: 258]
  ------------------
  165|      2|      return false;
  166|      2|    }
  167|    260|  }
  168|    294|  if (num_orientations == 0) {
  ------------------
  |  Branch (168:7): [True: 3, False: 291]
  ------------------
  169|      3|    return false;
  170|      3|  }
  171|    291|  if (num_orientations > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (171:7): [True: 13, False: 278]
  ------------------
  172|       |    // We can't have more orientations than the maximum number of decoded
  173|       |    // values.
  174|     13|    return false;
  175|     13|  }
  176|    278|  orientations_.resize(num_orientations);
  177|    278|  bool last_orientation = true;
  178|    278|  RAnsBitDecoder decoder;
  179|    278|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (179:7): [True: 4, False: 274]
  ------------------
  180|      4|    return false;
  181|      4|  }
  182|   173k|  for (uint32_t i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (182:24): [True: 173k, False: 274]
  ------------------
  183|   173k|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (183:9): [True: 20.5k, False: 152k]
  ------------------
  184|  20.5k|      last_orientation = !last_orientation;
  185|  20.5k|    }
  186|   173k|    orientations_[i] = last_orientation;
  187|   173k|  }
  188|    274|  decoder.EndDecoding();
  189|    274|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  190|    274|                                     MeshDataT>::DecodePredictionData(buffer);
  191|    278|}
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  125|    212|                          const PointIndex* entry_to_point_id_map) {
  126|    212|  if (num_components != 2) {
  ------------------
  |  Branch (126:7): [True: 20, False: 192]
  ------------------
  127|       |    // Corrupt/malformed input. Two output components are req'd.
  128|     20|    return false;
  129|     20|  }
  130|    192|  num_components_ = num_components;
  131|    192|  entry_to_point_id_map_ = entry_to_point_id_map;
  132|    192|  predicted_value_ =
  133|    192|      std::unique_ptr<DataTypeT[]>(new DataTypeT[num_components]);
  134|    192|  this->transform().Init(num_components);
  135|       |
  136|    192|  const int corner_map_size =
  137|    192|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  138|    192|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (138:7): [True: 0, False: 192]
  ------------------
  139|      0|    return false;
  140|      0|  }
  141|   882k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (141:19): [True: 882k, False: 166]
  ------------------
  142|   882k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  143|   882k|    if (!ComputePredictedValue(corner_id, out_data, p)) {
  ------------------
  |  Branch (143:9): [True: 26, False: 882k]
  ------------------
  144|     26|      return false;
  145|     26|    }
  146|       |
  147|   882k|    const int dst_offset = p * num_components;
  148|   882k|    this->transform().ComputeOriginalValue(
  149|   882k|        predicted_value_.get(), in_corr + dst_offset, out_data + dst_offset);
  150|   882k|  }
  151|    166|  return true;
  152|    192|}
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
  196|   882k|                          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|   882k|  const CornerIndex next_corner_id =
  201|   882k|      this->mesh_data().corner_table()->Next(corner_id);
  202|   882k|  const CornerIndex prev_corner_id =
  203|   882k|      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|   882k|  int next_data_id, prev_data_id;
  207|       |
  208|   882k|  int next_vert_id, prev_vert_id;
  209|   882k|  next_vert_id =
  210|   882k|      this->mesh_data().corner_table()->Vertex(next_corner_id).value();
  211|   882k|  prev_vert_id =
  212|   882k|      this->mesh_data().corner_table()->Vertex(prev_corner_id).value();
  213|       |
  214|   882k|  next_data_id = this->mesh_data().vertex_to_data_map()->at(next_vert_id);
  215|   882k|  prev_data_id = this->mesh_data().vertex_to_data_map()->at(prev_vert_id);
  216|       |
  217|   882k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (217:7): [True: 627k, False: 254k]
  |  Branch (217:33): [True: 373k, False: 254k]
  ------------------
  218|       |    // Both other corners have available UV coordinates for prediction.
  219|   373k|    const Vector2f n_uv = GetTexCoordForEntryId(next_data_id, data);
  220|   373k|    const Vector2f p_uv = GetTexCoordForEntryId(prev_data_id, data);
  221|   373k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (221:9): [True: 371k, False: 2.07k]
  ------------------
  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|   742k|      for (const int i : {0, 1}) {
  ------------------
  |  Branch (225:24): [True: 742k, False: 371k]
  ------------------
  226|   742k|        if (std::isnan(p_uv[i]) || static_cast<double>(p_uv[i]) > INT_MAX ||
  ------------------
  |  Branch (226:13): [True: 0, False: 742k]
  |  Branch (226:36): [True: 49.3k, False: 692k]
  ------------------
  227|   692k|            static_cast<double>(p_uv[i]) < INT_MIN) {
  ------------------
  |  Branch (227:13): [True: 0, False: 692k]
  ------------------
  228|  49.3k|          predicted_value_[i] = INT_MIN;
  229|   692k|        } else {
  230|   692k|          predicted_value_[i] = static_cast<int>(p_uv[i]);
  231|   692k|        }
  232|   742k|      }
  233|   371k|      return true;
  234|   371k|    }
  235|       |
  236|       |    // Get positions at all corners.
  237|  2.07k|    const Vector3f tip_pos = GetPositionForEntryId(data_id);
  238|  2.07k|    const Vector3f next_pos = GetPositionForEntryId(next_data_id);
  239|  2.07k|    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.07k|    const Vector3f pn = prev_pos - next_pos;
  264|  2.07k|    const Vector3f cn = tip_pos - next_pos;
  265|  2.07k|    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.07k|    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.07k|    if (version_ < DRACO_BITSTREAM_VERSION(1, 2) || pn_norm2_squared > 0) {
  ------------------
  |  |  115|  4.15k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (276:9): [True: 0, False: 2.07k]
  |  Branch (276:53): [True: 305, False: 1.77k]
  ------------------
  277|    305|      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|    305|      t = sqrt((cn - pn * s).SquaredNorm() / pn_norm2_squared);
  282|  1.77k|    } else {
  283|  1.77k|      s = 0;
  284|  1.77k|      t = 0;
  285|  1.77k|    }
  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.07k|    const Vector2f pn_uv = p_uv - n_uv;
  302|  2.07k|    const float pnus = pn_uv[0] * s + n_uv[0];
  303|  2.07k|    const float pnut = pn_uv[0] * t;
  304|  2.07k|    const float pnvs = pn_uv[1] * s + n_uv[1];
  305|  2.07k|    const float pnvt = pn_uv[1] * t;
  306|  2.07k|    Vector2f predicted_uv;
  307|  2.07k|    if (orientations_.empty()) {
  ------------------
  |  Branch (307:9): [True: 26, False: 2.05k]
  ------------------
  308|     26|      return false;
  309|     26|    }
  310|       |
  311|       |    // When decoding the data, we already know which orientation to use.
  312|  2.05k|    const bool orientation = orientations_.back();
  313|  2.05k|    orientations_.pop_back();
  314|  2.05k|    if (orientation) {
  ------------------
  |  Branch (314:9): [True: 950, False: 1.10k]
  ------------------
  315|    950|      predicted_uv = Vector2f(pnus - pnvt, pnvs + pnut);
  316|  1.10k|    } else {
  317|  1.10k|      predicted_uv = Vector2f(pnus + pnvt, pnvs - pnut);
  318|  1.10k|    }
  319|  2.05k|    if (std::is_integral<DataTypeT>::value) {
  ------------------
  |  Branch (319:9): [True: 2.05k, 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.05k|      const double u = floor(predicted_uv[0] + 0.5);
  324|  2.05k|      if (std::isnan(u) || u > INT_MAX || u < INT_MIN) {
  ------------------
  |  Branch (324:11): [True: 0, False: 2.05k]
  |  Branch (324:28): [True: 41, False: 2.01k]
  |  Branch (324:43): [True: 67, False: 1.94k]
  ------------------
  325|    108|        predicted_value_[0] = INT_MIN;
  326|  1.94k|      } else {
  327|  1.94k|        predicted_value_[0] = static_cast<int>(u);
  328|  1.94k|      }
  329|  2.05k|      const double v = floor(predicted_uv[1] + 0.5);
  330|  2.05k|      if (std::isnan(v) || v > INT_MAX || v < INT_MIN) {
  ------------------
  |  Branch (330:11): [True: 0, False: 2.05k]
  |  Branch (330:28): [True: 46, False: 2.00k]
  |  Branch (330:43): [True: 71, False: 1.93k]
  ------------------
  331|    117|        predicted_value_[1] = INT_MIN;
  332|  1.93k|      } else {
  333|  1.93k|        predicted_value_[1] = static_cast<int>(v);
  334|  1.93k|      }
  335|  2.05k|    } 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.05k|    return true;
  341|  2.07k|  }
  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|   508k|  int data_offset = 0;
  346|   508k|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (346:7): [True: 254k, False: 254k]
  ------------------
  347|       |    // Use the value on the previous corner as the prediction.
  348|   254k|    data_offset = prev_data_id * num_components_;
  349|   254k|  }
  350|   508k|  if (next_data_id < data_id) {
  ------------------
  |  Branch (350:7): [True: 14, False: 508k]
  ------------------
  351|       |    // Use the value on the next corner as the prediction.
  352|     14|    data_offset = next_data_id * num_components_;
  353|   508k|  } else {
  354|       |    // None of the other corners have a valid value. Use the last encoded value
  355|       |    // as the prediction if possible.
  356|   508k|    if (data_id > 0) {
  ------------------
  |  Branch (356:9): [True: 508k, False: 192]
  ------------------
  357|   508k|      data_offset = (data_id - 1) * num_components_;
  358|   508k|    } else {
  359|       |      // We are encoding the first value. Predict 0.
  360|    576|      for (int i = 0; i < num_components_; ++i) {
  ------------------
  |  Branch (360:23): [True: 384, False: 192]
  ------------------
  361|    384|        predicted_value_[i] = 0;
  362|    384|      }
  363|    192|      return true;
  364|    192|    }
  365|   508k|  }
  366|  1.52M|  for (int i = 0; i < num_components_; ++i) {
  ------------------
  |  Branch (366:19): [True: 1.01M, False: 508k]
  ------------------
  367|  1.01M|    predicted_value_[i] = data[data_offset + i];
  368|  1.01M|  }
  369|   508k|  return true;
  370|   508k|}
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetTexCoordForEntryIdEiPKi:
  102|   746k|  Vector2f GetTexCoordForEntryId(int entry_id, const DataTypeT* data) const {
  103|   746k|    const int data_offset = entry_id * num_components_;
  104|   746k|    return Vector2f(static_cast<float>(data[data_offset]),
  105|   746k|                    static_cast<float>(data[data_offset + 1]));
  106|   746k|  }
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetPositionForEntryIdEi:
   94|  6.23k|  Vector3f GetPositionForEntryId(int entry_id) const {
   95|  6.23k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   96|  6.23k|    Vector3f pos;
   97|  6.23k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   98|  6.23k|                                 &pos[0]);
   99|  6.23k|    return pos;
  100|  6.23k|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_i:
   44|    335|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   45|    335|            attribute, transform, mesh_data),
   46|    335|        pos_attribute_(nullptr),
   47|    335|        entry_to_point_id_map_(nullptr),
   48|    335|        num_components_(0),
   49|    335|        version_(version) {}
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   71|    666|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   73|    335|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   74|    335|    DRACO_DCHECK_EQ(i, 0);
   75|    335|    (void)i;
   76|    335|    return GeometryAttribute::POSITION;
   77|    335|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   79|    332|  bool SetParentAttribute(const PointAttribute* att) override {
   80|    332|    if (att == nullptr) {
  ------------------
  |  Branch (80:9): [True: 0, False: 332]
  ------------------
   81|      0|      return false;
   82|      0|    }
   83|    332|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (83:9): [True: 0, False: 332]
  ------------------
   84|      0|      return false;  // Invalid attribute type.
   85|      0|    }
   86|    332|    if (att->num_components() != 3) {
  ------------------
  |  Branch (86:9): [True: 1, False: 331]
  ------------------
   87|      1|      return false;  // Currently works only for 3 component positions.
   88|      1|    }
   89|    331|    pos_attribute_ = att;
   90|    331|    return true;
   91|    332|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  156|    321|    DecodePredictionData(DecoderBuffer* buffer) {
  157|       |  // Decode the delta coded orientations.
  158|    321|  uint32_t num_orientations = 0;
  159|    321|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    321|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (159:7): [True: 17, False: 304]
  ------------------
  160|     17|    if (!buffer->Decode(&num_orientations)) {
  ------------------
  |  Branch (160:9): [True: 1, False: 16]
  ------------------
  161|      1|      return false;
  162|      1|    }
  163|    304|  } else {
  164|    304|    if (!DecodeVarint(&num_orientations, buffer)) {
  ------------------
  |  Branch (164:9): [True: 2, False: 302]
  ------------------
  165|      2|      return false;
  166|      2|    }
  167|    304|  }
  168|    318|  if (num_orientations == 0) {
  ------------------
  |  Branch (168:7): [True: 2, False: 316]
  ------------------
  169|      2|    return false;
  170|      2|  }
  171|    316|  if (num_orientations > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (171:7): [True: 49, False: 267]
  ------------------
  172|       |    // We can't have more orientations than the maximum number of decoded
  173|       |    // values.
  174|     49|    return false;
  175|     49|  }
  176|    267|  orientations_.resize(num_orientations);
  177|    267|  bool last_orientation = true;
  178|    267|  RAnsBitDecoder decoder;
  179|    267|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (179:7): [True: 4, False: 263]
  ------------------
  180|      4|    return false;
  181|      4|  }
  182|   180k|  for (uint32_t i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (182:24): [True: 180k, False: 263]
  ------------------
  183|   180k|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (183:9): [True: 69.5k, False: 111k]
  ------------------
  184|  69.5k|      last_orientation = !last_orientation;
  185|  69.5k|    }
  186|   180k|    orientations_[i] = last_orientation;
  187|   180k|  }
  188|    263|  decoder.EndDecoding();
  189|    263|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  190|    263|                                     MeshDataT>::DecodePredictionData(buffer);
  191|    267|}
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  125|    221|                          const PointIndex* entry_to_point_id_map) {
  126|    221|  if (num_components != 2) {
  ------------------
  |  Branch (126:7): [True: 7, False: 214]
  ------------------
  127|       |    // Corrupt/malformed input. Two output components are req'd.
  128|      7|    return false;
  129|      7|  }
  130|    214|  num_components_ = num_components;
  131|    214|  entry_to_point_id_map_ = entry_to_point_id_map;
  132|    214|  predicted_value_ =
  133|    214|      std::unique_ptr<DataTypeT[]>(new DataTypeT[num_components]);
  134|    214|  this->transform().Init(num_components);
  135|       |
  136|    214|  const int corner_map_size =
  137|    214|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  138|    214|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (138:7): [True: 0, False: 214]
  ------------------
  139|      0|    return false;
  140|      0|  }
  141|   239k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (141:19): [True: 238k, False: 176]
  ------------------
  142|   238k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  143|   238k|    if (!ComputePredictedValue(corner_id, out_data, p)) {
  ------------------
  |  Branch (143:9): [True: 38, False: 238k]
  ------------------
  144|     38|      return false;
  145|     38|    }
  146|       |
  147|   238k|    const int dst_offset = p * num_components;
  148|   238k|    this->transform().ComputeOriginalValue(
  149|   238k|        predicted_value_.get(), in_corr + dst_offset, out_data + dst_offset);
  150|   238k|  }
  151|    176|  return true;
  152|    214|}
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
  196|   238k|                          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|   238k|  const CornerIndex next_corner_id =
  201|   238k|      this->mesh_data().corner_table()->Next(corner_id);
  202|   238k|  const CornerIndex prev_corner_id =
  203|   238k|      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|   238k|  int next_data_id, prev_data_id;
  207|       |
  208|   238k|  int next_vert_id, prev_vert_id;
  209|   238k|  next_vert_id =
  210|   238k|      this->mesh_data().corner_table()->Vertex(next_corner_id).value();
  211|   238k|  prev_vert_id =
  212|   238k|      this->mesh_data().corner_table()->Vertex(prev_corner_id).value();
  213|       |
  214|   238k|  next_data_id = this->mesh_data().vertex_to_data_map()->at(next_vert_id);
  215|   238k|  prev_data_id = this->mesh_data().vertex_to_data_map()->at(prev_vert_id);
  216|       |
  217|   238k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (217:7): [True: 238k, False: 405]
  |  Branch (217:33): [True: 238k, False: 331]
  ------------------
  218|       |    // Both other corners have available UV coordinates for prediction.
  219|   238k|    const Vector2f n_uv = GetTexCoordForEntryId(next_data_id, data);
  220|   238k|    const Vector2f p_uv = GetTexCoordForEntryId(prev_data_id, data);
  221|   238k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (221:9): [True: 228k, False: 9.32k]
  ------------------
  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|   457k|      for (const int i : {0, 1}) {
  ------------------
  |  Branch (225:24): [True: 457k, False: 228k]
  ------------------
  226|   457k|        if (std::isnan(p_uv[i]) || static_cast<double>(p_uv[i]) > INT_MAX ||
  ------------------
  |  Branch (226:13): [True: 0, False: 457k]
  |  Branch (226:36): [True: 12.5k, False: 445k]
  ------------------
  227|   445k|            static_cast<double>(p_uv[i]) < INT_MIN) {
  ------------------
  |  Branch (227:13): [True: 0, False: 445k]
  ------------------
  228|  12.5k|          predicted_value_[i] = INT_MIN;
  229|   445k|        } else {
  230|   445k|          predicted_value_[i] = static_cast<int>(p_uv[i]);
  231|   445k|        }
  232|   457k|      }
  233|   228k|      return true;
  234|   228k|    }
  235|       |
  236|       |    // Get positions at all corners.
  237|  9.32k|    const Vector3f tip_pos = GetPositionForEntryId(data_id);
  238|  9.32k|    const Vector3f next_pos = GetPositionForEntryId(next_data_id);
  239|  9.32k|    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|  9.32k|    const Vector3f pn = prev_pos - next_pos;
  264|  9.32k|    const Vector3f cn = tip_pos - next_pos;
  265|  9.32k|    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|  9.32k|    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|  9.32k|    if (version_ < DRACO_BITSTREAM_VERSION(1, 2) || pn_norm2_squared > 0) {
  ------------------
  |  |  115|  18.6k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (276:9): [True: 0, False: 9.32k]
  |  Branch (276:53): [True: 300, False: 9.02k]
  ------------------
  277|    300|      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|    300|      t = sqrt((cn - pn * s).SquaredNorm() / pn_norm2_squared);
  282|  9.02k|    } else {
  283|  9.02k|      s = 0;
  284|  9.02k|      t = 0;
  285|  9.02k|    }
  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|  9.32k|    const Vector2f pn_uv = p_uv - n_uv;
  302|  9.32k|    const float pnus = pn_uv[0] * s + n_uv[0];
  303|  9.32k|    const float pnut = pn_uv[0] * t;
  304|  9.32k|    const float pnvs = pn_uv[1] * s + n_uv[1];
  305|  9.32k|    const float pnvt = pn_uv[1] * t;
  306|  9.32k|    Vector2f predicted_uv;
  307|  9.32k|    if (orientations_.empty()) {
  ------------------
  |  Branch (307:9): [True: 38, False: 9.28k]
  ------------------
  308|     38|      return false;
  309|     38|    }
  310|       |
  311|       |    // When decoding the data, we already know which orientation to use.
  312|  9.28k|    const bool orientation = orientations_.back();
  313|  9.28k|    orientations_.pop_back();
  314|  9.28k|    if (orientation) {
  ------------------
  |  Branch (314:9): [True: 1.24k, False: 8.04k]
  ------------------
  315|  1.24k|      predicted_uv = Vector2f(pnus - pnvt, pnvs + pnut);
  316|  8.04k|    } else {
  317|  8.04k|      predicted_uv = Vector2f(pnus + pnvt, pnvs - pnut);
  318|  8.04k|    }
  319|  9.28k|    if (std::is_integral<DataTypeT>::value) {
  ------------------
  |  Branch (319:9): [True: 9.28k, 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|  9.28k|      const double u = floor(predicted_uv[0] + 0.5);
  324|  9.28k|      if (std::isnan(u) || u > INT_MAX || u < INT_MIN) {
  ------------------
  |  Branch (324:11): [True: 0, False: 9.28k]
  |  Branch (324:28): [True: 148, False: 9.13k]
  |  Branch (324:43): [True: 51, False: 9.08k]
  ------------------
  325|    199|        predicted_value_[0] = INT_MIN;
  326|  9.08k|      } else {
  327|  9.08k|        predicted_value_[0] = static_cast<int>(u);
  328|  9.08k|      }
  329|  9.28k|      const double v = floor(predicted_uv[1] + 0.5);
  330|  9.28k|      if (std::isnan(v) || v > INT_MAX || v < INT_MIN) {
  ------------------
  |  Branch (330:11): [True: 0, False: 9.28k]
  |  Branch (330:28): [True: 92, False: 9.19k]
  |  Branch (330:43): [True: 55, False: 9.13k]
  ------------------
  331|    147|        predicted_value_[1] = INT_MIN;
  332|  9.13k|      } else {
  333|  9.13k|        predicted_value_[1] = static_cast<int>(v);
  334|  9.13k|      }
  335|  9.28k|    } 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|  9.28k|    return true;
  341|  9.32k|  }
  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|    736|  int data_offset = 0;
  346|    736|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (346:7): [True: 331, False: 405]
  ------------------
  347|       |    // Use the value on the previous corner as the prediction.
  348|    331|    data_offset = prev_data_id * num_components_;
  349|    331|  }
  350|    736|  if (next_data_id < data_id) {
  ------------------
  |  Branch (350:7): [True: 90, False: 646]
  ------------------
  351|       |    // Use the value on the next corner as the prediction.
  352|     90|    data_offset = next_data_id * num_components_;
  353|    646|  } else {
  354|       |    // None of the other corners have a valid value. Use the last encoded value
  355|       |    // as the prediction if possible.
  356|    646|    if (data_id > 0) {
  ------------------
  |  Branch (356:9): [True: 432, False: 214]
  ------------------
  357|    432|      data_offset = (data_id - 1) * num_components_;
  358|    432|    } else {
  359|       |      // We are encoding the first value. Predict 0.
  360|    642|      for (int i = 0; i < num_components_; ++i) {
  ------------------
  |  Branch (360:23): [True: 428, False: 214]
  ------------------
  361|    428|        predicted_value_[i] = 0;
  362|    428|      }
  363|    214|      return true;
  364|    214|    }
  365|    646|  }
  366|  1.56k|  for (int i = 0; i < num_components_; ++i) {
  ------------------
  |  Branch (366:19): [True: 1.04k, False: 522]
  ------------------
  367|  1.04k|    predicted_value_[i] = data[data_offset + i];
  368|  1.04k|  }
  369|    522|  return true;
  370|    736|}
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetTexCoordForEntryIdEiPKi:
  102|   476k|  Vector2f GetTexCoordForEntryId(int entry_id, const DataTypeT* data) const {
  103|   476k|    const int data_offset = entry_id * num_components_;
  104|   476k|    return Vector2f(static_cast<float>(data[data_offset]),
  105|   476k|                    static_cast<float>(data[data_offset + 1]));
  106|   476k|  }
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetPositionForEntryIdEi:
   94|  27.9k|  Vector3f GetPositionForEntryId(int entry_id) const {
   95|  27.9k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   96|  27.9k|    Vector3f pos;
   97|  27.9k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   98|  27.9k|                                 &pos[0]);
   99|  27.9k|    return pos;
  100|  27.9k|  }

_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   38|    552|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   39|    552|            attribute, transform, mesh_data),
   40|    552|        predictor_(mesh_data) {}
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   62|  1.10k|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   64|    552|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   65|    552|    DRACO_DCHECK_EQ(i, 0);
   66|    552|    (void)i;
   67|    552|    return GeometryAttribute::POSITION;
   68|    552|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   70|    550|  bool SetParentAttribute(const PointAttribute* att) override {
   71|    550|    if (!att || att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (71:9): [True: 0, False: 550]
  |  Branch (71:17): [True: 0, False: 550]
  ------------------
   72|      0|      return false;  // Invalid attribute type.
   73|      0|    }
   74|    550|    if (att->num_components() != 3) {
  ------------------
  |  Branch (74:9): [True: 1, False: 549]
  ------------------
   75|      1|      return false;  // Currently works only for 3 component positions.
   76|      1|    }
   77|    549|    predictor_.SetPositionAttribute(*att);
   78|    549|    return true;
   79|    550|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  128|    544|                                                                buffer) {
  129|       |  // Decode the delta coded orientations.
  130|    544|  int32_t num_orientations = 0;
  131|    544|  if (!buffer->Decode(&num_orientations) || num_orientations < 0) {
  ------------------
  |  Branch (131:7): [True: 4, False: 540]
  |  Branch (131:45): [True: 10, False: 530]
  ------------------
  132|     14|    return false;
  133|     14|  }
  134|       |
  135|       |  // Check that the decoded number of orientations is not unreasonably high.
  136|    530|  const int32_t max_num_orientations = max_num_predicted_values_;
  137|    530|  if (max_num_orientations != -1 && num_orientations > max_num_orientations) {
  ------------------
  |  Branch (137:7): [True: 530, False: 0]
  |  Branch (137:37): [True: 33, False: 497]
  ------------------
  138|     33|    return false;
  139|     33|  }
  140|       |
  141|    497|  predictor_.ResizeOrientations(num_orientations);
  142|    497|  bool last_orientation = true;
  143|    497|  RAnsBitDecoder decoder;
  144|    497|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (144:7): [True: 5, False: 492]
  ------------------
  145|      5|    return false;
  146|      5|  }
  147|   371k|  for (int i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (147:19): [True: 371k, False: 492]
  ------------------
  148|   371k|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (148:9): [True: 67.7k, False: 303k]
  ------------------
  149|  67.7k|      last_orientation = !last_orientation;
  150|  67.7k|    }
  151|   371k|    predictor_.set_orientation(i, last_orientation);
  152|   371k|  }
  153|    492|  decoder.EndDecoding();
  154|    492|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  155|    492|                                     MeshDataT>::DecodePredictionData(buffer);
  156|    497|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE24SetMaxNumPredictedValuesEi:
   81|    544|  virtual void SetMaxNumPredictedValues(int32_t num) {
   82|    544|    max_num_predicted_values_ = num;
   83|    544|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   97|    433|                                      const PointIndex* entry_to_point_id_map) {
   98|    433|  if (num_components != MeshPredictionSchemeTexCoordsPortablePredictor<
  ------------------
  |  Branch (98:7): [True: 15, False: 418]
  ------------------
   99|    433|                            DataTypeT, MeshDataT>::kNumComponents) {
  100|     15|    return false;
  101|     15|  }
  102|    418|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  103|    418|  this->transform().Init(num_components);
  104|       |
  105|    418|  const int corner_map_size =
  106|    418|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  107|    418|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (107:7): [True: 0, False: 418]
  ------------------
  108|      0|    return false;
  109|      0|  }
  110|  1.47M|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 1.47M, False: 241]
  ------------------
  111|  1.47M|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  112|  1.47M|    if (!predictor_.template ComputePredictedValue<false>(corner_id, out_data,
  ------------------
  |  Branch (112:9): [True: 177, False: 1.47M]
  ------------------
  113|  1.47M|                                                          p)) {
  114|    177|      return false;
  115|    177|    }
  116|       |
  117|  1.47M|    const int dst_offset = p * num_components;
  118|  1.47M|    this->transform().ComputeOriginalValue(predictor_.predicted_value(),
  119|  1.47M|                                           in_corr + dst_offset,
  120|  1.47M|                                           out_data + dst_offset);
  121|  1.47M|  }
  122|    241|  return true;
  123|    418|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   38|    509|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   39|    509|            attribute, transform, mesh_data),
   40|    509|        predictor_(mesh_data) {}
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   62|  1.01k|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   64|    509|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   65|    509|    DRACO_DCHECK_EQ(i, 0);
   66|    509|    (void)i;
   67|    509|    return GeometryAttribute::POSITION;
   68|    509|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   70|    507|  bool SetParentAttribute(const PointAttribute* att) override {
   71|    507|    if (!att || att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (71:9): [True: 0, False: 507]
  |  Branch (71:17): [True: 0, False: 507]
  ------------------
   72|      0|      return false;  // Invalid attribute type.
   73|      0|    }
   74|    507|    if (att->num_components() != 3) {
  ------------------
  |  Branch (74:9): [True: 1, False: 506]
  ------------------
   75|      1|      return false;  // Currently works only for 3 component positions.
   76|      1|    }
   77|    506|    predictor_.SetPositionAttribute(*att);
   78|    506|    return true;
   79|    507|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  128|    503|                                                                buffer) {
  129|       |  // Decode the delta coded orientations.
  130|    503|  int32_t num_orientations = 0;
  131|    503|  if (!buffer->Decode(&num_orientations) || num_orientations < 0) {
  ------------------
  |  Branch (131:7): [True: 3, False: 500]
  |  Branch (131:45): [True: 29, False: 471]
  ------------------
  132|     32|    return false;
  133|     32|  }
  134|       |
  135|       |  // Check that the decoded number of orientations is not unreasonably high.
  136|    471|  const int32_t max_num_orientations = max_num_predicted_values_;
  137|    471|  if (max_num_orientations != -1 && num_orientations > max_num_orientations) {
  ------------------
  |  Branch (137:7): [True: 471, False: 0]
  |  Branch (137:37): [True: 59, False: 412]
  ------------------
  138|     59|    return false;
  139|     59|  }
  140|       |
  141|    412|  predictor_.ResizeOrientations(num_orientations);
  142|    412|  bool last_orientation = true;
  143|    412|  RAnsBitDecoder decoder;
  144|    412|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (144:7): [True: 4, False: 408]
  ------------------
  145|      4|    return false;
  146|      4|  }
  147|  78.3k|  for (int i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (147:19): [True: 77.9k, False: 408]
  ------------------
  148|  77.9k|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (148:9): [True: 2.65k, False: 75.3k]
  ------------------
  149|  2.65k|      last_orientation = !last_orientation;
  150|  2.65k|    }
  151|  77.9k|    predictor_.set_orientation(i, last_orientation);
  152|  77.9k|  }
  153|    408|  decoder.EndDecoding();
  154|    408|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  155|    408|                                     MeshDataT>::DecodePredictionData(buffer);
  156|    412|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE24SetMaxNumPredictedValuesEi:
   81|    503|  virtual void SetMaxNumPredictedValues(int32_t num) {
   82|    503|    max_num_predicted_values_ = num;
   83|    503|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   97|    362|                                      const PointIndex* entry_to_point_id_map) {
   98|    362|  if (num_components != MeshPredictionSchemeTexCoordsPortablePredictor<
  ------------------
  |  Branch (98:7): [True: 16, False: 346]
  ------------------
   99|    362|                            DataTypeT, MeshDataT>::kNumComponents) {
  100|     16|    return false;
  101|     16|  }
  102|    346|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  103|    346|  this->transform().Init(num_components);
  104|       |
  105|    346|  const int corner_map_size =
  106|    346|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  107|    346|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (107:7): [True: 0, False: 346]
  ------------------
  108|      0|    return false;
  109|      0|  }
  110|   321k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 321k, False: 205]
  ------------------
  111|   321k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  112|   321k|    if (!predictor_.template ComputePredictedValue<false>(corner_id, out_data,
  ------------------
  |  Branch (112:9): [True: 141, False: 321k]
  ------------------
  113|   321k|                                                          p)) {
  114|    141|      return false;
  115|    141|    }
  116|       |
  117|   321k|    const int dst_offset = p * num_components;
  118|   321k|    this->transform().ComputeOriginalValue(predictor_.predicted_value(),
  119|   321k|                                           in_corr + dst_offset,
  120|   321k|                                           out_data + dst_offset);
  121|   321k|  }
  122|    205|  return true;
  123|    346|}

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

_ZNK5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|    265|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    665|  bool AreCorrectionsPositive() override {
   71|    665|    return transform_.AreCorrectionsPositive();
   72|    665|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    260|  bool DecodePredictionData(DecoderBuffer* buffer) override {
   49|    260|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 15, False: 245]
  ------------------
   50|     15|      return false;
   51|     15|    }
   52|    245|    return true;
   53|    260|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE9transformEv:
   81|  43.4M|  inline Transform& transform() { return transform_; }
_ZNK5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|    431|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    851|  bool AreCorrectionsPositive() override {
   71|    851|    return transform_.AreCorrectionsPositive();
   72|    851|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    422|  bool DecodePredictionData(DecoderBuffer* buffer) override {
   49|    422|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 30, False: 392]
  ------------------
   50|     30|      return false;
   51|     30|    }
   52|    392|    return true;
   53|    422|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE9transformEv:
   81|  1.47M|  inline Transform& transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   46|  8.19k|      : attribute_(attribute), transform_(transform) {}
_ZNK5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22GetNumParentAttributesEv:
   58|  5.29k|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22AreCorrectionsPositiveEv:
   70|  7.95k|  bool AreCorrectionsPositive() override {
   71|  7.95k|    return transform_.AreCorrectionsPositive();
   72|  7.95k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|  6.21k|  bool DecodePredictionData(DecoderBuffer* buffer) override {
   49|  6.21k|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 348, False: 5.86k]
  ------------------
   50|    348|      return false;
   51|    348|    }
   52|  5.86k|    return true;
   53|  6.21k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE9transformEv:
   81|  17.6M|  inline Transform& transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    674|      : attribute_(attribute), transform_(transform) {}
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    865|      : attribute_(attribute), transform_(transform) {}

_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    674|                                 const PointCloudDecoder* decoder) {
  188|    674|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    674|      method, att_id, decoder, TransformT());
  190|    674|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    674|                                 const TransformT& transform) {
  156|    674|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 674]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    674|  const PointAttribute* const att = decoder->point_cloud()->attribute(att_id);
  160|    674|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 674, 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|    674|    const MeshDecoder* const mesh_decoder =
  167|    674|        static_cast<const MeshDecoder*>(decoder);
  168|       |
  169|    674|    auto ret = CreateMeshPredictionScheme<
  170|    674|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    674|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    674|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    674|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 409, False: 265]
  ------------------
  174|    409|      return ret;
  175|    409|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    674|  }
  178|       |  // Create delta decoder.
  179|    265|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    265|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    674|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    192|      uint16_t bitstream_version) {
  143|    192|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    192|        method, attribute, transform, mesh_data, bitstream_version);
  145|    192|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    192|        uint16_t bitstream_version) {
  127|    192|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 189, False: 3]
  ------------------
  128|    189|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    189|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    189|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    189|                                                  mesh_data));
  132|    189|      }
  133|      3|      return nullptr;
  134|    192|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    224|      uint16_t bitstream_version) {
  143|    224|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    224|        method, attribute, transform, mesh_data, bitstream_version);
  145|    224|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    224|        uint16_t bitstream_version) {
  127|    224|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 220, False: 4]
  ------------------
  128|    220|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    220|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    220|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    220|                                                  mesh_data));
  132|    220|      }
  133|      4|      return nullptr;
  134|    224|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    865|                                 const PointCloudDecoder* decoder) {
  188|    865|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    865|      method, att_id, decoder, TransformT());
  190|    865|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    865|                                 const TransformT& transform) {
  156|    865|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 865]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    865|  const PointAttribute* const att = decoder->point_cloud()->attribute(att_id);
  160|    865|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 865, 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|    865|    const MeshDecoder* const mesh_decoder =
  167|    865|        static_cast<const MeshDecoder*>(decoder);
  168|       |
  169|    865|    auto ret = CreateMeshPredictionScheme<
  170|    865|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    865|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    865|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    865|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 434, False: 431]
  ------------------
  174|    434|      return ret;
  175|    434|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    865|  }
  178|       |  // Create delta decoder.
  179|    431|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    431|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    865|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    211|      uint16_t bitstream_version) {
  143|    211|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    211|        method, attribute, transform, mesh_data, bitstream_version);
  145|    211|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    211|        uint16_t bitstream_version) {
  111|    211|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 201, False: 10]
  ------------------
  112|    201|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    201|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    201|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    201|                                                  mesh_data));
  116|    201|      }
  117|     10|      return nullptr;
  118|    211|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    240|      uint16_t bitstream_version) {
  143|    240|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    240|        method, attribute, transform, mesh_data, bitstream_version);
  145|    240|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    240|        uint16_t bitstream_version) {
  111|    240|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 233, False: 7]
  ------------------
  112|    233|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    233|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    233|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    233|                                                  mesh_data));
  116|    233|      }
  117|      7|      return nullptr;
  118|    240|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|  8.19k|                                 const PointCloudDecoder* decoder) {
  188|  8.19k|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|  8.19k|      method, att_id, decoder, TransformT());
  190|  8.19k|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|  8.19k|                                 const TransformT& transform) {
  156|  8.19k|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 8.19k]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|  8.19k|  const PointAttribute* const att = decoder->point_cloud()->attribute(att_id);
  160|  8.19k|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 8.19k, 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|  8.19k|    const MeshDecoder* const mesh_decoder =
  167|  8.19k|        static_cast<const MeshDecoder*>(decoder);
  168|       |
  169|  8.19k|    auto ret = CreateMeshPredictionScheme<
  170|  8.19k|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|  8.19k|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|  8.19k|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|  8.19k|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 7.68k, False: 510]
  ------------------
  174|  7.68k|      return ret;
  175|  7.68k|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|  8.19k|  }
  178|       |  // Create delta decoder.
  179|    510|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    510|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|  8.19k|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  3.79k|      uint16_t bitstream_version) {
  143|  3.79k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  3.79k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  3.79k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  3.79k|        uint16_t bitstream_version) {
   53|  3.79k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 1.09k, False: 2.69k]
  ------------------
   54|  1.09k|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|  1.09k|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|  1.09k|                                                         MeshDataT>(
   57|  1.09k|                attribute, transform, mesh_data));
   58|  1.09k|      }
   59|  2.69k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  2.69k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 653, False: 2.04k]
  ------------------
   61|    653|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    653|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    653|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    653|                                                  mesh_data));
   65|    653|      }
   66|  2.04k|#endif
   67|  2.04k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 635, False: 1.41k]
  ------------------
   68|    635|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    635|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    635|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    635|                                                  mesh_data));
   72|    635|      }
   73|  1.41k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|  1.41k|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 310, False: 1.10k]
  ------------------
   75|    310|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    310|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    310|                                                     MeshDataT>(
   78|    310|                attribute, transform, mesh_data, bitstream_version));
   79|    310|      }
   80|  1.10k|#endif
   81|  1.10k|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 552, False: 548]
  ------------------
   82|    552|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    552|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    552|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    552|                                                  mesh_data));
   86|    552|      }
   87|    548|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    548|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 548, False: 0]
  ------------------
   89|    548|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    548|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    548|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    548|                                                  mesh_data));
   93|    548|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  3.79k|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  3.89k|      uint16_t bitstream_version) {
  143|  3.89k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  3.89k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  3.89k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  3.89k|        uint16_t bitstream_version) {
   53|  3.89k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 954, False: 2.93k]
  ------------------
   54|    954|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    954|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    954|                                                         MeshDataT>(
   57|    954|                attribute, transform, mesh_data));
   58|    954|      }
   59|  2.93k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  2.93k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 724, False: 2.21k]
  ------------------
   61|    724|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    724|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    724|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    724|                                                  mesh_data));
   65|    724|      }
   66|  2.21k|#endif
   67|  2.21k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 726, False: 1.48k]
  ------------------
   68|    726|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    726|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    726|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    726|                                                  mesh_data));
   72|    726|      }
   73|  1.48k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|  1.48k|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 335, False: 1.15k]
  ------------------
   75|    335|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    335|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    335|                                                     MeshDataT>(
   78|    335|                attribute, transform, mesh_data, bitstream_version));
   79|    335|      }
   80|  1.15k|#endif
   81|  1.15k|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 509, False: 642]
  ------------------
   82|    509|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    509|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    509|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    509|                                                  mesh_data));
   86|    509|      }
   87|    642|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    642|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 642, False: 0]
  ------------------
   89|    642|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    642|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    642|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    642|                                                  mesh_data));
   93|    642|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  3.89k|    }

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

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

_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    674|    uint16_t bitstream_version) {
   38|    674|  const PointAttribute* const att = source->point_cloud()->attribute(att_id);
   39|    674|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 674, False: 0]
  ------------------
   40|    674|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 178, False: 496]
  ------------------
   41|    496|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 10, False: 486]
  ------------------
   42|    486|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 4, False: 482]
  ------------------
   43|    482|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 9, False: 473]
  ------------------
   44|    473|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 411, False: 62]
  ------------------
   45|    655|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 43, False: 19]
  ------------------
   46|    655|    const CornerTable* const ct = source->GetCornerTable();
   47|    655|    const MeshAttributeIndicesEncodingData* const encoding_data =
   48|    655|        source->GetAttributeEncodingData(att_id);
   49|    655|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 239, False: 416]
  |  Branch (49:26): [True: 0, False: 416]
  ------------------
   50|       |      // No connectivity data found.
   51|    239|      return nullptr;
   52|    239|    }
   53|       |    // Connectivity data exists.
   54|    416|    const MeshAttributeCornerTable* const att_ct =
   55|    416|        source->GetAttributeCornerTable(att_id);
   56|    416|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 192, False: 224]
  ------------------
   57|    192|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    192|      MeshData md;
   59|    192|      md.Set(source->mesh(), att_ct,
   60|    192|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    192|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    192|      MeshPredictionSchemeFactoryT factory;
   63|    192|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    192|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 189, False: 3]
  ------------------
   65|    189|        return ret;
   66|    189|      }
   67|    224|    } else {
   68|    224|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    224|      MeshData md;
   70|    224|      md.Set(source->mesh(), ct,
   71|    224|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    224|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    224|      MeshPredictionSchemeFactoryT factory;
   74|    224|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    224|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 220, False: 4]
  ------------------
   76|    220|        return ret;
   77|    220|      }
   78|    224|    }
   79|    416|  }
   80|     26|  return nullptr;
   81|    674|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    865|    uint16_t bitstream_version) {
   38|    865|  const PointAttribute* const att = source->point_cloud()->attribute(att_id);
   39|    865|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 865, False: 0]
  ------------------
   40|    865|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 191, False: 674]
  ------------------
   41|    674|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 11, False: 663]
  ------------------
   42|    663|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 11, False: 652]
  ------------------
   43|    652|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 161, False: 491]
  ------------------
   44|    491|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 434, False: 57]
  ------------------
   45|    860|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 52, False: 5]
  ------------------
   46|    860|    const CornerTable* const ct = source->GetCornerTable();
   47|    860|    const MeshAttributeIndicesEncodingData* const encoding_data =
   48|    860|        source->GetAttributeEncodingData(att_id);
   49|    860|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 409, False: 451]
  |  Branch (49:26): [True: 0, False: 451]
  ------------------
   50|       |      // No connectivity data found.
   51|    409|      return nullptr;
   52|    409|    }
   53|       |    // Connectivity data exists.
   54|    451|    const MeshAttributeCornerTable* const att_ct =
   55|    451|        source->GetAttributeCornerTable(att_id);
   56|    451|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 211, False: 240]
  ------------------
   57|    211|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    211|      MeshData md;
   59|    211|      md.Set(source->mesh(), att_ct,
   60|    211|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    211|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    211|      MeshPredictionSchemeFactoryT factory;
   63|    211|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    211|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 201, False: 10]
  ------------------
   65|    201|        return ret;
   66|    201|      }
   67|    240|    } else {
   68|    240|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    240|      MeshData md;
   70|    240|      md.Set(source->mesh(), ct,
   71|    240|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    240|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    240|      MeshPredictionSchemeFactoryT factory;
   74|    240|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    240|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 233, False: 7]
  ------------------
   76|    233|        return ret;
   77|    233|      }
   78|    240|    }
   79|    451|  }
   80|     22|  return nullptr;
   81|    865|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|  8.19k|    uint16_t bitstream_version) {
   38|  8.19k|  const PointAttribute* const att = source->point_cloud()->attribute(att_id);
   39|  8.19k|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 8.19k, False: 0]
  ------------------
   40|  8.19k|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 2.19k, False: 5.99k]
  ------------------
   41|  5.99k|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 1.48k, False: 4.50k]
  ------------------
   42|  4.50k|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 1.37k, False: 3.13k]
  ------------------
   43|  3.13k|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 1.06k, False: 2.06k]
  ------------------
   44|  2.06k|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 1.21k, False: 859]
  ------------------
   45|  7.97k|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 648, False: 211]
  ------------------
   46|  7.97k|    const CornerTable* const ct = source->GetCornerTable();
   47|  7.97k|    const MeshAttributeIndicesEncodingData* const encoding_data =
   48|  7.97k|        source->GetAttributeEncodingData(att_id);
   49|  7.97k|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 299, False: 7.68k]
  |  Branch (49:26): [True: 0, False: 7.68k]
  ------------------
   50|       |      // No connectivity data found.
   51|    299|      return nullptr;
   52|    299|    }
   53|       |    // Connectivity data exists.
   54|  7.68k|    const MeshAttributeCornerTable* const att_ct =
   55|  7.68k|        source->GetAttributeCornerTable(att_id);
   56|  7.68k|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 3.79k, False: 3.89k]
  ------------------
   57|  3.79k|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|  3.79k|      MeshData md;
   59|  3.79k|      md.Set(source->mesh(), att_ct,
   60|  3.79k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|  3.79k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|  3.79k|      MeshPredictionSchemeFactoryT factory;
   63|  3.79k|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|  3.79k|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 3.79k, False: 0]
  ------------------
   65|  3.79k|        return ret;
   66|  3.79k|      }
   67|  3.89k|    } else {
   68|  3.89k|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|  3.89k|      MeshData md;
   70|  3.89k|      md.Set(source->mesh(), ct,
   71|  3.89k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|  3.89k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|  3.89k|      MeshPredictionSchemeFactoryT factory;
   74|  3.89k|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|  3.89k|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 3.89k, False: 0]
  ------------------
   76|  3.89k|        return ret;
   77|  3.89k|      }
   78|  3.89k|    }
   79|  7.68k|  }
   80|    211|  return nullptr;
   81|  8.19k|}

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

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

_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE14IsInBottomLeftERKNS_7VectorDIiLi2EEE:
   92|  1.47M|  bool IsInBottomLeft(const Point2& p) const {
   93|  1.47M|    if (p[0] == 0 && p[1] == 0) {
  ------------------
  |  Branch (93:9): [True: 1.37M, False: 94.9k]
  |  Branch (93:22): [True: 1.36M, False: 12.9k]
  ------------------
   94|  1.36M|      return true;
   95|  1.36M|    }
   96|   107k|    return (p[0] < 0 && p[1] <= 0);
  ------------------
  |  Branch (96:13): [True: 47.8k, False: 60.0k]
  |  Branch (96:25): [True: 23.8k, False: 23.9k]
  ------------------
   97|  1.47M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE16GetRotationCountENS_7VectorDIiLi2EEE:
   50|  1.47M|  int32_t GetRotationCount(Point2 pred) const {
   51|  1.47M|    const DataType sign_x = pred[0];
   52|  1.47M|    const DataType sign_y = pred[1];
   53|       |
   54|  1.47M|    int32_t rotation_count = 0;
   55|  1.47M|    if (sign_x == 0) {
  ------------------
  |  Branch (55:9): [True: 1.37M, False: 94.9k]
  ------------------
   56|  1.37M|      if (sign_y == 0) {
  ------------------
  |  Branch (56:11): [True: 1.36M, False: 12.9k]
  ------------------
   57|  1.36M|        rotation_count = 0;
   58|  1.36M|      } else if (sign_y > 0) {
  ------------------
  |  Branch (58:18): [True: 6.40k, False: 6.54k]
  ------------------
   59|  6.40k|        rotation_count = 3;
   60|  6.54k|      } else {
   61|  6.54k|        rotation_count = 1;
   62|  6.54k|      }
   63|  1.37M|    } else if (sign_x > 0) {
  ------------------
  |  Branch (63:16): [True: 47.1k, False: 47.8k]
  ------------------
   64|  47.1k|      if (sign_y >= 0) {
  ------------------
  |  Branch (64:11): [True: 22.4k, False: 24.6k]
  ------------------
   65|  22.4k|        rotation_count = 2;
   66|  24.6k|      } else {
   67|  24.6k|        rotation_count = 1;
   68|  24.6k|      }
   69|  47.8k|    } else {
   70|  47.8k|      if (sign_y <= 0) {
  ------------------
  |  Branch (70:11): [True: 23.8k, False: 23.9k]
  ------------------
   71|  23.8k|        rotation_count = 0;
   72|  23.9k|      } else {
   73|  23.9k|        rotation_count = 3;
   74|  23.9k|      }
   75|  47.8k|    }
   76|  1.47M|    return rotation_count;
   77|  1.47M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE11RotatePointENS_7VectorDIiLi2EEEi:
   79|   168k|  Point2 RotatePoint(Point2 p, int32_t rotation_count) const {
   80|   168k|    switch (rotation_count) {
   81|  61.5k|      case 1:
  ------------------
  |  Branch (81:7): [True: 61.5k, False: 106k]
  ------------------
   82|  61.5k|        return Point2(p[1], -p[0]);
   83|  44.9k|      case 2:
  ------------------
  |  Branch (83:7): [True: 44.9k, False: 123k]
  ------------------
   84|  44.9k|        return Point2(-p[0], -p[1]);
   85|  61.5k|      case 3:
  ------------------
  |  Branch (85:7): [True: 61.5k, False: 106k]
  ------------------
   86|  61.5k|        return Point2(-p[1], p[0]);
   87|      0|      default:
  ------------------
  |  Branch (87:7): [True: 0, False: 168k]
  ------------------
   88|      0|        return p;
   89|   168k|    }
   90|   168k|  }
_ZN5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiEC2Ev:
   40|    865|  PredictionSchemeNormalOctahedronCanonicalizedTransformBase() : Base() {}

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

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

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

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

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

_ZNK5draco26SequentialAttributeDecoder9attributeEv:
   53|  12.2k|  const PointAttribute* attribute() const { return attribute_; }
_ZN5draco26SequentialAttributeDecoder9attributeEv:
   54|   373M|  PointAttribute* attribute() { return attribute_; }
_ZNK5draco26SequentialAttributeDecoder12attribute_idEv:
   55|  9.72k|  int attribute_id() const { return attribute_id_; }
_ZNK5draco26SequentialAttributeDecoder7decoderEv:
   56|  43.8k|  PointCloudDecoder* decoder() const { return decoder_; }
_ZN5draco26SequentialAttributeDecoder20SetPortableAttributeENSt3__110unique_ptrINS_14PointAttributeENS1_14default_deleteIS3_EEEE:
   69|  13.8k|  void SetPortableAttribute(std::unique_ptr<PointAttribute> att) {
   70|  13.8k|    portable_attribute_ = std::move(att);
   71|  13.8k|  }
_ZN5draco26SequentialAttributeDecoder18portable_attributeEv:
   73|  45.9k|  PointAttribute* portable_attribute() { return portable_attribute_.get(); }
_ZN5draco26SequentialAttributeDecoderD2Ev:
   29|  43.7k|  virtual ~SequentialAttributeDecoder() = default;

_ZN5draco37SequentialAttributeDecodersControllerC2ENSt3__110unique_ptrINS_15PointsSequencerENS1_14default_deleteIS3_EEEE:
   26|  39.7k|    : sequencer_(std::move(sequencer)) {}
_ZN5draco37SequentialAttributeDecodersController27DecodeAttributesDecoderDataEPNS_13DecoderBufferE:
   29|  10.7k|    DecoderBuffer* buffer) {
   30|  10.7k|  if (!AttributesDecoder::DecodeAttributesDecoderData(buffer)) {
  ------------------
  |  Branch (30:7): [True: 268, False: 10.4k]
  ------------------
   31|    268|    return false;
   32|    268|  }
   33|       |  // Decode unique ids of all sequential encoders and create them.
   34|  10.4k|  const int32_t num_attributes = GetNumAttributes();
   35|  10.4k|  sequential_decoders_.resize(num_attributes);
   36|  54.1k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (36:19): [True: 43.7k, False: 10.4k]
  ------------------
   37|  43.7k|    uint8_t decoder_type;
   38|  43.7k|    if (!buffer->Decode(&decoder_type)) {
  ------------------
  |  Branch (38:9): [True: 18, False: 43.7k]
  ------------------
   39|     18|      return false;
   40|     18|    }
   41|       |    // Create the decoder from the id.
   42|  43.7k|    sequential_decoders_[i] = CreateSequentialDecoder(decoder_type);
   43|  43.7k|    if (!sequential_decoders_[i]) {
  ------------------
  |  Branch (43:9): [True: 13, False: 43.7k]
  ------------------
   44|     13|      return false;
   45|     13|    }
   46|  43.7k|    if (!sequential_decoders_[i]->Init(GetDecoder(), GetAttributeId(i))) {
  ------------------
  |  Branch (46:9): [True: 6, False: 43.7k]
  ------------------
   47|      6|      return false;
   48|      6|    }
   49|  43.7k|  }
   50|  10.4k|  return true;
   51|  10.4k|}
_ZN5draco37SequentialAttributeDecodersController16DecodeAttributesEPNS_13DecoderBufferE:
   54|  7.45k|    DecoderBuffer* buffer) {
   55|  7.45k|  if (!sequencer_ || !sequencer_->GenerateSequence(&point_ids_)) {
  ------------------
  |  Branch (55:7): [True: 0, False: 7.45k]
  |  Branch (55:22): [True: 5, False: 7.44k]
  ------------------
   56|      5|    return false;
   57|      5|  }
   58|       |  // Initialize point to attribute value mapping for all decoded attributes.
   59|  7.44k|  const int32_t num_attributes = GetNumAttributes();
   60|  29.3k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (60:19): [True: 21.8k, False: 7.44k]
  ------------------
   61|  21.8k|    PointAttribute* const pa =
   62|  21.8k|        GetDecoder()->point_cloud()->attribute(GetAttributeId(i));
   63|  21.8k|    if (!sequencer_->UpdatePointToAttributeIndexMapping(pa)) {
  ------------------
  |  Branch (63:9): [True: 3, False: 21.8k]
  ------------------
   64|      3|      return false;
   65|      3|    }
   66|  21.8k|  }
   67|  7.44k|  return AttributesDecoder::DecodeAttributes(buffer);
   68|  7.44k|}
_ZN5draco37SequentialAttributeDecodersController24DecodePortableAttributesEPNS_13DecoderBufferE:
   71|  7.44k|    DecoderBuffer* in_buffer) {
   72|  7.44k|  const int32_t num_attributes = GetNumAttributes();
   73|  19.7k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (73:19): [True: 15.8k, False: 3.89k]
  ------------------
   74|  15.8k|    if (!sequential_decoders_[i]->DecodePortableAttribute(point_ids_,
  ------------------
  |  Branch (74:9): [True: 3.55k, False: 12.2k]
  ------------------
   75|  15.8k|                                                          in_buffer)) {
   76|  3.55k|      return false;
   77|  3.55k|    }
   78|  15.8k|  }
   79|  3.89k|  return true;
   80|  7.44k|}
_ZN5draco37SequentialAttributeDecodersController36DecodeDataNeededByPortableTransformsEPNS_13DecoderBufferE:
   83|  3.89k|    DecodeDataNeededByPortableTransforms(DecoderBuffer* in_buffer) {
   84|  3.89k|  const int32_t num_attributes = GetNumAttributes();
   85|  9.21k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (85:19): [True: 6.48k, False: 2.73k]
  ------------------
   86|  6.48k|    if (!sequential_decoders_[i]->DecodeDataNeededByPortableTransform(
  ------------------
  |  Branch (86:9): [True: 1.15k, False: 5.32k]
  ------------------
   87|  6.48k|            point_ids_, in_buffer)) {
   88|  1.15k|      return false;
   89|  1.15k|    }
   90|  6.48k|  }
   91|  2.73k|  return true;
   92|  3.89k|}
_ZN5draco37SequentialAttributeDecodersController35TransformAttributesToOriginalFormatEv:
   95|  2.73k|    TransformAttributesToOriginalFormat() {
   96|  2.73k|  const int32_t num_attributes = GetNumAttributes();
   97|  6.79k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (97:19): [True: 4.67k, False: 2.12k]
  ------------------
   98|       |    // Check whether the attribute transform should be skipped.
   99|  4.67k|    if (GetDecoder()->options()) {
  ------------------
  |  Branch (99:9): [True: 4.67k, False: 0]
  ------------------
  100|  4.67k|      const PointAttribute* const attribute =
  101|  4.67k|          sequential_decoders_[i]->attribute();
  102|  4.67k|      const PointAttribute* const portable_attribute =
  103|  4.67k|          sequential_decoders_[i]->GetPortableAttribute();
  104|  4.67k|      if (portable_attribute &&
  ------------------
  |  Branch (104:11): [True: 4.13k, False: 537]
  |  Branch (104:11): [True: 1.04k, False: 3.62k]
  ------------------
  105|  4.13k|          GetDecoder()->options()->GetAttributeBool(
  ------------------
  |  Branch (105:11): [True: 1.04k, False: 3.09k]
  ------------------
  106|  4.13k|              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|  1.04k|        sequential_decoders_[i]->attribute()->CopyFrom(*portable_attribute);
  113|  1.04k|        continue;
  114|  1.04k|      }
  115|  4.67k|    }
  116|  3.62k|    if (!sequential_decoders_[i]->TransformAttributeToOriginalFormat(
  ------------------
  |  Branch (116:9): [True: 610, False: 3.01k]
  ------------------
  117|  3.62k|            point_ids_)) {
  118|    610|      return false;
  119|    610|    }
  120|  3.62k|  }
  121|  2.12k|  return true;
  122|  2.73k|}
_ZN5draco37SequentialAttributeDecodersController23CreateSequentialDecoderEh:
  126|  43.7k|    uint8_t decoder_type) {
  127|  43.7k|  switch (decoder_type) {
  128|  2.84k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_GENERIC:
  ------------------
  |  Branch (128:5): [True: 2.84k, False: 40.8k]
  ------------------
  129|  2.84k|      return std::unique_ptr<SequentialAttributeDecoder>(
  130|  2.84k|          new SequentialAttributeDecoder());
  131|  38.1k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_INTEGER:
  ------------------
  |  Branch (131:5): [True: 38.1k, False: 5.57k]
  ------------------
  132|  38.1k|      return std::unique_ptr<SequentialAttributeDecoder>(
  133|  38.1k|          new SequentialIntegerAttributeDecoder());
  134|    993|    case SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION:
  ------------------
  |  Branch (134:5): [True: 993, False: 42.7k]
  ------------------
  135|    993|      return std::unique_ptr<SequentialAttributeDecoder>(
  136|    993|          new SequentialQuantizationAttributeDecoder());
  137|      0|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
  138|  1.71k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS:
  ------------------
  |  Branch (138:5): [True: 1.71k, False: 42.0k]
  ------------------
  139|  1.71k|      return std::unique_ptr<SequentialNormalAttributeDecoder>(
  140|  1.71k|          new SequentialNormalAttributeDecoder());
  141|      0|#endif
  142|     13|    default:
  ------------------
  |  Branch (142:5): [True: 13, False: 43.7k]
  ------------------
  143|     13|      break;
  144|  43.7k|  }
  145|       |  // Unknown or unsupported decoder type.
  146|     13|  return nullptr;
  147|  43.7k|}

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

_ZN5draco33SequentialIntegerAttributeDecoderC2Ev:
   23|  40.8k|SequentialIntegerAttributeDecoder::SequentialIntegerAttributeDecoder() =
_ZN5draco33SequentialIntegerAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   27|  40.8k|                                             int attribute_id) {
   28|  40.8k|  if (!SequentialAttributeDecoder::Init(decoder, attribute_id)) {
  ------------------
  |  Branch (28:7): [True: 0, False: 40.8k]
  ------------------
   29|      0|    return false;
   30|      0|  }
   31|  40.8k|  return true;
   32|  40.8k|}
_ZN5draco33SequentialIntegerAttributeDecoder34TransformAttributeToOriginalFormatERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEE:
   35|  3.09k|    const std::vector<PointIndex>& point_ids) {
   36|  3.09k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   37|  3.09k|  if (decoder() &&
  ------------------
  |  Branch (37:7): [True: 3.09k, False: 0]
  ------------------
   38|  3.09k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.09k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (38:7): [True: 6, False: 3.08k]
  ------------------
   39|      6|    return true;  // Don't revert the transform here for older files.
   40|      6|  }
   41|  3.08k|#endif
   42|  3.08k|  return StoreValues(static_cast<uint32_t>(point_ids.size()));
   43|  3.09k|}
_ZN5draco33SequentialIntegerAttributeDecoder12DecodeValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   46|  14.7k|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
   47|       |  // Decode prediction scheme.
   48|  14.7k|  int8_t prediction_scheme_method;
   49|  14.7k|  if (!in_buffer->Decode(&prediction_scheme_method)) {
  ------------------
  |  Branch (49:7): [True: 285, False: 14.4k]
  ------------------
   50|    285|    return false;
   51|    285|  }
   52|       |  // Check that decoded prediction scheme method type is valid.
   53|  14.4k|  if (prediction_scheme_method < PREDICTION_NONE ||
  ------------------
  |  Branch (53:7): [True: 112, False: 14.3k]
  ------------------
   54|  14.3k|      prediction_scheme_method >= NUM_PREDICTION_SCHEMES) {
  ------------------
  |  Branch (54:7): [True: 244, False: 14.1k]
  ------------------
   55|    356|    return false;
   56|    356|  }
   57|  14.1k|  if (prediction_scheme_method != PREDICTION_NONE) {
  ------------------
  |  Branch (57:7): [True: 13.4k, False: 625]
  ------------------
   58|  13.4k|    int8_t prediction_transform_type;
   59|  13.4k|    if (!in_buffer->Decode(&prediction_transform_type)) {
  ------------------
  |  Branch (59:9): [True: 102, False: 13.3k]
  ------------------
   60|    102|      return false;
   61|    102|    }
   62|       |    // Check that decoded prediction scheme transform type is valid.
   63|  13.3k|    if (prediction_transform_type < PREDICTION_TRANSFORM_NONE ||
  ------------------
  |  Branch (63:9): [True: 46, False: 13.3k]
  ------------------
   64|  13.3k|        prediction_transform_type >= NUM_PREDICTION_SCHEME_TRANSFORM_TYPES) {
  ------------------
  |  Branch (64:9): [True: 80, False: 13.2k]
  ------------------
   65|    126|      return false;
   66|    126|    }
   67|  13.2k|    prediction_scheme_ = CreateIntPredictionScheme(
   68|  13.2k|        static_cast<PredictionSchemeMethod>(prediction_scheme_method),
   69|  13.2k|        static_cast<PredictionSchemeTransformType>(prediction_transform_type));
   70|  13.2k|  }
   71|       |
   72|  13.8k|  if (prediction_scheme_) {
  ------------------
  |  Branch (72:7): [True: 9.72k, False: 4.16k]
  ------------------
   73|  9.72k|    if (!InitPredictionScheme(prediction_scheme_.get())) {
  ------------------
  |  Branch (73:9): [True: 31, False: 9.69k]
  ------------------
   74|     31|      return false;
   75|     31|    }
   76|  9.72k|  }
   77|       |
   78|  13.8k|  if (!DecodeIntegerValues(point_ids, in_buffer)) {
  ------------------
  |  Branch (78:7): [True: 2.46k, False: 11.3k]
  ------------------
   79|  2.46k|    return false;
   80|  2.46k|  }
   81|       |
   82|  11.3k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   83|  11.3k|  const int32_t num_values = static_cast<uint32_t>(point_ids.size());
   84|  11.3k|  if (decoder() &&
  ------------------
  |  Branch (84:7): [True: 11.3k, False: 0]
  ------------------
   85|  11.3k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  11.3k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (85:7): [True: 34, False: 11.3k]
  ------------------
   86|       |    // For older files, revert the transform right after we decode the data.
   87|     34|    if (!StoreValues(num_values)) {
  ------------------
  |  Branch (87:9): [True: 1, False: 33]
  ------------------
   88|      1|      return false;
   89|      1|    }
   90|     34|  }
   91|  11.3k|#endif
   92|  11.3k|  return true;
   93|  11.3k|}
_ZN5draco33SequentialIntegerAttributeDecoder25CreateIntPredictionSchemeENS_22PredictionSchemeMethodENS_29PredictionSchemeTransformTypeE:
   98|  11.6k|    PredictionSchemeTransformType transform_type) {
   99|  11.6k|  if (transform_type != PREDICTION_TRANSFORM_WRAP) {
  ------------------
  |  Branch (99:7): [True: 3.50k, False: 8.19k]
  ------------------
  100|  3.50k|    return nullptr;  // For now we support only wrap transform.
  101|  3.50k|  }
  102|  8.19k|  return CreatePredictionSchemeForDecoder<
  103|  8.19k|      int32_t, PredictionSchemeWrapDecodingTransform<int32_t>>(
  104|  8.19k|      method, attribute_id(), decoder());
  105|  11.6k|}
_ZN5draco33SequentialIntegerAttributeDecoder19DecodeIntegerValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
  108|  13.8k|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
  109|  13.8k|  const int num_components = GetNumValueComponents();
  110|  13.8k|  if (num_components <= 0) {
  ------------------
  |  Branch (110:7): [True: 0, False: 13.8k]
  ------------------
  111|      0|    return false;
  112|      0|  }
  113|  13.8k|  const size_t num_entries = point_ids.size();
  114|  13.8k|  const size_t num_values = num_entries * num_components;
  115|  13.8k|  PreparePortableAttribute(static_cast<int>(num_entries), num_components);
  116|  13.8k|  int32_t* const portable_attribute_data = GetPortableAttributeData();
  117|  13.8k|  if (portable_attribute_data == nullptr) {
  ------------------
  |  Branch (117:7): [True: 22, False: 13.8k]
  ------------------
  118|     22|    return false;
  119|     22|  }
  120|  13.8k|  uint8_t compressed;
  121|  13.8k|  if (!in_buffer->Decode(&compressed)) {
  ------------------
  |  Branch (121:7): [True: 40, False: 13.7k]
  ------------------
  122|     40|    return false;
  123|     40|  }
  124|  13.7k|  if (compressed > 0) {
  ------------------
  |  Branch (124:7): [True: 702, False: 13.0k]
  ------------------
  125|       |    // Decode compressed values.
  126|    702|    if (!DecodeSymbols(static_cast<uint32_t>(num_values), num_components,
  ------------------
  |  Branch (126:9): [True: 273, False: 429]
  ------------------
  127|    702|                       in_buffer,
  128|    702|                       reinterpret_cast<uint32_t*>(portable_attribute_data))) {
  129|    273|      return false;
  130|    273|    }
  131|  13.0k|  } else {
  132|       |    // Decode the integer data directly.
  133|       |    // Get the number of bytes for a given entry.
  134|  13.0k|    uint8_t num_bytes;
  135|  13.0k|    if (!in_buffer->Decode(&num_bytes)) {
  ------------------
  |  Branch (135:9): [True: 18, False: 13.0k]
  ------------------
  136|     18|      return false;
  137|     18|    }
  138|  13.0k|    if (num_bytes == DataTypeLength(DT_INT32)) {
  ------------------
  |  Branch (138:9): [True: 521, False: 12.5k]
  ------------------
  139|    521|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (139:11): [True: 0, False: 521]
  ------------------
  140|    521|          sizeof(int32_t) * num_values) {
  141|      0|        return false;
  142|      0|      }
  143|    521|      if (!in_buffer->Decode(portable_attribute_data,
  ------------------
  |  Branch (143:11): [True: 2, False: 519]
  ------------------
  144|    521|                             sizeof(int32_t) * num_values)) {
  145|      2|        return false;
  146|      2|      }
  147|  12.5k|    } else {
  148|  12.5k|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (148:11): [True: 47, False: 12.5k]
  ------------------
  149|  12.5k|          num_bytes * num_values) {
  150|     47|        return false;
  151|     47|      }
  152|  12.5k|      if (in_buffer->remaining_size() <
  ------------------
  |  Branch (152:11): [True: 19, False: 12.4k]
  ------------------
  153|  12.5k|          static_cast<int64_t>(num_bytes) * static_cast<int64_t>(num_values)) {
  154|     19|        return false;
  155|     19|      }
  156|  1.92G|      for (size_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (156:26): [True: 1.92G, False: 12.4k]
  ------------------
  157|  1.92G|        if (!in_buffer->Decode(portable_attribute_data + i, num_bytes)) {
  ------------------
  |  Branch (157:13): [True: 0, False: 1.92G]
  ------------------
  158|      0|          return false;
  159|      0|        }
  160|  1.92G|      }
  161|  12.4k|    }
  162|  13.0k|  }
  163|       |
  164|  13.4k|  if (num_values > 0 && (prediction_scheme_ == nullptr ||
  ------------------
  |  Branch (164:7): [True: 13.4k, False: 0]
  |  Branch (164:26): [True: 3.95k, False: 9.47k]
  ------------------
  165|  11.9k|                         !prediction_scheme_->AreCorrectionsPositive())) {
  ------------------
  |  Branch (165:26): [True: 7.95k, False: 1.51k]
  ------------------
  166|       |    // Convert the values back to the original signed format.
  167|  11.9k|    ConvertSymbolsToSignedInts(
  168|  11.9k|        reinterpret_cast<const uint32_t*>(portable_attribute_data),
  169|  11.9k|        static_cast<int>(num_values), portable_attribute_data);
  170|  11.9k|  }
  171|       |
  172|       |  // If the data was encoded with a prediction scheme, we must revert it.
  173|  13.4k|  if (prediction_scheme_) {
  ------------------
  |  Branch (173:7): [True: 9.47k, False: 3.95k]
  ------------------
  174|  9.47k|    prediction_scheme_->SetMaxNumPredictedValues(num_values);
  175|  9.47k|    if (!prediction_scheme_->DecodePredictionData(in_buffer)) {
  ------------------
  |  Branch (175:9): [True: 1.19k, False: 8.27k]
  ------------------
  176|  1.19k|      return false;
  177|  1.19k|    }
  178|       |
  179|  8.27k|    if (num_values > 0) {
  ------------------
  |  Branch (179:9): [True: 8.27k, False: 0]
  ------------------
  180|  8.27k|      if (!prediction_scheme_->ComputeOriginalValues(
  ------------------
  |  Branch (180:11): [True: 843, False: 7.43k]
  ------------------
  181|  8.27k|              portable_attribute_data, portable_attribute_data,
  182|  8.27k|              static_cast<int>(num_values), num_components, point_ids.data())) {
  183|    843|        return false;
  184|    843|      }
  185|  8.27k|    }
  186|  8.27k|  }
  187|  11.3k|  return true;
  188|  13.4k|}
_ZN5draco33SequentialIntegerAttributeDecoder11StoreValuesEj:
  190|  2.29k|bool SequentialIntegerAttributeDecoder::StoreValues(uint32_t num_values) {
  191|  2.29k|  switch (attribute()->data_type()) {
  192|    287|    case DT_UINT8:
  ------------------
  |  Branch (192:5): [True: 287, False: 2.01k]
  ------------------
  193|    287|      StoreTypedValues<uint8_t>(num_values);
  194|    287|      break;
  195|  1.12k|    case DT_INT8:
  ------------------
  |  Branch (195:5): [True: 1.12k, False: 1.17k]
  ------------------
  196|  1.12k|      StoreTypedValues<int8_t>(num_values);
  197|  1.12k|      break;
  198|    193|    case DT_UINT16:
  ------------------
  |  Branch (198:5): [True: 193, False: 2.10k]
  ------------------
  199|    193|      StoreTypedValues<uint16_t>(num_values);
  200|    193|      break;
  201|    192|    case DT_INT16:
  ------------------
  |  Branch (201:5): [True: 192, False: 2.10k]
  ------------------
  202|    192|      StoreTypedValues<int16_t>(num_values);
  203|    192|      break;
  204|    152|    case DT_UINT32:
  ------------------
  |  Branch (204:5): [True: 152, False: 2.14k]
  ------------------
  205|    152|      StoreTypedValues<uint32_t>(num_values);
  206|    152|      break;
  207|    224|    case DT_INT32:
  ------------------
  |  Branch (207:5): [True: 224, False: 2.07k]
  ------------------
  208|    224|      StoreTypedValues<int32_t>(num_values);
  209|    224|      break;
  210|    122|    default:
  ------------------
  |  Branch (210:5): [True: 122, False: 2.17k]
  ------------------
  211|    122|      return false;
  212|  2.29k|  }
  213|  2.17k|  return true;
  214|  2.29k|}
_ZN5draco33SequentialIntegerAttributeDecoder24PreparePortableAttributeEii:
  238|  13.8k|    int num_entries, int num_components) {
  239|  13.8k|  GeometryAttribute ga;
  240|  13.8k|  ga.Init(attribute()->attribute_type(), nullptr, num_components, DT_INT32,
  241|  13.8k|          false, num_components * DataTypeLength(DT_INT32), 0);
  242|  13.8k|  std::unique_ptr<PointAttribute> port_att(new PointAttribute(ga));
  243|  13.8k|  port_att->SetIdentityMapping();
  244|  13.8k|  port_att->Reset(num_entries);
  245|  13.8k|  port_att->set_unique_id(attribute()->unique_id());
  246|  13.8k|  SetPortableAttribute(std::move(port_att));
  247|  13.8k|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIhEEvj:
  217|    287|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|    287|  const int num_components = attribute()->num_components();
  219|    287|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|    287|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|    287|      new AttributeTypeT[num_components]);
  222|    287|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|    287|  int val_id = 0;
  224|    287|  int out_byte_pos = 0;
  225|  7.39M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 7.39M, False: 287]
  ------------------
  226|  81.9M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 74.5M, False: 7.39M]
  ------------------
  227|  74.5M|      const AttributeTypeT value =
  228|  74.5M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|  74.5M|      att_val[c] = value;
  230|  74.5M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|  7.39M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|  7.39M|    out_byte_pos += entry_size;
  234|  7.39M|  }
  235|    287|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIaEEvj:
  217|  1.12k|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|  1.12k|  const int num_components = attribute()->num_components();
  219|  1.12k|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|  1.12k|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|  1.12k|      new AttributeTypeT[num_components]);
  222|  1.12k|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|  1.12k|  int val_id = 0;
  224|  1.12k|  int out_byte_pos = 0;
  225|   274M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 274M, False: 1.12k]
  ------------------
  226|  1.40G|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 1.13G, False: 274M]
  ------------------
  227|  1.13G|      const AttributeTypeT value =
  228|  1.13G|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|  1.13G|      att_val[c] = value;
  230|  1.13G|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|   274M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|   274M|    out_byte_pos += entry_size;
  234|   274M|  }
  235|  1.12k|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesItEEvj:
  217|    193|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|    193|  const int num_components = attribute()->num_components();
  219|    193|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|    193|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|    193|      new AttributeTypeT[num_components]);
  222|    193|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|    193|  int val_id = 0;
  224|    193|  int out_byte_pos = 0;
  225|   291k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 291k, False: 193]
  ------------------
  226|  9.95M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 9.65M, False: 291k]
  ------------------
  227|  9.65M|      const AttributeTypeT value =
  228|  9.65M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|  9.65M|      att_val[c] = value;
  230|  9.65M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|   291k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|   291k|    out_byte_pos += entry_size;
  234|   291k|  }
  235|    193|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIsEEvj:
  217|    192|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|    192|  const int num_components = attribute()->num_components();
  219|    192|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|    192|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|    192|      new AttributeTypeT[num_components]);
  222|    192|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|    192|  int val_id = 0;
  224|    192|  int out_byte_pos = 0;
  225|  48.7k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 48.5k, False: 192]
  ------------------
  226|  1.02M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 972k, False: 48.5k]
  ------------------
  227|   972k|      const AttributeTypeT value =
  228|   972k|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|   972k|      att_val[c] = value;
  230|   972k|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|  48.5k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|  48.5k|    out_byte_pos += entry_size;
  234|  48.5k|  }
  235|    192|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIjEEvj:
  217|    152|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|    152|  const int num_components = attribute()->num_components();
  219|    152|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|    152|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|    152|      new AttributeTypeT[num_components]);
  222|    152|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|    152|  int val_id = 0;
  224|    152|  int out_byte_pos = 0;
  225|   518k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 518k, False: 152]
  ------------------
  226|  55.4M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 54.9M, False: 518k]
  ------------------
  227|  54.9M|      const AttributeTypeT value =
  228|  54.9M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|  54.9M|      att_val[c] = value;
  230|  54.9M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|   518k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|   518k|    out_byte_pos += entry_size;
  234|   518k|  }
  235|    152|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIiEEvj:
  217|    224|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|    224|  const int num_components = attribute()->num_components();
  219|    224|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|    224|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|    224|      new AttributeTypeT[num_components]);
  222|    224|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|    224|  int val_id = 0;
  224|    224|  int out_byte_pos = 0;
  225|  90.6M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 90.6M, False: 224]
  ------------------
  226|   334M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 243M, False: 90.6M]
  ------------------
  227|   243M|      const AttributeTypeT value =
  228|   243M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|   243M|      att_val[c] = value;
  230|   243M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|  90.6M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|  90.6M|    out_byte_pos += entry_size;
  234|  90.6M|  }
  235|    224|}

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

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

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

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

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

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

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

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

_ZN5draco10AnsDecoderC2Ev:
   56|  46.3k|  AnsDecoder() : buf(nullptr), buf_offset(0), state(0) {}
rans_bit_decoder.cc:_ZN5dracoL13ans_read_initEPNS_10AnsDecoderEPKhi:
  300|  30.6k|                                const uint8_t* const buf, int offset) {
  301|  30.6k|  unsigned x;
  302|  30.6k|  if (offset < 1) {
  ------------------
  |  Branch (302:7): [True: 43, False: 30.6k]
  ------------------
  303|     43|    return 1;
  304|     43|  }
  305|  30.6k|  ans->buf = buf;
  306|  30.6k|  x = buf[offset - 1] >> 6;
  307|  30.6k|  if (x == 0) {
  ------------------
  |  Branch (307:7): [True: 27.4k, False: 3.14k]
  ------------------
  308|  27.4k|    ans->buf_offset = offset - 1;
  309|  27.4k|    ans->state = buf[offset - 1] & 0x3F;
  310|  27.4k|  } else if (x == 1) {
  ------------------
  |  Branch (310:14): [True: 2.81k, False: 330]
  ------------------
  311|  2.81k|    if (offset < 2) {
  ------------------
  |  Branch (311:9): [True: 3, False: 2.80k]
  ------------------
  312|      3|      return 1;
  313|      3|    }
  314|  2.80k|    ans->buf_offset = offset - 2;
  315|  2.80k|    ans->state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  316|  2.80k|  } else if (x == 2) {
  ------------------
  |  Branch (316:14): [True: 313, False: 17]
  ------------------
  317|    313|    if (offset < 3) {
  ------------------
  |  Branch (317:9): [True: 1, False: 312]
  ------------------
  318|      1|      return 1;
  319|      1|    }
  320|    312|    ans->buf_offset = offset - 3;
  321|    312|    ans->state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  322|    312|  } else {
  323|     17|    return 1;
  324|     17|  }
  325|  30.6k|  ans->state += DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  30.6k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  326|  30.6k|  if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   64|  30.6k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
                if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  30.6k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (326:7): [True: 7, False: 30.6k]
  ------------------
  327|      7|    return 1;
  328|      7|  }
  329|  30.6k|  return 0;
  330|  30.6k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|  2.80k|static uint32_t mem_get_le16(const void* vmem) {
   68|  2.80k|  uint32_t val;
   69|  2.80k|  const uint8_t* mem = (const uint8_t*)vmem;
   70|       |
   71|  2.80k|  val = mem[1] << 8;
   72|  2.80k|  val |= mem[0];
   73|  2.80k|  return val;
   74|  2.80k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    312|static uint32_t mem_get_le24(const void* vmem) {
   77|    312|  uint32_t val;
   78|    312|  const uint8_t* mem = (const uint8_t*)vmem;
   79|       |
   80|    312|  val = mem[2] << 16;
   81|    312|  val |= mem[1] << 8;
   82|    312|  val |= mem[0];
   83|    312|  return val;
   84|    312|}
rans_bit_decoder.cc:_ZN5dracoL14rabs_desc_readEPNS_10AnsDecoderEh:
  166|   149M|static inline int rabs_desc_read(struct AnsDecoder* ans, AnsP8 p0) {
  167|   149M|  int val;
  168|       |#if DRACO_ANS_IMPL1
  169|       |  unsigned l_s;
  170|       |#else
  171|   149M|  unsigned quot, rem, x, xn;
  172|   149M|#endif
  173|   149M|  const AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
  ------------------
  |  |   63|   149M|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  174|   149M|  if (ans->state < DRACO_ANS_L_BASE && ans->buf_offset > 0) {
  ------------------
  |  |   64|   298M|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  |  Branch (174:7): [True: 113M, False: 35.8M]
  |  Branch (174:40): [True: 144k, False: 113M]
  ------------------
  175|   144k|    ans->state = ans->state * DRACO_ANS_IO_BASE + ans->buf[--ans->buf_offset];
  ------------------
  |  |   65|   144k|#define DRACO_ANS_IO_BASE 256
  ------------------
  176|   144k|  }
  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|   149M|  x = ans->state;
  184|   149M|  quot = x / DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|   149M|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  185|   149M|  rem = x % DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|   149M|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  186|   149M|  xn = quot * p;
  187|   149M|  val = rem < p;
  188|   149M|  if (UNPREDICTABLE(val)) {
  ------------------
  |  |  165|   298M|#define UNPREDICTABLE(x) x
  |  |  ------------------
  |  |  |  Branch (165:26): [True: 137M, False: 12.2M]
  |  |  ------------------
  ------------------
  189|   137M|    ans->state = xn + rem;
  190|   137M|  } else {
  191|       |    // ans->state = quot * p0 + rem - p;
  192|  12.2M|    ans->state = x - xn - p;
  193|  12.2M|  }
  194|   149M|#endif
  195|   149M|  return val;
  196|   149M|}
rans_bit_decoder.cc:_ZN5dracoL12ans_read_endEPNS_10AnsDecoderE:
  332|  68.4k|static inline int ans_read_end(struct AnsDecoder* const ans) {
  333|  68.4k|  return ans->state == DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  68.4k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  334|  68.4k|}
_ZN5draco11RAnsDecoderILi12EEC2Ev:
  416|  4.58k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi12EE24rans_build_look_up_tableEPKjj:
  484|  2.60k|                                       uint32_t num_symbols) {
  485|  2.60k|    lut_table_.resize(rans_precision);
  486|  2.60k|    probability_table_.resize(num_symbols);
  487|  2.60k|    uint32_t cum_prob = 0;
  488|  2.60k|    uint32_t act_prob = 0;
  489|  26.6k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 24.2k, False: 2.43k]
  ------------------
  490|  24.2k|      probability_table_[i].prob = token_probs[i];
  491|  24.2k|      probability_table_[i].cum_prob = cum_prob;
  492|  24.2k|      cum_prob += token_probs[i];
  493|  24.2k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 172, False: 24.0k]
  ------------------
  494|    172|        return false;
  495|    172|      }
  496|  9.01M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 8.98M, False: 24.0k]
  ------------------
  497|  8.98M|        lut_table_[j] = i;
  498|  8.98M|      }
  499|  24.0k|      act_prob = cum_prob;
  500|  24.0k|    }
  501|  2.43k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 270, False: 2.16k]
  ------------------
  502|    270|      return false;
  503|    270|    }
  504|  2.16k|    return true;
  505|  2.43k|  }
_ZN5draco11RAnsDecoderILi12EE9read_initEPKhi:
  421|  2.10k|  inline int read_init(const uint8_t* const buf, int offset) {
  422|  2.10k|    unsigned x;
  423|  2.10k|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 182, False: 1.92k]
  ------------------
  424|    182|      return 1;
  425|    182|    }
  426|  1.92k|    ans_.buf = buf;
  427|  1.92k|    x = buf[offset - 1] >> 6;
  428|  1.92k|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 1.16k, False: 761]
  ------------------
  429|  1.16k|      ans_.buf_offset = offset - 1;
  430|  1.16k|      ans_.state = buf[offset - 1] & 0x3F;
  431|  1.16k|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 334, False: 427]
  ------------------
  432|    334|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 89, False: 245]
  ------------------
  433|     89|        return 1;
  434|     89|      }
  435|    245|      ans_.buf_offset = offset - 2;
  436|    245|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    427|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 262, False: 165]
  ------------------
  438|    262|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 74, False: 188]
  ------------------
  439|     74|        return 1;
  440|     74|      }
  441|    188|      ans_.buf_offset = offset - 3;
  442|    188|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    188|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 165, False: 0]
  ------------------
  444|    165|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 80, False: 85]
  ------------------
  445|     80|        return 1;
  446|     80|      }
  447|     85|      ans_.buf_offset = offset - 4;
  448|     85|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     85|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|  1.68k|    ans_.state += l_rans_base;
  453|  1.68k|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  1.68k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 85, False: 1.59k]
  ------------------
  454|     85|      return 1;
  455|     85|    }
  456|  1.59k|    return 0;
  457|  1.68k|  }
symbol_decoding.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|    423|static uint32_t mem_get_le16(const void* vmem) {
   68|    423|  uint32_t val;
   69|    423|  const uint8_t* mem = (const uint8_t*)vmem;
   70|       |
   71|    423|  val = mem[1] << 8;
   72|    423|  val |= mem[0];
   73|    423|  return val;
   74|    423|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    344|static uint32_t mem_get_le24(const void* vmem) {
   77|    344|  uint32_t val;
   78|    344|  const uint8_t* mem = (const uint8_t*)vmem;
   79|       |
   80|    344|  val = mem[2] << 16;
   81|    344|  val |= mem[1] << 8;
   82|    344|  val |= mem[0];
   83|    344|  return val;
   84|    344|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le32EPKv:
   86|    432|static inline uint32_t mem_get_le32(const void* vmem) {
   87|    432|  uint32_t val;
   88|    432|  const uint8_t* mem = (const uint8_t*)vmem;
   89|       |
   90|    432|  val = mem[3] << 24;
   91|    432|  val |= mem[2] << 16;
   92|    432|  val |= mem[1] << 8;
   93|    432|  val |= mem[0];
   94|    432|  return val;
   95|    432|}
_ZN5draco11RAnsDecoderILi12EE9rans_readEv:
  465|   160M|  inline int rans_read() {
  466|   160M|    unsigned rem;
  467|   160M|    unsigned quo;
  468|   160M|    struct rans_dec_sym sym;
  469|   160M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 134M, False: 25.3M]
  |  Branch (469:40): [True: 25.3k, False: 134M]
  ------------------
  470|  25.3k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  25.3k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  25.3k|    }
  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|   160M|    quo = ans_.state / rans_precision;
  475|   160M|    rem = ans_.state % rans_precision;
  476|   160M|    fetch_sym(&sym, rem);
  477|   160M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   160M|    return sym.val;
  479|   160M|  }
_ZN5draco11RAnsDecoderILi12EE9fetch_symEPNS_12rans_dec_symEj:
  508|   160M|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   160M|    uint32_t symbol = lut_table_[rem];
  510|   160M|    out->val = symbol;
  511|   160M|    out->prob = probability_table_[symbol].prob;
  512|   160M|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   160M|  }
_ZN5draco11RAnsDecoderILi12EE8read_endEv:
  459|  1.53k|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi13EEC2Ev:
  416|    510|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi13EE24rans_build_look_up_tableEPKjj:
  484|    384|                                       uint32_t num_symbols) {
  485|    384|    lut_table_.resize(rans_precision);
  486|    384|    probability_table_.resize(num_symbols);
  487|    384|    uint32_t cum_prob = 0;
  488|    384|    uint32_t act_prob = 0;
  489|  19.8k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 19.4k, False: 359]
  ------------------
  490|  19.4k|      probability_table_[i].prob = token_probs[i];
  491|  19.4k|      probability_table_[i].cum_prob = cum_prob;
  492|  19.4k|      cum_prob += token_probs[i];
  493|  19.4k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 25, False: 19.4k]
  ------------------
  494|     25|        return false;
  495|     25|      }
  496|  2.79M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 2.77M, False: 19.4k]
  ------------------
  497|  2.77M|        lut_table_[j] = i;
  498|  2.77M|      }
  499|  19.4k|      act_prob = cum_prob;
  500|  19.4k|    }
  501|    359|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 29, False: 330]
  ------------------
  502|     29|      return false;
  503|     29|    }
  504|    330|    return true;
  505|    359|  }
_ZN5draco11RAnsDecoderILi13EE9read_initEPKhi:
  421|    306|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    306|    unsigned x;
  423|    306|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 9, False: 297]
  ------------------
  424|      9|      return 1;
  425|      9|    }
  426|    297|    ans_.buf = buf;
  427|    297|    x = buf[offset - 1] >> 6;
  428|    297|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 154, False: 143]
  ------------------
  429|    154|      ans_.buf_offset = offset - 1;
  430|    154|      ans_.state = buf[offset - 1] & 0x3F;
  431|    154|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 66, False: 77]
  ------------------
  432|     66|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 9, False: 57]
  ------------------
  433|      9|        return 1;
  434|      9|      }
  435|     57|      ans_.buf_offset = offset - 2;
  436|     57|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     77|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 34, False: 43]
  ------------------
  438|     34|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 9, False: 25]
  ------------------
  439|      9|        return 1;
  440|      9|      }
  441|     25|      ans_.buf_offset = offset - 3;
  442|     25|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     43|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 43, False: 0]
  ------------------
  444|     43|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 9, False: 34]
  ------------------
  445|      9|        return 1;
  446|      9|      }
  447|     34|      ans_.buf_offset = offset - 4;
  448|     34|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     34|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|    270|    ans_.state += l_rans_base;
  453|    270|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    270|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 15, False: 255]
  ------------------
  454|     15|      return 1;
  455|     15|    }
  456|    255|    return 0;
  457|    270|  }
_ZN5draco11RAnsDecoderILi13EE9rans_readEv:
  465|  17.3M|  inline int rans_read() {
  466|  17.3M|    unsigned rem;
  467|  17.3M|    unsigned quo;
  468|  17.3M|    struct rans_dec_sym sym;
  469|  17.3M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 17.1M, False: 167k]
  |  Branch (469:40): [True: 3.71k, False: 17.1M]
  ------------------
  470|  3.71k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  3.71k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  3.71k|    }
  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|  17.3M|    quo = ans_.state / rans_precision;
  475|  17.3M|    rem = ans_.state % rans_precision;
  476|  17.3M|    fetch_sym(&sym, rem);
  477|  17.3M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|  17.3M|    return sym.val;
  479|  17.3M|  }
_ZN5draco11RAnsDecoderILi13EE9fetch_symEPNS_12rans_dec_symEj:
  508|  17.3M|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|  17.3M|    uint32_t symbol = lut_table_[rem];
  510|  17.3M|    out->val = symbol;
  511|  17.3M|    out->prob = probability_table_[symbol].prob;
  512|  17.3M|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|  17.3M|  }
_ZN5draco11RAnsDecoderILi13EE8read_endEv:
  459|    255|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi15EEC2Ev:
  416|    382|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi15EE24rans_build_look_up_tableEPKjj:
  484|    248|                                       uint32_t num_symbols) {
  485|    248|    lut_table_.resize(rans_precision);
  486|    248|    probability_table_.resize(num_symbols);
  487|    248|    uint32_t cum_prob = 0;
  488|    248|    uint32_t act_prob = 0;
  489|  2.25k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 2.02k, False: 231]
  ------------------
  490|  2.02k|      probability_table_[i].prob = token_probs[i];
  491|  2.02k|      probability_table_[i].cum_prob = cum_prob;
  492|  2.02k|      cum_prob += token_probs[i];
  493|  2.02k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 17, False: 2.00k]
  ------------------
  494|     17|        return false;
  495|     17|      }
  496|  6.44M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 6.44M, False: 2.00k]
  ------------------
  497|  6.44M|        lut_table_[j] = i;
  498|  6.44M|      }
  499|  2.00k|      act_prob = cum_prob;
  500|  2.00k|    }
  501|    231|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 43, False: 188]
  ------------------
  502|     43|      return false;
  503|     43|    }
  504|    188|    return true;
  505|    231|  }
_ZN5draco11RAnsDecoderILi15EE9read_initEPKhi:
  421|    126|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    126|    unsigned x;
  423|    126|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 13, False: 113]
  ------------------
  424|     13|      return 1;
  425|     13|    }
  426|    113|    ans_.buf = buf;
  427|    113|    x = buf[offset - 1] >> 6;
  428|    113|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 28, False: 85]
  ------------------
  429|     28|      ans_.buf_offset = offset - 1;
  430|     28|      ans_.state = buf[offset - 1] & 0x3F;
  431|     85|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 28, False: 57]
  ------------------
  432|     28|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 11, False: 17]
  ------------------
  433|     11|        return 1;
  434|     11|      }
  435|     17|      ans_.buf_offset = offset - 2;
  436|     17|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     57|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 22, False: 35]
  ------------------
  438|     22|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 12, False: 10]
  ------------------
  439|     12|        return 1;
  440|     12|      }
  441|     10|      ans_.buf_offset = offset - 3;
  442|     10|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     35|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 35, False: 0]
  ------------------
  444|     35|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 9, False: 26]
  ------------------
  445|      9|        return 1;
  446|      9|      }
  447|     26|      ans_.buf_offset = offset - 4;
  448|     26|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     26|    } 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|   469k|  inline int rans_read() {
  466|   469k|    unsigned rem;
  467|   469k|    unsigned quo;
  468|   469k|    struct rans_dec_sym sym;
  469|   469k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 94.0k, False: 375k]
  |  Branch (469:40): [True: 862, False: 93.1k]
  ------------------
  470|    862|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    862|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|    862|    }
  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|   469k|    quo = ans_.state / rans_precision;
  475|   469k|    rem = ans_.state % rans_precision;
  476|   469k|    fetch_sym(&sym, rem);
  477|   469k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   469k|    return sym.val;
  479|   469k|  }
_ZN5draco11RAnsDecoderILi15EE9fetch_symEPNS_12rans_dec_symEj:
  508|   469k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   469k|    uint32_t symbol = lut_table_[rem];
  510|   469k|    out->val = symbol;
  511|   469k|    out->prob = probability_table_[symbol].prob;
  512|   469k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   469k|  }
_ZN5draco11RAnsDecoderILi15EE8read_endEv:
  459|     70|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi16EEC2Ev:
  416|    406|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi16EE24rans_build_look_up_tableEPKjj:
  484|    249|                                       uint32_t num_symbols) {
  485|    249|    lut_table_.resize(rans_precision);
  486|    249|    probability_table_.resize(num_symbols);
  487|    249|    uint32_t cum_prob = 0;
  488|    249|    uint32_t act_prob = 0;
  489|  15.9k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 15.6k, False: 226]
  ------------------
  490|  15.6k|      probability_table_[i].prob = token_probs[i];
  491|  15.6k|      probability_table_[i].cum_prob = cum_prob;
  492|  15.6k|      cum_prob += token_probs[i];
  493|  15.6k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 23, False: 15.6k]
  ------------------
  494|     23|        return false;
  495|     23|      }
  496|  12.8M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 12.8M, False: 15.6k]
  ------------------
  497|  12.8M|        lut_table_[j] = i;
  498|  12.8M|      }
  499|  15.6k|      act_prob = cum_prob;
  500|  15.6k|    }
  501|    226|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 46, False: 180]
  ------------------
  502|     46|      return false;
  503|     46|    }
  504|    180|    return true;
  505|    226|  }
_ZN5draco11RAnsDecoderILi16EE9read_initEPKhi:
  421|    129|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    129|    unsigned x;
  423|    129|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 5, False: 124]
  ------------------
  424|      5|      return 1;
  425|      5|    }
  426|    124|    ans_.buf = buf;
  427|    124|    x = buf[offset - 1] >> 6;
  428|    124|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 32, False: 92]
  ------------------
  429|     32|      ans_.buf_offset = offset - 1;
  430|     32|      ans_.state = buf[offset - 1] & 0x3F;
  431|     92|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 20, False: 72]
  ------------------
  432|     20|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 9, False: 11]
  ------------------
  433|      9|        return 1;
  434|      9|      }
  435|     11|      ans_.buf_offset = offset - 2;
  436|     11|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     72|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 25, False: 47]
  ------------------
  438|     25|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 11, False: 14]
  ------------------
  439|     11|        return 1;
  440|     11|      }
  441|     14|      ans_.buf_offset = offset - 3;
  442|     14|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     47|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 47, False: 0]
  ------------------
  444|     47|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 9, False: 38]
  ------------------
  445|      9|        return 1;
  446|      9|      }
  447|     38|      ans_.buf_offset = offset - 4;
  448|     38|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     38|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     95|    ans_.state += l_rans_base;
  453|     95|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     95|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 27, False: 68]
  ------------------
  454|     27|      return 1;
  455|     27|    }
  456|     68|    return 0;
  457|     95|  }
_ZN5draco11RAnsDecoderILi16EE9rans_readEv:
  465|   529k|  inline int rans_read() {
  466|   529k|    unsigned rem;
  467|   529k|    unsigned quo;
  468|   529k|    struct rans_dec_sym sym;
  469|   531k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 197k, False: 333k]
  |  Branch (469:40): [True: 1.25k, False: 196k]
  ------------------
  470|  1.25k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  1.25k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  1.25k|    }
  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|   529k|    quo = ans_.state / rans_precision;
  475|   529k|    rem = ans_.state % rans_precision;
  476|   529k|    fetch_sym(&sym, rem);
  477|   529k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   529k|    return sym.val;
  479|   529k|  }
_ZN5draco11RAnsDecoderILi16EE9fetch_symEPNS_12rans_dec_symEj:
  508|   529k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   529k|    uint32_t symbol = lut_table_[rem];
  510|   529k|    out->val = symbol;
  511|   529k|    out->prob = probability_table_[symbol].prob;
  512|   529k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   529k|  }
_ZN5draco11RAnsDecoderILi16EE8read_endEv:
  459|     68|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi18EEC2Ev:
  416|    342|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi18EE24rans_build_look_up_tableEPKjj:
  484|    214|                                       uint32_t num_symbols) {
  485|    214|    lut_table_.resize(rans_precision);
  486|    214|    probability_table_.resize(num_symbols);
  487|    214|    uint32_t cum_prob = 0;
  488|    214|    uint32_t act_prob = 0;
  489|  3.19k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 3.00k, False: 193]
  ------------------
  490|  3.00k|      probability_table_[i].prob = token_probs[i];
  491|  3.00k|      probability_table_[i].cum_prob = cum_prob;
  492|  3.00k|      cum_prob += token_probs[i];
  493|  3.00k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 21, False: 2.97k]
  ------------------
  494|     21|        return false;
  495|     21|      }
  496|  44.2M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 44.2M, False: 2.97k]
  ------------------
  497|  44.2M|        lut_table_[j] = i;
  498|  44.2M|      }
  499|  2.97k|      act_prob = cum_prob;
  500|  2.97k|    }
  501|    193|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 37, False: 156]
  ------------------
  502|     37|      return false;
  503|     37|    }
  504|    156|    return true;
  505|    193|  }
_ZN5draco11RAnsDecoderILi18EE9read_initEPKhi:
  421|    120|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    120|    unsigned x;
  423|    120|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 2, False: 118]
  ------------------
  424|      2|      return 1;
  425|      2|    }
  426|    118|    ans_.buf = buf;
  427|    118|    x = buf[offset - 1] >> 6;
  428|    118|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 30, False: 88]
  ------------------
  429|     30|      ans_.buf_offset = offset - 1;
  430|     30|      ans_.state = buf[offset - 1] & 0x3F;
  431|     88|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 25, False: 63]
  ------------------
  432|     25|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 9, False: 16]
  ------------------
  433|      9|        return 1;
  434|      9|      }
  435|     16|      ans_.buf_offset = offset - 2;
  436|     16|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     63|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 22, False: 41]
  ------------------
  438|     22|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 10, False: 12]
  ------------------
  439|     10|        return 1;
  440|     10|      }
  441|     12|      ans_.buf_offset = offset - 3;
  442|     12|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     41|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 41, False: 0]
  ------------------
  444|     41|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 9, False: 32]
  ------------------
  445|      9|        return 1;
  446|      9|      }
  447|     32|      ans_.buf_offset = offset - 4;
  448|     32|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     32|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     90|    ans_.state += l_rans_base;
  453|     90|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     90|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 18, False: 72]
  ------------------
  454|     18|      return 1;
  455|     18|    }
  456|     72|    return 0;
  457|     90|  }
_ZN5draco11RAnsDecoderILi18EE9rans_readEv:
  465|   121k|  inline int rans_read() {
  466|   121k|    unsigned rem;
  467|   121k|    unsigned quo;
  468|   121k|    struct rans_dec_sym sym;
  469|   122k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 96.0k, False: 26.8k]
  |  Branch (469:40): [True: 941, False: 95.0k]
  ------------------
  470|    941|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    941|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|    941|    }
  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|   121k|    quo = ans_.state / rans_precision;
  475|   121k|    rem = ans_.state % rans_precision;
  476|   121k|    fetch_sym(&sym, rem);
  477|   121k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   121k|    return sym.val;
  479|   121k|  }
_ZN5draco11RAnsDecoderILi18EE9fetch_symEPNS_12rans_dec_symEj:
  508|   121k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   121k|    uint32_t symbol = lut_table_[rem];
  510|   121k|    out->val = symbol;
  511|   121k|    out->prob = probability_table_[symbol].prob;
  512|   121k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   121k|  }
_ZN5draco11RAnsDecoderILi18EE8read_endEv:
  459|     72|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi19EEC2Ev:
  416|    466|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi19EE24rans_build_look_up_tableEPKjj:
  484|    287|                                       uint32_t num_symbols) {
  485|    287|    lut_table_.resize(rans_precision);
  486|    287|    probability_table_.resize(num_symbols);
  487|    287|    uint32_t cum_prob = 0;
  488|    287|    uint32_t act_prob = 0;
  489|  6.10k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 5.84k, False: 268]
  ------------------
  490|  5.84k|      probability_table_[i].prob = token_probs[i];
  491|  5.84k|      probability_table_[i].cum_prob = cum_prob;
  492|  5.84k|      cum_prob += token_probs[i];
  493|  5.84k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 19, False: 5.82k]
  ------------------
  494|     19|        return false;
  495|     19|      }
  496|   124M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 124M, False: 5.82k]
  ------------------
  497|   124M|        lut_table_[j] = i;
  498|   124M|      }
  499|  5.82k|      act_prob = cum_prob;
  500|  5.82k|    }
  501|    268|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 49, False: 219]
  ------------------
  502|     49|      return false;
  503|     49|    }
  504|    219|    return true;
  505|    268|  }
_ZN5draco11RAnsDecoderILi19EE9read_initEPKhi:
  421|    133|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    133|    unsigned x;
  423|    133|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 5, False: 128]
  ------------------
  424|      5|      return 1;
  425|      5|    }
  426|    128|    ans_.buf = buf;
  427|    128|    x = buf[offset - 1] >> 6;
  428|    128|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 41, False: 87]
  ------------------
  429|     41|      ans_.buf_offset = offset - 1;
  430|     41|      ans_.state = buf[offset - 1] & 0x3F;
  431|     87|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 15, False: 72]
  ------------------
  432|     15|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 2, False: 13]
  ------------------
  433|      2|        return 1;
  434|      2|      }
  435|     13|      ans_.buf_offset = offset - 2;
  436|     13|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     72|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 16, False: 56]
  ------------------
  438|     16|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 7, False: 9]
  ------------------
  439|      7|        return 1;
  440|      7|      }
  441|      9|      ans_.buf_offset = offset - 3;
  442|      9|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     56|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 56, False: 0]
  ------------------
  444|     56|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 9, False: 47]
  ------------------
  445|      9|        return 1;
  446|      9|      }
  447|     47|      ans_.buf_offset = offset - 4;
  448|     47|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     47|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|    110|    ans_.state += l_rans_base;
  453|    110|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    110|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 20, False: 90]
  ------------------
  454|     20|      return 1;
  455|     20|    }
  456|     90|    return 0;
  457|    110|  }
_ZN5draco11RAnsDecoderILi19EE9rans_readEv:
  465|   168k|  inline int rans_read() {
  466|   168k|    unsigned rem;
  467|   168k|    unsigned quo;
  468|   168k|    struct rans_dec_sym sym;
  469|   170k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 137k, False: 32.8k]
  |  Branch (469:40): [True: 1.93k, False: 135k]
  ------------------
  470|  1.93k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  1.93k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  1.93k|    }
  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|   168k|    quo = ans_.state / rans_precision;
  475|   168k|    rem = ans_.state % rans_precision;
  476|   168k|    fetch_sym(&sym, rem);
  477|   168k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   168k|    return sym.val;
  479|   168k|  }
_ZN5draco11RAnsDecoderILi19EE9fetch_symEPNS_12rans_dec_symEj:
  508|   168k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   168k|    uint32_t symbol = lut_table_[rem];
  510|   168k|    out->val = symbol;
  511|   168k|    out->prob = probability_table_[symbol].prob;
  512|   168k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   168k|  }
_ZN5draco11RAnsDecoderILi19EE8read_endEv:
  459|     90|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi20EEC2Ev:
  416|  2.06k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi20EE24rans_build_look_up_tableEPKjj:
  484|  1.25k|                                       uint32_t num_symbols) {
  485|  1.25k|    lut_table_.resize(rans_precision);
  486|  1.25k|    probability_table_.resize(num_symbols);
  487|  1.25k|    uint32_t cum_prob = 0;
  488|  1.25k|    uint32_t act_prob = 0;
  489|  28.9k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 27.7k, False: 1.19k]
  ------------------
  490|  27.7k|      probability_table_[i].prob = token_probs[i];
  491|  27.7k|      probability_table_[i].cum_prob = cum_prob;
  492|  27.7k|      cum_prob += token_probs[i];
  493|  27.7k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 55, False: 27.6k]
  ------------------
  494|     55|        return false;
  495|     55|      }
  496|  1.16G|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 1.16G, False: 27.6k]
  ------------------
  497|  1.16G|        lut_table_[j] = i;
  498|  1.16G|      }
  499|  27.6k|      act_prob = cum_prob;
  500|  27.6k|    }
  501|  1.19k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 115, False: 1.08k]
  ------------------
  502|    115|      return false;
  503|    115|    }
  504|  1.08k|    return true;
  505|  1.19k|  }
_ZN5draco11RAnsDecoderILi20EE9read_initEPKhi:
  421|    667|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    667|    unsigned x;
  423|    667|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 55, False: 612]
  ------------------
  424|     55|      return 1;
  425|     55|    }
  426|    612|    ans_.buf = buf;
  427|    612|    x = buf[offset - 1] >> 6;
  428|    612|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 159, False: 453]
  ------------------
  429|    159|      ans_.buf_offset = offset - 1;
  430|    159|      ans_.state = buf[offset - 1] & 0x3F;
  431|    453|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 105, False: 348]
  ------------------
  432|    105|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 41, False: 64]
  ------------------
  433|     41|        return 1;
  434|     41|      }
  435|     64|      ans_.buf_offset = offset - 2;
  436|     64|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    348|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 133, False: 215]
  ------------------
  438|    133|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 47, False: 86]
  ------------------
  439|     47|        return 1;
  440|     47|      }
  441|     86|      ans_.buf_offset = offset - 3;
  442|     86|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    215|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 215, False: 0]
  ------------------
  444|    215|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 45, False: 170]
  ------------------
  445|     45|        return 1;
  446|     45|      }
  447|    170|      ans_.buf_offset = offset - 4;
  448|    170|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|    170|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|    479|    ans_.state += l_rans_base;
  453|    479|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    479|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 44, False: 435]
  ------------------
  454|     44|      return 1;
  455|     44|    }
  456|    435|    return 0;
  457|    479|  }
_ZN5draco11RAnsDecoderILi20EE9rans_readEv:
  465|  8.72M|  inline int rans_read() {
  466|  8.72M|    unsigned rem;
  467|  8.72M|    unsigned quo;
  468|  8.72M|    struct rans_dec_sym sym;
  469|  8.72M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 6.89M, False: 1.83M]
  |  Branch (469:40): [True: 6.45k, False: 6.89M]
  ------------------
  470|  6.45k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  6.45k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  6.45k|    }
  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|  8.72M|    quo = ans_.state / rans_precision;
  475|  8.72M|    rem = ans_.state % rans_precision;
  476|  8.72M|    fetch_sym(&sym, rem);
  477|  8.72M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|  8.72M|    return sym.val;
  479|  8.72M|  }
_ZN5draco11RAnsDecoderILi20EE9fetch_symEPNS_12rans_dec_symEj:
  508|  8.72M|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|  8.72M|    uint32_t symbol = lut_table_[rem];
  510|  8.72M|    out->val = symbol;
  511|  8.72M|    out->prob = probability_table_[symbol].prob;
  512|  8.72M|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|  8.72M|  }
_ZN5draco11RAnsDecoderILi20EE8read_endEv:
  459|    435|  inline int read_end() { return ans_.state == l_rans_base; }

_ZN5draco17RAnsSymbolDecoderILi5EEC2Ev:
   33|  1.54k|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi5EE6CreateEPNS_13DecoderBufferE:
   59|  1.54k|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|  1.54k|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 1.54k]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|  1.54k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|  1.54k|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.54k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 205, False: 1.34k]
  ------------------
   67|    205|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 8, False: 197]
  ------------------
   68|      8|      return false;
   69|      8|    }
   70|       |
   71|    205|  } else
   72|  1.34k|#endif
   73|  1.34k|  {
   74|  1.34k|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 51, False: 1.29k]
  ------------------
   75|     51|      return false;
   76|     51|    }
   77|  1.34k|  }
   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.48k|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 159, False: 1.32k]
  ------------------
   83|    159|    return false;
   84|    159|  }
   85|  1.32k|  probability_table_.resize(num_symbols_);
   86|  1.32k|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 383, False: 946]
  ------------------
   87|    383|    return true;
   88|    383|  }
   89|       |  // Decode the table.
   90|  2.80M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 2.80M, False: 646]
  ------------------
   91|  2.80M|    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.80M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 105, False: 2.80M]
  ------------------
   95|    105|      return false;
   96|    105|    }
   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.80M|    const int token = prob_data & 3;
  102|  2.80M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 1.49M, False: 1.31M]
  ------------------
  103|  1.49M|      const uint32_t offset = prob_data >> 2;
  104|  1.49M|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 144, False: 1.49M]
  ------------------
  105|    144|        return false;
  106|    144|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  57.2M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 55.7M, False: 1.49M]
  ------------------
  109|  55.7M|        probability_table_[i + j] = 0;
  110|  55.7M|      }
  111|  1.49M|      i += offset;
  112|  1.49M|    } else {
  113|  1.31M|      const int extra_bytes = token;
  114|  1.31M|      uint32_t prob = prob_data >> 2;
  115|  2.61M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 1.29M, False: 1.31M]
  ------------------
  116|  1.29M|        uint8_t eb;
  117|  1.29M|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 51, False: 1.29M]
  ------------------
  118|     51|          return false;
  119|     51|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  1.29M|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  1.29M|      }
  124|  1.31M|      probability_table_[i] = prob;
  125|  1.31M|    }
  126|  2.80M|  }
  127|    646|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 146, False: 500]
  ------------------
  128|    146|    return false;
  129|    146|  }
  130|    500|  return true;
  131|    646|}
_ZN5draco17RAnsSymbolDecoderILi5EE13StartDecodingEPNS_13DecoderBufferE:
  135|    827|    DecoderBuffer* buffer) {
  136|    827|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    827|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    827|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    827|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 38, False: 789]
  ------------------
  140|     38|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 5, False: 33]
  ------------------
  141|      5|      return false;
  142|      5|    }
  143|       |
  144|     38|  } else
  145|    789|#endif
  146|    789|  {
  147|    789|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 32, False: 757]
  ------------------
  148|     32|      return false;
  149|     32|    }
  150|    789|  }
  151|    790|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 94, False: 696]
  ------------------
  152|     94|    return false;
  153|     94|  }
  154|    696|  const uint8_t* const data_head =
  155|    696|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    696|  buffer->Advance(bytes_encoded);
  158|    696|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 171, False: 525]
  ------------------
  159|    171|    return false;
  160|    171|  }
  161|    525|  return true;
  162|    696|}
_ZNK5draco17RAnsSymbolDecoderILi5EE11num_symbolsEv:
   38|    594|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi5EE12DecodeSymbolEv:
   43|  26.7M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi5EE11EndDecodingEv:
  165|    458|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    458|  ans_.read_end();
  167|    458|}
_ZN5draco17RAnsSymbolDecoderILi1EEC2Ev:
   33|    714|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi1EE6CreateEPNS_13DecoderBufferE:
   59|    714|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    714|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 714]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    714|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    714|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    714|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 126, False: 588]
  ------------------
   67|    126|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 6, False: 120]
  ------------------
   68|      6|      return false;
   69|      6|    }
   70|       |
   71|    126|  } else
   72|    588|#endif
   73|    588|  {
   74|    588|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 31, False: 557]
  ------------------
   75|     31|      return false;
   76|     31|    }
   77|    588|  }
   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|    677|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 90, False: 587]
  ------------------
   83|     90|    return false;
   84|     90|  }
   85|    587|  probability_table_.resize(num_symbols_);
   86|    587|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 29, False: 558]
  ------------------
   87|     29|    return true;
   88|     29|  }
   89|       |  // Decode the table.
   90|  1.96M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.96M, False: 405]
  ------------------
   91|  1.96M|    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.96M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 66, False: 1.95M]
  ------------------
   95|     66|      return false;
   96|     66|    }
   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.95M|    const int token = prob_data & 3;
  102|  1.95M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 1.06M, False: 898k]
  ------------------
  103|  1.06M|      const uint32_t offset = prob_data >> 2;
  104|  1.06M|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 67, False: 1.06M]
  ------------------
  105|     67|        return false;
  106|     67|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  48.8M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 47.8M, False: 1.06M]
  ------------------
  109|  47.8M|        probability_table_[i + j] = 0;
  110|  47.8M|      }
  111|  1.06M|      i += offset;
  112|  1.06M|    } else {
  113|   898k|      const int extra_bytes = token;
  114|   898k|      uint32_t prob = prob_data >> 2;
  115|  1.56M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 666k, False: 898k]
  ------------------
  116|   666k|        uint8_t eb;
  117|   666k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 20, False: 666k]
  ------------------
  118|     20|          return false;
  119|     20|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   666k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   666k|      }
  124|   898k|      probability_table_[i] = prob;
  125|   898k|    }
  126|  1.95M|  }
  127|    405|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 172, False: 233]
  ------------------
  128|    172|    return false;
  129|    172|  }
  130|    233|  return true;
  131|    405|}
_ZNK5draco17RAnsSymbolDecoderILi1EE11num_symbolsEv:
   38|    262|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi1EE13StartDecodingEPNS_13DecoderBufferE:
  135|    233|    DecoderBuffer* buffer) {
  136|    233|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    233|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    233|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    233|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 14, False: 219]
  ------------------
  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|    219|#endif
  146|    219|  {
  147|    219|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 22, False: 197]
  ------------------
  148|     22|      return false;
  149|     22|    }
  150|    219|  }
  151|    211|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 27, False: 184]
  ------------------
  152|     27|    return false;
  153|     27|  }
  154|    184|  const uint8_t* const data_head =
  155|    184|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    184|  buffer->Advance(bytes_encoded);
  158|    184|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 47, False: 137]
  ------------------
  159|     47|    return false;
  160|     47|  }
  161|    137|  return true;
  162|    184|}
_ZN5draco17RAnsSymbolDecoderILi1EE12DecodeSymbolEv:
   43|  31.4M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi1EE11EndDecodingEv:
  165|    137|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    137|  ans_.read_end();
  167|    137|}
_ZN5draco17RAnsSymbolDecoderILi2EEC2Ev:
   33|    430|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi2EE6CreateEPNS_13DecoderBufferE:
   59|    430|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    430|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 430]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    430|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    430|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    430|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 24, False: 406]
  ------------------
   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|    406|#endif
   73|    406|  {
   74|    406|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 10, False: 396]
  ------------------
   75|     10|      return false;
   76|     10|    }
   77|    406|  }
   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|    420|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 27, False: 393]
  ------------------
   83|     27|    return false;
   84|     27|  }
   85|    393|  probability_table_.resize(num_symbols_);
   86|    393|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 19, False: 374]
  ------------------
   87|     19|    return true;
   88|     19|  }
   89|       |  // Decode the table.
   90|  90.7k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 90.4k, False: 289]
  ------------------
   91|  90.4k|    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.4k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 43, False: 90.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|  90.4k|    const int token = prob_data & 3;
  102|  90.4k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 26.6k, False: 63.7k]
  ------------------
  103|  26.6k|      const uint32_t offset = prob_data >> 2;
  104|  26.6k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 21, False: 26.6k]
  ------------------
  105|     21|        return false;
  106|     21|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  1.20M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 1.17M, False: 26.6k]
  ------------------
  109|  1.17M|        probability_table_[i + j] = 0;
  110|  1.17M|      }
  111|  26.6k|      i += offset;
  112|  63.7k|    } else {
  113|  63.7k|      const int extra_bytes = token;
  114|  63.7k|      uint32_t prob = prob_data >> 2;
  115|   115k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 52.2k, False: 63.7k]
  ------------------
  116|  52.2k|        uint8_t eb;
  117|  52.2k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 21, False: 52.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|  52.1k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  52.1k|      }
  124|  63.7k|      probability_table_[i] = prob;
  125|  63.7k|    }
  126|  90.4k|  }
  127|    289|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 23, False: 266]
  ------------------
  128|     23|    return false;
  129|     23|  }
  130|    266|  return true;
  131|    289|}
_ZNK5draco17RAnsSymbolDecoderILi2EE11num_symbolsEv:
   38|    285|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi2EE13StartDecodingEPNS_13DecoderBufferE:
  135|    266|    DecoderBuffer* buffer) {
  136|    266|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    266|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    266|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    266|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 3, False: 263]
  ------------------
  140|      3|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 3]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      3|  } else
  145|    263|#endif
  146|    263|  {
  147|    263|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 3, False: 260]
  ------------------
  148|      3|      return false;
  149|      3|    }
  150|    263|  }
  151|    263|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 13, False: 250]
  ------------------
  152|     13|    return false;
  153|     13|  }
  154|    250|  const uint8_t* const data_head =
  155|    250|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    250|  buffer->Advance(bytes_encoded);
  158|    250|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 47, False: 203]
  ------------------
  159|     47|    return false;
  160|     47|  }
  161|    203|  return true;
  162|    250|}
_ZN5draco17RAnsSymbolDecoderILi2EE12DecodeSymbolEv:
   43|  6.26M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi2EE11EndDecodingEv:
  165|    203|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    203|  ans_.read_end();
  167|    203|}
_ZN5draco17RAnsSymbolDecoderILi3EEC2Ev:
   33|    425|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi3EE6CreateEPNS_13DecoderBufferE:
   59|    425|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    425|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 425]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    425|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    425|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    425|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 34, False: 391]
  ------------------
   67|     34|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 34]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     34|  } else
   72|    391|#endif
   73|    391|  {
   74|    391|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 9, False: 382]
  ------------------
   75|      9|      return false;
   76|      9|    }
   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|    416|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 15, False: 401]
  ------------------
   83|     15|    return false;
   84|     15|  }
   85|    401|  probability_table_.resize(num_symbols_);
   86|    401|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 26, False: 375]
  ------------------
   87|     26|    return true;
   88|     26|  }
   89|       |  // Decode the table.
   90|  14.1k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 13.9k, False: 286]
  ------------------
   91|  13.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|  13.9k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 46, False: 13.8k]
  ------------------
   95|     46|      return false;
   96|     46|    }
   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.8k|    const int token = prob_data & 3;
  102|  13.8k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 7.94k, False: 5.91k]
  ------------------
  103|  7.94k|      const uint32_t offset = prob_data >> 2;
  104|  7.94k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 21, False: 7.92k]
  ------------------
  105|     21|        return false;
  106|     21|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   329k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 321k, False: 7.92k]
  ------------------
  109|   321k|        probability_table_[i + j] = 0;
  110|   321k|      }
  111|  7.92k|      i += offset;
  112|  7.92k|    } else {
  113|  5.91k|      const int extra_bytes = token;
  114|  5.91k|      uint32_t prob = prob_data >> 2;
  115|  10.0k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 4.19k, False: 5.89k]
  ------------------
  116|  4.19k|        uint8_t eb;
  117|  4.19k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 22, False: 4.16k]
  ------------------
  118|     22|          return false;
  119|     22|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  4.16k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  4.16k|      }
  124|  5.89k|      probability_table_[i] = prob;
  125|  5.89k|    }
  126|  13.8k|  }
  127|    286|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 21, False: 265]
  ------------------
  128|     21|    return false;
  129|     21|  }
  130|    265|  return true;
  131|    286|}
_ZNK5draco17RAnsSymbolDecoderILi3EE11num_symbolsEv:
   38|    291|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi3EE13StartDecodingEPNS_13DecoderBufferE:
  135|    265|    DecoderBuffer* buffer) {
  136|    265|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    265|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    265|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    265|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 13, False: 252]
  ------------------
  140|     13|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 13]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     13|  } else
  145|    252|#endif
  146|    252|  {
  147|    252|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 13, False: 239]
  ------------------
  148|     13|      return false;
  149|     13|    }
  150|    252|  }
  151|    252|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 20, False: 232]
  ------------------
  152|     20|    return false;
  153|     20|  }
  154|    232|  const uint8_t* const data_head =
  155|    232|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    232|  buffer->Advance(bytes_encoded);
  158|    232|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 53, False: 179]
  ------------------
  159|     53|    return false;
  160|     53|  }
  161|    179|  return true;
  162|    232|}
_ZN5draco17RAnsSymbolDecoderILi3EE12DecodeSymbolEv:
   43|  10.7M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi3EE11EndDecodingEv:
  165|    179|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    179|  ans_.read_end();
  167|    179|}
_ZN5draco17RAnsSymbolDecoderILi4EEC2Ev:
   33|    348|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi4EE6CreateEPNS_13DecoderBufferE:
   59|    348|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    348|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 348]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    348|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    348|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    348|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 22, False: 326]
  ------------------
   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|    326|#endif
   73|    326|  {
   74|    326|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 15, False: 311]
  ------------------
   75|     15|      return false;
   76|     15|    }
   77|    326|  }
   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|    333|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 16, False: 317]
  ------------------
   83|     16|    return false;
   84|     16|  }
   85|    317|  probability_table_.resize(num_symbols_);
   86|    317|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 306]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|  4.94k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 4.71k, False: 232]
  ------------------
   91|  4.71k|    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.71k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 42, False: 4.66k]
  ------------------
   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|  4.66k|    const int token = prob_data & 3;
  102|  4.66k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 2.75k, False: 1.91k]
  ------------------
  103|  2.75k|      const uint32_t offset = prob_data >> 2;
  104|  2.75k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 14, False: 2.73k]
  ------------------
  105|     14|        return false;
  106|     14|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  91.8k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 89.1k, False: 2.73k]
  ------------------
  109|  89.1k|        probability_table_[i + j] = 0;
  110|  89.1k|      }
  111|  2.73k|      i += offset;
  112|  2.73k|    } else {
  113|  1.91k|      const int extra_bytes = token;
  114|  1.91k|      uint32_t prob = prob_data >> 2;
  115|  3.20k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 1.31k, False: 1.89k]
  ------------------
  116|  1.31k|        uint8_t eb;
  117|  1.31k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 18, False: 1.29k]
  ------------------
  118|     18|          return false;
  119|     18|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  1.29k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  1.29k|      }
  124|  1.89k|      probability_table_[i] = prob;
  125|  1.89k|    }
  126|  4.66k|  }
  127|    232|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 27, False: 205]
  ------------------
  128|     27|    return false;
  129|     27|  }
  130|    205|  return true;
  131|    232|}
_ZNK5draco17RAnsSymbolDecoderILi4EE11num_symbolsEv:
   38|    216|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi4EE13StartDecodingEPNS_13DecoderBufferE:
  135|    205|    DecoderBuffer* buffer) {
  136|    205|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    205|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    205|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    205|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 16, False: 189]
  ------------------
  140|     16|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 16]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     16|  } else
  145|    189|#endif
  146|    189|  {
  147|    189|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 10, False: 179]
  ------------------
  148|     10|      return false;
  149|     10|    }
  150|    189|  }
  151|    195|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 28, False: 167]
  ------------------
  152|     28|    return false;
  153|     28|  }
  154|    167|  const uint8_t* const data_head =
  155|    167|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    167|  buffer->Advance(bytes_encoded);
  158|    167|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 56, False: 111]
  ------------------
  159|     56|    return false;
  160|     56|  }
  161|    111|  return true;
  162|    167|}
_ZN5draco17RAnsSymbolDecoderILi4EE12DecodeSymbolEv:
   43|  13.4M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi4EE11EndDecodingEv:
  165|    111|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    111|  ans_.read_end();
  167|    111|}
_ZN5draco17RAnsSymbolDecoderILi6EEC2Ev:
   33|    348|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi6EE6CreateEPNS_13DecoderBufferE:
   59|    348|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    348|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 348]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    348|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    348|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    348|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 25, False: 323]
  ------------------
   67|     25|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 25]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     25|  } else
   72|    323|#endif
   73|    323|  {
   74|    323|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 9, False: 314]
  ------------------
   75|      9|      return false;
   76|      9|    }
   77|    323|  }
   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|    339|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 13, False: 326]
  ------------------
   83|     13|    return false;
   84|     13|  }
   85|    326|  probability_table_.resize(num_symbols_);
   86|    326|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 8, False: 318]
  ------------------
   87|      8|    return true;
   88|      8|  }
   89|       |  // Decode the table.
   90|  9.09k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 8.85k, False: 237]
  ------------------
   91|  8.85k|    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|  8.85k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 41, False: 8.81k]
  ------------------
   95|     41|      return false;
   96|     41|    }
   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|  8.81k|    const int token = prob_data & 3;
  102|  8.81k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 4.93k, False: 3.88k]
  ------------------
  103|  4.93k|      const uint32_t offset = prob_data >> 2;
  104|  4.93k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 20, False: 4.91k]
  ------------------
  105|     20|        return false;
  106|     20|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   116k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 111k, False: 4.91k]
  ------------------
  109|   111k|        probability_table_[i + j] = 0;
  110|   111k|      }
  111|  4.91k|      i += offset;
  112|  4.91k|    } else {
  113|  3.88k|      const int extra_bytes = token;
  114|  3.88k|      uint32_t prob = prob_data >> 2;
  115|  6.57k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 2.71k, False: 3.86k]
  ------------------
  116|  2.71k|        uint8_t eb;
  117|  2.71k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 20, False: 2.69k]
  ------------------
  118|     20|          return false;
  119|     20|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  2.69k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  2.69k|      }
  124|  3.86k|      probability_table_[i] = prob;
  125|  3.86k|    }
  126|  8.81k|  }
  127|    237|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 15, False: 222]
  ------------------
  128|     15|    return false;
  129|     15|  }
  130|    222|  return true;
  131|    237|}
_ZNK5draco17RAnsSymbolDecoderILi6EE11num_symbolsEv:
   38|    230|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi6EE13StartDecodingEPNS_13DecoderBufferE:
  135|    222|    DecoderBuffer* buffer) {
  136|    222|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    222|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    222|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    222|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 20, False: 202]
  ------------------
  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|    202|#endif
  146|    202|  {
  147|    202|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 1, False: 201]
  ------------------
  148|      1|      return false;
  149|      1|    }
  150|    202|  }
  151|    220|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 29, False: 191]
  ------------------
  152|     29|    return false;
  153|     29|  }
  154|    191|  const uint8_t* const data_head =
  155|    191|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    191|  buffer->Advance(bytes_encoded);
  158|    191|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 44, False: 147]
  ------------------
  159|     44|    return false;
  160|     44|  }
  161|    147|  return true;
  162|    191|}
_ZN5draco17RAnsSymbolDecoderILi6EE12DecodeSymbolEv:
   43|  24.7M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi6EE11EndDecodingEv:
  165|    147|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    147|  ans_.read_end();
  167|    147|}
_ZN5draco17RAnsSymbolDecoderILi7EEC2Ev:
   33|    400|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi7EE6CreateEPNS_13DecoderBufferE:
   59|    400|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    400|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 400]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    400|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    400|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    400|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 49, False: 351]
  ------------------
   67|     49|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 49]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     49|  } else
   72|    351|#endif
   73|    351|  {
   74|    351|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 13, False: 338]
  ------------------
   75|     13|      return false;
   76|     13|    }
   77|    351|  }
   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|    387|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 14, False: 373]
  ------------------
   83|     14|    return false;
   84|     14|  }
   85|    373|  probability_table_.resize(num_symbols_);
   86|    373|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 9, False: 364]
  ------------------
   87|      9|    return true;
   88|      9|  }
   89|       |  // Decode the table.
   90|  2.14M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 2.14M, False: 258]
  ------------------
   91|  2.14M|    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.14M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 44, False: 2.14M]
  ------------------
   95|     44|      return false;
   96|     44|    }
   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.14M|    const int token = prob_data & 3;
  102|  2.14M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 91.6k, False: 2.05M]
  ------------------
  103|  91.6k|      const uint32_t offset = prob_data >> 2;
  104|  91.6k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 25, False: 91.6k]
  ------------------
  105|     25|        return false;
  106|     25|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  2.88M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 2.79M, False: 91.6k]
  ------------------
  109|  2.79M|        probability_table_[i + j] = 0;
  110|  2.79M|      }
  111|  91.6k|      i += offset;
  112|  2.05M|    } else {
  113|  2.05M|      const int extra_bytes = token;
  114|  2.05M|      uint32_t prob = prob_data >> 2;
  115|  4.03M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 1.98M, False: 2.05M]
  ------------------
  116|  1.98M|        uint8_t eb;
  117|  1.98M|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 37, False: 1.98M]
  ------------------
  118|     37|          return false;
  119|     37|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  1.98M|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  1.98M|      }
  124|  2.05M|      probability_table_[i] = prob;
  125|  2.05M|    }
  126|  2.14M|  }
  127|    258|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 26, False: 232]
  ------------------
  128|     26|    return false;
  129|     26|  }
  130|    232|  return true;
  131|    258|}
_ZNK5draco17RAnsSymbolDecoderILi7EE11num_symbolsEv:
   38|    241|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi7EE13StartDecodingEPNS_13DecoderBufferE:
  135|    232|    DecoderBuffer* buffer) {
  136|    232|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    232|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    232|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    232|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 31, False: 201]
  ------------------
  140|     31|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 3, False: 28]
  ------------------
  141|      3|      return false;
  142|      3|    }
  143|       |
  144|     31|  } else
  145|    201|#endif
  146|    201|  {
  147|    201|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 10, False: 191]
  ------------------
  148|     10|      return false;
  149|     10|    }
  150|    201|  }
  151|    219|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 37, False: 182]
  ------------------
  152|     37|    return false;
  153|     37|  }
  154|    182|  const uint8_t* const data_head =
  155|    182|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    182|  buffer->Advance(bytes_encoded);
  158|    182|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 46, False: 136]
  ------------------
  159|     46|    return false;
  160|     46|  }
  161|    136|  return true;
  162|    182|}
_ZN5draco17RAnsSymbolDecoderILi7EE12DecodeSymbolEv:
   43|  24.5M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi7EE11EndDecodingEv:
  165|    136|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    136|  ans_.read_end();
  167|    136|}
_ZN5draco17RAnsSymbolDecoderILi8EEC2Ev:
   33|    374|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi8EE6CreateEPNS_13DecoderBufferE:
   59|    374|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    374|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 374]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    374|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    374|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    374|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 40, False: 334]
  ------------------
   67|     40|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 38]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     40|  } else
   72|    334|#endif
   73|    334|  {
   74|    334|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 10, False: 324]
  ------------------
   75|     10|      return false;
   76|     10|    }
   77|    334|  }
   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|    362|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 17, False: 345]
  ------------------
   83|     17|    return false;
   84|     17|  }
   85|    345|  probability_table_.resize(num_symbols_);
   86|    345|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 13, False: 332]
  ------------------
   87|     13|    return true;
   88|     13|  }
   89|       |  // Decode the table.
   90|   140k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 140k, False: 253]
  ------------------
   91|   140k|    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|   140k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 44, False: 140k]
  ------------------
   95|     44|      return false;
   96|     44|    }
   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|   140k|    const int token = prob_data & 3;
  102|   140k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 121k, False: 19.1k]
  ------------------
  103|   121k|      const uint32_t offset = prob_data >> 2;
  104|   121k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 19, False: 121k]
  ------------------
  105|     19|        return false;
  106|     19|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  2.96M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 2.84M, False: 121k]
  ------------------
  109|  2.84M|        probability_table_[i + j] = 0;
  110|  2.84M|      }
  111|   121k|      i += offset;
  112|   121k|    } else {
  113|  19.1k|      const int extra_bytes = token;
  114|  19.1k|      uint32_t prob = prob_data >> 2;
  115|  45.2k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 26.0k, False: 19.1k]
  ------------------
  116|  26.0k|        uint8_t eb;
  117|  26.0k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 16, False: 26.0k]
  ------------------
  118|     16|          return false;
  119|     16|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  26.0k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  26.0k|      }
  124|  19.1k|      probability_table_[i] = prob;
  125|  19.1k|    }
  126|   140k|  }
  127|    253|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 12, False: 241]
  ------------------
  128|     12|    return false;
  129|     12|  }
  130|    241|  return true;
  131|    253|}
_ZNK5draco17RAnsSymbolDecoderILi8EE11num_symbolsEv:
   38|    254|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi8EE13StartDecodingEPNS_13DecoderBufferE:
  135|    241|    DecoderBuffer* buffer) {
  136|    241|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    241|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    241|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    241|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 20, False: 221]
  ------------------
  140|     20|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 20]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     20|  } else
  145|    221|#endif
  146|    221|  {
  147|    221|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 221]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    221|  }
  151|    241|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 34, False: 207]
  ------------------
  152|     34|    return false;
  153|     34|  }
  154|    207|  const uint8_t* const data_head =
  155|    207|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    207|  buffer->Advance(bytes_encoded);
  158|    207|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 46, False: 161]
  ------------------
  159|     46|    return false;
  160|     46|  }
  161|    161|  return true;
  162|    207|}
_ZN5draco17RAnsSymbolDecoderILi8EE12DecodeSymbolEv:
   43|  22.0M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi8EE11EndDecodingEv:
  165|    161|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    161|  ans_.read_end();
  167|    161|}
_ZN5draco17RAnsSymbolDecoderILi9EEC2Ev:
   33|    510|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi9EE6CreateEPNS_13DecoderBufferE:
   59|    510|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    510|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 510]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    510|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    510|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    510|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 16, False: 494]
  ------------------
   67|     16|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 16]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     16|  } else
   72|    494|#endif
   73|    494|  {
   74|    494|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 12, False: 482]
  ------------------
   75|     12|      return false;
   76|     12|    }
   77|    494|  }
   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: 20, False: 478]
  ------------------
   83|     20|    return false;
   84|     20|  }
   85|    478|  probability_table_.resize(num_symbols_);
   86|    478|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 7, False: 471]
  ------------------
   87|      7|    return true;
   88|      7|  }
   89|       |  // Decode the table.
   90|  72.4k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 72.1k, False: 384]
  ------------------
   91|  72.1k|    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.1k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 45, False: 72.0k]
  ------------------
   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|  72.0k|    const int token = prob_data & 3;
  102|  72.0k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 23.3k, False: 48.6k]
  ------------------
  103|  23.3k|      const uint32_t offset = prob_data >> 2;
  104|  23.3k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 26, False: 23.3k]
  ------------------
  105|     26|        return false;
  106|     26|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   939k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 915k, False: 23.3k]
  ------------------
  109|   915k|        probability_table_[i + j] = 0;
  110|   915k|      }
  111|  23.3k|      i += offset;
  112|  48.6k|    } else {
  113|  48.6k|      const int extra_bytes = token;
  114|  48.6k|      uint32_t prob = prob_data >> 2;
  115|  89.0k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 40.3k, False: 48.6k]
  ------------------
  116|  40.3k|        uint8_t eb;
  117|  40.3k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 16, False: 40.3k]
  ------------------
  118|     16|          return false;
  119|     16|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  40.3k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  40.3k|      }
  124|  48.6k|      probability_table_[i] = prob;
  125|  48.6k|    }
  126|  72.0k|  }
  127|    384|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 54, False: 330]
  ------------------
  128|     54|    return false;
  129|     54|  }
  130|    330|  return true;
  131|    384|}
_ZNK5draco17RAnsSymbolDecoderILi9EE11num_symbolsEv:
   38|    337|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi9EE13StartDecodingEPNS_13DecoderBufferE:
  135|    330|    DecoderBuffer* buffer) {
  136|    330|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    330|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    330|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    330|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 2, False: 328]
  ------------------
  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|    328|#endif
  146|    328|  {
  147|    328|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 2, False: 326]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|    328|  }
  151|    328|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 22, False: 306]
  ------------------
  152|     22|    return false;
  153|     22|  }
  154|    306|  const uint8_t* const data_head =
  155|    306|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    306|  buffer->Advance(bytes_encoded);
  158|    306|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 51, False: 255]
  ------------------
  159|     51|    return false;
  160|     51|  }
  161|    255|  return true;
  162|    306|}
_ZN5draco17RAnsSymbolDecoderILi9EE12DecodeSymbolEv:
   43|  17.3M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi9EE11EndDecodingEv:
  165|    255|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    255|  ans_.read_end();
  167|    255|}
_ZN5draco17RAnsSymbolDecoderILi10EEC2Ev:
   33|    382|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi10EE6CreateEPNS_13DecoderBufferE:
   59|    382|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    382|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 382]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    382|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    382|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    382|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 38, False: 344]
  ------------------
   67|     38|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 38]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     38|  } else
   72|    344|#endif
   73|    344|  {
   74|    344|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 16, False: 328]
  ------------------
   75|     16|      return false;
   76|     16|    }
   77|    344|  }
   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|    366|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 13, False: 353]
  ------------------
   83|     13|    return false;
   84|     13|  }
   85|    353|  probability_table_.resize(num_symbols_);
   86|    353|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 19, False: 334]
  ------------------
   87|     19|    return true;
   88|     19|  }
   89|       |  // Decode the table.
   90|  94.6k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 94.3k, False: 248]
  ------------------
   91|  94.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|  94.3k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 54, False: 94.3k]
  ------------------
   95|     54|      return false;
   96|     54|    }
   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|  94.3k|    const int token = prob_data & 3;
  102|  94.3k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 5.75k, False: 88.5k]
  ------------------
  103|  5.75k|      const uint32_t offset = prob_data >> 2;
  104|  5.75k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 20, False: 5.73k]
  ------------------
  105|     20|        return false;
  106|     20|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   271k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 265k, False: 5.73k]
  ------------------
  109|   265k|        probability_table_[i + j] = 0;
  110|   265k|      }
  111|  5.73k|      i += offset;
  112|  88.5k|    } else {
  113|  88.5k|      const int extra_bytes = token;
  114|  88.5k|      uint32_t prob = prob_data >> 2;
  115|   174k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 86.3k, False: 88.5k]
  ------------------
  116|  86.3k|        uint8_t eb;
  117|  86.3k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 12, False: 86.3k]
  ------------------
  118|     12|          return false;
  119|     12|        }
  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|  88.5k|      probability_table_[i] = prob;
  125|  88.5k|    }
  126|  94.3k|  }
  127|    248|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 60, False: 188]
  ------------------
  128|     60|    return false;
  129|     60|  }
  130|    188|  return true;
  131|    248|}
_ZNK5draco17RAnsSymbolDecoderILi10EE11num_symbolsEv:
   38|    207|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi10EE13StartDecodingEPNS_13DecoderBufferE:
  135|    188|    DecoderBuffer* buffer) {
  136|    188|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    188|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    188|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    188|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 23, False: 165]
  ------------------
  140|     23|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 22]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     23|  } else
  145|    165|#endif
  146|    165|  {
  147|    165|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 13, False: 152]
  ------------------
  148|     13|      return false;
  149|     13|    }
  150|    165|  }
  151|    174|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 48, False: 126]
  ------------------
  152|     48|    return false;
  153|     48|  }
  154|    126|  const uint8_t* const data_head =
  155|    126|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    126|  buffer->Advance(bytes_encoded);
  158|    126|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 56, False: 70]
  ------------------
  159|     56|    return false;
  160|     56|  }
  161|     70|  return true;
  162|    126|}
_ZN5draco17RAnsSymbolDecoderILi10EE12DecodeSymbolEv:
   43|   469k|  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|    406|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi11EE6CreateEPNS_13DecoderBufferE:
   59|    406|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    406|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 406]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    406|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    406|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    406|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 42, False: 364]
  ------------------
   67|     42|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 42]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     42|  } else
   72|    364|#endif
   73|    364|  {
   74|    364|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 13, False: 351]
  ------------------
   75|     13|      return false;
   76|     13|    }
   77|    364|  }
   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|    393|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 33, False: 360]
  ------------------
   83|     33|    return false;
   84|     33|  }
   85|    360|  probability_table_.resize(num_symbols_);
   86|    360|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 14, False: 346]
  ------------------
   87|     14|    return true;
   88|     14|  }
   89|       |  // Decode the table.
   90|   389k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 389k, False: 249]
  ------------------
   91|   389k|    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|   389k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 40, False: 389k]
  ------------------
   95|     40|      return false;
   96|     40|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   389k|    const int token = prob_data & 3;
  102|   389k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 29.4k, False: 359k]
  ------------------
  103|  29.4k|      const uint32_t offset = prob_data >> 2;
  104|  29.4k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 29, False: 29.4k]
  ------------------
  105|     29|        return false;
  106|     29|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  1.16M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 1.13M, False: 29.4k]
  ------------------
  109|  1.13M|        probability_table_[i + j] = 0;
  110|  1.13M|      }
  111|  29.4k|      i += offset;
  112|   359k|    } else {
  113|   359k|      const int extra_bytes = token;
  114|   359k|      uint32_t prob = prob_data >> 2;
  115|   698k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 338k, False: 359k]
  ------------------
  116|   338k|        uint8_t eb;
  117|   338k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 28, False: 338k]
  ------------------
  118|     28|          return false;
  119|     28|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   338k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   338k|      }
  124|   359k|      probability_table_[i] = prob;
  125|   359k|    }
  126|   389k|  }
  127|    249|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 69, False: 180]
  ------------------
  128|     69|    return false;
  129|     69|  }
  130|    180|  return true;
  131|    249|}
_ZNK5draco17RAnsSymbolDecoderILi11EE11num_symbolsEv:
   38|    194|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi11EE13StartDecodingEPNS_13DecoderBufferE:
  135|    180|    DecoderBuffer* buffer) {
  136|    180|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    180|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    180|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    180|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 3, False: 177]
  ------------------
  140|      3|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 2]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|      3|  } else
  145|    177|#endif
  146|    177|  {
  147|    177|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 9, False: 168]
  ------------------
  148|      9|      return false;
  149|      9|    }
  150|    177|  }
  151|    170|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 41, False: 129]
  ------------------
  152|     41|    return false;
  153|     41|  }
  154|    129|  const uint8_t* const data_head =
  155|    129|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    129|  buffer->Advance(bytes_encoded);
  158|    129|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 61, False: 68]
  ------------------
  159|     61|    return false;
  160|     61|  }
  161|     68|  return true;
  162|    129|}
_ZN5draco17RAnsSymbolDecoderILi11EE12DecodeSymbolEv:
   43|   529k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi11EE11EndDecodingEv:
  165|     68|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     68|  ans_.read_end();
  167|     68|}
_ZN5draco17RAnsSymbolDecoderILi12EEC2Ev:
   33|    342|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi12EE6CreateEPNS_13DecoderBufferE:
   59|    342|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    342|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 342]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    342|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    342|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    342|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 30, False: 312]
  ------------------
   67|     30|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 30]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     30|  } else
   72|    312|#endif
   73|    312|  {
   74|    312|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 7, False: 305]
  ------------------
   75|      7|      return false;
   76|      7|    }
   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|    335|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 9, False: 326]
  ------------------
   83|      9|    return false;
   84|      9|  }
   85|    326|  probability_table_.resize(num_symbols_);
   86|    326|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 9, False: 317]
  ------------------
   87|      9|    return true;
   88|      9|  }
   89|       |  // Decode the table.
   90|  1.38M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.38M, False: 214]
  ------------------
   91|  1.38M|    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.38M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 51, False: 1.38M]
  ------------------
   95|     51|      return false;
   96|     51|    }
   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.38M|    const int token = prob_data & 3;
  102|  1.38M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 795k, False: 591k]
  ------------------
  103|   795k|      const uint32_t offset = prob_data >> 2;
  104|   795k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 34, False: 795k]
  ------------------
  105|     34|        return false;
  106|     34|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  30.7M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 29.9M, False: 795k]
  ------------------
  109|  29.9M|        probability_table_[i + j] = 0;
  110|  29.9M|      }
  111|   795k|      i += offset;
  112|   795k|    } else {
  113|   591k|      const int extra_bytes = token;
  114|   591k|      uint32_t prob = prob_data >> 2;
  115|  1.19M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 602k, False: 591k]
  ------------------
  116|   602k|        uint8_t eb;
  117|   602k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 18, False: 602k]
  ------------------
  118|     18|          return false;
  119|     18|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   602k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   602k|      }
  124|   591k|      probability_table_[i] = prob;
  125|   591k|    }
  126|  1.38M|  }
  127|    214|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 58, False: 156]
  ------------------
  128|     58|    return false;
  129|     58|  }
  130|    156|  return true;
  131|    214|}
_ZNK5draco17RAnsSymbolDecoderILi12EE11num_symbolsEv:
   38|    165|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi12EE13StartDecodingEPNS_13DecoderBufferE:
  135|    156|    DecoderBuffer* buffer) {
  136|    156|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    156|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    156|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    156|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 5, False: 151]
  ------------------
  140|      5|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 4]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|      5|  } else
  145|    151|#endif
  146|    151|  {
  147|    151|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 2, False: 149]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|    151|  }
  151|    153|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 33, False: 120]
  ------------------
  152|     33|    return false;
  153|     33|  }
  154|    120|  const uint8_t* const data_head =
  155|    120|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    120|  buffer->Advance(bytes_encoded);
  158|    120|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 48, False: 72]
  ------------------
  159|     48|    return false;
  160|     48|  }
  161|     72|  return true;
  162|    120|}
_ZN5draco17RAnsSymbolDecoderILi12EE12DecodeSymbolEv:
   43|   121k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi12EE11EndDecodingEv:
  165|     72|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     72|  ans_.read_end();
  167|     72|}
_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: 40, False: 426]
  ------------------
   67|     40|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 40]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     40|  } else
   72|    426|#endif
   73|    426|  {
   74|    426|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 15, False: 411]
  ------------------
   75|     15|      return false;
   76|     15|    }
   77|    426|  }
   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|    451|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 14, False: 437]
  ------------------
   83|     14|    return false;
   84|     14|  }
   85|    437|  probability_table_.resize(num_symbols_);
   86|    437|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 30, False: 407]
  ------------------
   87|     30|    return true;
   88|     30|  }
   89|       |  // Decode the table.
   90|  1.59M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.59M, False: 287]
  ------------------
   91|  1.59M|    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.59M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 61, False: 1.59M]
  ------------------
   95|     61|      return false;
   96|     61|    }
   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.59M|    const int token = prob_data & 3;
  102|  1.59M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 901k, False: 695k]
  ------------------
  103|   901k|      const uint32_t offset = prob_data >> 2;
  104|   901k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 37, False: 901k]
  ------------------
  105|     37|        return false;
  106|     37|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  49.6M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 48.7M, False: 901k]
  ------------------
  109|  48.7M|        probability_table_[i + j] = 0;
  110|  48.7M|      }
  111|   901k|      i += offset;
  112|   901k|    } else {
  113|   695k|      const int extra_bytes = token;
  114|   695k|      uint32_t prob = prob_data >> 2;
  115|   935k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 239k, False: 695k]
  ------------------
  116|   239k|        uint8_t eb;
  117|   239k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 22, False: 239k]
  ------------------
  118|     22|          return false;
  119|     22|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   239k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   239k|      }
  124|   695k|      probability_table_[i] = prob;
  125|   695k|    }
  126|  1.59M|  }
  127|    287|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 68, False: 219]
  ------------------
  128|     68|    return false;
  129|     68|  }
  130|    219|  return true;
  131|    287|}
_ZNK5draco17RAnsSymbolDecoderILi13EE11num_symbolsEv:
   38|    249|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi13EE13StartDecodingEPNS_13DecoderBufferE:
  135|    219|    DecoderBuffer* buffer) {
  136|    219|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    219|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    219|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    219|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 20, False: 199]
  ------------------
  140|     20|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 20]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     20|  } else
  145|    199|#endif
  146|    199|  {
  147|    199|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 10, False: 189]
  ------------------
  148|     10|      return false;
  149|     10|    }
  150|    199|  }
  151|    209|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 76, False: 133]
  ------------------
  152|     76|    return false;
  153|     76|  }
  154|    133|  const uint8_t* const data_head =
  155|    133|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    133|  buffer->Advance(bytes_encoded);
  158|    133|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 43, False: 90]
  ------------------
  159|     43|    return false;
  160|     43|  }
  161|     90|  return true;
  162|    133|}
_ZN5draco17RAnsSymbolDecoderILi13EE12DecodeSymbolEv:
   43|   168k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi13EE11EndDecodingEv:
  165|     90|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     90|  ans_.read_end();
  167|     90|}
_ZN5draco17RAnsSymbolDecoderILi14EEC2Ev:
   33|    370|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi14EE6CreateEPNS_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: 38, False: 332]
  ------------------
   67|     38|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 38]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     38|  } else
   72|    332|#endif
   73|    332|  {
   74|    332|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 5, False: 327]
  ------------------
   75|      5|      return false;
   76|      5|    }
   77|    332|  }
   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|    365|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 25, False: 340]
  ------------------
   83|     25|    return false;
   84|     25|  }
   85|    340|  probability_table_.resize(num_symbols_);
   86|    340|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 13, False: 327]
  ------------------
   87|     13|    return true;
   88|     13|  }
   89|       |  // Decode the table.
   90|   881k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 881k, False: 227]
  ------------------
   91|   881k|    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|   881k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 56, False: 881k]
  ------------------
   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|   881k|    const int token = prob_data & 3;
  102|   881k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 526k, False: 354k]
  ------------------
  103|   526k|      const uint32_t offset = prob_data >> 2;
  104|   526k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 21, False: 526k]
  ------------------
  105|     21|        return false;
  106|     21|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  20.5M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 19.9M, False: 526k]
  ------------------
  109|  19.9M|        probability_table_[i + j] = 0;
  110|  19.9M|      }
  111|   526k|      i += offset;
  112|   526k|    } else {
  113|   354k|      const int extra_bytes = token;
  114|   354k|      uint32_t prob = prob_data >> 2;
  115|   637k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 282k, False: 354k]
  ------------------
  116|   282k|        uint8_t eb;
  117|   282k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 23, False: 282k]
  ------------------
  118|     23|          return false;
  119|     23|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   282k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   282k|      }
  124|   354k|      probability_table_[i] = prob;
  125|   354k|    }
  126|   881k|  }
  127|    227|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 34, False: 193]
  ------------------
  128|     34|    return false;
  129|     34|  }
  130|    193|  return true;
  131|    227|}
_ZNK5draco17RAnsSymbolDecoderILi14EE11num_symbolsEv:
   38|    206|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi14EE13StartDecodingEPNS_13DecoderBufferE:
  135|    193|    DecoderBuffer* buffer) {
  136|    193|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    193|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    193|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    193|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 16, False: 177]
  ------------------
  140|     16|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 15]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     16|  } else
  145|    177|#endif
  146|    177|  {
  147|    177|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 10, False: 167]
  ------------------
  148|     10|      return false;
  149|     10|    }
  150|    177|  }
  151|    182|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 41, False: 141]
  ------------------
  152|     41|    return false;
  153|     41|  }
  154|    141|  const uint8_t* const data_head =
  155|    141|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    141|  buffer->Advance(bytes_encoded);
  158|    141|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 49, False: 92]
  ------------------
  159|     49|    return false;
  160|     49|  }
  161|     92|  return true;
  162|    141|}
_ZN5draco17RAnsSymbolDecoderILi14EE12DecodeSymbolEv:
   43|   106k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi14EE11EndDecodingEv:
  165|     92|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     92|  ans_.read_end();
  167|     92|}
_ZN5draco17RAnsSymbolDecoderILi15EEC2Ev:
   33|    494|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi15EE6CreateEPNS_13DecoderBufferE:
   59|    494|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    494|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 494]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    494|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    494|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    494|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 144, False: 350]
  ------------------
   67|    144|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 6, False: 138]
  ------------------
   68|      6|      return false;
   69|      6|    }
   70|       |
   71|    144|  } else
   72|    350|#endif
   73|    350|  {
   74|    350|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 11, False: 339]
  ------------------
   75|     11|      return false;
   76|     11|    }
   77|    350|  }
   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|    477|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 50, False: 427]
  ------------------
   83|     50|    return false;
   84|     50|  }
   85|    427|  probability_table_.resize(num_symbols_);
   86|    427|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 12, False: 415]
  ------------------
   87|     12|    return true;
   88|     12|  }
   89|       |  // Decode the table.
   90|  2.01M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 2.01M, False: 299]
  ------------------
   91|  2.01M|    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.01M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 75, False: 2.01M]
  ------------------
   95|     75|      return false;
   96|     75|    }
   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.01M|    const int token = prob_data & 3;
  102|  2.01M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 1.12M, False: 883k]
  ------------------
  103|  1.12M|      const uint32_t offset = prob_data >> 2;
  104|  1.12M|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 23, False: 1.12M]
  ------------------
  105|     23|        return false;
  106|     23|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  64.8M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 63.7M, False: 1.12M]
  ------------------
  109|  63.7M|        probability_table_[i + j] = 0;
  110|  63.7M|      }
  111|  1.12M|      i += offset;
  112|  1.12M|    } else {
  113|   883k|      const int extra_bytes = token;
  114|   883k|      uint32_t prob = prob_data >> 2;
  115|  1.27M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 387k, False: 883k]
  ------------------
  116|   387k|        uint8_t eb;
  117|   387k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 18, False: 387k]
  ------------------
  118|     18|          return false;
  119|     18|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   387k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   387k|      }
  124|   883k|      probability_table_[i] = prob;
  125|   883k|    }
  126|  2.01M|  }
  127|    299|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 34, False: 265]
  ------------------
  128|     34|    return false;
  129|     34|  }
  130|    265|  return true;
  131|    299|}
_ZNK5draco17RAnsSymbolDecoderILi15EE11num_symbolsEv:
   38|    277|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi15EE13StartDecodingEPNS_13DecoderBufferE:
  135|    265|    DecoderBuffer* buffer) {
  136|    265|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    265|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    265|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    265|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 86, False: 179]
  ------------------
  140|     86|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 84]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     86|  } else
  145|    179|#endif
  146|    179|  {
  147|    179|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 6, False: 173]
  ------------------
  148|      6|      return false;
  149|      6|    }
  150|    179|  }
  151|    257|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 113, False: 144]
  ------------------
  152|    113|    return false;
  153|    113|  }
  154|    144|  const uint8_t* const data_head =
  155|    144|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    144|  buffer->Advance(bytes_encoded);
  158|    144|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 53, False: 91]
  ------------------
  159|     53|    return false;
  160|     53|  }
  161|     91|  return true;
  162|    144|}
_ZN5draco17RAnsSymbolDecoderILi15EE12DecodeSymbolEv:
   43|   162k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi15EE11EndDecodingEv:
  165|     91|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     91|  ans_.read_end();
  167|     91|}
_ZN5draco17RAnsSymbolDecoderILi16EEC2Ev:
   33|    363|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi16EE6CreateEPNS_13DecoderBufferE:
   59|    363|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    363|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 363]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    363|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    363|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    363|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 64, False: 299]
  ------------------
   67|     64|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 64]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     64|  } else
   72|    299|#endif
   73|    299|  {
   74|    299|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 11, False: 288]
  ------------------
   75|     11|      return false;
   76|     11|    }
   77|    299|  }
   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: 6, False: 346]
  ------------------
   83|      6|    return false;
   84|      6|  }
   85|    346|  probability_table_.resize(num_symbols_);
   86|    346|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 13, False: 333]
  ------------------
   87|     13|    return true;
   88|     13|  }
   89|       |  // Decode the table.
   90|  7.64k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 7.39k, False: 253]
  ------------------
   91|  7.39k|    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|  7.39k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 46, False: 7.34k]
  ------------------
   95|     46|      return false;
   96|     46|    }
   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|  7.34k|    const int token = prob_data & 3;
  102|  7.34k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 3.47k, False: 3.87k]
  ------------------
  103|  3.47k|      const uint32_t offset = prob_data >> 2;
  104|  3.47k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 16, False: 3.45k]
  ------------------
  105|     16|        return false;
  106|     16|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   115k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 112k, False: 3.45k]
  ------------------
  109|   112k|        probability_table_[i + j] = 0;
  110|   112k|      }
  111|  3.45k|      i += offset;
  112|  3.87k|    } else {
  113|  3.87k|      const int extra_bytes = token;
  114|  3.87k|      uint32_t prob = prob_data >> 2;
  115|  6.93k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 3.08k, False: 3.85k]
  ------------------
  116|  3.08k|        uint8_t eb;
  117|  3.08k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 18, False: 3.06k]
  ------------------
  118|     18|          return false;
  119|     18|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  3.06k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  3.06k|      }
  124|  3.85k|      probability_table_[i] = prob;
  125|  3.85k|    }
  126|  7.34k|  }
  127|    253|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 27, False: 226]
  ------------------
  128|     27|    return false;
  129|     27|  }
  130|    226|  return true;
  131|    253|}
_ZNK5draco17RAnsSymbolDecoderILi16EE11num_symbolsEv:
   38|    239|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi16EE13StartDecodingEPNS_13DecoderBufferE:
  135|    226|    DecoderBuffer* buffer) {
  136|    226|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    226|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    226|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    226|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 56, False: 170]
  ------------------
  140|     56|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 56]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     56|  } else
  145|    170|#endif
  146|    170|  {
  147|    170|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 170]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    170|  }
  151|    226|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 106, False: 120]
  ------------------
  152|    106|    return false;
  153|    106|  }
  154|    120|  const uint8_t* const data_head =
  155|    120|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    120|  buffer->Advance(bytes_encoded);
  158|    120|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 47, False: 73]
  ------------------
  159|     47|    return false;
  160|     47|  }
  161|     73|  return true;
  162|    120|}
_ZN5draco17RAnsSymbolDecoderILi16EE12DecodeSymbolEv:
   43|   207k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi16EE11EndDecodingEv:
  165|     73|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     73|  ans_.read_end();
  167|     73|}
_ZN5draco17RAnsSymbolDecoderILi17EEC2Ev:
   33|    389|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi17EE6CreateEPNS_13DecoderBufferE:
   59|    389|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    389|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 389]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    389|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    389|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    389|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 54, False: 335]
  ------------------
   67|     54|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 4, False: 50]
  ------------------
   68|      4|      return false;
   69|      4|    }
   70|       |
   71|     54|  } else
   72|    335|#endif
   73|    335|  {
   74|    335|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 16, False: 319]
  ------------------
   75|     16|      return false;
   76|     16|    }
   77|    335|  }
   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|    369|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 37, False: 332]
  ------------------
   83|     37|    return false;
   84|     37|  }
   85|    332|  probability_table_.resize(num_symbols_);
   86|    332|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 321]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|  1.05M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.05M, False: 209]
  ------------------
   91|  1.05M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  1.05M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 57, False: 1.05M]
  ------------------
   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|  1.05M|    const int token = prob_data & 3;
  102|  1.05M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 480k, False: 569k]
  ------------------
  103|   480k|      const uint32_t offset = prob_data >> 2;
  104|   480k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 18, False: 480k]
  ------------------
  105|     18|        return false;
  106|     18|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  14.3M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 13.8M, False: 480k]
  ------------------
  109|  13.8M|        probability_table_[i + j] = 0;
  110|  13.8M|      }
  111|   480k|      i += offset;
  112|   569k|    } else {
  113|   569k|      const int extra_bytes = token;
  114|   569k|      uint32_t prob = prob_data >> 2;
  115|  1.13M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 561k, False: 569k]
  ------------------
  116|   561k|        uint8_t eb;
  117|   561k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 37, False: 561k]
  ------------------
  118|     37|          return false;
  119|     37|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   561k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   561k|      }
  124|   569k|      probability_table_[i] = prob;
  125|   569k|    }
  126|  1.05M|  }
  127|    209|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 27, False: 182]
  ------------------
  128|     27|    return false;
  129|     27|  }
  130|    182|  return true;
  131|    209|}
_ZNK5draco17RAnsSymbolDecoderILi17EE11num_symbolsEv:
   38|    193|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi17EE13StartDecodingEPNS_13DecoderBufferE:
  135|    182|    DecoderBuffer* buffer) {
  136|    182|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    182|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    182|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    182|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 18, False: 164]
  ------------------
  140|     18|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 17]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     18|  } else
  145|    164|#endif
  146|    164|  {
  147|    164|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 1, False: 163]
  ------------------
  148|      1|      return false;
  149|      1|    }
  150|    164|  }
  151|    180|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 63, False: 117]
  ------------------
  152|     63|    return false;
  153|     63|  }
  154|    117|  const uint8_t* const data_head =
  155|    117|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    117|  buffer->Advance(bytes_encoded);
  158|    117|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 39, False: 78]
  ------------------
  159|     39|    return false;
  160|     39|  }
  161|     78|  return true;
  162|    117|}
_ZN5draco17RAnsSymbolDecoderILi17EE12DecodeSymbolEv:
   43|   257k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi17EE11EndDecodingEv:
  165|     78|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     78|  ans_.read_end();
  167|     78|}
_ZN5draco17RAnsSymbolDecoderILi18EEC2Ev:
   33|    452|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi18EE6CreateEPNS_13DecoderBufferE:
   59|    452|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    452|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 452]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    452|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    452|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    452|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 130, False: 322]
  ------------------
   67|    130|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 129]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|    130|  } else
   72|    322|#endif
   73|    322|  {
   74|    322|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 12, False: 310]
  ------------------
   75|     12|      return false;
   76|     12|    }
   77|    322|  }
   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|    439|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 51, False: 388]
  ------------------
   83|     51|    return false;
   84|     51|  }
   85|    388|  probability_table_.resize(num_symbols_);
   86|    388|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 12, False: 376]
  ------------------
   87|     12|    return true;
   88|     12|  }
   89|       |  // Decode the table.
   90|   646k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 646k, False: 263]
  ------------------
   91|   646k|    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|   646k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 66, False: 646k]
  ------------------
   95|     66|      return false;
   96|     66|    }
   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|   646k|    const int token = prob_data & 3;
  102|   646k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 179k, False: 466k]
  ------------------
  103|   179k|      const uint32_t offset = prob_data >> 2;
  104|   179k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 19, False: 179k]
  ------------------
  105|     19|        return false;
  106|     19|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  6.04M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 5.86M, False: 179k]
  ------------------
  109|  5.86M|        probability_table_[i + j] = 0;
  110|  5.86M|      }
  111|   179k|      i += offset;
  112|   466k|    } else {
  113|   466k|      const int extra_bytes = token;
  114|   466k|      uint32_t prob = prob_data >> 2;
  115|   848k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 382k, False: 466k]
  ------------------
  116|   382k|        uint8_t eb;
  117|   382k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 28, False: 381k]
  ------------------
  118|     28|          return false;
  119|     28|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   381k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   381k|      }
  124|   466k|      probability_table_[i] = prob;
  125|   466k|    }
  126|   646k|  }
  127|    263|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 48, False: 215]
  ------------------
  128|     48|    return false;
  129|     48|  }
  130|    215|  return true;
  131|    263|}
_ZNK5draco17RAnsSymbolDecoderILi18EE11num_symbolsEv:
   38|    227|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi18EE13StartDecodingEPNS_13DecoderBufferE:
  135|    215|    DecoderBuffer* buffer) {
  136|    215|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    215|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    215|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    215|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 48, False: 167]
  ------------------
  140|     48|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 4, False: 44]
  ------------------
  141|      4|      return false;
  142|      4|    }
  143|       |
  144|     48|  } else
  145|    167|#endif
  146|    167|  {
  147|    167|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 167]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    167|  }
  151|    211|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 66, False: 145]
  ------------------
  152|     66|    return false;
  153|     66|  }
  154|    145|  const uint8_t* const data_head =
  155|    145|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    145|  buffer->Advance(bytes_encoded);
  158|    145|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 44, False: 101]
  ------------------
  159|     44|    return false;
  160|     44|  }
  161|    101|  return true;
  162|    145|}
_ZN5draco17RAnsSymbolDecoderILi18EE12DecodeSymbolEv:
   43|  7.98M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi18EE11EndDecodingEv:
  165|    101|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    101|  ans_.read_end();
  167|    101|}

_ZN5draco13DecodeSymbolsEjiPNS_13DecoderBufferEPj:
   33|  12.5k|                   DecoderBuffer* src_buffer, uint32_t* out_values) {
   34|  12.5k|  if (num_values == 0) {
  ------------------
  |  Branch (34:7): [True: 87, False: 12.4k]
  ------------------
   35|     87|    return true;
   36|     87|  }
   37|       |  // Decode which scheme to use.
   38|  12.4k|  uint8_t scheme;
   39|  12.4k|  if (!src_buffer->Decode(&scheme)) {
  ------------------
  |  Branch (39:7): [True: 295, False: 12.1k]
  ------------------
   40|    295|    return false;
   41|    295|  }
   42|  12.1k|  if (scheme == SYMBOL_CODING_TAGGED) {
  ------------------
  |  Branch (42:7): [True: 1.35k, False: 10.8k]
  ------------------
   43|  1.35k|    return DecodeTaggedSymbols<RAnsSymbolDecoder>(num_values, num_components,
   44|  1.35k|                                                  src_buffer, out_values);
   45|  10.8k|  } else if (scheme == SYMBOL_CODING_RAW) {
  ------------------
  |  Branch (45:14): [True: 7.89k, False: 2.93k]
  ------------------
   46|  7.89k|    return DecodeRawSymbols<RAnsSymbolDecoder>(num_values, src_buffer,
   47|  7.89k|                                               out_values);
   48|  7.89k|  }
   49|  2.93k|  return false;
   50|  12.1k|}
_ZN5draco19DecodeTaggedSymbolsINS_17RAnsSymbolDecoderEEEbjiPNS_13DecoderBufferEPj:
   54|  1.35k|                         DecoderBuffer* src_buffer, uint32_t* out_values) {
   55|       |  // Decode the encoded data.
   56|  1.35k|  SymbolDecoderT<5> tag_decoder;
   57|  1.35k|  if (!tag_decoder.Create(src_buffer)) {
  ------------------
  |  Branch (57:7): [True: 612, False: 745]
  ------------------
   58|    612|    return false;
   59|    612|  }
   60|       |
   61|    745|  if (!tag_decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (61:7): [True: 289, False: 456]
  ------------------
   62|    289|    return false;
   63|    289|  }
   64|       |
   65|    456|  if (num_values > 0 && tag_decoder.num_symbols() == 0) {
  ------------------
  |  Branch (65:7): [True: 456, False: 0]
  |  Branch (65:25): [True: 53, False: 403]
  ------------------
   66|     53|    return false;  // Wrong number of symbols.
   67|     53|  }
   68|       |
   69|       |  // src_buffer now points behind the encoded tag data (to the place where the
   70|       |  // values are encoded).
   71|    403|  src_buffer->StartBitDecoding(false, nullptr);
   72|    403|  int value_id = 0;
   73|  9.76M|  for (uint32_t i = 0; i < num_values; i += num_components) {
  ------------------
  |  Branch (73:24): [True: 9.76M, False: 389]
  ------------------
   74|       |    // Decode the tag.
   75|  9.76M|    const uint32_t bit_length = tag_decoder.DecodeSymbol();
   76|       |    // Decode the actual value.
   77|  21.7M|    for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (77:21): [True: 12.0M, False: 9.76M]
  ------------------
   78|  12.0M|      uint32_t val;
   79|  12.0M|      if (!src_buffer->DecodeLeastSignificantBits32(bit_length, &val)) {
  ------------------
  |  Branch (79:11): [True: 14, False: 12.0M]
  ------------------
   80|     14|        return false;
   81|     14|      }
   82|  12.0M|      out_values[value_id++] = val;
   83|  12.0M|    }
   84|  9.76M|  }
   85|    389|  tag_decoder.EndDecoding();
   86|    389|  src_buffer->EndBitDecoding();
   87|    389|  return true;
   88|    403|}
_ZN5draco16DecodeRawSymbolsINS_17RAnsSymbolDecoderEEEbjPNS_13DecoderBufferEPj:
  116|  7.89k|                      uint32_t* out_values) {
  117|  7.89k|  uint8_t max_bit_length;
  118|  7.89k|  if (!src_buffer->Decode(&max_bit_length)) {
  ------------------
  |  Branch (118:7): [True: 75, False: 7.82k]
  ------------------
  119|     75|    return false;
  120|     75|  }
  121|  7.82k|  switch (max_bit_length) {
  122|    714|    case 1:
  ------------------
  |  Branch (122:5): [True: 714, False: 7.11k]
  ------------------
  123|    714|      return DecodeRawSymbolsInternal<SymbolDecoderT<1>>(num_values, src_buffer,
  124|    714|                                                         out_values);
  125|    430|    case 2:
  ------------------
  |  Branch (125:5): [True: 430, False: 7.39k]
  ------------------
  126|    430|      return DecodeRawSymbolsInternal<SymbolDecoderT<2>>(num_values, src_buffer,
  127|    430|                                                         out_values);
  128|    425|    case 3:
  ------------------
  |  Branch (128:5): [True: 425, False: 7.39k]
  ------------------
  129|    425|      return DecodeRawSymbolsInternal<SymbolDecoderT<3>>(num_values, src_buffer,
  130|    425|                                                         out_values);
  131|    348|    case 4:
  ------------------
  |  Branch (131:5): [True: 348, False: 7.47k]
  ------------------
  132|    348|      return DecodeRawSymbolsInternal<SymbolDecoderT<4>>(num_values, src_buffer,
  133|    348|                                                         out_values);
  134|    190|    case 5:
  ------------------
  |  Branch (134:5): [True: 190, False: 7.63k]
  ------------------
  135|    190|      return DecodeRawSymbolsInternal<SymbolDecoderT<5>>(num_values, src_buffer,
  136|    190|                                                         out_values);
  137|    348|    case 6:
  ------------------
  |  Branch (137:5): [True: 348, False: 7.47k]
  ------------------
  138|    348|      return DecodeRawSymbolsInternal<SymbolDecoderT<6>>(num_values, src_buffer,
  139|    348|                                                         out_values);
  140|    400|    case 7:
  ------------------
  |  Branch (140:5): [True: 400, False: 7.42k]
  ------------------
  141|    400|      return DecodeRawSymbolsInternal<SymbolDecoderT<7>>(num_values, src_buffer,
  142|    400|                                                         out_values);
  143|    374|    case 8:
  ------------------
  |  Branch (143:5): [True: 374, False: 7.45k]
  ------------------
  144|    374|      return DecodeRawSymbolsInternal<SymbolDecoderT<8>>(num_values, src_buffer,
  145|    374|                                                         out_values);
  146|    510|    case 9:
  ------------------
  |  Branch (146:5): [True: 510, False: 7.31k]
  ------------------
  147|    510|      return DecodeRawSymbolsInternal<SymbolDecoderT<9>>(num_values, src_buffer,
  148|    510|                                                         out_values);
  149|    382|    case 10:
  ------------------
  |  Branch (149:5): [True: 382, False: 7.44k]
  ------------------
  150|    382|      return DecodeRawSymbolsInternal<SymbolDecoderT<10>>(
  151|    382|          num_values, src_buffer, out_values);
  152|    406|    case 11:
  ------------------
  |  Branch (152:5): [True: 406, False: 7.41k]
  ------------------
  153|    406|      return DecodeRawSymbolsInternal<SymbolDecoderT<11>>(
  154|    406|          num_values, src_buffer, out_values);
  155|    342|    case 12:
  ------------------
  |  Branch (155:5): [True: 342, False: 7.48k]
  ------------------
  156|    342|      return DecodeRawSymbolsInternal<SymbolDecoderT<12>>(
  157|    342|          num_values, src_buffer, out_values);
  158|    466|    case 13:
  ------------------
  |  Branch (158:5): [True: 466, False: 7.35k]
  ------------------
  159|    466|      return DecodeRawSymbolsInternal<SymbolDecoderT<13>>(
  160|    466|          num_values, src_buffer, out_values);
  161|    370|    case 14:
  ------------------
  |  Branch (161:5): [True: 370, False: 7.45k]
  ------------------
  162|    370|      return DecodeRawSymbolsInternal<SymbolDecoderT<14>>(
  163|    370|          num_values, src_buffer, out_values);
  164|    494|    case 15:
  ------------------
  |  Branch (164:5): [True: 494, False: 7.33k]
  ------------------
  165|    494|      return DecodeRawSymbolsInternal<SymbolDecoderT<15>>(
  166|    494|          num_values, src_buffer, out_values);
  167|    363|    case 16:
  ------------------
  |  Branch (167:5): [True: 363, False: 7.46k]
  ------------------
  168|    363|      return DecodeRawSymbolsInternal<SymbolDecoderT<16>>(
  169|    363|          num_values, src_buffer, out_values);
  170|    389|    case 17:
  ------------------
  |  Branch (170:5): [True: 389, False: 7.43k]
  ------------------
  171|    389|      return DecodeRawSymbolsInternal<SymbolDecoderT<17>>(
  172|    389|          num_values, src_buffer, out_values);
  173|    452|    case 18:
  ------------------
  |  Branch (173:5): [True: 452, False: 7.37k]
  ------------------
  174|    452|      return DecodeRawSymbolsInternal<SymbolDecoderT<18>>(
  175|    452|          num_values, src_buffer, out_values);
  176|    421|    default:
  ------------------
  |  Branch (176:5): [True: 421, False: 7.40k]
  ------------------
  177|    421|      return false;
  178|  7.82k|  }
  179|  7.82k|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi1EEEEEbjPNS_13DecoderBufferEPj:
   92|    714|                              uint32_t* out_values) {
   93|    714|  SymbolDecoderT decoder;
   94|    714|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 452, False: 262]
  ------------------
   95|    452|    return false;
   96|    452|  }
   97|       |
   98|    262|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 262, False: 0]
  |  Branch (98:25): [True: 29, False: 233]
  ------------------
   99|     29|    return false;  // Wrong number of symbols.
  100|     29|  }
  101|       |
  102|    233|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 96, False: 137]
  ------------------
  103|     96|    return false;
  104|     96|  }
  105|  31.4M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 31.4M, False: 137]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  31.4M|    const uint32_t value = decoder.DecodeSymbol();
  108|  31.4M|    out_values[i] = value;
  109|  31.4M|  }
  110|    137|  decoder.EndDecoding();
  111|    137|  return true;
  112|    233|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi2EEEEEbjPNS_13DecoderBufferEPj:
   92|    430|                              uint32_t* out_values) {
   93|    430|  SymbolDecoderT decoder;
   94|    430|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 145, False: 285]
  ------------------
   95|    145|    return false;
   96|    145|  }
   97|       |
   98|    285|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 285, False: 0]
  |  Branch (98:25): [True: 19, False: 266]
  ------------------
   99|     19|    return false;  // Wrong number of symbols.
  100|     19|  }
  101|       |
  102|    266|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 63, False: 203]
  ------------------
  103|     63|    return false;
  104|     63|  }
  105|  6.26M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 6.26M, False: 203]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  6.26M|    const uint32_t value = decoder.DecodeSymbol();
  108|  6.26M|    out_values[i] = value;
  109|  6.26M|  }
  110|    203|  decoder.EndDecoding();
  111|    203|  return true;
  112|    266|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi3EEEEEbjPNS_13DecoderBufferEPj:
   92|    425|                              uint32_t* out_values) {
   93|    425|  SymbolDecoderT decoder;
   94|    425|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 134, False: 291]
  ------------------
   95|    134|    return false;
   96|    134|  }
   97|       |
   98|    291|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 291, False: 0]
  |  Branch (98:25): [True: 26, False: 265]
  ------------------
   99|     26|    return false;  // Wrong number of symbols.
  100|     26|  }
  101|       |
  102|    265|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 86, False: 179]
  ------------------
  103|     86|    return false;
  104|     86|  }
  105|  10.7M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 10.7M, False: 179]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  10.7M|    const uint32_t value = decoder.DecodeSymbol();
  108|  10.7M|    out_values[i] = value;
  109|  10.7M|  }
  110|    179|  decoder.EndDecoding();
  111|    179|  return true;
  112|    265|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi4EEEEEbjPNS_13DecoderBufferEPj:
   92|    348|                              uint32_t* out_values) {
   93|    348|  SymbolDecoderT decoder;
   94|    348|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 132, False: 216]
  ------------------
   95|    132|    return false;
   96|    132|  }
   97|       |
   98|    216|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 216, False: 0]
  |  Branch (98:25): [True: 11, False: 205]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    205|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 94, False: 111]
  ------------------
  103|     94|    return false;
  104|     94|  }
  105|  13.4M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 13.4M, False: 111]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  13.4M|    const uint32_t value = decoder.DecodeSymbol();
  108|  13.4M|    out_values[i] = value;
  109|  13.4M|  }
  110|    111|  decoder.EndDecoding();
  111|    111|  return true;
  112|    205|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi5EEEEEbjPNS_13DecoderBufferEPj:
   92|    190|                              uint32_t* out_values) {
   93|    190|  SymbolDecoderT decoder;
   94|    190|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 52, False: 138]
  ------------------
   95|     52|    return false;
   96|     52|  }
   97|       |
   98|    138|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 138, False: 0]
  |  Branch (98:25): [True: 56, False: 82]
  ------------------
   99|     56|    return false;  // Wrong number of symbols.
  100|     56|  }
  101|       |
  102|     82|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 13, False: 69]
  ------------------
  103|     13|    return false;
  104|     13|  }
  105|  17.0M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 17.0M, False: 69]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  17.0M|    const uint32_t value = decoder.DecodeSymbol();
  108|  17.0M|    out_values[i] = value;
  109|  17.0M|  }
  110|     69|  decoder.EndDecoding();
  111|     69|  return true;
  112|     82|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi6EEEEEbjPNS_13DecoderBufferEPj:
   92|    348|                              uint32_t* out_values) {
   93|    348|  SymbolDecoderT decoder;
   94|    348|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 118, False: 230]
  ------------------
   95|    118|    return false;
   96|    118|  }
   97|       |
   98|    230|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 230, False: 0]
  |  Branch (98:25): [True: 8, False: 222]
  ------------------
   99|      8|    return false;  // Wrong number of symbols.
  100|      8|  }
  101|       |
  102|    222|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 75, False: 147]
  ------------------
  103|     75|    return false;
  104|     75|  }
  105|  24.7M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 24.7M, False: 147]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  24.7M|    const uint32_t value = decoder.DecodeSymbol();
  108|  24.7M|    out_values[i] = value;
  109|  24.7M|  }
  110|    147|  decoder.EndDecoding();
  111|    147|  return true;
  112|    222|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi7EEEEEbjPNS_13DecoderBufferEPj:
   92|    400|                              uint32_t* out_values) {
   93|    400|  SymbolDecoderT decoder;
   94|    400|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 159, False: 241]
  ------------------
   95|    159|    return false;
   96|    159|  }
   97|       |
   98|    241|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 241, False: 0]
  |  Branch (98:25): [True: 9, False: 232]
  ------------------
   99|      9|    return false;  // Wrong number of symbols.
  100|      9|  }
  101|       |
  102|    232|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 96, False: 136]
  ------------------
  103|     96|    return false;
  104|     96|  }
  105|  24.5M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 24.5M, False: 136]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  24.5M|    const uint32_t value = decoder.DecodeSymbol();
  108|  24.5M|    out_values[i] = value;
  109|  24.5M|  }
  110|    136|  decoder.EndDecoding();
  111|    136|  return true;
  112|    232|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi8EEEEEbjPNS_13DecoderBufferEPj:
   92|    374|                              uint32_t* out_values) {
   93|    374|  SymbolDecoderT decoder;
   94|    374|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 120, False: 254]
  ------------------
   95|    120|    return false;
   96|    120|  }
   97|       |
   98|    254|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 254, False: 0]
  |  Branch (98:25): [True: 13, False: 241]
  ------------------
   99|     13|    return false;  // Wrong number of symbols.
  100|     13|  }
  101|       |
  102|    241|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 80, False: 161]
  ------------------
  103|     80|    return false;
  104|     80|  }
  105|  22.0M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 22.0M, False: 161]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  22.0M|    const uint32_t value = decoder.DecodeSymbol();
  108|  22.0M|    out_values[i] = value;
  109|  22.0M|  }
  110|    161|  decoder.EndDecoding();
  111|    161|  return true;
  112|    241|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi9EEEEEbjPNS_13DecoderBufferEPj:
   92|    510|                              uint32_t* out_values) {
   93|    510|  SymbolDecoderT decoder;
   94|    510|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 173, False: 337]
  ------------------
   95|    173|    return false;
   96|    173|  }
   97|       |
   98|    337|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 337, False: 0]
  |  Branch (98:25): [True: 7, False: 330]
  ------------------
   99|      7|    return false;  // Wrong number of symbols.
  100|      7|  }
  101|       |
  102|    330|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 75, False: 255]
  ------------------
  103|     75|    return false;
  104|     75|  }
  105|  17.3M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 17.3M, False: 255]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  17.3M|    const uint32_t value = decoder.DecodeSymbol();
  108|  17.3M|    out_values[i] = value;
  109|  17.3M|  }
  110|    255|  decoder.EndDecoding();
  111|    255|  return true;
  112|    330|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi10EEEEEbjPNS_13DecoderBufferEPj:
   92|    382|                              uint32_t* out_values) {
   93|    382|  SymbolDecoderT decoder;
   94|    382|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 175, False: 207]
  ------------------
   95|    175|    return false;
   96|    175|  }
   97|       |
   98|    207|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 207, False: 0]
  |  Branch (98:25): [True: 19, False: 188]
  ------------------
   99|     19|    return false;  // Wrong number of symbols.
  100|     19|  }
  101|       |
  102|    188|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 118, False: 70]
  ------------------
  103|    118|    return false;
  104|    118|  }
  105|   469k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 469k, False: 70]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   469k|    const uint32_t value = decoder.DecodeSymbol();
  108|   469k|    out_values[i] = value;
  109|   469k|  }
  110|     70|  decoder.EndDecoding();
  111|     70|  return true;
  112|    188|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi11EEEEEbjPNS_13DecoderBufferEPj:
   92|    406|                              uint32_t* out_values) {
   93|    406|  SymbolDecoderT decoder;
   94|    406|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 212, False: 194]
  ------------------
   95|    212|    return false;
   96|    212|  }
   97|       |
   98|    194|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 194, False: 0]
  |  Branch (98:25): [True: 14, False: 180]
  ------------------
   99|     14|    return false;  // Wrong number of symbols.
  100|     14|  }
  101|       |
  102|    180|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 112, False: 68]
  ------------------
  103|    112|    return false;
  104|    112|  }
  105|   530k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 529k, False: 68]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   529k|    const uint32_t value = decoder.DecodeSymbol();
  108|   529k|    out_values[i] = value;
  109|   529k|  }
  110|     68|  decoder.EndDecoding();
  111|     68|  return true;
  112|    180|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi12EEEEEbjPNS_13DecoderBufferEPj:
   92|    342|                              uint32_t* out_values) {
   93|    342|  SymbolDecoderT decoder;
   94|    342|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 177, False: 165]
  ------------------
   95|    177|    return false;
   96|    177|  }
   97|       |
   98|    165|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 165, False: 0]
  |  Branch (98:25): [True: 9, False: 156]
  ------------------
   99|      9|    return false;  // Wrong number of symbols.
  100|      9|  }
  101|       |
  102|    156|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 84, False: 72]
  ------------------
  103|     84|    return false;
  104|     84|  }
  105|   121k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 121k, False: 72]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   121k|    const uint32_t value = decoder.DecodeSymbol();
  108|   121k|    out_values[i] = value;
  109|   121k|  }
  110|     72|  decoder.EndDecoding();
  111|     72|  return true;
  112|    156|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi13EEEEEbjPNS_13DecoderBufferEPj:
   92|    466|                              uint32_t* out_values) {
   93|    466|  SymbolDecoderT decoder;
   94|    466|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 217, False: 249]
  ------------------
   95|    217|    return false;
   96|    217|  }
   97|       |
   98|    249|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 249, False: 0]
  |  Branch (98:25): [True: 30, False: 219]
  ------------------
   99|     30|    return false;  // Wrong number of symbols.
  100|     30|  }
  101|       |
  102|    219|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 129, False: 90]
  ------------------
  103|    129|    return false;
  104|    129|  }
  105|   168k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 168k, False: 90]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   168k|    const uint32_t value = decoder.DecodeSymbol();
  108|   168k|    out_values[i] = value;
  109|   168k|  }
  110|     90|  decoder.EndDecoding();
  111|     90|  return true;
  112|    219|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi14EEEEEbjPNS_13DecoderBufferEPj:
   92|    370|                              uint32_t* out_values) {
   93|    370|  SymbolDecoderT decoder;
   94|    370|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 164, False: 206]
  ------------------
   95|    164|    return false;
   96|    164|  }
   97|       |
   98|    206|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 206, False: 0]
  |  Branch (98:25): [True: 13, False: 193]
  ------------------
   99|     13|    return false;  // Wrong number of symbols.
  100|     13|  }
  101|       |
  102|    193|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 101, False: 92]
  ------------------
  103|    101|    return false;
  104|    101|  }
  105|   106k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 106k, False: 92]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   106k|    const uint32_t value = decoder.DecodeSymbol();
  108|   106k|    out_values[i] = value;
  109|   106k|  }
  110|     92|  decoder.EndDecoding();
  111|     92|  return true;
  112|    193|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi15EEEEEbjPNS_13DecoderBufferEPj:
   92|    494|                              uint32_t* out_values) {
   93|    494|  SymbolDecoderT decoder;
   94|    494|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 217, False: 277]
  ------------------
   95|    217|    return false;
   96|    217|  }
   97|       |
   98|    277|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 277, False: 0]
  |  Branch (98:25): [True: 12, False: 265]
  ------------------
   99|     12|    return false;  // Wrong number of symbols.
  100|     12|  }
  101|       |
  102|    265|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 174, False: 91]
  ------------------
  103|    174|    return false;
  104|    174|  }
  105|   162k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 162k, False: 91]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   162k|    const uint32_t value = decoder.DecodeSymbol();
  108|   162k|    out_values[i] = value;
  109|   162k|  }
  110|     91|  decoder.EndDecoding();
  111|     91|  return true;
  112|    265|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi16EEEEEbjPNS_13DecoderBufferEPj:
   92|    363|                              uint32_t* out_values) {
   93|    363|  SymbolDecoderT decoder;
   94|    363|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 124, False: 239]
  ------------------
   95|    124|    return false;
   96|    124|  }
   97|       |
   98|    239|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 239, False: 0]
  |  Branch (98:25): [True: 13, False: 226]
  ------------------
   99|     13|    return false;  // Wrong number of symbols.
  100|     13|  }
  101|       |
  102|    226|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 153, False: 73]
  ------------------
  103|    153|    return false;
  104|    153|  }
  105|   207k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 207k, False: 73]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   207k|    const uint32_t value = decoder.DecodeSymbol();
  108|   207k|    out_values[i] = value;
  109|   207k|  }
  110|     73|  decoder.EndDecoding();
  111|     73|  return true;
  112|    226|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi17EEEEEbjPNS_13DecoderBufferEPj:
   92|    389|                              uint32_t* out_values) {
   93|    389|  SymbolDecoderT decoder;
   94|    389|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 196, False: 193]
  ------------------
   95|    196|    return false;
   96|    196|  }
   97|       |
   98|    193|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 193, False: 0]
  |  Branch (98:25): [True: 11, False: 182]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    182|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 104, False: 78]
  ------------------
  103|    104|    return false;
  104|    104|  }
  105|   257k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 257k, False: 78]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   257k|    const uint32_t value = decoder.DecodeSymbol();
  108|   257k|    out_values[i] = value;
  109|   257k|  }
  110|     78|  decoder.EndDecoding();
  111|     78|  return true;
  112|    182|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi18EEEEEbjPNS_13DecoderBufferEPj:
   92|    452|                              uint32_t* out_values) {
   93|    452|  SymbolDecoderT decoder;
   94|    452|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 225, False: 227]
  ------------------
   95|    225|    return false;
   96|    225|  }
   97|       |
   98|    227|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 227, False: 0]
  |  Branch (98:25): [True: 12, False: 215]
  ------------------
   99|     12|    return false;  // Wrong number of symbols.
  100|     12|  }
  101|       |
  102|    215|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 114, False: 101]
  ------------------
  103|    114|    return false;
  104|    114|  }
  105|  7.98M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 7.98M, False: 101]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  7.98M|    const uint32_t value = decoder.DecodeSymbol();
  108|  7.98M|    out_values[i] = value;
  109|  7.98M|  }
  110|    101|  decoder.EndDecoding();
  111|    101|  return true;
  112|    215|}

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

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

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

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

_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEEC2Ev:
   48|  5.55k|    : decoder_(nullptr),
   49|  5.55k|      last_symbol_id_(-1),
   50|  5.55k|      last_vert_id_(-1),
   51|  5.55k|      last_face_id_(-1),
   52|  5.55k|      num_new_vertices_(0),
   53|  5.55k|      num_encoded_vertices_(0),
   54|  5.55k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  5.55k|    MeshEdgebreakerDecoder* decoder) {
   59|  5.55k|  decoder_ = decoder;
   60|  5.55k|  return true;
   61|  5.55k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE23GetAttributeCornerTableEi:
   66|  5.82k|    int att_id) const {
   67|  8.41k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 6.95k, False: 1.46k]
  ------------------
   68|  6.95k|    const int decoder_id = attribute_data_[i].decoder_id;
   69|  6.95k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 2.58k, False: 4.36k]
  |  Branch (69:27): [True: 0, False: 4.36k]
  ------------------
   70|  2.58k|      continue;
   71|  2.58k|    }
   72|  4.36k|    const AttributesDecoderInterface* const dec =
   73|  4.36k|        decoder_->attributes_decoder(decoder_id);
   74|  10.3k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 10.3k, False: 6]
  ------------------
   75|  10.3k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 4.36k, False: 6.02k]
  ------------------
   76|  4.36k|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 2.87k, False: 1.49k]
  ------------------
   77|  2.87k|          return &attribute_data_[i].connectivity_data;
   78|  2.87k|        }
   79|  1.49k|        return nullptr;
   80|  4.36k|      }
   81|  10.3k|    }
   82|  4.36k|  }
   83|  1.46k|  return nullptr;
   84|  5.82k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE24GetAttributeEncodingDataEi:
   89|  5.82k|    int att_id) const {
   90|  8.41k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 6.95k, False: 1.46k]
  ------------------
   91|  6.95k|    const int decoder_id = attribute_data_[i].decoder_id;
   92|  6.95k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 2.58k, False: 4.36k]
  |  Branch (92:27): [True: 0, False: 4.36k]
  ------------------
   93|  2.58k|      continue;
   94|  2.58k|    }
   95|  4.36k|    const AttributesDecoderInterface* const dec =
   96|  4.36k|        decoder_->attributes_decoder(decoder_id);
   97|  10.3k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 10.3k, False: 6]
  ------------------
   98|  10.3k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 4.36k, False: 6.02k]
  ------------------
   99|  4.36k|        return &attribute_data_[i].encoding_data;
  100|  4.36k|      }
  101|  10.3k|    }
  102|  4.36k|  }
  103|  1.46k|  return &pos_encoding_data_;
  104|  5.82k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE23CreateAttributesDecoderEi:
  130|  4.82k|    int32_t att_decoder_id) {
  131|  4.82k|  int8_t att_data_id;
  132|  4.82k|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 22, False: 4.80k]
  ------------------
  133|     22|    return false;
  134|     22|  }
  135|  4.80k|  uint8_t decoder_type;
  136|  4.80k|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 14, False: 4.78k]
  ------------------
  137|     14|    return false;
  138|     14|  }
  139|       |
  140|  4.78k|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 3.52k, False: 1.26k]
  ------------------
  141|  3.52k|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 75, False: 3.45k]
  ------------------
  142|     75|      return false;  // Unexpected attribute data.
  143|     75|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|  3.45k|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 8, False: 3.44k]
  ------------------
  148|      8|      return false;
  149|      8|    }
  150|       |
  151|  3.44k|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|  3.44k|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|  1.26k|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 5, False: 1.25k]
  ------------------
  155|      5|      return false;  // Some other decoder is already using the data. Error.
  156|      5|    }
  157|  1.25k|    pos_data_decoder_id_ = att_decoder_id;
  158|  1.25k|  }
  159|       |
  160|  4.70k|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|  4.70k|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  4.70k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 4.69k, False: 9]
  ------------------
  162|  4.69k|    uint8_t traversal_method_encoded;
  163|  4.69k|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 8, False: 4.68k]
  ------------------
  164|      8|      return false;
  165|      8|    }
  166|       |    // Check that decoded traversal method is valid.
  167|  4.68k|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 29, False: 4.65k]
  ------------------
  168|     29|      return false;
  169|     29|    }
  170|  4.65k|    traversal_method =
  171|  4.65k|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|  4.65k|  }
  173|       |
  174|  4.66k|  const Mesh* mesh = decoder_->mesh();
  175|  4.66k|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|  4.66k|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 2.46k, False: 2.19k]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|  2.46k|    MeshAttributeIndicesEncodingData* encoding_data = nullptr;
  181|  2.46k|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 1.23k, False: 1.23k]
  ------------------
  182|  1.23k|      encoding_data = &pos_encoding_data_;
  183|  1.23k|    } else {
  184|  1.23k|      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|  1.23k|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|  1.23k|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|  2.46k|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 410, False: 2.05k]
  ------------------
  191|    410|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|    410|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|    410|          AttTraverser;
  194|    410|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|  2.05k|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 2.05k, False: 0]
  ------------------
  196|  2.05k|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|  2.05k|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|  2.05k|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|  2.05k|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|  2.46k|  } else {
  203|  2.19k|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 14, False: 2.18k]
  ------------------
  204|     14|      return false;  // Unsupported method.
  205|     14|    }
  206|  2.18k|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 9, False: 2.17k]
  ------------------
  207|      9|      return false;  // Attribute data must be specified.
  208|      9|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|  2.17k|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|  2.17k|        AttObserver;
  214|  2.17k|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|  2.17k|        AttTraverser;
  216|       |
  217|  2.17k|    MeshAttributeIndicesEncodingData* const encoding_data =
  218|  2.17k|        &attribute_data_[att_data_id].encoding_data;
  219|  2.17k|    const MeshAttributeCornerTable* const corner_table =
  220|  2.17k|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|  2.17k|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|  2.17k|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|  2.17k|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|  2.17k|                             encoding_data);
  227|       |
  228|  2.17k|    AttTraverser att_traverser;
  229|  2.17k|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|  2.17k|    traversal_sequencer->SetTraverser(att_traverser);
  232|  2.17k|    sequencer = std::move(traversal_sequencer);
  233|  2.17k|  }
  234|       |
  235|  4.64k|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 4.64k]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|  4.64k|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|  4.64k|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|  4.64k|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|  4.64k|                                        std::move(att_controller));
  244|  4.64k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18DecodeConnectivityEv:
  247|  5.55k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  5.55k|  num_new_vertices_ = 0;
  249|  5.55k|  new_to_parent_vertex_map_.clear();
  250|  5.55k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  5.55k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  5.55k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 650, False: 4.90k]
  ------------------
  252|    650|    uint32_t num_new_verts;
  253|    650|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    650|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 216, False: 434]
  ------------------
  254|    216|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 216]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    434|    } else {
  258|    434|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 434]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    434|    }
  262|    650|    num_new_vertices_ = num_new_verts;
  263|    650|  }
  264|  5.55k|#endif
  265|       |
  266|  5.55k|  uint32_t num_encoded_vertices;
  267|  5.55k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  5.55k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  5.55k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 216, False: 5.33k]
  ------------------
  269|    216|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 216]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    216|  } else
  274|  5.33k|#endif
  275|  5.33k|  {
  276|  5.33k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 1, False: 5.33k]
  ------------------
  277|      1|      return false;
  278|      1|    }
  279|  5.33k|  }
  280|  5.55k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  5.55k|  uint32_t num_faces;
  283|  5.55k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  5.55k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  5.55k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 216, False: 5.33k]
  ------------------
  285|    216|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 216]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    216|  } else
  290|  5.33k|#endif
  291|  5.33k|  {
  292|  5.33k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 5.33k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  5.33k|  }
  296|  5.55k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 0, False: 5.55k]
  ------------------
  297|      0|    return false;  // Draco cannot handle this many faces.
  298|      0|  }
  299|       |
  300|  5.55k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 1, False: 5.55k]
  ------------------
  301|      1|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      1|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|  5.55k|  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|  5.55k|  const uint64_t num_encoded_vertices_64 =
  311|  5.55k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  5.55k|  const uint64_t max_num_vertex_edges =
  313|  5.55k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  5.55k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 3, False: 5.54k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      3|    return false;
  317|      3|  }
  318|       |
  319|  5.54k|  uint8_t num_attribute_data;
  320|  5.54k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 5.54k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  5.54k|  uint32_t num_encoded_symbols;
  325|  5.54k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  5.54k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  5.54k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 214, False: 5.33k]
  ------------------
  327|    214|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 214]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    214|  } else
  332|  5.33k|#endif
  333|  5.33k|  {
  334|  5.33k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 5.33k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  5.33k|  }
  338|       |
  339|  5.54k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 4, False: 5.54k]
  ------------------
  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|  5.54k|  const uint32_t max_encoded_faces =
  346|  5.54k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  5.54k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 7, False: 5.53k]
  ------------------
  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|  5.53k|  uint32_t num_encoded_split_symbols;
  355|  5.53k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  5.53k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  5.53k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 205, False: 5.33k]
  ------------------
  357|    205|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 205]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    205|  } else
  362|  5.33k|#endif
  363|  5.33k|  {
  364|  5.33k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 5.33k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  5.33k|  }
  368|       |
  369|  5.53k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 3, False: 5.53k]
  ------------------
  370|      3|    return false;  // Split symbols are a sub-set of all symbols.
  371|      3|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  5.53k|  vertex_traversal_length_.clear();
  375|  5.53k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  5.53k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 5.53k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  5.53k|  processed_corner_ids_.clear();
  380|  5.53k|  processed_corner_ids_.reserve(num_faces);
  381|  5.53k|  processed_connectivity_corners_.clear();
  382|  5.53k|  processed_connectivity_corners_.reserve(num_faces);
  383|  5.53k|  topology_split_data_.clear();
  384|  5.53k|  hole_event_data_.clear();
  385|  5.53k|  init_face_configurations_.clear();
  386|  5.53k|  init_corners_.clear();
  387|       |
  388|  5.53k|  last_symbol_id_ = -1;
  389|  5.53k|  last_face_id_ = -1;
  390|  5.53k|  last_vert_id_ = -1;
  391|       |
  392|  5.53k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  5.53k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  5.53k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 1, False: 5.53k]
  ------------------
  397|  5.53k|          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|  5.53k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  5.53k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  5.53k|  int32_t topology_split_decoded_bytes = -1;
  410|  5.53k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  5.53k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 635, False: 4.89k]
  ------------------
  411|    635|    uint32_t encoded_connectivity_size;
  412|    635|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    635|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 201, False: 434]
  ------------------
  413|    201|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 2, False: 199]
  ------------------
  414|      2|        return false;
  415|      2|      }
  416|    434|    } else {
  417|    434|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 434]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|    434|    }
  421|    633|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 2, False: 631]
  ------------------
  422|    631|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 30, False: 601]
  ------------------
  423|     32|      return false;
  424|     32|    }
  425|    601|    DecoderBuffer event_buffer;
  426|    601|    event_buffer.Init(
  427|    601|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    601|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    601|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    601|    topology_split_decoded_bytes =
  432|    601|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    601|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 165, False: 436]
  ------------------
  434|    165|      return false;
  435|    165|    }
  436|       |
  437|    601|  } else
  438|  4.89k|#endif
  439|  4.89k|  {
  440|  4.89k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 16, False: 4.88k]
  ------------------
  441|     16|      return false;
  442|     16|    }
  443|  4.89k|  }
  444|       |
  445|  5.31k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  5.31k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  5.31k|                                           num_encoded_split_symbols);
  449|  5.31k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  5.31k|  DecoderBuffer traversal_end_buffer;
  452|  5.31k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 146, False: 5.17k]
  ------------------
  453|    146|    return false;
  454|    146|  }
  455|       |
  456|  5.17k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  5.17k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 370, False: 4.80k]
  ------------------
  458|    370|    return false;
  459|    370|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|  4.80k|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|  4.80k|                           traversal_end_buffer.remaining_size(),
  464|  4.80k|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|  4.80k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|  4.80k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  4.80k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 319, False: 4.48k]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|    319|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|    319|  }
  471|  4.80k|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|  4.80k|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 4.70k, False: 92]
  ------------------
  475|  4.70k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|  4.70k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  4.70k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 300, False: 4.40k]
  ------------------
  477|  2.16k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 1.86k, False: 300]
  ------------------
  478|  1.86k|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 1.86k]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|  1.86k|      }
  482|       |
  483|    300|    } else
  484|  4.40k|#endif
  485|  4.40k|    {
  486|   195k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 191k, False: 4.40k]
  ------------------
  487|   191k|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 191k]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|   191k|      }
  491|  4.40k|    }
  492|  4.70k|  }
  493|  4.80k|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  13.5k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 8.73k, False: 4.80k]
  ------------------
  498|  8.73k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|   554k|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 554k, False: 8.73k]
  ------------------
  501|   554k|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|   554k|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  8.73k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 8.73k]
  ------------------
  505|  8.73k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  8.73k|  }
  509|       |
  510|  4.80k|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  13.5k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 8.73k, False: 4.80k]
  ------------------
  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|  8.73k|    int32_t att_connectivity_verts =
  517|  8.73k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  8.73k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 751, False: 7.98k]
  ------------------
  519|    751|      att_connectivity_verts = corner_table_->num_vertices();
  520|    751|    }
  521|  8.73k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  8.73k|  }
  523|  4.80k|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 6, False: 4.79k]
  ------------------
  524|      6|    return false;
  525|      6|  }
  526|  4.79k|  return true;
  527|  4.80k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE19OnAttributesDecodedEv:
  530|  1.13k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|  1.13k|  return true;
  532|  1.13k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18DecodeConnectivityEi:
  536|  5.17k|    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|  5.17k|  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|  5.17k|  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|  5.17k|  std::vector<VertexIndex> invalid_vertices;
  558|  5.17k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  5.17k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  5.17k|  int num_faces = 0;
  562|  40.9M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 40.9M, False: 4.89k]
  ------------------
  563|  40.9M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  40.9M|    bool check_topology_split = false;
  566|  40.9M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  40.9M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 18.3M, False: 22.5M]
  ------------------
  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|  18.3M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 7, False: 18.3M]
  ------------------
  588|      7|        return -1;
  589|      7|      }
  590|       |
  591|  18.3M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  18.3M|      const VertexIndex vertex_x =
  593|  18.3M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  18.3M|      const CornerIndex corner_b =
  595|  18.3M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  18.3M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 182, False: 18.3M]
  ------------------
  598|       |        // All matched corners must be different.
  599|    182|        return -1;
  600|    182|      }
  601|  18.3M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 18.3M]
  |  Branch (601:11): [True: 0, False: 18.3M]
  ------------------
  602|  18.3M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 18.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|  18.3M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  18.3M|      SetOppositeCorners(corner_a, corner + 1);
  612|  18.3M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  18.3M|      const VertexIndex vert_a_prev =
  616|  18.3M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  18.3M|      const VertexIndex vert_b_next =
  618|  18.3M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  18.3M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 18.3M]
  |  Branch (619:38): [True: 0, False: 18.3M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  18.3M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  18.3M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  18.3M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  18.3M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  18.3M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  18.3M|      active_corner_stack.back() = corner;
  631|  22.5M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 8.15M, False: 14.4M]
  |  Branch (631:40): [True: 5.44M, False: 8.98M]
  ------------------
  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|  13.6M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 1, False: 13.6M]
  ------------------
  647|      1|        return -1;
  648|      1|      }
  649|  13.6M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  13.6M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 13.6M]
  ------------------
  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|  13.6M|      const CornerIndex corner(3 * face.value());
  658|  13.6M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  13.6M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 8.15M, False: 5.44M]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  8.15M|        opp_corner = corner + 2;
  662|  8.15M|        corner_l = corner + 1;
  663|  8.15M|        corner_r = corner;
  664|  8.15M|      } else {
  665|       |        // "l" is the new first corner.
  666|  5.44M|        opp_corner = corner + 1;
  667|  5.44M|        corner_l = corner;
  668|  5.44M|        corner_r = corner + 2;
  669|  5.44M|      }
  670|  13.6M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  13.6M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  13.6M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 1, False: 13.6M]
  ------------------
  675|      1|        return -1;  // Unexpected number of decoded vertices.
  676|      1|      }
  677|       |
  678|  13.6M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  13.6M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  13.6M|      const VertexIndex vertex_r =
  682|  13.6M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  13.6M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  13.6M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  13.6M|      corner_table_->MapCornerToVertex(
  688|  13.6M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  13.6M|      active_corner_stack.back() = corner;
  690|  13.6M|      check_topology_split = true;
  691|  13.6M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 4.43M, False: 4.55M]
  ------------------
  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.43M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 0, False: 4.43M]
  ------------------
  703|      0|        return -1;
  704|      0|      }
  705|  4.43M|      const CornerIndex corner_b = active_corner_stack.back();
  706|  4.43M|      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.43M|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  4.43M|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 124, False: 4.43M]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|    124|        active_corner_stack.push_back(it->second);
  714|    124|      }
  715|  4.43M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 17, False: 4.43M]
  ------------------
  716|     17|        return -1;
  717|     17|      }
  718|  4.43M|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  4.43M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 4.43M]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  4.43M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 12, False: 4.43M]
  |  Branch (724:11): [True: 12, False: 4.43M]
  ------------------
  725|  4.43M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 4.43M]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|     12|        return -1;
  729|     12|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  4.43M|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  4.43M|      SetOppositeCorners(corner_a, corner + 2);
  735|  4.43M|      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.43M|      const VertexIndex vertex_p =
  739|  4.43M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  4.43M|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  4.43M|      corner_table_->MapCornerToVertex(
  742|  4.43M|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  4.43M|      const VertexIndex vert_b_prev =
  744|  4.43M|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  4.43M|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  4.43M|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  4.43M|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  4.43M|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  4.43M|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  4.43M|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  4.43M|                                       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.43M|      const CornerIndex first_corner = corner_n;
  757|  13.4M|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 9.01M, False: 4.43M]
  ------------------
  758|  9.01M|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|  9.01M|        corner_n = corner_table_->SwingLeft(corner_n);
  760|  9.01M|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 6, False: 9.01M]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      6|          return -1;
  764|      6|        }
  765|  9.01M|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  4.43M|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  4.43M|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 773k, False: 3.66M]
  ------------------
  770|   773k|        invalid_vertices.push_back(vertex_n);
  771|   773k|      }
  772|  4.43M|      active_corner_stack.back() = corner;
  773|  4.55M|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 4.55M, False: 0]
  ------------------
  774|  4.55M|      const CornerIndex corner(3 * face.value());
  775|  4.55M|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  4.55M|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  4.55M|      corner_table_->MapCornerToVertex(corner + 1,
  779|  4.55M|                                       corner_table_->AddNewVertex());
  780|  4.55M|      corner_table_->MapCornerToVertex(corner + 2,
  781|  4.55M|                                       corner_table_->AddNewVertex());
  782|       |
  783|  4.55M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 2, False: 4.55M]
  ------------------
  784|      2|        return -1;  // Unexpected number of decoded vertices.
  785|      2|      }
  786|       |
  787|  4.55M|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  4.55M|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  4.55M|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  4.55M|      active_corner_stack.push_back(corner);
  792|  4.55M|      check_topology_split = true;
  793|  4.55M|    } 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|  40.9M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  40.9M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 18.1M, False: 22.7M]
  ------------------
  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|  18.1M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  18.1M|      EdgeFaceName split_edge;
  812|  18.1M|      int encoder_split_symbol_id;
  813|  18.1M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 2.52k, False: 18.1M]
  ------------------
  814|  18.1M|                             &encoder_split_symbol_id)) {
  815|  2.52k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 48, False: 2.47k]
  ------------------
  816|     48|          return -1;  // Wrong split symbol id.
  817|     48|        }
  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.47k|        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.47k|        CornerIndex new_active_corner;
  831|  2.47k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 1.11k, False: 1.36k]
  ------------------
  832|  1.11k|          new_active_corner = corner_table_->Next(act_top_corner);
  833|  1.36k|        } else {
  834|  1.36k|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|  1.36k|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  2.47k|        const int decoder_split_symbol_id =
  839|  2.47k|            num_symbols - encoder_split_symbol_id - 1;
  840|  2.47k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  2.47k|            new_active_corner;
  842|  2.47k|      }
  843|  18.1M|    }
  844|  40.9M|  }
  845|  4.89k|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 4.89k]
  ------------------
  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|  53.1k|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 48.3k, False: 4.81k]
  ------------------
  850|  48.3k|    const CornerIndex corner = active_corner_stack.back();
  851|  48.3k|    active_corner_stack.pop_back();
  852|  48.3k|    const bool interior_face =
  853|  48.3k|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  48.3k|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 36.2k, False: 12.1k]
  ------------------
  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|  36.2k|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 15, False: 36.1k]
  ------------------
  877|     15|        return -1;  // More faces than expected added to the mesh.
  878|     15|      }
  879|       |
  880|  36.1k|      const CornerIndex corner_a = corner;
  881|  36.1k|      const VertexIndex vert_n =
  882|  36.1k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  36.1k|      const CornerIndex corner_b =
  884|  36.1k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  36.1k|      const VertexIndex vert_x =
  887|  36.1k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  36.1k|      const CornerIndex corner_c =
  889|  36.1k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  36.1k|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 4, False: 36.1k]
  |  Branch (891:33): [True: 55, False: 36.1k]
  |  Branch (891:55): [True: 0, False: 36.1k]
  ------------------
  892|       |        // All matched corners must be different.
  893|     59|        return -1;
  894|     59|      }
  895|  36.1k|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 3, False: 36.1k]
  |  Branch (895:11): [True: 5, False: 36.1k]
  ------------------
  896|  36.1k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 1, False: 36.1k]
  ------------------
  897|  36.1k|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 1, False: 36.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|  36.1k|      const VertexIndex vert_p =
  904|  36.1k|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  36.1k|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  36.1k|      const CornerIndex new_corner(3 * face.value());
  909|  36.1k|      SetOppositeCorners(new_corner, corner);
  910|  36.1k|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  36.1k|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  36.1k|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  36.1k|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  36.1k|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|   144k|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 108k, False: 36.1k]
  ------------------
  920|   108k|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|   108k|      }
  922|       |
  923|  36.1k|      init_face_configurations_.push_back(true);
  924|  36.1k|      init_corners_.push_back(new_corner);
  925|  36.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|  12.1k|      init_face_configurations_.push_back(false);
  930|  12.1k|      init_corners_.push_back(corner);
  931|  12.1k|    }
  932|  48.3k|  }
  933|  4.81k|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 15, False: 4.80k]
  ------------------
  934|     15|    return -1;  // Unexpected number of decoded faces.
  935|     15|  }
  936|       |
  937|  4.80k|  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.80k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 4.44k, False: 4.80k]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  4.44k|    VertexIndex src_vert(num_vertices - 1);
  943|  5.14k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 706, False: 4.44k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|    706|      src_vert = VertexIndex(--num_vertices - 1);
  946|    706|    }
  947|  4.44k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 706, False: 3.73k]
  ------------------
  948|    706|      continue;  // No need to swap anything.
  949|    706|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  3.73k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  75.4k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 71.6k, False: 3.73k]
  ------------------
  954|  71.6k|      const CornerIndex cid = vcit.Corner();
  955|  71.6k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 0, False: 71.6k]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      0|        return -1;
  959|      0|      }
  960|  71.6k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  71.6k|    }
  962|  3.73k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  3.73k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  3.73k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  3.73k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  3.73k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  3.73k|    num_vertices--;
  972|  3.73k|  }
  973|  4.80k|  return num_vertices;
  974|  4.80k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  5.49k|    DecoderBuffer* decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  5.49k|  uint32_t num_topology_splits;
  982|  5.49k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  5.49k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  5.49k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 169, False: 5.32k]
  ------------------
  984|    169|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 1, False: 168]
  ------------------
  985|      1|      return -1;
  986|      1|    }
  987|       |
  988|    169|  } else
  989|  5.32k|#endif
  990|  5.32k|  {
  991|  5.32k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 5.32k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  5.32k|  }
  995|  5.49k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 2.69k, False: 2.80k]
  ------------------
  996|  2.69k|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 27, False: 2.66k]
  ------------------
  997|  2.69k|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|     27|      return -1;
  999|     27|    }
 1000|  2.66k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|  2.66k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  2.66k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 81, False: 2.58k]
  ------------------
 1002|  75.7k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 75.7k, False: 24]
  ------------------
 1003|  75.7k|        TopologySplitEventData event_data;
 1004|  75.7k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 32, False: 75.7k]
  ------------------
 1005|     32|          return -1;
 1006|     32|        }
 1007|  75.7k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 17, False: 75.6k]
  ------------------
 1008|     17|          return -1;
 1009|     17|        }
 1010|  75.6k|        uint8_t edge_data;
 1011|  75.6k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 8, False: 75.6k]
  ------------------
 1012|      8|          return -1;
 1013|      8|        }
 1014|  75.6k|        event_data.source_edge = edge_data & 1;
 1015|  75.6k|        topology_split_data_.push_back(event_data);
 1016|  75.6k|      }
 1017|       |
 1018|     81|    } else
 1019|  2.58k|#endif
 1020|  2.58k|    {
 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|  2.58k|      int last_source_symbol_id = 0;
 1024|  70.6k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 68.1k, False: 2.57k]
  ------------------
 1025|  68.1k|        TopologySplitEventData event_data;
 1026|  68.1k|        uint32_t delta;
 1027|  68.1k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 9, False: 68.1k]
  ------------------
 1028|      9|          return -1;
 1029|      9|        }
 1030|  68.1k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  68.1k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 3, False: 68.1k]
  ------------------
 1032|      3|          return -1;
 1033|      3|        }
 1034|  68.1k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 1, False: 68.1k]
  ------------------
 1035|      1|          return -1;
 1036|      1|        }
 1037|  68.1k|        event_data.split_symbol_id =
 1038|  68.1k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  68.1k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  68.1k|        topology_split_data_.push_back(event_data);
 1041|  68.1k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|  2.57k|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  8.12k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 5.55k, False: 2.57k]
  ------------------
 1045|  5.55k|        uint32_t edge_data;
 1046|  5.55k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  5.55k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 709, False: 4.84k]
  ------------------
 1047|    709|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  4.84k|        } else {
 1049|  4.84k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  4.84k|        }
 1051|  5.55k|        TopologySplitEventData& event_data = topology_split_data_[i];
 1052|  5.55k|        event_data.source_edge = edge_data & 1;
 1053|  5.55k|      }
 1054|  2.57k|      decoder_buffer->EndBitDecoding();
 1055|  2.57k|    }
 1056|  2.66k|  }
 1057|  5.40k|  uint32_t num_hole_events = 0;
 1058|  5.40k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  5.40k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  5.40k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 89, False: 5.31k]
  ------------------
 1060|     89|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 2, False: 87]
  ------------------
 1061|      2|      return -1;
 1062|      2|    }
 1063|  5.31k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  5.31k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 368, False: 4.94k]
  ------------------
 1064|    368|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 9, False: 359]
  ------------------
 1065|      9|      return -1;
 1066|      9|    }
 1067|    368|  }
 1068|  5.38k|#endif
 1069|  5.38k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 119, False: 5.27k]
  ------------------
 1070|    119|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|    119|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    119|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 73, False: 46]
  ------------------
 1072|   666k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 666k, False: 15]
  ------------------
 1073|   666k|        HoleEventData event_data;
 1074|   666k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 58, False: 666k]
  ------------------
 1075|     58|          return -1;
 1076|     58|        }
 1077|   666k|        hole_event_data_.push_back(event_data);
 1078|   666k|      }
 1079|       |
 1080|     73|    } else
 1081|     46|#endif
 1082|     46|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     46|      int last_symbol_id = 0;
 1085|  55.0k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 54.9k, False: 32]
  ------------------
 1086|  54.9k|        HoleEventData event_data;
 1087|  54.9k|        uint32_t delta;
 1088|  54.9k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 14, False: 54.9k]
  ------------------
 1089|     14|          return -1;
 1090|     14|        }
 1091|  54.9k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  54.9k|        last_symbol_id = event_data.symbol_id;
 1093|  54.9k|        hole_event_data_.push_back(event_data);
 1094|  54.9k|      }
 1095|     46|    }
 1096|    119|  }
 1097|  5.31k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  5.38k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|  1.86k|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|  1.86k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|  1.86k|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|  7.46k|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 5.59k, False: 1.86k]
  ------------------
 1109|  5.59k|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|  5.59k|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 1.73k, False: 3.86k]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|  3.88k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 2.14k, False: 1.73k]
  ------------------
 1114|  2.14k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|  2.14k|      }
 1116|  1.73k|      continue;
 1117|  1.73k|    }
 1118|       |
 1119|  9.99k|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 6.13k, False: 3.86k]
  ------------------
 1120|  6.13k|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|  6.13k|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 4.18k, False: 1.94k]
  ------------------
 1122|  4.18k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|  4.18k|      }
 1124|  6.13k|    }
 1125|  3.86k|  }
 1126|  1.86k|  return true;
 1127|  1.86k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|   191k|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|   191k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|   191k|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|   191k|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|   764k|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 573k, False: 191k]
  ------------------
 1139|   573k|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|   573k|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 29.7k, False: 543k]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   113k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 84.1k, False: 29.7k]
  ------------------
 1144|  84.1k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|  84.1k|      }
 1146|  29.7k|      continue;
 1147|  29.7k|    }
 1148|   543k|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|   543k|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 271k, False: 271k]
  ------------------
 1151|   271k|      continue;
 1152|   271k|    }
 1153|       |
 1154|   963k|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 691k, False: 271k]
  ------------------
 1155|   691k|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|   691k|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 464k, False: 227k]
  ------------------
 1157|   464k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|   464k|      }
 1159|   691k|    }
 1160|   271k|  }
 1161|   191k|  return true;
 1162|   191k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE21AssignPointsToCornersEi:
 1166|  4.80k|    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|  4.80k|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|  4.80k|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 92, False: 4.70k]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|   162k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 162k, False: 92]
  ------------------
 1176|   162k|      Mesh::Face face;
 1177|   162k|      const CornerIndex start_corner(3 * f.value());
 1178|   648k|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 486k, False: 162k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|   486k|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|   486k|        face[c] = vert_id;
 1182|   486k|      }
 1183|   162k|      decoder_->mesh()->SetFace(f, face);
 1184|   162k|    }
 1185|     92|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|     92|    return true;
 1187|     92|  }
 1188|       |  // Else we need to deduplicate multiple attributes.
 1189|       |
 1190|       |  // Map between point id and an associated corner id. Only one corner for
 1191|       |  // each point is stored. The corners are used to sample the attribute values
 1192|       |  // in the last stage of the deduplication.
 1193|  4.70k|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|  4.70k|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|   131k|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 126k, False: 4.70k]
  ------------------
 1197|   126k|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|   126k|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 5.49k, False: 121k]
  ------------------
 1199|  5.49k|      continue;  // Isolated vertex.
 1200|  5.49k|    }
 1201|   121k|    CornerIndex deduplication_first_corner = c;
 1202|   121k|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 31.4k, False: 89.7k]
  ------------------
 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|  31.4k|      deduplication_first_corner = c;
 1206|  89.7k|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|   161k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 127k, False: 33.4k]
  ------------------
 1210|   127k|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 42.3k, False: 85.4k]
  ------------------
 1211|  42.3k|          continue;  // No seam for this attribute, ignore it.
 1212|  42.3k|        }
 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|  85.4k|        const VertexIndex vert_id =
 1217|  85.4k|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|  85.4k|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|  85.4k|        bool seam_found = false;
 1220|   208k|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 179k, False: 29.0k]
  ------------------
 1221|   179k|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 6, False: 179k]
  ------------------
 1222|      6|            return false;
 1223|      6|          }
 1224|   179k|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 56.3k, False: 123k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|  56.3k|            deduplication_first_corner = act_c;
 1227|  56.3k|            seam_found = true;
 1228|  56.3k|            break;
 1229|  56.3k|          }
 1230|   123k|          act_c = corner_table_->SwingRight(act_c);
 1231|   123k|        }
 1232|  85.4k|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 56.3k, False: 29.0k]
  ------------------
 1233|  56.3k|          break;  // No reason to process other attributes if we found a seam.
 1234|  56.3k|        }
 1235|  85.4k|      }
 1236|  89.7k|    }
 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|   121k|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|   121k|    corner_to_point_map[c.value()] =
 1246|   121k|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|   121k|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|   121k|    CornerIndex prev_c = c;
 1250|   121k|    c = corner_table_->SwingRight(c);
 1251|   589k|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 557k, False: 32.3k]
  |  Branch (1251:40): [True: 468k, False: 88.8k]
  ------------------
 1252|   468k|      bool attribute_seam = false;
 1253|   795k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 639k, False: 155k]
  ------------------
 1254|   639k|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 313k, False: 326k]
  ------------------
 1255|   639k|            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|   313k|          attribute_seam = true;
 1259|   313k|          break;
 1260|   313k|        }
 1261|   639k|      }
 1262|   468k|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 313k, False: 155k]
  ------------------
 1263|   313k|        corner_to_point_map[c.value()] =
 1264|   313k|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|   313k|        point_to_corner_map.push_back(c.value());
 1266|   313k|      } else {
 1267|   155k|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|   155k|      }
 1269|   468k|      prev_c = c;
 1270|   468k|      c = corner_table_->SwingRight(c);
 1271|   468k|    }
 1272|   121k|  }
 1273|       |  // Add faces.
 1274|   197k|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 192k, False: 4.70k]
  ------------------
 1275|   192k|    Mesh::Face face;
 1276|   770k|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 577k, False: 192k]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|   577k|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|   577k|    }
 1280|   192k|    decoder_->mesh()->SetFace(f, face);
 1281|   192k|  }
 1282|  4.70k|  decoder_->point_cloud()->set_num_points(
 1283|  4.70k|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|  4.70k|  return true;
 1285|  4.70k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEEC2Ev:
   48|  2.47k|    : decoder_(nullptr),
   49|  2.47k|      last_symbol_id_(-1),
   50|  2.47k|      last_vert_id_(-1),
   51|  2.47k|      last_face_id_(-1),
   52|  2.47k|      num_new_vertices_(0),
   53|  2.47k|      num_encoded_vertices_(0),
   54|  2.47k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  2.47k|    MeshEdgebreakerDecoder* decoder) {
   59|  2.47k|  decoder_ = decoder;
   60|  2.47k|  return true;
   61|  2.47k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE23GetAttributeCornerTableEi:
   66|  2.36k|    int att_id) const {
   67|  3.47k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 2.72k, False: 750]
  ------------------
   68|  2.72k|    const int decoder_id = attribute_data_[i].decoder_id;
   69|  2.72k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 1.10k, False: 1.62k]
  |  Branch (69:27): [True: 0, False: 1.62k]
  ------------------
   70|  1.10k|      continue;
   71|  1.10k|    }
   72|  1.62k|    const AttributesDecoderInterface* const dec =
   73|  1.62k|        decoder_->attributes_decoder(decoder_id);
   74|  7.17k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 7.17k, False: 3]
  ------------------
   75|  7.17k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 1.61k, False: 5.55k]
  ------------------
   76|  1.61k|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 1.19k, False: 424]
  ------------------
   77|  1.19k|          return &attribute_data_[i].connectivity_data;
   78|  1.19k|        }
   79|    424|        return nullptr;
   80|  1.61k|      }
   81|  7.17k|    }
   82|  1.62k|  }
   83|    750|  return nullptr;
   84|  2.36k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE24GetAttributeEncodingDataEi:
   89|  2.36k|    int att_id) const {
   90|  3.47k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 2.72k, False: 750]
  ------------------
   91|  2.72k|    const int decoder_id = attribute_data_[i].decoder_id;
   92|  2.72k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 1.10k, False: 1.62k]
  |  Branch (92:27): [True: 0, False: 1.62k]
  ------------------
   93|  1.10k|      continue;
   94|  1.10k|    }
   95|  1.62k|    const AttributesDecoderInterface* const dec =
   96|  1.62k|        decoder_->attributes_decoder(decoder_id);
   97|  7.17k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 7.17k, False: 3]
  ------------------
   98|  7.17k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 1.61k, False: 5.55k]
  ------------------
   99|  1.61k|        return &attribute_data_[i].encoding_data;
  100|  1.61k|      }
  101|  7.17k|    }
  102|  1.62k|  }
  103|    750|  return &pos_encoding_data_;
  104|  2.36k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE23CreateAttributesDecoderEi:
  130|  1.75k|    int32_t att_decoder_id) {
  131|  1.75k|  int8_t att_data_id;
  132|  1.75k|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 58, False: 1.70k]
  ------------------
  133|     58|    return false;
  134|     58|  }
  135|  1.70k|  uint8_t decoder_type;
  136|  1.70k|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 27, False: 1.67k]
  ------------------
  137|     27|    return false;
  138|     27|  }
  139|       |
  140|  1.67k|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 1.13k, False: 536]
  ------------------
  141|  1.13k|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 76, False: 1.06k]
  ------------------
  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|  1.06k|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 10, False: 1.05k]
  ------------------
  148|     10|      return false;
  149|     10|    }
  150|       |
  151|  1.05k|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|  1.05k|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    536|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 2, False: 534]
  ------------------
  155|      2|      return false;  // Some other decoder is already using the data. Error.
  156|      2|    }
  157|    534|    pos_data_decoder_id_ = att_decoder_id;
  158|    534|  }
  159|       |
  160|  1.58k|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|  1.58k|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  1.58k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 1.58k, False: 0]
  ------------------
  162|  1.58k|    uint8_t traversal_method_encoded;
  163|  1.58k|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 17, False: 1.56k]
  ------------------
  164|     17|      return false;
  165|     17|    }
  166|       |    // Check that decoded traversal method is valid.
  167|  1.56k|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 10, False: 1.55k]
  ------------------
  168|     10|      return false;
  169|     10|    }
  170|  1.55k|    traversal_method =
  171|  1.55k|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|  1.55k|  }
  173|       |
  174|  1.55k|  const Mesh* mesh = decoder_->mesh();
  175|  1.55k|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|  1.55k|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 786, False: 772]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|    786|    MeshAttributeIndicesEncodingData* encoding_data = nullptr;
  181|    786|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 511, False: 275]
  ------------------
  182|    511|      encoding_data = &pos_encoding_data_;
  183|    511|    } else {
  184|    275|      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|    275|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|    275|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|    786|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 258, False: 528]
  ------------------
  191|    258|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|    258|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|    258|          AttTraverser;
  194|    258|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|    528|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 528, False: 0]
  ------------------
  196|    528|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|    528|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|    528|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|    528|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|    786|  } else {
  203|    772|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 5, False: 767]
  ------------------
  204|      5|      return false;  // Unsupported method.
  205|      5|    }
  206|    767|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 7, False: 760]
  ------------------
  207|      7|      return false;  // Attribute data must be specified.
  208|      7|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|    760|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|    760|        AttObserver;
  214|    760|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|    760|        AttTraverser;
  216|       |
  217|    760|    MeshAttributeIndicesEncodingData* const encoding_data =
  218|    760|        &attribute_data_[att_data_id].encoding_data;
  219|    760|    const MeshAttributeCornerTable* const corner_table =
  220|    760|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|    760|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|    760|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|    760|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|    760|                             encoding_data);
  227|       |
  228|    760|    AttTraverser att_traverser;
  229|    760|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|    760|    traversal_sequencer->SetTraverser(att_traverser);
  232|    760|    sequencer = std::move(traversal_sequencer);
  233|    760|  }
  234|       |
  235|  1.54k|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 1.54k]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|  1.54k|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|  1.54k|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|  1.54k|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|  1.54k|                                        std::move(att_controller));
  244|  1.54k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18DecodeConnectivityEv:
  247|  2.47k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  2.47k|  num_new_vertices_ = 0;
  249|  2.47k|  new_to_parent_vertex_map_.clear();
  250|  2.47k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  2.47k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.47k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 664, False: 1.80k]
  ------------------
  252|    664|    uint32_t num_new_verts;
  253|    664|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    664|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 192, False: 472]
  ------------------
  254|    192|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 192]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    472|    } else {
  258|    472|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 472]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    472|    }
  262|    664|    num_new_vertices_ = num_new_verts;
  263|    664|  }
  264|  2.47k|#endif
  265|       |
  266|  2.47k|  uint32_t num_encoded_vertices;
  267|  2.47k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  2.47k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.47k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 192, False: 2.28k]
  ------------------
  269|    192|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 192]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    192|  } else
  274|  2.28k|#endif
  275|  2.28k|  {
  276|  2.28k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 2.28k]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|  2.28k|  }
  280|  2.47k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  2.47k|  uint32_t num_faces;
  283|  2.47k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  2.47k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.47k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 192, False: 2.28k]
  ------------------
  285|    192|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 192]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    192|  } else
  290|  2.28k|#endif
  291|  2.28k|  {
  292|  2.28k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 2.28k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  2.28k|  }
  296|  2.47k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 2, False: 2.47k]
  ------------------
  297|      2|    return false;  // Draco cannot handle this many faces.
  298|      2|  }
  299|       |
  300|  2.47k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 5, False: 2.46k]
  ------------------
  301|      5|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      5|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|  2.46k|  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.46k|  const uint64_t num_encoded_vertices_64 =
  311|  2.46k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  2.46k|  const uint64_t max_num_vertex_edges =
  313|  2.46k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  2.46k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 2, False: 2.46k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      2|    return false;
  317|      2|  }
  318|       |
  319|  2.46k|  uint8_t num_attribute_data;
  320|  2.46k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 2.46k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  2.46k|  uint32_t num_encoded_symbols;
  325|  2.46k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  2.46k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.46k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 184, False: 2.27k]
  ------------------
  327|    184|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 184]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    184|  } else
  332|  2.27k|#endif
  333|  2.27k|  {
  334|  2.27k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 2.27k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  2.27k|  }
  338|       |
  339|  2.46k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 2, False: 2.46k]
  ------------------
  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|  2.46k|  const uint32_t max_encoded_faces =
  346|  2.46k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  2.46k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 5, False: 2.45k]
  ------------------
  348|       |    // Faces can only be 1 1/3 times bigger than number of encoded symbols. This
  349|       |    // could only happen if all new encoded components started with interior
  350|       |    // triangles. E.g. A mesh with multiple tetrahedrons.
  351|      5|    return false;
  352|      5|  }
  353|       |
  354|  2.45k|  uint32_t num_encoded_split_symbols;
  355|  2.45k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  2.45k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.45k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 178, False: 2.27k]
  ------------------
  357|    178|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 178]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    178|  } else
  362|  2.27k|#endif
  363|  2.27k|  {
  364|  2.27k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 2.27k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  2.27k|  }
  368|       |
  369|  2.45k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 4, False: 2.45k]
  ------------------
  370|      4|    return false;  // Split symbols are a sub-set of all symbols.
  371|      4|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  2.45k|  vertex_traversal_length_.clear();
  375|  2.45k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  2.45k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 2.45k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  2.45k|  processed_corner_ids_.clear();
  380|  2.45k|  processed_corner_ids_.reserve(num_faces);
  381|  2.45k|  processed_connectivity_corners_.clear();
  382|  2.45k|  processed_connectivity_corners_.reserve(num_faces);
  383|  2.45k|  topology_split_data_.clear();
  384|  2.45k|  hole_event_data_.clear();
  385|  2.45k|  init_face_configurations_.clear();
  386|  2.45k|  init_corners_.clear();
  387|       |
  388|  2.45k|  last_symbol_id_ = -1;
  389|  2.45k|  last_face_id_ = -1;
  390|  2.45k|  last_vert_id_ = -1;
  391|       |
  392|  2.45k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  2.45k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  2.45k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 1, False: 2.45k]
  ------------------
  397|  2.45k|          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.45k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  2.45k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  2.45k|  int32_t topology_split_decoded_bytes = -1;
  410|  2.45k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.45k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 647, False: 1.80k]
  ------------------
  411|    647|    uint32_t encoded_connectivity_size;
  412|    647|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    647|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 175, False: 472]
  ------------------
  413|    175|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 5, False: 170]
  ------------------
  414|      5|        return false;
  415|      5|      }
  416|    472|    } else {
  417|    472|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 472]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|    472|    }
  421|    642|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 1, False: 641]
  ------------------
  422|    641|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 25, False: 616]
  ------------------
  423|     26|      return false;
  424|     26|    }
  425|    616|    DecoderBuffer event_buffer;
  426|    616|    event_buffer.Init(
  427|    616|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    616|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    616|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    616|    topology_split_decoded_bytes =
  432|    616|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    616|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 152, False: 464]
  ------------------
  434|    152|      return false;
  435|    152|    }
  436|       |
  437|    616|  } else
  438|  1.80k|#endif
  439|  1.80k|  {
  440|  1.80k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 20, False: 1.78k]
  ------------------
  441|     20|      return false;
  442|     20|    }
  443|  1.80k|  }
  444|       |
  445|  2.24k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  2.24k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  2.24k|                                           num_encoded_split_symbols);
  449|  2.24k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  2.24k|  DecoderBuffer traversal_end_buffer;
  452|  2.24k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 115, False: 2.13k]
  ------------------
  453|    115|    return false;
  454|    115|  }
  455|       |
  456|  2.13k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  2.13k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 269, False: 1.86k]
  ------------------
  458|    269|    return false;
  459|    269|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|  1.86k|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|  1.86k|                           traversal_end_buffer.remaining_size(),
  464|  1.86k|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|  1.86k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|  1.86k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.86k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 381, False: 1.48k]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|    381|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|    381|  }
  471|  1.86k|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|  1.86k|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 1.69k, False: 165]
  ------------------
  475|  1.69k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|  1.69k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  1.69k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 308, False: 1.39k]
  ------------------
  477|   540k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 539k, False: 308]
  ------------------
  478|   539k|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 539k]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|   539k|      }
  482|       |
  483|    308|    } else
  484|  1.39k|#endif
  485|  1.39k|    {
  486|  11.9M|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 11.9M, False: 1.39k]
  ------------------
  487|  11.9M|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 11.9M]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|  11.9M|      }
  491|  1.39k|    }
  492|  1.69k|  }
  493|  1.86k|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  4.20k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 2.34k, False: 1.86k]
  ------------------
  498|  2.34k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  20.4M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 20.4M, False: 2.34k]
  ------------------
  501|  20.4M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  20.4M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  2.34k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 2.34k]
  ------------------
  505|  2.34k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  2.34k|  }
  509|       |
  510|  1.86k|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  4.20k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 2.34k, False: 1.86k]
  ------------------
  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.34k|    int32_t att_connectivity_verts =
  517|  2.34k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  2.34k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 315, False: 2.02k]
  ------------------
  519|    315|      att_connectivity_verts = corner_table_->num_vertices();
  520|    315|    }
  521|  2.34k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  2.34k|  }
  523|  1.86k|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 13, False: 1.85k]
  ------------------
  524|     13|    return false;
  525|     13|  }
  526|  1.85k|  return true;
  527|  1.86k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE19OnAttributesDecodedEv:
  530|    398|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|    398|  return true;
  532|    398|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18DecodeConnectivityEi:
  536|  2.13k|    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.13k|  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.13k|  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.13k|  std::vector<VertexIndex> invalid_vertices;
  558|  2.13k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  2.13k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  2.13k|  int num_faces = 0;
  562|   106M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 106M, False: 2.00k]
  ------------------
  563|   106M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|   106M|    bool check_topology_split = false;
  566|   106M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|   106M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 52.5M, False: 54.0M]
  ------------------
  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|  52.5M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 0, False: 52.5M]
  ------------------
  588|      0|        return -1;
  589|      0|      }
  590|       |
  591|  52.5M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  52.5M|      const VertexIndex vertex_x =
  593|  52.5M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  52.5M|      const CornerIndex corner_b =
  595|  52.5M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  52.5M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 46, False: 52.5M]
  ------------------
  598|       |        // All matched corners must be different.
  599|     46|        return -1;
  600|     46|      }
  601|  52.5M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 52.5M]
  |  Branch (601:11): [True: 0, False: 52.5M]
  ------------------
  602|  52.5M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 52.5M]
  ------------------
  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|  52.5M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  52.5M|      SetOppositeCorners(corner_a, corner + 1);
  612|  52.5M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  52.5M|      const VertexIndex vert_a_prev =
  616|  52.5M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  52.5M|      const VertexIndex vert_b_next =
  618|  52.5M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  52.5M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 52.5M]
  |  Branch (619:38): [True: 0, False: 52.5M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  52.5M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  52.5M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  52.5M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  52.5M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  52.5M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  52.5M|      active_corner_stack.back() = corner;
  631|  54.0M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 53.9M, False: 161k]
  |  Branch (631:40): [True: 39.3k, False: 122k]
  ------------------
  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|  53.9M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 0, False: 53.9M]
  ------------------
  647|      0|        return -1;
  648|      0|      }
  649|  53.9M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  53.9M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 53.9M]
  ------------------
  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|  53.9M|      const CornerIndex corner(3 * face.value());
  658|  53.9M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  53.9M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 53.9M, False: 39.3k]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  53.9M|        opp_corner = corner + 2;
  662|  53.9M|        corner_l = corner + 1;
  663|  53.9M|        corner_r = corner;
  664|  53.9M|      } else {
  665|       |        // "l" is the new first corner.
  666|  39.3k|        opp_corner = corner + 1;
  667|  39.3k|        corner_l = corner;
  668|  39.3k|        corner_r = corner + 2;
  669|  39.3k|      }
  670|  53.9M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  53.9M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  53.9M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 15, False: 53.9M]
  ------------------
  675|     15|        return -1;  // Unexpected number of decoded vertices.
  676|     15|      }
  677|       |
  678|  53.9M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  53.9M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  53.9M|      const VertexIndex vertex_r =
  682|  53.9M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  53.9M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  53.9M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  53.9M|      corner_table_->MapCornerToVertex(
  688|  53.9M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  53.9M|      active_corner_stack.back() = corner;
  690|  53.9M|      check_topology_split = true;
  691|  53.9M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 41.8k, False: 80.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|  41.8k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 1, False: 41.8k]
  ------------------
  703|      1|        return -1;
  704|      1|      }
  705|  41.8k|      const CornerIndex corner_b = active_corner_stack.back();
  706|  41.8k|      active_corner_stack.pop_back();
  707|       |
  708|       |      // Corner "a" can correspond either to a normal active edge, or to an edge
  709|       |      // created from the topology split event.
  710|  41.8k|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  41.8k|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 63, False: 41.8k]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|     63|        active_corner_stack.push_back(it->second);
  714|     63|      }
  715|  41.8k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 19, False: 41.8k]
  ------------------
  716|     19|        return -1;
  717|     19|      }
  718|  41.8k|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  41.8k|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 41.8k]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  41.8k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 16, False: 41.8k]
  |  Branch (724:11): [True: 16, False: 41.8k]
  ------------------
  725|  41.8k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 41.8k]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|     16|        return -1;
  729|     16|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  41.8k|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  41.8k|      SetOppositeCorners(corner_a, corner + 2);
  735|  41.8k|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  41.8k|      const VertexIndex vertex_p =
  739|  41.8k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  41.8k|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  41.8k|      corner_table_->MapCornerToVertex(
  742|  41.8k|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  41.8k|      const VertexIndex vert_b_prev =
  744|  41.8k|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  41.8k|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  41.8k|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  41.8k|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  41.8k|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  41.8k|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  41.8k|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  41.8k|                                       corner_table_->LeftMostCorner(vertex_n));
  753|       |
  754|       |      // Also update the vertex id at corner "n" and all corners that are
  755|       |      // connected to it in the CCW direction.
  756|  41.8k|      const CornerIndex first_corner = corner_n;
  757|   225k|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 184k, False: 41.8k]
  ------------------
  758|   184k|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|   184k|        corner_n = corner_table_->SwingLeft(corner_n);
  760|   184k|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 4, False: 184k]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      4|          return -1;
  764|      4|        }
  765|   184k|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  41.8k|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  41.8k|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 23.7k, False: 18.0k]
  ------------------
  770|  23.7k|        invalid_vertices.push_back(vertex_n);
  771|  23.7k|      }
  772|  41.8k|      active_corner_stack.back() = corner;
  773|  80.2k|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 80.2k, False: 0]
  ------------------
  774|  80.2k|      const CornerIndex corner(3 * face.value());
  775|  80.2k|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  80.2k|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  80.2k|      corner_table_->MapCornerToVertex(corner + 1,
  779|  80.2k|                                       corner_table_->AddNewVertex());
  780|  80.2k|      corner_table_->MapCornerToVertex(corner + 2,
  781|  80.2k|                                       corner_table_->AddNewVertex());
  782|       |
  783|  80.2k|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 3, False: 80.2k]
  ------------------
  784|      3|        return -1;  // Unexpected number of decoded vertices.
  785|      3|      }
  786|       |
  787|  80.2k|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  80.2k|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  80.2k|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  80.2k|      active_corner_stack.push_back(corner);
  792|  80.2k|      check_topology_split = true;
  793|  80.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|   106M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|   106M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 54.0M, False: 52.5M]
  ------------------
  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|  54.0M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  54.0M|      EdgeFaceName split_edge;
  812|  54.0M|      int encoder_split_symbol_id;
  813|  54.0M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 2.67k, False: 54.0M]
  ------------------
  814|  54.0M|                             &encoder_split_symbol_id)) {
  815|  2.67k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 28, False: 2.64k]
  ------------------
  816|     28|          return -1;  // Wrong split symbol id.
  817|     28|        }
  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: 878, False: 1.76k]
  ------------------
  832|    878|          new_active_corner = corner_table_->Next(act_top_corner);
  833|  1.76k|        } else {
  834|  1.76k|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|  1.76k|        }
  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|  54.0M|    }
  844|   106M|  }
  845|  2.00k|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 2.00k]
  ------------------
  846|      0|    return -1;  // Unexpected number of decoded vertices.
  847|      0|  }
  848|       |  // Decode start faces and connect them to the faces from the active stack.
  849|  35.3k|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 33.3k, False: 1.97k]
  ------------------
  850|  33.3k|    const CornerIndex corner = active_corner_stack.back();
  851|  33.3k|    active_corner_stack.pop_back();
  852|  33.3k|    const bool interior_face =
  853|  33.3k|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  33.3k|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 26.5k, False: 6.79k]
  ------------------
  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|  26.5k|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 10, False: 26.5k]
  ------------------
  877|     10|        return -1;  // More faces than expected added to the mesh.
  878|     10|      }
  879|       |
  880|  26.5k|      const CornerIndex corner_a = corner;
  881|  26.5k|      const VertexIndex vert_n =
  882|  26.5k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  26.5k|      const CornerIndex corner_b =
  884|  26.5k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  26.5k|      const VertexIndex vert_x =
  887|  26.5k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  26.5k|      const CornerIndex corner_c =
  889|  26.5k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  26.5k|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 3, False: 26.5k]
  |  Branch (891:33): [True: 9, False: 26.5k]
  |  Branch (891:55): [True: 0, False: 26.5k]
  ------------------
  892|       |        // All matched corners must be different.
  893|     12|        return -1;
  894|     12|      }
  895|  26.5k|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 7, False: 26.5k]
  |  Branch (895:11): [True: 9, False: 26.5k]
  ------------------
  896|  26.5k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 1, False: 26.5k]
  ------------------
  897|  26.5k|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 1, False: 26.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|      9|        return -1;
  901|      9|      }
  902|       |
  903|  26.5k|      const VertexIndex vert_p =
  904|  26.5k|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  26.5k|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  26.5k|      const CornerIndex new_corner(3 * face.value());
  909|  26.5k|      SetOppositeCorners(new_corner, corner);
  910|  26.5k|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  26.5k|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  26.5k|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  26.5k|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  26.5k|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|   106k|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 79.6k, False: 26.5k]
  ------------------
  920|  79.6k|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|  79.6k|      }
  922|       |
  923|  26.5k|      init_face_configurations_.push_back(true);
  924|  26.5k|      init_corners_.push_back(new_corner);
  925|  26.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|  6.79k|      init_face_configurations_.push_back(false);
  930|  6.79k|      init_corners_.push_back(corner);
  931|  6.79k|    }
  932|  33.3k|  }
  933|  1.97k|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 100, False: 1.87k]
  ------------------
  934|    100|    return -1;  // Unexpected number of decoded faces.
  935|    100|  }
  936|       |
  937|  1.87k|  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.87k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 1.56k, False: 1.86k]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  1.56k|    VertexIndex src_vert(num_vertices - 1);
  943|  1.73k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 168, False: 1.56k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|    168|      src_vert = VertexIndex(--num_vertices - 1);
  946|    168|    }
  947|  1.56k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 168, False: 1.39k]
  ------------------
  948|    168|      continue;  // No need to swap anything.
  949|    168|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  1.39k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  6.88k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 5.49k, False: 1.39k]
  ------------------
  954|  5.49k|      const CornerIndex cid = vcit.Corner();
  955|  5.49k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 6, False: 5.49k]
  ------------------
  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|  5.49k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  5.49k|    }
  962|  1.39k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  1.39k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  1.39k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  1.39k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  1.39k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  1.39k|    num_vertices--;
  972|  1.39k|  }
  973|  1.86k|  return num_vertices;
  974|  1.87k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  2.42k|    DecoderBuffer* decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  2.42k|  uint32_t num_topology_splits;
  982|  2.42k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  2.42k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.42k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 145, False: 2.27k]
  ------------------
  984|    145|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 1, False: 144]
  ------------------
  985|      1|      return -1;
  986|      1|    }
  987|       |
  988|    145|  } else
  989|  2.27k|#endif
  990|  2.27k|  {
  991|  2.27k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 2.27k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  2.27k|  }
  995|  2.41k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 926, False: 1.49k]
  ------------------
  996|    926|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 28, False: 898]
  ------------------
  997|    926|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|     28|      return -1;
  999|     28|    }
 1000|    898|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|    898|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    898|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 64, False: 834]
  ------------------
 1002|  86.9k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 86.9k, False: 28]
  ------------------
 1003|  86.9k|        TopologySplitEventData event_data;
 1004|  86.9k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 25, False: 86.9k]
  ------------------
 1005|     25|          return -1;
 1006|     25|        }
 1007|  86.9k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 7, False: 86.9k]
  ------------------
 1008|      7|          return -1;
 1009|      7|        }
 1010|  86.9k|        uint8_t edge_data;
 1011|  86.9k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 4, False: 86.8k]
  ------------------
 1012|      4|          return -1;
 1013|      4|        }
 1014|  86.8k|        event_data.source_edge = edge_data & 1;
 1015|  86.8k|        topology_split_data_.push_back(event_data);
 1016|  86.8k|      }
 1017|       |
 1018|     64|    } else
 1019|    834|#endif
 1020|    834|    {
 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|    834|      int last_source_symbol_id = 0;
 1024|  42.7k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 41.9k, False: 816]
  ------------------
 1025|  41.9k|        TopologySplitEventData event_data;
 1026|  41.9k|        uint32_t delta;
 1027|  41.9k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 13, False: 41.9k]
  ------------------
 1028|     13|          return -1;
 1029|     13|        }
 1030|  41.9k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  41.9k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 4, False: 41.9k]
  ------------------
 1032|      4|          return -1;
 1033|      4|        }
 1034|  41.9k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 1, False: 41.9k]
  ------------------
 1035|      1|          return -1;
 1036|      1|        }
 1037|  41.9k|        event_data.split_symbol_id =
 1038|  41.9k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  41.9k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  41.9k|        topology_split_data_.push_back(event_data);
 1041|  41.9k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|    816|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  7.29k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 6.47k, False: 816]
  ------------------
 1045|  6.47k|        uint32_t edge_data;
 1046|  6.47k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  6.47k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 4.27k, False: 2.19k]
  ------------------
 1047|  4.27k|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  4.27k|        } else {
 1049|  2.19k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  2.19k|        }
 1051|  6.47k|        TopologySplitEventData& event_data = topology_split_data_[i];
 1052|  6.47k|        event_data.source_edge = edge_data & 1;
 1053|  6.47k|      }
 1054|    816|      decoder_buffer->EndBitDecoding();
 1055|    816|    }
 1056|    898|  }
 1057|  2.33k|  uint32_t num_hole_events = 0;
 1058|  2.33k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  2.33k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.33k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 86, False: 2.25k]
  ------------------
 1060|     86|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 5, False: 81]
  ------------------
 1061|      5|      return -1;
 1062|      5|    }
 1063|  2.25k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  2.25k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 376, False: 1.87k]
  ------------------
 1064|    376|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 8, False: 368]
  ------------------
 1065|      8|      return -1;
 1066|      8|    }
 1067|    376|  }
 1068|  2.32k|#endif
 1069|  2.32k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 89, False: 2.23k]
  ------------------
 1070|     89|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     89|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     89|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 53, False: 36]
  ------------------
 1072|   605k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 605k, False: 2]
  ------------------
 1073|   605k|        HoleEventData event_data;
 1074|   605k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 51, False: 605k]
  ------------------
 1075|     51|          return -1;
 1076|     51|        }
 1077|   605k|        hole_event_data_.push_back(event_data);
 1078|   605k|      }
 1079|       |
 1080|     53|    } else
 1081|     36|#endif
 1082|     36|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     36|      int last_symbol_id = 0;
 1085|  17.9k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 17.9k, False: 11]
  ------------------
 1086|  17.9k|        HoleEventData event_data;
 1087|  17.9k|        uint32_t delta;
 1088|  17.9k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 25, False: 17.8k]
  ------------------
 1089|     25|          return -1;
 1090|     25|        }
 1091|  17.8k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  17.8k|        last_symbol_id = event_data.symbol_id;
 1093|  17.8k|        hole_event_data_.push_back(event_data);
 1094|  17.8k|      }
 1095|     36|    }
 1096|     89|  }
 1097|  2.24k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  2.32k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|   539k|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|   539k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|   539k|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|  2.15M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 1.61M, False: 539k]
  ------------------
 1109|  1.61M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|  1.61M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 7.18k, False: 1.61M]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|  14.6k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 7.46k, False: 7.18k]
  ------------------
 1114|  7.46k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|  7.46k|      }
 1116|  7.18k|      continue;
 1117|  7.18k|    }
 1118|       |
 1119|  3.22M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 1.61M, False: 1.61M]
  ------------------
 1120|  1.61M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|  1.61M|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 653k, False: 961k]
  ------------------
 1122|   653k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|   653k|      }
 1124|  1.61M|    }
 1125|  1.61M|  }
 1126|   539k|  return true;
 1127|   539k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|  11.9M|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|  11.9M|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|  11.9M|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|  11.9M|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  47.7M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 35.7M, False: 11.9M]
  ------------------
 1139|  35.7M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  35.7M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 148k, False: 35.6M]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   347k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 199k, False: 148k]
  ------------------
 1144|   199k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   199k|      }
 1146|   148k|      continue;
 1147|   148k|    }
 1148|  35.6M|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|  35.6M|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 17.8M, False: 17.8M]
  ------------------
 1151|  17.8M|      continue;
 1152|  17.8M|    }
 1153|       |
 1154|  41.1M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 23.3M, False: 17.8M]
  ------------------
 1155|  23.3M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  23.3M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 19.5M, False: 3.75M]
  ------------------
 1157|  19.5M|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|  19.5M|      }
 1159|  23.3M|    }
 1160|  17.8M|  }
 1161|  11.9M|  return true;
 1162|  11.9M|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE21AssignPointsToCornersEi:
 1166|  1.86k|    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.86k|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|  1.86k|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 165, False: 1.69k]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|  1.53M|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 1.53M, False: 165]
  ------------------
 1176|  1.53M|      Mesh::Face face;
 1177|  1.53M|      const CornerIndex start_corner(3 * f.value());
 1178|  6.13M|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 4.60M, False: 1.53M]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|  4.60M|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|  4.60M|        face[c] = vert_id;
 1182|  4.60M|      }
 1183|  1.53M|      decoder_->mesh()->SetFace(f, face);
 1184|  1.53M|    }
 1185|    165|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|    165|    return true;
 1187|    165|  }
 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.69k|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|  1.69k|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|  6.31M|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 6.31M, False: 1.68k]
  ------------------
 1197|  6.31M|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|  6.31M|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 4.00k, False: 6.31M]
  ------------------
 1199|  4.00k|      continue;  // Isolated vertex.
 1200|  4.00k|    }
 1201|  6.31M|    CornerIndex deduplication_first_corner = c;
 1202|  6.31M|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 154k, False: 6.15M]
  ------------------
 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|   154k|      deduplication_first_corner = c;
 1206|  6.15M|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|  6.98M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 6.24M, False: 739k]
  ------------------
 1210|  6.24M|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 814k, False: 5.42M]
  ------------------
 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|  5.42M|        const VertexIndex vert_id =
 1217|  5.42M|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|  5.42M|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|  5.42M|        bool seam_found = false;
 1220|  5.56M|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 5.54M, False: 12.7k]
  ------------------
 1221|  5.54M|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 13, False: 5.54M]
  ------------------
 1222|     13|            return false;
 1223|     13|          }
 1224|  5.54M|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 5.41M, False: 130k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|  5.41M|            deduplication_first_corner = act_c;
 1227|  5.41M|            seam_found = true;
 1228|  5.41M|            break;
 1229|  5.41M|          }
 1230|   130k|          act_c = corner_table_->SwingRight(act_c);
 1231|   130k|        }
 1232|  5.42M|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 5.41M, False: 12.7k]
  ------------------
 1233|  5.41M|          break;  // No reason to process other attributes if we found a seam.
 1234|  5.41M|        }
 1235|  5.42M|      }
 1236|  6.15M|    }
 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|  6.31M|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|  6.31M|    corner_to_point_map[c.value()] =
 1246|  6.31M|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|  6.31M|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|  6.31M|    CornerIndex prev_c = c;
 1250|  6.31M|    c = corner_table_->SwingRight(c);
 1251|  37.3M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 37.2M, False: 156k]
  |  Branch (1251:40): [True: 31.0M, False: 6.15M]
  ------------------
 1252|  31.0M|      bool attribute_seam = false;
 1253|  35.3M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 31.5M, False: 3.81M]
  ------------------
 1254|  31.5M|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 27.2M, False: 4.26M]
  ------------------
 1255|  31.5M|            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|  27.2M|          attribute_seam = true;
 1259|  27.2M|          break;
 1260|  27.2M|        }
 1261|  31.5M|      }
 1262|  31.0M|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 27.2M, False: 3.81M]
  ------------------
 1263|  27.2M|        corner_to_point_map[c.value()] =
 1264|  27.2M|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|  27.2M|        point_to_corner_map.push_back(c.value());
 1266|  27.2M|      } else {
 1267|  3.81M|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|  3.81M|      }
 1269|  31.0M|      prev_c = c;
 1270|  31.0M|      c = corner_table_->SwingRight(c);
 1271|  31.0M|    }
 1272|  6.31M|  }
 1273|       |  // Add faces.
 1274|  12.4M|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 12.4M, False: 1.68k]
  ------------------
 1275|  12.4M|    Mesh::Face face;
 1276|  49.7M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 37.2M, False: 12.4M]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|  37.2M|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|  37.2M|    }
 1280|  12.4M|    decoder_->mesh()->SetFace(f, face);
 1281|  12.4M|  }
 1282|  1.68k|  decoder_->point_cloud()->set_num_points(
 1283|  1.68k|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|  1.68k|  return true;
 1285|  1.69k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEEC2Ev:
   48|  3.03k|    : decoder_(nullptr),
   49|  3.03k|      last_symbol_id_(-1),
   50|  3.03k|      last_vert_id_(-1),
   51|  3.03k|      last_face_id_(-1),
   52|  3.03k|      num_new_vertices_(0),
   53|  3.03k|      num_encoded_vertices_(0),
   54|  3.03k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  3.03k|    MeshEdgebreakerDecoder* decoder) {
   59|  3.03k|  decoder_ = decoder;
   60|  3.03k|  return true;
   61|  3.03k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE23GetAttributeCornerTableEi:
   66|    356|    int att_id) const {
   67|    491|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 324, False: 167]
  ------------------
   68|    324|    const int decoder_id = attribute_data_[i].decoder_id;
   69|    324|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 119, False: 205]
  |  Branch (69:27): [True: 0, False: 205]
  ------------------
   70|    119|      continue;
   71|    119|    }
   72|    205|    const AttributesDecoderInterface* const dec =
   73|    205|        decoder_->attributes_decoder(decoder_id);
   74|  1.78k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 1.76k, False: 16]
  ------------------
   75|  1.76k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 189, False: 1.58k]
  ------------------
   76|    189|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 129, False: 60]
  ------------------
   77|    129|          return &attribute_data_[i].connectivity_data;
   78|    129|        }
   79|     60|        return nullptr;
   80|    189|      }
   81|  1.76k|    }
   82|    205|  }
   83|    167|  return nullptr;
   84|    356|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE24GetAttributeEncodingDataEi:
   89|    356|    int att_id) const {
   90|    491|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 324, False: 167]
  ------------------
   91|    324|    const int decoder_id = attribute_data_[i].decoder_id;
   92|    324|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 119, False: 205]
  |  Branch (92:27): [True: 0, False: 205]
  ------------------
   93|    119|      continue;
   94|    119|    }
   95|    205|    const AttributesDecoderInterface* const dec =
   96|    205|        decoder_->attributes_decoder(decoder_id);
   97|  1.78k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 1.76k, False: 16]
  ------------------
   98|  1.76k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 189, False: 1.58k]
  ------------------
   99|    189|        return &attribute_data_[i].encoding_data;
  100|    189|      }
  101|  1.76k|    }
  102|    205|  }
  103|    167|  return &pos_encoding_data_;
  104|    356|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE23CreateAttributesDecoderEi:
  130|    315|    int32_t att_decoder_id) {
  131|    315|  int8_t att_data_id;
  132|    315|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 26, False: 289]
  ------------------
  133|     26|    return false;
  134|     26|  }
  135|    289|  uint8_t decoder_type;
  136|    289|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 6, False: 283]
  ------------------
  137|      6|    return false;
  138|      6|  }
  139|       |
  140|    283|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 166, False: 117]
  ------------------
  141|    166|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 25, False: 141]
  ------------------
  142|     25|      return false;  // Unexpected attribute data.
  143|     25|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|    141|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 6, False: 135]
  ------------------
  148|      6|      return false;
  149|      6|    }
  150|       |
  151|    135|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|    135|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    117|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 3, False: 114]
  ------------------
  155|      3|      return false;  // Some other decoder is already using the data. Error.
  156|      3|    }
  157|    114|    pos_data_decoder_id_ = att_decoder_id;
  158|    114|  }
  159|       |
  160|    249|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|    249|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    249|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 249, False: 0]
  ------------------
  162|    249|    uint8_t traversal_method_encoded;
  163|    249|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 2, False: 247]
  ------------------
  164|      2|      return false;
  165|      2|    }
  166|       |    // Check that decoded traversal method is valid.
  167|    247|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 20, False: 227]
  ------------------
  168|     20|      return false;
  169|     20|    }
  170|    227|    traversal_method =
  171|    227|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|    227|  }
  173|       |
  174|    227|  const Mesh* mesh = decoder_->mesh();
  175|    227|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|    227|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 167, False: 60]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|    167|    MeshAttributeIndicesEncodingData* encoding_data = nullptr;
  181|    167|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 100, False: 67]
  ------------------
  182|    100|      encoding_data = &pos_encoding_data_;
  183|    100|    } else {
  184|     67|      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|     67|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|     67|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|    167|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 48, False: 119]
  ------------------
  191|     48|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|     48|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|     48|          AttTraverser;
  194|     48|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|    119|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 119, False: 0]
  ------------------
  196|    119|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|    119|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|    119|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|    119|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|    167|  } else {
  203|     60|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 2, False: 58]
  ------------------
  204|      2|      return false;  // Unsupported method.
  205|      2|    }
  206|     58|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 3, False: 55]
  ------------------
  207|      3|      return false;  // Attribute data must be specified.
  208|      3|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|     55|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|     55|        AttObserver;
  214|     55|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|     55|        AttTraverser;
  216|       |
  217|     55|    MeshAttributeIndicesEncodingData* const encoding_data =
  218|     55|        &attribute_data_[att_data_id].encoding_data;
  219|     55|    const MeshAttributeCornerTable* const corner_table =
  220|     55|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|     55|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|     55|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|     55|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|     55|                             encoding_data);
  227|       |
  228|     55|    AttTraverser att_traverser;
  229|     55|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|     55|    traversal_sequencer->SetTraverser(att_traverser);
  232|     55|    sequencer = std::move(traversal_sequencer);
  233|     55|  }
  234|       |
  235|    222|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 222]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|    222|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|    222|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|    222|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|    222|                                        std::move(att_controller));
  244|    222|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18DecodeConnectivityEv:
  247|  3.03k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  3.03k|  num_new_vertices_ = 0;
  249|  3.03k|  new_to_parent_vertex_map_.clear();
  250|  3.03k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  3.03k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.03k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 663, False: 2.37k]
  ------------------
  252|    663|    uint32_t num_new_verts;
  253|    663|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    663|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 484, False: 179]
  ------------------
  254|    484|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 484]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    484|    } else {
  258|    179|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 179]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    179|    }
  262|    663|    num_new_vertices_ = num_new_verts;
  263|    663|  }
  264|  3.03k|#endif
  265|       |
  266|  3.03k|  uint32_t num_encoded_vertices;
  267|  3.03k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  3.03k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.03k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 484, False: 2.55k]
  ------------------
  269|    484|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 484]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    484|  } else
  274|  2.55k|#endif
  275|  2.55k|  {
  276|  2.55k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 2.55k]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|  2.55k|  }
  280|  3.03k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  3.03k|  uint32_t num_faces;
  283|  3.03k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  3.03k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.03k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 484, False: 2.55k]
  ------------------
  285|    484|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 484]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    484|  } else
  290|  2.55k|#endif
  291|  2.55k|  {
  292|  2.55k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 2.55k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  2.55k|  }
  296|  3.03k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 1, False: 3.03k]
  ------------------
  297|      1|    return false;  // Draco cannot handle this many faces.
  298|      1|  }
  299|       |
  300|  3.03k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 2, False: 3.03k]
  ------------------
  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|  3.03k|  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.03k|  const uint64_t num_encoded_vertices_64 =
  311|  3.03k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  3.03k|  const uint64_t max_num_vertex_edges =
  313|  3.03k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  3.03k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 1, False: 3.03k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      1|    return false;
  317|      1|  }
  318|       |
  319|  3.03k|  uint8_t num_attribute_data;
  320|  3.03k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 3.03k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  3.03k|  uint32_t num_encoded_symbols;
  325|  3.03k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  3.03k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.03k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 482, False: 2.54k]
  ------------------
  327|    482|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 482]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    482|  } else
  332|  2.54k|#endif
  333|  2.54k|  {
  334|  2.54k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 2.54k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  2.54k|  }
  338|       |
  339|  3.03k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 2, False: 3.02k]
  ------------------
  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|  3.02k|  const uint32_t max_encoded_faces =
  346|  3.02k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  3.02k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 9, False: 3.02k]
  ------------------
  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|      9|    return false;
  352|      9|  }
  353|       |
  354|  3.02k|  uint32_t num_encoded_split_symbols;
  355|  3.02k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  3.02k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.02k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 472, False: 2.54k]
  ------------------
  357|    472|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 472]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    472|  } else
  362|  2.54k|#endif
  363|  2.54k|  {
  364|  2.54k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 2.54k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  2.54k|  }
  368|       |
  369|  3.02k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 1, False: 3.01k]
  ------------------
  370|      1|    return false;  // Split symbols are a sub-set of all symbols.
  371|      1|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  3.01k|  vertex_traversal_length_.clear();
  375|  3.01k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  3.01k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 3.01k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  3.01k|  processed_corner_ids_.clear();
  380|  3.01k|  processed_corner_ids_.reserve(num_faces);
  381|  3.01k|  processed_connectivity_corners_.clear();
  382|  3.01k|  processed_connectivity_corners_.reserve(num_faces);
  383|  3.01k|  topology_split_data_.clear();
  384|  3.01k|  hole_event_data_.clear();
  385|  3.01k|  init_face_configurations_.clear();
  386|  3.01k|  init_corners_.clear();
  387|       |
  388|  3.01k|  last_symbol_id_ = -1;
  389|  3.01k|  last_face_id_ = -1;
  390|  3.01k|  last_vert_id_ = -1;
  391|       |
  392|  3.01k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  3.01k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  3.01k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 1, False: 3.01k]
  ------------------
  397|  3.01k|          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.01k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  3.01k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  3.01k|  int32_t topology_split_decoded_bytes = -1;
  410|  3.01k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.01k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 650, False: 2.36k]
  ------------------
  411|    650|    uint32_t encoded_connectivity_size;
  412|    650|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    650|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 471, False: 179]
  ------------------
  413|    471|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 4, False: 467]
  ------------------
  414|      4|        return false;
  415|      4|      }
  416|    471|    } else {
  417|    179|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 179]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|    179|    }
  421|    646|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 3, False: 643]
  ------------------
  422|    643|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 11, False: 632]
  ------------------
  423|     14|      return false;
  424|     14|    }
  425|    632|    DecoderBuffer event_buffer;
  426|    632|    event_buffer.Init(
  427|    632|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    632|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    632|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    632|    topology_split_decoded_bytes =
  432|    632|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    632|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 156, False: 476]
  ------------------
  434|    156|      return false;
  435|    156|    }
  436|       |
  437|    632|  } else
  438|  2.36k|#endif
  439|  2.36k|  {
  440|  2.36k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 19, False: 2.34k]
  ------------------
  441|     19|      return false;
  442|     19|    }
  443|  2.36k|  }
  444|       |
  445|  2.82k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  2.82k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  2.82k|                                           num_encoded_split_symbols);
  449|  2.82k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  2.82k|  DecoderBuffer traversal_end_buffer;
  452|  2.82k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 1.55k, False: 1.27k]
  ------------------
  453|  1.55k|    return false;
  454|  1.55k|  }
  455|       |
  456|  1.27k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  1.27k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 950, False: 325]
  ------------------
  458|    950|    return false;
  459|    950|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|    325|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|    325|                           traversal_end_buffer.remaining_size(),
  464|    325|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|    325|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|    325|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    325|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 5, False: 320]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|      5|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|      5|  }
  471|    325|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|    325|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 224, False: 101]
  ------------------
  475|    224|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|    224|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|    224|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 5, False: 219]
  ------------------
  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|    219|#endif
  485|    219|    {
  486|   752k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 751k, False: 219]
  ------------------
  487|   751k|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 751k]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|   751k|      }
  491|    219|    }
  492|    224|  }
  493|    325|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  1.53k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 1.21k, False: 325]
  ------------------
  498|  1.21k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  1.99M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 1.99M, False: 1.21k]
  ------------------
  501|  1.99M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  1.99M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  1.21k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 1.21k]
  ------------------
  505|  1.21k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  1.21k|  }
  509|       |
  510|    325|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  1.53k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 1.21k, False: 325]
  ------------------
  512|       |    // For non-position attributes, preallocate the vertex to value mapping
  513|       |    // using the maximum number of vertices from the base corner table and the
  514|       |    // attribute corner table (since the attribute decoder may use either of
  515|       |    // it).
  516|  1.21k|    int32_t att_connectivity_verts =
  517|  1.21k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  1.21k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 1, False: 1.21k]
  ------------------
  519|      1|      att_connectivity_verts = corner_table_->num_vertices();
  520|      1|    }
  521|  1.21k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  1.21k|  }
  523|    325|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 17, False: 308]
  ------------------
  524|     17|    return false;
  525|     17|  }
  526|    308|  return true;
  527|    325|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE19OnAttributesDecodedEv:
  530|     23|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|     23|  return true;
  532|     23|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18DecodeConnectivityEi:
  536|  1.27k|    int num_symbols) {
  537|       |  // Algorithm does the reverse decoding of the symbols encoded with the
  538|       |  // edgebreaker method. The reverse decoding always keeps track of the active
  539|       |  // edge identified by its opposite corner (active corner). New faces are
  540|       |  // always added to this active edge. There may be multiple active corners at
  541|       |  // one time that either correspond to separate mesh components or to
  542|       |  // sub-components of one mesh that are going to be merged together using the
  543|       |  // TOPOLOGY_S symbol. We can store these active edges on a stack, because the
  544|       |  // decoder always processes only the latest active edge. TOPOLOGY_S then
  545|       |  // removes the top edge from the stack and TOPOLOGY_E adds a new edge to the
  546|       |  // stack.
  547|  1.27k|  std::vector<CornerIndex> active_corner_stack;
  548|       |
  549|       |  // Additional active edges may be added as a result of topology split events.
  550|       |  // They can be added in arbitrary order, but we always know the split symbol
  551|       |  // id they belong to, so we can address them using this symbol id.
  552|  1.27k|  std::unordered_map<int, CornerIndex> topology_split_active_corners;
  553|       |
  554|       |  // Vector used for storing vertices that were marked as isolated during the
  555|       |  // decoding process. Currently used only when the mesh doesn't contain any
  556|       |  // non-position connectivity data.
  557|  1.27k|  std::vector<VertexIndex> invalid_vertices;
  558|  1.27k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  1.27k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  1.27k|  int num_faces = 0;
  562|  97.6M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 97.6M, False: 518]
  ------------------
  563|  97.6M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  97.6M|    bool check_topology_split = false;
  566|  97.6M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  97.6M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 9.28M, False: 88.3M]
  ------------------
  568|       |      // Create a new face between two edges on the open boundary.
  569|       |      // The first edge is opposite to the corner "a" from the image below.
  570|       |      // The other edge is opposite to the corner "b" that can be reached
  571|       |      // through a CCW traversal around the vertex "v".
  572|       |      // One new active boundary edge is created, opposite to the new corner
  573|       |      // "x".
  574|       |      //
  575|       |      //     *-------*
  576|       |      //    / \     / \
  577|       |      //   /   \   /   \
  578|       |      //  /     \ /     \
  579|       |      // *-------v-------*
  580|       |      //  \b    /x\    a/
  581|       |      //   \   /   \   /
  582|       |      //    \ /  C  \ /
  583|       |      //     *.......*
  584|       |
  585|       |      // Find the corner "b" from the corner "a" which is the corner on the
  586|       |      // top of the active stack.
  587|  9.28M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 160, False: 9.28M]
  ------------------
  588|    160|        return -1;
  589|    160|      }
  590|       |
  591|  9.28M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  9.28M|      const VertexIndex vertex_x =
  593|  9.28M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  9.28M|      const CornerIndex corner_b =
  595|  9.28M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  9.28M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 181, False: 9.28M]
  ------------------
  598|       |        // All matched corners must be different.
  599|    181|        return -1;
  600|    181|      }
  601|  9.28M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 9.28M]
  |  Branch (601:11): [True: 0, False: 9.28M]
  ------------------
  602|  9.28M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 9.28M]
  ------------------
  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|  9.28M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  9.28M|      SetOppositeCorners(corner_a, corner + 1);
  612|  9.28M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  9.28M|      const VertexIndex vert_a_prev =
  616|  9.28M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  9.28M|      const VertexIndex vert_b_next =
  618|  9.28M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  9.28M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 9.28M]
  |  Branch (619:38): [True: 0, False: 9.28M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  9.28M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  9.28M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  9.28M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  9.28M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  9.28M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  9.28M|      active_corner_stack.back() = corner;
  631|  88.3M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 510k, False: 87.8M]
  |  Branch (631:40): [True: 76.0M, False: 11.8M]
  ------------------
  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|  76.5M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 1, False: 76.5M]
  ------------------
  647|      1|        return -1;
  648|      1|      }
  649|  76.5M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  76.5M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 76.5M]
  ------------------
  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|  76.5M|      const CornerIndex corner(3 * face.value());
  658|  76.5M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  76.5M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 510k, False: 76.0M]
  ------------------
  660|       |        // "r" is the new first corner.
  661|   510k|        opp_corner = corner + 2;
  662|   510k|        corner_l = corner + 1;
  663|   510k|        corner_r = corner;
  664|  76.0M|      } else {
  665|       |        // "l" is the new first corner.
  666|  76.0M|        opp_corner = corner + 1;
  667|  76.0M|        corner_l = corner;
  668|  76.0M|        corner_r = corner + 2;
  669|  76.0M|      }
  670|  76.5M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  76.5M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  76.5M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 7, False: 76.5M]
  ------------------
  675|      7|        return -1;  // Unexpected number of decoded vertices.
  676|      7|      }
  677|       |
  678|  76.5M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  76.5M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  76.5M|      const VertexIndex vertex_r =
  682|  76.5M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  76.5M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  76.5M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  76.5M|      corner_table_->MapCornerToVertex(
  688|  76.5M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  76.5M|      active_corner_stack.back() = corner;
  690|  76.5M|      check_topology_split = true;
  691|  76.5M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 51.8k, False: 11.8M]
  ------------------
  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|  51.8k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 1, False: 51.8k]
  ------------------
  703|      1|        return -1;
  704|      1|      }
  705|  51.8k|      const CornerIndex corner_b = active_corner_stack.back();
  706|  51.8k|      active_corner_stack.pop_back();
  707|       |
  708|       |      // Corner "a" can correspond either to a normal active edge, or to an edge
  709|       |      // created from the topology split event.
  710|  51.8k|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  51.8k|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 137, False: 51.7k]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|    137|        active_corner_stack.push_back(it->second);
  714|    137|      }
  715|  51.8k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 53, False: 51.8k]
  ------------------
  716|     53|        return -1;
  717|     53|      }
  718|  51.8k|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  51.8k|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 51.8k]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  51.8k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 2, False: 51.8k]
  |  Branch (724:11): [True: 2, False: 51.8k]
  ------------------
  725|  51.8k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 51.8k]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|      2|        return -1;
  729|      2|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  51.8k|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  51.8k|      SetOppositeCorners(corner_a, corner + 2);
  735|  51.8k|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  51.8k|      const VertexIndex vertex_p =
  739|  51.8k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  51.8k|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  51.8k|      corner_table_->MapCornerToVertex(
  742|  51.8k|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  51.8k|      const VertexIndex vert_b_prev =
  744|  51.8k|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  51.8k|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  51.8k|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  51.8k|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  51.8k|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  51.8k|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  51.8k|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  51.8k|                                       corner_table_->LeftMostCorner(vertex_n));
  753|       |
  754|       |      // Also update the vertex id at corner "n" and all corners that are
  755|       |      // connected to it in the CCW direction.
  756|  51.8k|      const CornerIndex first_corner = corner_n;
  757|   387k|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 335k, False: 51.8k]
  ------------------
  758|   335k|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|   335k|        corner_n = corner_table_->SwingLeft(corner_n);
  760|   335k|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 1, False: 335k]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      1|          return -1;
  764|      1|        }
  765|   335k|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  51.8k|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  51.8k|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 51.3k, False: 475]
  ------------------
  770|  51.3k|        invalid_vertices.push_back(vertex_n);
  771|  51.3k|      }
  772|  51.8k|      active_corner_stack.back() = corner;
  773|  11.8M|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 11.8M, False: 277]
  ------------------
  774|  11.8M|      const CornerIndex corner(3 * face.value());
  775|  11.8M|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  11.8M|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  11.8M|      corner_table_->MapCornerToVertex(corner + 1,
  779|  11.8M|                                       corner_table_->AddNewVertex());
  780|  11.8M|      corner_table_->MapCornerToVertex(corner + 2,
  781|  11.8M|                                       corner_table_->AddNewVertex());
  782|       |
  783|  11.8M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 12, False: 11.8M]
  ------------------
  784|     12|        return -1;  // Unexpected number of decoded vertices.
  785|     12|      }
  786|       |
  787|  11.8M|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  11.8M|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  11.8M|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  11.8M|      active_corner_stack.push_back(corner);
  792|  11.8M|      check_topology_split = true;
  793|  11.8M|    } else {
  794|       |      // Error. Unknown symbol decoded.
  795|    277|      return -1;
  796|    277|    }
  797|       |    // Inform the traversal decoder that a new corner has been reached.
  798|  97.6M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  97.6M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 88.3M, False: 9.33M]
  ------------------
  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|  88.3M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  88.3M|      EdgeFaceName split_edge;
  812|  88.3M|      int encoder_split_symbol_id;
  813|  88.3M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 3.44k, False: 88.3M]
  ------------------
  814|  88.3M|                             &encoder_split_symbol_id)) {
  815|  3.44k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 62, False: 3.37k]
  ------------------
  816|     62|          return -1;  // Wrong split symbol id.
  817|     62|        }
  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|  3.37k|        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|  3.37k|        CornerIndex new_active_corner;
  831|  3.37k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 1.45k, False: 1.92k]
  ------------------
  832|  1.45k|          new_active_corner = corner_table_->Next(act_top_corner);
  833|  1.92k|        } else {
  834|  1.92k|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|  1.92k|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  3.37k|        const int decoder_split_symbol_id =
  839|  3.37k|            num_symbols - encoder_split_symbol_id - 1;
  840|  3.37k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  3.37k|            new_active_corner;
  842|  3.37k|      }
  843|  88.3M|    }
  844|  97.6M|  }
  845|    518|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 518]
  ------------------
  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|  9.16M|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 9.16M, False: 454]
  ------------------
  850|  9.16M|    const CornerIndex corner = active_corner_stack.back();
  851|  9.16M|    active_corner_stack.pop_back();
  852|  9.16M|    const bool interior_face =
  853|  9.16M|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  9.16M|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 3.56M, False: 5.60M]
  ------------------
  855|       |      // The start face is interior, we need to find three corners that are
  856|       |      // opposite to it. The first opposite corner "a" is the corner from the
  857|       |      // top of the active corner stack and the remaining two corners "b" and
  858|       |      // "c" are then the next corners from the left-most corners of vertices
  859|       |      // "n" and "x" respectively.
  860|       |      //
  861|       |      //           *-------*
  862|       |      //          / \     / \
  863|       |      //         /   \   /   \
  864|       |      //        /     \ /     \
  865|       |      //       *-------p-------*
  866|       |      //      / \a    . .    c/ \
  867|       |      //     /   \   .   .   /   \
  868|       |      //    /     \ .  I  . /     \
  869|       |      //   *-------n.......x------*
  870|       |      //    \     / \     / \     /
  871|       |      //     \   /   \   /   \   /
  872|       |      //      \ /     \b/     \ /
  873|       |      //       *-------*-------*
  874|       |      //
  875|       |
  876|  3.56M|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 43, False: 3.56M]
  ------------------
  877|     43|        return -1;  // More faces than expected added to the mesh.
  878|     43|      }
  879|       |
  880|  3.56M|      const CornerIndex corner_a = corner;
  881|  3.56M|      const VertexIndex vert_n =
  882|  3.56M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  3.56M|      const CornerIndex corner_b =
  884|  3.56M|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  3.56M|      const VertexIndex vert_x =
  887|  3.56M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  3.56M|      const CornerIndex corner_c =
  889|  3.56M|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  3.56M|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 1, False: 3.56M]
  |  Branch (891:33): [True: 7, False: 3.56M]
  |  Branch (891:55): [True: 0, False: 3.56M]
  ------------------
  892|       |        // All matched corners must be different.
  893|      8|        return -1;
  894|      8|      }
  895|  3.56M|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 3, False: 3.56M]
  |  Branch (895:11): [True: 13, False: 3.56M]
  ------------------
  896|  3.56M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 4, False: 3.56M]
  ------------------
  897|  3.56M|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 6, False: 3.56M]
  ------------------
  898|       |        // One of the corners is already opposite to an existing face, which
  899|       |        // should not happen unless the input was tampered with.
  900|     13|        return -1;
  901|     13|      }
  902|       |
  903|  3.56M|      const VertexIndex vert_p =
  904|  3.56M|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  3.56M|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  3.56M|      const CornerIndex new_corner(3 * face.value());
  909|  3.56M|      SetOppositeCorners(new_corner, corner);
  910|  3.56M|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  3.56M|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  3.56M|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  3.56M|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  3.56M|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|  14.2M|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 10.6M, False: 3.56M]
  ------------------
  920|  10.6M|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|  10.6M|      }
  922|       |
  923|  3.56M|      init_face_configurations_.push_back(true);
  924|  3.56M|      init_corners_.push_back(new_corner);
  925|  5.60M|    } 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|  5.60M|      init_face_configurations_.push_back(false);
  930|  5.60M|      init_corners_.push_back(corner);
  931|  5.60M|    }
  932|  9.16M|  }
  933|    454|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 124, False: 330]
  ------------------
  934|    124|    return -1;  // Unexpected number of decoded faces.
  935|    124|  }
  936|       |
  937|    330|  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|  6.16k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 6.16k, False: 325]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  6.16k|    VertexIndex src_vert(num_vertices - 1);
  943|  7.10k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 937, False: 6.16k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|    937|      src_vert = VertexIndex(--num_vertices - 1);
  946|    937|    }
  947|  6.16k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 793, False: 5.37k]
  ------------------
  948|    793|      continue;  // No need to swap anything.
  949|    793|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  5.37k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  22.5k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 17.1k, False: 5.36k]
  ------------------
  954|  17.1k|      const CornerIndex cid = vcit.Corner();
  955|  17.1k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 5, False: 17.1k]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      5|        return -1;
  959|      5|      }
  960|  17.1k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  17.1k|    }
  962|  5.36k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  5.36k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  5.36k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  5.36k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  5.36k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  5.36k|    num_vertices--;
  972|  5.36k|  }
  973|    325|  return num_vertices;
  974|    330|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  3.00k|    DecoderBuffer* decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  3.00k|  uint32_t num_topology_splits;
  982|  3.00k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  3.00k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.00k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 455, False: 2.54k]
  ------------------
  984|    455|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 1, False: 454]
  ------------------
  985|      1|      return -1;
  986|      1|    }
  987|       |
  988|    455|  } else
  989|  2.54k|#endif
  990|  2.54k|  {
  991|  2.54k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 2.54k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  2.54k|  }
  995|  2.99k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 649, False: 2.35k]
  ------------------
  996|    649|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 24, False: 625]
  ------------------
  997|    649|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|     24|      return -1;
  999|     24|    }
 1000|    625|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|    625|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    625|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 58, False: 567]
  ------------------
 1002|   172k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 172k, False: 10]
  ------------------
 1003|   172k|        TopologySplitEventData event_data;
 1004|   172k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 29, False: 172k]
  ------------------
 1005|     29|          return -1;
 1006|     29|        }
 1007|   172k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 15, False: 172k]
  ------------------
 1008|     15|          return -1;
 1009|     15|        }
 1010|   172k|        uint8_t edge_data;
 1011|   172k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 4, False: 172k]
  ------------------
 1012|      4|          return -1;
 1013|      4|        }
 1014|   172k|        event_data.source_edge = edge_data & 1;
 1015|   172k|        topology_split_data_.push_back(event_data);
 1016|   172k|      }
 1017|       |
 1018|     58|    } else
 1019|    567|#endif
 1020|    567|    {
 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|    567|      int last_source_symbol_id = 0;
 1024|   608k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 608k, False: 546]
  ------------------
 1025|   608k|        TopologySplitEventData event_data;
 1026|   608k|        uint32_t delta;
 1027|   608k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 16, False: 608k]
  ------------------
 1028|     16|          return -1;
 1029|     16|        }
 1030|   608k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|   608k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 4, False: 608k]
  ------------------
 1032|      4|          return -1;
 1033|      4|        }
 1034|   608k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 1, False: 608k]
  ------------------
 1035|      1|          return -1;
 1036|      1|        }
 1037|   608k|        event_data.split_symbol_id =
 1038|   608k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|   608k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|   608k|        topology_split_data_.push_back(event_data);
 1041|   608k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|    546|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  5.92k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 5.37k, False: 546]
  ------------------
 1045|  5.37k|        uint32_t edge_data;
 1046|  5.37k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  5.37k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 743, False: 4.63k]
  ------------------
 1047|    743|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  4.63k|        } else {
 1049|  4.63k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  4.63k|        }
 1051|  5.37k|        TopologySplitEventData& event_data = topology_split_data_[i];
 1052|  5.37k|        event_data.source_edge = edge_data & 1;
 1053|  5.37k|      }
 1054|    546|      decoder_buffer->EndBitDecoding();
 1055|    546|    }
 1056|    625|  }
 1057|  2.90k|  uint32_t num_hole_events = 0;
 1058|  2.90k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  2.90k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.90k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 380, False: 2.52k]
  ------------------
 1060|    380|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 3, False: 377]
  ------------------
 1061|      3|      return -1;
 1062|      3|    }
 1063|  2.52k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  2.52k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 158, False: 2.36k]
  ------------------
 1064|    158|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 6, False: 152]
  ------------------
 1065|      6|      return -1;
 1066|      6|    }
 1067|    158|  }
 1068|  2.89k|#endif
 1069|  2.89k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 85, False: 2.81k]
  ------------------
 1070|     85|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     85|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     85|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 42, False: 43]
  ------------------
 1072|   212k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 212k, False: 3]
  ------------------
 1073|   212k|        HoleEventData event_data;
 1074|   212k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 39, False: 212k]
  ------------------
 1075|     39|          return -1;
 1076|     39|        }
 1077|   212k|        hole_event_data_.push_back(event_data);
 1078|   212k|      }
 1079|       |
 1080|     42|    } else
 1081|     43|#endif
 1082|     43|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     43|      int last_symbol_id = 0;
 1085|  51.6k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 51.5k, False: 10]
  ------------------
 1086|  51.5k|        HoleEventData event_data;
 1087|  51.5k|        uint32_t delta;
 1088|  51.5k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 33, False: 51.5k]
  ------------------
 1089|     33|          return -1;
 1090|     33|        }
 1091|  51.5k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  51.5k|        last_symbol_id = event_data.symbol_id;
 1093|  51.5k|        hole_event_data_.push_back(event_data);
 1094|  51.5k|      }
 1095|     43|    }
 1096|     85|  }
 1097|  2.82k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  2.89k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|     10|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|     10|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|     10|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|     40|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 30, False: 10]
  ------------------
 1109|     30|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|     30|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 10, False: 20]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|     20|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 10, False: 10]
  ------------------
 1114|     10|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|     10|      }
 1116|     10|      continue;
 1117|     10|    }
 1118|       |
 1119|     40|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 20, False: 20]
  ------------------
 1120|     20|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|     20|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 10, False: 10]
  ------------------
 1122|     10|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|     10|      }
 1124|     20|    }
 1125|     20|  }
 1126|     10|  return true;
 1127|     10|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|   751k|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|   751k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|   751k|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|   751k|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  3.00M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 2.25M, False: 751k]
  ------------------
 1139|  2.25M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  2.25M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 478k, False: 1.77M]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|  1.36M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 888k, False: 478k]
  ------------------
 1144|   888k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   888k|      }
 1146|   478k|      continue;
 1147|   478k|    }
 1148|  1.77M|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|  1.77M|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 888k, False: 888k]
  ------------------
 1151|   888k|      continue;
 1152|   888k|    }
 1153|       |
 1154|  2.56M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 1.67M, False: 888k]
  ------------------
 1155|  1.67M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  1.67M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 1.10M, False: 564k]
  ------------------
 1157|  1.10M|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|  1.10M|      }
 1159|  1.67M|    }
 1160|   888k|  }
 1161|   751k|  return true;
 1162|   751k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE21AssignPointsToCornersEi:
 1166|    325|    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|    325|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|    325|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 101, False: 224]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|   193k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 193k, False: 101]
  ------------------
 1176|   193k|      Mesh::Face face;
 1177|   193k|      const CornerIndex start_corner(3 * f.value());
 1178|   772k|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 579k, False: 193k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|   579k|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|   579k|        face[c] = vert_id;
 1182|   579k|      }
 1183|   193k|      decoder_->mesh()->SetFace(f, face);
 1184|   193k|    }
 1185|    101|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|    101|    return true;
 1187|    101|  }
 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|    224|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|    224|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|   621k|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 621k, False: 207]
  ------------------
 1197|   621k|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|   621k|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 79, False: 620k]
  ------------------
 1199|     79|      continue;  // Isolated vertex.
 1200|     79|    }
 1201|   620k|    CornerIndex deduplication_first_corner = c;
 1202|   620k|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 478k, False: 142k]
  ------------------
 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|   478k|      deduplication_first_corner = c;
 1206|   478k|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|   213k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 182k, False: 31.7k]
  ------------------
 1210|   182k|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 65.6k, False: 116k]
  ------------------
 1211|  65.6k|          continue;  // No seam for this attribute, ignore it.
 1212|  65.6k|        }
 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|   116k|        const VertexIndex vert_id =
 1217|   116k|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|   116k|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|   116k|        bool seam_found = false;
 1220|   155k|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 149k, False: 5.37k]
  ------------------
 1221|   149k|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 17, False: 149k]
  ------------------
 1222|     17|            return false;
 1223|     17|          }
 1224|   149k|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 111k, False: 38.6k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|   111k|            deduplication_first_corner = act_c;
 1227|   111k|            seam_found = true;
 1228|   111k|            break;
 1229|   111k|          }
 1230|  38.6k|          act_c = corner_table_->SwingRight(act_c);
 1231|  38.6k|        }
 1232|   116k|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 111k, False: 5.37k]
  ------------------
 1233|   111k|          break;  // No reason to process other attributes if we found a seam.
 1234|   111k|        }
 1235|   116k|      }
 1236|   142k|    }
 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|   620k|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|   620k|    corner_to_point_map[c.value()] =
 1246|   620k|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|   620k|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|   620k|    CornerIndex prev_c = c;
 1250|   620k|    c = corner_table_->SwingRight(c);
 1251|  2.18M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 1.70M, False: 478k]
  |  Branch (1251:40): [True: 1.56M, False: 142k]
  ------------------
 1252|  1.56M|      bool attribute_seam = false;
 1253|  2.49M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 2.09M, False: 396k]
  ------------------
 1254|  2.09M|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 1.16M, False: 931k]
  ------------------
 1255|  2.09M|            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.16M|          attribute_seam = true;
 1259|  1.16M|          break;
 1260|  1.16M|        }
 1261|  2.09M|      }
 1262|  1.56M|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 1.16M, False: 396k]
  ------------------
 1263|  1.16M|        corner_to_point_map[c.value()] =
 1264|  1.16M|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|  1.16M|        point_to_corner_map.push_back(c.value());
 1266|  1.16M|      } else {
 1267|   396k|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|   396k|      }
 1269|  1.56M|      prev_c = c;
 1270|  1.56M|      c = corner_table_->SwingRight(c);
 1271|  1.56M|    }
 1272|   620k|  }
 1273|       |  // Add faces.
 1274|   617k|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 617k, False: 207]
  ------------------
 1275|   617k|    Mesh::Face face;
 1276|  2.47M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 1.85M, False: 617k]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|  1.85M|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|  1.85M|    }
 1280|   617k|    decoder_->mesh()->SetFace(f, face);
 1281|   617k|  }
 1282|    207|  decoder_->point_cloud()->set_num_points(
 1283|    207|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|    207|  return true;
 1285|    224|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    410|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|    410|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    410|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    410|  const Mesh* mesh = decoder_->mesh();
  115|    410|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    410|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    410|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    410|                           encoding_data);
  120|       |
  121|    410|  TraverserT att_traverser;
  122|    410|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    410|  traversal_sequencer->SetTraverser(att_traverser);
  125|    410|  return std::move(traversal_sequencer);
  126|    410|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|  2.05k|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|  2.05k|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|  2.05k|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|  2.05k|  const Mesh* mesh = decoder_->mesh();
  115|  2.05k|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|  2.05k|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|  2.05k|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|  2.05k|                           encoding_data);
  120|       |
  121|  2.05k|  TraverserT att_traverser;
  122|  2.05k|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|  2.05k|  traversal_sequencer->SetTraverser(att_traverser);
  125|  2.05k|  return std::move(traversal_sequencer);
  126|  2.05k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    258|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|    258|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    258|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    258|  const Mesh* mesh = decoder_->mesh();
  115|    258|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    258|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    258|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    258|                           encoding_data);
  120|       |
  121|    258|  TraverserT att_traverser;
  122|    258|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    258|  traversal_sequencer->SetTraverser(att_traverser);
  125|    258|  return std::move(traversal_sequencer);
  126|    258|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    528|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|    528|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    528|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    528|  const Mesh* mesh = decoder_->mesh();
  115|    528|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    528|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    528|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    528|                           encoding_data);
  120|       |
  121|    528|  TraverserT att_traverser;
  122|    528|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    528|  traversal_sequencer->SetTraverser(att_traverser);
  125|    528|  return std::move(traversal_sequencer);
  126|    528|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|     48|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|     48|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|     48|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|     48|  const Mesh* mesh = decoder_->mesh();
  115|     48|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|     48|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|     48|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|     48|                           encoding_data);
  120|       |
  121|     48|  TraverserT att_traverser;
  122|     48|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|     48|  traversal_sequencer->SetTraverser(att_traverser);
  125|     48|  return std::move(traversal_sequencer);
  126|     48|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    119|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|    119|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    119|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    119|  const Mesh* mesh = decoder_->mesh();
  115|    119|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    119|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    119|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    119|                           encoding_data);
  120|       |
  121|    119|  TraverserT att_traverser;
  122|    119|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    119|  traversal_sequencer->SetTraverser(att_traverser);
  125|    119|  return std::move(traversal_sequencer);
  126|    119|}

_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE10GetDecoderEv:
   65|  15.9k|  MeshEdgebreakerDecoder* GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE14GetCornerTableEv:
   66|  5.82k|  const CornerTable* GetCornerTable() const override {
   67|  5.82k|    return corner_table_.get();
   68|  5.82k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  18.1M|                       int* out_encoder_split_symbol_id) {
   87|  18.1M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 1.15M, False: 17.0M]
  ------------------
   88|  1.15M|      return false;
   89|  1.15M|    }
   90|  17.0M|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 48, False: 17.0M]
  ------------------
   91|  17.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|     48|      *out_encoder_split_symbol_id = -1;
   98|     48|      return true;
   99|     48|    }
  100|  17.0M|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 17.0M, False: 2.47k]
  ------------------
  101|  17.0M|      return false;
  102|  17.0M|    }
  103|  2.47k|    *out_face_edge =
  104|  2.47k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  2.47k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  2.47k|    topology_split_data_.pop_back();
  108|  2.47k|    return true;
  109|  17.0M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  59.3M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  59.3M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  59.3M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  59.3M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE13AttributeDataC2Ev:
  210|  22.4k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE10GetDecoderEv:
   65|  6.74k|  MeshEdgebreakerDecoder* GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE14GetCornerTableEv:
   66|  4.61k|  const CornerTable* GetCornerTable() const override {
   67|  4.61k|    return corner_table_.get();
   68|  4.61k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  54.0M|                       int* out_encoder_split_symbol_id) {
   87|  54.0M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 53.4M, False: 629k]
  ------------------
   88|  53.4M|      return false;
   89|  53.4M|    }
   90|   629k|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 28, False: 629k]
  ------------------
   91|   629k|        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|     28|      *out_encoder_split_symbol_id = -1;
   98|     28|      return true;
   99|     28|    }
  100|   629k|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 627k, False: 2.64k]
  ------------------
  101|   627k|      return false;
  102|   627k|    }
  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|   629k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|   159M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|   159M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|   159M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|   159M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE13AttributeDataC2Ev:
  210|  14.8k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE10GetDecoderEv:
   65|  15.5k|  MeshEdgebreakerDecoder* GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE14GetCornerTableEv:
   66|  3.18k|  const CornerTable* GetCornerTable() const override {
   67|  3.18k|    return corner_table_.get();
   68|  3.18k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  88.3M|                       int* out_encoder_split_symbol_id) {
   87|  88.3M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 71.3M, False: 17.0M]
  ------------------
   88|  71.3M|      return false;
   89|  71.3M|    }
   90|  17.0M|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 62, False: 17.0M]
  ------------------
   91|  17.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|     62|      *out_encoder_split_symbol_id = -1;
   98|     62|      return true;
   99|     62|    }
  100|  17.0M|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 17.0M, False: 3.37k]
  ------------------
  101|  17.0M|      return false;
  102|  17.0M|    }
  103|  3.37k|    *out_face_edge =
  104|  3.37k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  3.37k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  3.37k|    topology_split_data_.pop_back();
  108|  3.37k|    return true;
  109|  17.0M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|   105M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|   105M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|   105M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|   105M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE13AttributeDataC2Ev:
  210|  18.7k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}

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

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

_ZN5draco31MeshEdgebreakerTraversalDecoderC2Ev:
   33|  11.0k|      : attribute_connectivity_decoders_(nullptr),
   34|  11.0k|        num_attribute_data_(0),
   35|  11.0k|        decoder_impl_(nullptr) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder4InitEPNS_35MeshEdgebreakerDecoderImplInterfaceE:
   36|  10.3k|  void Init(MeshEdgebreakerDecoderImplInterface* decoder) {
   37|  10.3k|    decoder_impl_ = decoder;
   38|  10.3k|    buffer_.Init(decoder->GetDecoder()->buffer()->data_head(),
   39|  10.3k|                 decoder->GetDecoder()->buffer()->remaining_size(),
   40|  10.3k|                 decoder->GetDecoder()->buffer()->bitstream_version());
   41|  10.3k|  }
_ZNK5draco31MeshEdgebreakerTraversalDecoder16BitstreamVersionEv:
   44|  7.07k|  uint16_t BitstreamVersion() const {
   45|  7.07k|    return decoder_impl_->GetDecoder()->bitstream_version();
   46|  7.07k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder21SetNumEncodedVerticesEi:
   50|  5.31k|  void SetNumEncodedVertices(int /* num_vertices */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19SetNumAttributeDataEi:
   54|  10.3k|  void SetNumAttributeData(int num_data) { num_attribute_data_ = num_data; }
_ZN5draco31MeshEdgebreakerTraversalDecoder5StartEPNS_13DecoderBufferE:
   59|  7.56k|  bool Start(DecoderBuffer* out_buffer) {
   60|       |    // Decode symbols from the main buffer decoder and face configurations from
   61|       |    // the start_face_buffer decoder.
   62|  7.56k|    if (!DecodeTraversalSymbols()) {
  ------------------
  |  Branch (62:9): [True: 50, False: 7.51k]
  ------------------
   63|     50|      return false;
   64|     50|    }
   65|       |
   66|  7.51k|    if (!DecodeStartFaces()) {
  ------------------
  |  Branch (66:9): [True: 122, False: 7.39k]
  ------------------
   67|    122|      return false;
   68|    122|    }
   69|       |
   70|  7.39k|    if (!DecodeAttributeSeams()) {
  ------------------
  |  Branch (70:9): [True: 44, False: 7.34k]
  ------------------
   71|     44|      return false;
   72|     44|    }
   73|  7.34k|    *out_buffer = buffer_;
   74|  7.34k|    return true;
   75|  7.39k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder28DecodeStartFaceConfigurationEv:
   78|  9.24M|  inline bool DecodeStartFaceConfiguration() {
   79|  9.24M|    uint32_t face_configuration;
   80|  9.24M|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   81|  9.24M|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  9.24M|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (81:9): [True: 1.74k, False: 9.24M]
  ------------------
   82|  1.74k|      start_face_buffer_.DecodeLeastSignificantBits32(1, &face_configuration);
   83|       |
   84|  1.74k|    } else
   85|  9.24M|#endif
   86|  9.24M|    {
   87|  9.24M|      face_configuration = start_face_decoder_.DecodeNextBit();
   88|  9.24M|    }
   89|  9.24M|    return face_configuration;
   90|  9.24M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder12DecodeSymbolEv:
   93|  41.3M|  inline uint32_t DecodeSymbol() {
   94|  41.3M|    uint32_t symbol;
   95|  41.3M|    symbol_buffer_.DecodeLeastSignificantBits32(1, &symbol);
   96|  41.3M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (96:9): [True: 18.5M, False: 22.8M]
  ------------------
   97|  18.5M|      return symbol;
   98|  18.5M|    }
   99|       |    // Else decode two additional bits.
  100|  22.8M|    uint32_t symbol_suffix;
  101|  22.8M|    symbol_buffer_.DecodeLeastSignificantBits32(2, &symbol_suffix);
  102|  22.8M|    symbol |= (symbol_suffix << 1);
  103|  22.8M|    return symbol;
  104|  41.3M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder22NewActiveCornerReachedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  40.9M|  inline void NewActiveCornerReached(CornerIndex /* corner */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder13MergeVerticesENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_:
  111|  4.43M|  inline void MergeVertices(VertexIndex /* dest */, VertexIndex /* source */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19DecodeAttributeSeamEi:
  117|  27.3M|  inline bool DecodeAttributeSeam(int attribute) {
  118|  27.3M|    return attribute_connectivity_decoders_[attribute].DecodeNextBit();
  119|  27.3M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder4DoneEv:
  122|  6.99k|  void Done() {
  123|  6.99k|    if (symbol_buffer_.bit_decoder_active()) {
  ------------------
  |  Branch (123:9): [True: 6.67k, False: 320]
  ------------------
  124|  6.67k|      symbol_buffer_.EndBitDecoding();
  125|  6.67k|    }
  126|  6.99k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  127|  6.99k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  6.99k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (127:9): [True: 705, False: 6.28k]
  ------------------
  128|    705|      start_face_buffer_.EndBitDecoding();
  129|       |
  130|    705|    } else
  131|  6.28k|#endif
  132|  6.28k|    {
  133|  6.28k|      start_face_decoder_.EndDecoding();
  134|  6.28k|    }
  135|  6.99k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder6bufferEv:
  138|  2.65k|  DecoderBuffer* buffer() { return &buffer_; }
_ZN5draco31MeshEdgebreakerTraversalDecoder22DecodeTraversalSymbolsEv:
  140|  8.04k|  bool DecodeTraversalSymbols() {
  141|  8.04k|    uint64_t traversal_size;
  142|  8.04k|    symbol_buffer_ = buffer_;
  143|  8.04k|    if (!symbol_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (143:9): [True: 26, False: 8.01k]
  ------------------
  144|     26|      return false;
  145|     26|    }
  146|  8.01k|    buffer_ = symbol_buffer_;
  147|  8.01k|    if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (147:9): [True: 54, False: 7.96k]
  ------------------
  148|     54|      return false;
  149|     54|    }
  150|  7.96k|    buffer_.Advance(traversal_size);
  151|  7.96k|    return true;
  152|  8.01k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder16DecodeStartFacesEv:
  154|  10.3k|  bool DecodeStartFaces() {
  155|       |    // Create a decoder that is set to the end of the encoded traversal data.
  156|  10.3k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  157|  10.3k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  10.3k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (157:9): [True: 1.32k, False: 8.98k]
  ------------------
  158|  1.32k|      start_face_buffer_ = buffer_;
  159|  1.32k|      uint64_t traversal_size;
  160|  1.32k|      if (!start_face_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (160:11): [True: 8, False: 1.31k]
  ------------------
  161|      8|        return false;
  162|      8|      }
  163|  1.31k|      buffer_ = start_face_buffer_;
  164|  1.31k|      if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (164:11): [True: 215, False: 1.10k]
  ------------------
  165|    215|        return false;
  166|    215|      }
  167|  1.10k|      buffer_.Advance(traversal_size);
  168|  1.10k|      return true;
  169|  1.31k|    }
  170|  8.98k|#endif
  171|  8.98k|    return start_face_decoder_.StartDecoding(&buffer_);
  172|  10.3k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder20DecodeAttributeSeamsEv:
  174|  10.0k|  bool DecodeAttributeSeams() {
  175|       |    // Prepare attribute decoding.
  176|  10.0k|    if (num_attribute_data_ > 0) {
  ------------------
  |  Branch (176:9): [True: 7.09k, False: 2.97k]
  ------------------
  177|  7.09k|      attribute_connectivity_decoders_ = std::unique_ptr<BinaryDecoder[]>(
  178|  7.09k|          new BinaryDecoder[num_attribute_data_]);
  179|  22.1k|      for (int i = 0; i < num_attribute_data_; ++i) {
  ------------------
  |  Branch (179:23): [True: 15.0k, False: 7.03k]
  ------------------
  180|  15.0k|        if (!attribute_connectivity_decoders_[i].StartDecoding(&buffer_)) {
  ------------------
  |  Branch (180:13): [True: 59, False: 15.0k]
  ------------------
  181|     59|          return false;
  182|     59|        }
  183|  15.0k|      }
  184|  7.09k|    }
  185|  10.0k|    return true;
  186|  10.0k|  }

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

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

_ZN5draco21MeshSequentialDecoderC2Ev:
   27|  4.09k|MeshSequentialDecoder::MeshSequentialDecoder() = default;
_ZN5draco21MeshSequentialDecoder18DecodeConnectivityEv:
   29|  3.63k|bool MeshSequentialDecoder::DecodeConnectivity() {
   30|  3.63k|  uint32_t num_faces;
   31|  3.63k|  uint32_t num_points;
   32|  3.63k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   33|  3.63k|  if (bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.63k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (33:7): [True: 318, False: 3.32k]
  ------------------
   34|    318|    if (!buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (34:9): [True: 0, False: 318]
  ------------------
   35|      0|      return false;
   36|      0|    }
   37|    318|    if (!buffer()->Decode(&num_points)) {
  ------------------
  |  Branch (37:9): [True: 0, False: 318]
  ------------------
   38|      0|      return false;
   39|      0|    }
   40|       |
   41|    318|  } else
   42|  3.32k|#endif
   43|  3.32k|  {
   44|  3.32k|    if (!DecodeVarint(&num_faces, buffer())) {
  ------------------
  |  Branch (44:9): [True: 0, False: 3.32k]
  ------------------
   45|      0|      return false;
   46|      0|    }
   47|  3.32k|    if (!DecodeVarint(&num_points, buffer())) {
  ------------------
  |  Branch (47:9): [True: 0, False: 3.32k]
  ------------------
   48|      0|      return false;
   49|      0|    }
   50|  3.32k|  }
   51|       |
   52|       |  // Check that num_faces and num_points are valid values.
   53|  3.63k|  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.63k|  if (faces_64 > 0xffffffff / 3) {
  ------------------
  |  Branch (55:7): [True: 0, False: 3.63k]
  ------------------
   56|      0|    return false;
   57|      0|  }
   58|  3.63k|  if (faces_64 > buffer()->remaining_size() / 3) {
  ------------------
  |  Branch (58:7): [True: 9, False: 3.62k]
  ------------------
   59|       |    // The number of faces is unreasonably high, because face indices do not
   60|       |    // fit in the remaining size of the buffer.
   61|      9|    return false;
   62|      9|  }
   63|  3.62k|  uint8_t connectivity_method;
   64|  3.62k|  if (!buffer()->Decode(&connectivity_method)) {
  ------------------
  |  Branch (64:7): [True: 0, False: 3.62k]
  ------------------
   65|      0|    return false;
   66|      0|  }
   67|  3.62k|  if (connectivity_method == 0) {
  ------------------
  |  Branch (67:7): [True: 2.29k, False: 1.33k]
  ------------------
   68|  2.29k|    if (!DecodeAndDecompressIndices(num_faces, num_points)) {
  ------------------
  |  Branch (68:9): [True: 2.05k, False: 235]
  ------------------
   69|  2.05k|      return false;
   70|  2.05k|    }
   71|  2.29k|  } else {
   72|  1.33k|    if (num_points < 256) {
  ------------------
  |  Branch (72:9): [True: 1.10k, False: 231]
  ------------------
   73|       |      // Decode indices as uint8_t.
   74|  1.69k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (74:28): [True: 604, False: 1.09k]
  ------------------
   75|    604|        Mesh::Face face;
   76|  2.40k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (76:25): [True: 1.80k, False: 595]
  ------------------
   77|  1.80k|          uint8_t val;
   78|  1.80k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (78:15): [True: 3, False: 1.80k]
  ------------------
   79|      3|            return false;
   80|      3|          }
   81|  1.80k|          if (val >= num_points) {
  ------------------
  |  Branch (81:15): [True: 6, False: 1.79k]
  ------------------
   82|      6|            return false;
   83|      6|          }
   84|  1.79k|          face[j] = val;
   85|  1.79k|        }
   86|    595|        mesh()->AddFace(face);
   87|    595|      }
   88|  1.10k|    } else if (num_points < (1 << 16)) {
  ------------------
  |  Branch (88:16): [True: 85, False: 146]
  ------------------
   89|       |      // Decode indices as uint16_t.
   90|    682|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:28): [True: 628, False: 54]
  ------------------
   91|    628|        Mesh::Face face;
   92|  2.43k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (92:25): [True: 1.84k, False: 597]
  ------------------
   93|  1.84k|          uint16_t val;
   94|  1.84k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (94:15): [True: 12, False: 1.82k]
  ------------------
   95|     12|            return false;
   96|     12|          }
   97|  1.82k|          if (val >= num_points) {
  ------------------
  |  Branch (97:15): [True: 19, False: 1.81k]
  ------------------
   98|     19|            return false;
   99|     19|          }
  100|  1.81k|          face[j] = val;
  101|  1.81k|        }
  102|    597|        mesh()->AddFace(face);
  103|    597|      }
  104|    146|    } else if (num_points < (1 << 21) &&
  ------------------
  |  Branch (104:16): [True: 67, False: 79]
  ------------------
  105|     67|               bitstream_version() >= DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|     67|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (105:16): [True: 67, False: 0]
  ------------------
  106|       |      // Decode indices as uint32_t.
  107|    811|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (107:28): [True: 780, False: 31]
  ------------------
  108|    780|        Mesh::Face face;
  109|  3.04k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (109:25): [True: 2.30k, False: 744]
  ------------------
  110|  2.30k|          uint32_t val;
  111|  2.30k|          if (!DecodeVarint(&val, buffer())) {
  ------------------
  |  Branch (111:15): [True: 8, False: 2.29k]
  ------------------
  112|      8|            return false;
  113|      8|          }
  114|  2.29k|          if (val >= num_points) {
  ------------------
  |  Branch (114:15): [True: 28, False: 2.26k]
  ------------------
  115|     28|            return false;
  116|     28|          }
  117|  2.26k|          face[j] = val;
  118|  2.26k|        }
  119|    744|        mesh()->AddFace(face);
  120|    744|      }
  121|     79|    } else {
  122|       |      // Decode faces as uint32_t (default).
  123|  16.7k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (123:28): [True: 16.7k, False: 36]
  ------------------
  124|  16.7k|        Mesh::Face face;
  125|  66.9k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (125:25): [True: 50.2k, False: 16.7k]
  ------------------
  126|  50.2k|          uint32_t val;
  127|  50.2k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (127:15): [True: 18, False: 50.2k]
  ------------------
  128|     18|            return false;
  129|     18|          }
  130|  50.2k|          if (val >= num_points) {
  ------------------
  |  Branch (130:15): [True: 25, False: 50.2k]
  ------------------
  131|     25|            return false;
  132|     25|          }
  133|  50.2k|          face[j] = val;
  134|  50.2k|        }
  135|  16.7k|        mesh()->AddFace(face);
  136|  16.7k|      }
  137|     79|    }
  138|  1.33k|  }
  139|  1.45k|  point_cloud()->set_num_points(num_points);
  140|  1.45k|  return true;
  141|  3.62k|}
_ZN5draco21MeshSequentialDecoder23CreateAttributesDecoderEi:
  143|  33.3k|bool MeshSequentialDecoder::CreateAttributesDecoder(int32_t att_decoder_id) {
  144|       |  // Always create the basic attribute decoder.
  145|  33.3k|  return SetAttributesDecoder(
  146|  33.3k|      att_decoder_id,
  147|  33.3k|      std::unique_ptr<AttributesDecoder>(
  148|  33.3k|          new SequentialAttributeDecodersController(
  149|  33.3k|              std::unique_ptr<PointsSequencer>(
  150|  33.3k|                  new LinearSequencer(point_cloud()->num_points())))));
  151|  33.3k|}
_ZN5draco21MeshSequentialDecoder26DecodeAndDecompressIndicesEjj:
  154|  2.29k|                                                       uint32_t num_points) {
  155|       |  // Get decoded indices differences that were encoded with an entropy code.
  156|  2.29k|  std::vector<uint32_t> indices_buffer(num_faces * 3);
  157|  2.29k|  if (!DecodeSymbols(num_faces * 3, 1, buffer(), indices_buffer.data())) {
  ------------------
  |  Branch (157:7): [True: 1.85k, False: 437]
  ------------------
  158|  1.85k|    return false;
  159|  1.85k|  }
  160|       |  // Reconstruct the indices from the differences.
  161|       |  // See MeshSequentialEncoder::CompressAndEncodeIndices() for more details.
  162|    437|  int32_t last_index_value = 0;  // This will always be >= 0.
  163|    437|  int vertex_index = 0;
  164|  5.76k|  for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (164:24): [True: 5.52k, False: 235]
  ------------------
  165|  5.52k|    Mesh::Face face;
  166|  21.6k|    for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (166:21): [True: 16.3k, False: 5.32k]
  ------------------
  167|  16.3k|      const uint32_t encoded_val = indices_buffer[vertex_index++];
  168|  16.3k|      int32_t index_diff = (encoded_val >> 1);
  169|  16.3k|      if (encoded_val & 1) {
  ------------------
  |  Branch (169:11): [True: 760, False: 15.5k]
  ------------------
  170|    760|        if (index_diff > last_index_value) {
  ------------------
  |  Branch (170:13): [True: 70, False: 690]
  ------------------
  171|       |          // Subtracting index_diff would result in a negative index.
  172|     70|          return false;
  173|     70|        }
  174|    690|        index_diff = -index_diff;
  175|  15.5k|      } else {
  176|  15.5k|        if (index_diff >
  ------------------
  |  Branch (176:13): [True: 38, False: 15.5k]
  ------------------
  177|  15.5k|            (std::numeric_limits<int32_t>::max() - last_index_value)) {
  178|       |          // Adding index_diff to last_index_value would overflow.
  179|     38|          return false;
  180|     38|        }
  181|  15.5k|      }
  182|  16.2k|      const int32_t index_value = index_diff + last_index_value;
  183|  16.2k|      if (index_value < 0 || static_cast<uint32_t>(index_value) >= num_points) {
  ------------------
  |  Branch (183:11): [True: 0, False: 16.2k]
  |  Branch (183:30): [True: 94, False: 16.1k]
  ------------------
  184|     94|        return false;
  185|     94|      }
  186|  16.1k|      face[j] = index_value;
  187|  16.1k|      last_index_value = index_value;
  188|  16.1k|    }
  189|  5.32k|    mesh()->AddFace(face);
  190|  5.32k|  }
  191|    235|  return true;
  192|    437|}

_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  2.59k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  2.62M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  2.62M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 2.56M, False: 61.0k]
  ------------------
   61|  2.56M|      return true;  // Already traversed.
   62|  2.56M|    }
   63|       |
   64|  61.0k|    corner_traversal_stack_.clear();
   65|  61.0k|    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|  61.0k|    const VertexIndex next_vert =
   69|  61.0k|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  61.0k|    const VertexIndex prev_vert =
   71|  61.0k|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  61.0k|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 61.0k]
  |  Branch (72:45): [True: 0, False: 61.0k]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  61.0k|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 59.6k, False: 1.37k]
  ------------------
   76|  59.6k|      this->MarkVertexVisited(next_vert);
   77|  59.6k|      this->traversal_observer().OnNewVertexVisited(
   78|  59.6k|          next_vert, this->corner_table()->Next(corner_id));
   79|  59.6k|    }
   80|  61.0k|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 10.7k, False: 50.3k]
  ------------------
   81|  10.7k|      this->MarkVertexVisited(prev_vert);
   82|  10.7k|      this->traversal_observer().OnNewVertexVisited(
   83|  10.7k|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  10.7k|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|   136k|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 75.1k, False: 61.0k]
  ------------------
   88|       |      // Currently processed corner.
   89|  75.1k|      corner_id = corner_traversal_stack_.back();
   90|  75.1k|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  75.1k|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 75.1k]
  |  Branch (92:47): [True: 931, False: 74.2k]
  ------------------
   93|       |        // This face has been already traversed.
   94|    931|        corner_traversal_stack_.pop_back();
   95|    931|        continue;
   96|    931|      }
   97|  2.62M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 2.62M, Folded]
  ------------------
   98|  2.62M|        this->MarkFaceVisited(face_id);
   99|  2.62M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  2.62M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  2.62M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 2.62M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  2.62M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 1.30M, False: 1.32M]
  ------------------
  105|  1.30M|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|  1.30M|          this->MarkVertexVisited(vert_id);
  107|  1.30M|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|  1.30M|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 1.26M, False: 36.5k]
  ------------------
  109|  1.26M|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|  1.26M|            face_id = FaceIndex(corner_id.value() / 3);
  111|  1.26M|            continue;
  112|  1.26M|          }
  113|  1.30M|        }
  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.35M|        const CornerIndex right_corner_id =
  118|  1.35M|            this->corner_table()->GetRightCorner(corner_id);
  119|  1.35M|        const CornerIndex left_corner_id =
  120|  1.35M|            this->corner_table()->GetLeftCorner(corner_id);
  121|  1.35M|        const FaceIndex right_face_id(
  122|  1.35M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 26.8k, False: 1.33M]
  ------------------
  123|  1.35M|                 ? kInvalidFaceIndex
  124|  1.35M|                 : FaceIndex(right_corner_id.value() / 3)));
  125|  1.35M|        const FaceIndex left_face_id(
  126|  1.35M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 65.8k, False: 1.29M]
  ------------------
  127|  1.35M|                 ? kInvalidFaceIndex
  128|  1.35M|                 : FaceIndex(left_corner_id.value() / 3)));
  129|  1.35M|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 1.30M, False: 53.4k]
  ------------------
  130|       |          // Right face has been already visited.
  131|  1.30M|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 67.1k, False: 1.23M]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  67.1k|            corner_traversal_stack_.pop_back();
  134|  67.1k|            break;  // Break from the while (true) loop.
  135|  1.23M|          } else {
  136|       |            // Go to the left face.
  137|  1.23M|            corner_id = left_corner_id;
  138|  1.23M|            face_id = left_face_id;
  139|  1.23M|          }
  140|  1.30M|        } else {
  141|       |          // Right face was not visited.
  142|  53.4k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 46.4k, False: 7.05k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  46.4k|            corner_id = right_corner_id;
  145|  46.4k|            face_id = right_face_id;
  146|  46.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|  7.05k|            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|  7.05k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  7.05k|            break;
  159|  7.05k|          }
  160|  53.4k|        }
  161|  1.35M|      }
  162|  74.2k|    }
  163|  61.0k|    return true;
  164|  61.0k|  }
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  2.59k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  5.41k|  DepthFirstTraverser() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  2.89k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  5.57M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  5.57M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 1.19M, False: 4.38M]
  ------------------
   61|  1.19M|      return true;  // Already traversed.
   62|  1.19M|    }
   63|       |
   64|  4.38M|    corner_traversal_stack_.clear();
   65|  4.38M|    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|  4.38M|    const VertexIndex next_vert =
   69|  4.38M|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  4.38M|    const VertexIndex prev_vert =
   71|  4.38M|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  4.38M|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 4.38M]
  |  Branch (72:45): [True: 0, False: 4.38M]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  4.38M|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 4.37M, False: 1.52k]
  ------------------
   76|  4.37M|      this->MarkVertexVisited(next_vert);
   77|  4.37M|      this->traversal_observer().OnNewVertexVisited(
   78|  4.37M|          next_vert, this->corner_table()->Next(corner_id));
   79|  4.37M|    }
   80|  4.38M|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 4.35M, False: 21.1k]
  ------------------
   81|  4.35M|      this->MarkVertexVisited(prev_vert);
   82|  4.35M|      this->traversal_observer().OnNewVertexVisited(
   83|  4.35M|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  4.35M|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|  8.82M|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 4.44M, False: 4.38M]
  ------------------
   88|       |      // Currently processed corner.
   89|  4.44M|      corner_id = corner_traversal_stack_.back();
   90|  4.44M|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  4.44M|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 4.44M]
  |  Branch (92:47): [True: 4.04k, False: 4.43M]
  ------------------
   93|       |        // This face has been already traversed.
   94|  4.04k|        corner_traversal_stack_.pop_back();
   95|  4.04k|        continue;
   96|  4.04k|      }
   97|  5.57M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 5.57M, Folded]
  ------------------
   98|  5.57M|        this->MarkFaceVisited(face_id);
   99|  5.57M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  5.57M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  5.57M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 5.57M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  5.57M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 4.97M, False: 594k]
  ------------------
  105|  4.97M|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|  4.97M|          this->MarkVertexVisited(vert_id);
  107|  4.97M|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|  4.97M|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 562k, False: 4.41M]
  ------------------
  109|   562k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   562k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   562k|            continue;
  112|   562k|          }
  113|  4.97M|        }
  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|  5.00M|        const CornerIndex right_corner_id =
  118|  5.00M|            this->corner_table()->GetRightCorner(corner_id);
  119|  5.00M|        const CornerIndex left_corner_id =
  120|  5.00M|            this->corner_table()->GetLeftCorner(corner_id);
  121|  5.00M|        const FaceIndex right_face_id(
  122|  5.00M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 4.39M, False: 617k]
  ------------------
  123|  5.00M|                 ? kInvalidFaceIndex
  124|  5.00M|                 : FaceIndex(right_corner_id.value() / 3)));
  125|  5.00M|        const FaceIndex left_face_id(
  126|  5.00M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 4.40M, False: 606k]
  ------------------
  127|  5.00M|                 ? kInvalidFaceIndex
  128|  5.00M|                 : FaceIndex(left_corner_id.value() / 3)));
  129|  5.00M|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 4.94M, False: 61.8k]
  ------------------
  130|       |          // Right face has been already visited.
  131|  4.94M|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 4.40M, False: 540k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  4.40M|            corner_traversal_stack_.pop_back();
  134|  4.40M|            break;  // Break from the while (true) loop.
  135|  4.40M|          } else {
  136|       |            // Go to the left face.
  137|   540k|            corner_id = left_corner_id;
  138|   540k|            face_id = left_face_id;
  139|   540k|          }
  140|  4.94M|        } else {
  141|       |          // Right face was not visited.
  142|  61.8k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 31.4k, False: 30.4k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  31.4k|            corner_id = right_corner_id;
  145|  31.4k|            face_id = right_face_id;
  146|  31.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|  30.4k|            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|  30.4k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  30.4k|            break;
  159|  30.4k|          }
  160|  61.8k|        }
  161|  5.00M|      }
  162|  4.43M|    }
  163|  4.38M|    return true;
  164|  4.38M|  }
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  2.89k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  5.97k|  DepthFirstTraverser() {}

_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   58|    662|  void OnTraversalStart() {
   59|    662|    prediction_degree_.resize(this->corner_table()->num_vertices(), 0);
   60|    662|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   65|  2.74M|  bool TraverseFromCorner(CornerIndex corner_id) {
   66|  2.74M|    if (prediction_degree_.size() == 0) {
  ------------------
  |  Branch (66:9): [True: 0, False: 2.74M]
  ------------------
   67|      0|      return true;
   68|      0|    }
   69|       |
   70|       |    // Traversal starts from the |corner_id|. It's going to follow either the
   71|       |    // right or the left neighboring faces to |corner_id| based on their
   72|       |    // prediction degree.
   73|  2.74M|    traversal_stacks_[0].push_back(corner_id);
   74|  2.74M|    best_priority_ = 0;
   75|       |    // For the first face, check the remaining corners as they may not be
   76|       |    // processed yet.
   77|  2.74M|    const VertexIndex next_vert =
   78|  2.74M|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   79|  2.74M|    const VertexIndex prev_vert =
   80|  2.74M|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   81|  2.74M|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (81:9): [True: 40.1k, False: 2.70M]
  ------------------
   82|  40.1k|      this->MarkVertexVisited(next_vert);
   83|  40.1k|      this->traversal_observer().OnNewVertexVisited(
   84|  40.1k|          next_vert, this->corner_table()->Next(corner_id));
   85|  40.1k|    }
   86|  2.74M|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (86:9): [True: 14.0k, False: 2.73M]
  ------------------
   87|  14.0k|      this->MarkVertexVisited(prev_vert);
   88|  14.0k|      this->traversal_observer().OnNewVertexVisited(
   89|  14.0k|          prev_vert, this->corner_table()->Previous(corner_id));
   90|  14.0k|    }
   91|  2.74M|    const VertexIndex tip_vertex = this->corner_table()->Vertex(corner_id);
   92|  2.74M|    if (!this->IsVertexVisited(tip_vertex)) {
  ------------------
  |  Branch (92:9): [True: 13.7k, False: 2.73M]
  ------------------
   93|  13.7k|      this->MarkVertexVisited(tip_vertex);
   94|  13.7k|      this->traversal_observer().OnNewVertexVisited(tip_vertex, corner_id);
   95|  13.7k|    }
   96|       |    // Start the actual traversal.
   97|  8.10M|    while ((corner_id = PopNextCornerToTraverse()) != kInvalidCornerIndex) {
  ------------------
  |  Branch (97:12): [True: 5.35M, False: 2.74M]
  ------------------
   98|  5.35M|      FaceIndex face_id(corner_id.value() / 3);
   99|       |      // Make sure the face hasn't been visited yet.
  100|  5.35M|      if (this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (100:11): [True: 4.04M, False: 1.30M]
  ------------------
  101|       |        // This face has been already traversed.
  102|  4.04M|        continue;
  103|  4.04M|      }
  104|       |
  105|  2.74M|      while (true) {
  ------------------
  |  Branch (105:14): [True: 2.74M, Folded]
  ------------------
  106|  2.74M|        face_id = FaceIndex(corner_id.value() / 3);
  107|  2.74M|        this->MarkFaceVisited(face_id);
  108|  2.74M|        this->traversal_observer().OnNewFaceVisited(face_id);
  109|       |
  110|       |        // If the newly reached vertex hasn't been visited, mark it and notify
  111|       |        // the observer.
  112|  2.74M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  113|  2.74M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (113:13): [True: 1.36M, False: 1.37M]
  ------------------
  114|  1.36M|          this->MarkVertexVisited(vert_id);
  115|  1.36M|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  116|  1.36M|        }
  117|       |
  118|       |        // Check whether we can traverse to the right and left neighboring
  119|       |        // faces.
  120|  2.74M|        const CornerIndex right_corner_id =
  121|  2.74M|            this->corner_table()->GetRightCorner(corner_id);
  122|  2.74M|        const CornerIndex left_corner_id =
  123|  2.74M|            this->corner_table()->GetLeftCorner(corner_id);
  124|  2.74M|        const FaceIndex right_face_id(
  125|  2.74M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (125:14): [True: 26.1k, False: 2.72M]
  ------------------
  126|  2.74M|                 ? kInvalidFaceIndex
  127|  2.74M|                 : FaceIndex(right_corner_id.value() / 3)));
  128|  2.74M|        const FaceIndex left_face_id(
  129|  2.74M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (129:14): [True: 52.5k, False: 2.69M]
  ------------------
  130|  2.74M|                 ? kInvalidFaceIndex
  131|  2.74M|                 : FaceIndex(left_corner_id.value() / 3)));
  132|  2.74M|        const bool is_right_face_visited = this->IsFaceVisited(right_face_id);
  133|  2.74M|        const bool is_left_face_visited = this->IsFaceVisited(left_face_id);
  134|       |
  135|  2.74M|        if (!is_left_face_visited) {
  ------------------
  |  Branch (135:13): [True: 2.06M, False: 684k]
  ------------------
  136|       |          // We can go to the left face.
  137|  2.06M|          const int priority = ComputePriority(left_corner_id);
  138|  2.06M|          if (is_right_face_visited && priority <= best_priority_) {
  ------------------
  |  Branch (138:15): [True: 721k, False: 1.34M]
  |  Branch (138:40): [True: 667k, False: 54.1k]
  ------------------
  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|   667k|            corner_id = left_corner_id;
  144|   667k|            continue;
  145|  1.39M|          } else {
  146|  1.39M|            AddCornerToTraversalStack(left_corner_id, priority);
  147|  1.39M|          }
  148|  2.06M|        }
  149|  2.08M|        if (!is_right_face_visited) {
  ------------------
  |  Branch (149:13): [True: 1.98M, False: 99.8k]
  ------------------
  150|       |          // Go to the right face.
  151|  1.98M|          const int priority = ComputePriority(right_corner_id);
  152|  1.98M|          if (priority <= best_priority_) {
  ------------------
  |  Branch (152:15): [True: 772k, False: 1.20M]
  ------------------
  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|   772k|            corner_id = right_corner_id;
  156|   772k|            continue;
  157|  1.20M|          } else {
  158|  1.20M|            AddCornerToTraversalStack(right_corner_id, priority);
  159|  1.20M|          }
  160|  1.98M|        }
  161|       |
  162|       |        // Couldn't proceed directly to the next corner
  163|  1.30M|        break;
  164|  2.08M|      }
  165|  1.30M|    }
  166|  2.74M|    return true;
  167|  2.74M|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE23PopNextCornerToTraverseEv:
  173|  8.10M|  CornerIndex PopNextCornerToTraverse() {
  174|  17.0M|    for (int i = best_priority_; i < kMaxPriority; ++i) {
  ------------------
  |  Branch (174:34): [True: 14.2M, False: 2.74M]
  ------------------
  175|  14.2M|      if (!traversal_stacks_[i].empty()) {
  ------------------
  |  Branch (175:11): [True: 5.35M, False: 8.92M]
  ------------------
  176|  5.35M|        const CornerIndex ret = traversal_stacks_[i].back();
  177|  5.35M|        traversal_stacks_[i].pop_back();
  178|  5.35M|        best_priority_ = i;
  179|  5.35M|        return ret;
  180|  5.35M|      }
  181|  14.2M|    }
  182|  2.74M|    return kInvalidCornerIndex;
  183|  8.10M|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15ComputePriorityENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  194|  4.04M|  inline int ComputePriority(CornerIndex corner_id) {
  195|  4.04M|    const VertexIndex v_tip = this->corner_table()->Vertex(corner_id);
  196|       |    // Priority 0 when traversing to already visited vertices.
  197|  4.04M|    int priority = 0;
  198|  4.04M|    if (!this->IsVertexVisited(v_tip)) {
  ------------------
  |  Branch (198:9): [True: 2.67M, False: 1.37M]
  ------------------
  199|  2.67M|      const int degree = ++prediction_degree_[v_tip];
  200|       |      // Priority 1 when prediction degree > 1, otherwise 2.
  201|  2.67M|      priority = (degree > 1 ? 1 : 2);
  ------------------
  |  Branch (201:19): [True: 1.30M, False: 1.36M]
  ------------------
  202|  2.67M|    }
  203|       |    // Clamp the priority to the maximum number of buckets.
  204|  4.04M|    if (priority >= kMaxPriority) {
  ------------------
  |  Branch (204:9): [True: 0, False: 4.04M]
  ------------------
  205|      0|      priority = kMaxPriority - 1;
  206|      0|    }
  207|  4.04M|    return priority;
  208|  4.04M|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE25AddCornerToTraversalStackENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEi:
  185|  2.60M|  inline void AddCornerToTraversalStack(CornerIndex ci, int priority) {
  186|  2.60M|    traversal_stacks_[priority].push_back(ci);
  187|       |    // Make sure that the best available priority is up to date.
  188|  2.60M|    if (priority < best_priority_) {
  ------------------
  |  Branch (188:9): [True: 646k, False: 1.96M]
  ------------------
  189|   646k|      best_priority_ = priority;
  190|   646k|    }
  191|  2.60M|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   63|    662|  void OnTraversalEnd() {}
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   55|  1.43k|  MaxPredictionDegreeTraverser() {}

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

_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|    716|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  2.39k|  bool UpdatePointToAttributeIndexMapping(PointAttribute* attribute) override {
   49|  2.39k|    const auto* corner_table = traverser_.corner_table();
   50|  2.39k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  2.39k|    const size_t num_faces = mesh_->num_faces();
   52|  2.39k|    const size_t num_points = mesh_->num_points();
   53|  4.73M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 4.73M, False: 2.39k]
  ------------------
   54|  4.73M|      const auto& face = mesh_->face(f);
   55|  18.9M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 14.2M, False: 4.73M]
  ------------------
   56|  14.2M|        const PointIndex point_id = face[p];
   57|  14.2M|        const VertexIndex vert_id =
   58|  14.2M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  14.2M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 14.2M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  14.2M|        const AttributeValueIndex att_entry_id(
   63|  14.2M|            encoding_data_
   64|  14.2M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  14.2M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 14.2M]
  |  Branch (65:13): [True: 0, False: 14.2M]
  |  Branch (65:39): [True: 0, False: 14.2M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|  14.2M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  14.2M|      }
   71|  4.73M|    }
   72|  2.39k|    return true;
   73|  2.39k|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|    662|  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|    662|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|    662|    traverser_.OnTraversalStart();
   82|    662|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 662]
  ------------------
   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|    662|    } else {
   89|    662|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  2.74M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 2.74M, False: 662]
  ------------------
   91|  2.74M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 2.74M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  2.74M|      }
   95|    662|    }
   96|    662|    traverser_.OnTraversalEnd();
   97|    662|    return true;
   98|    662|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  2.74M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  2.74M|    return traverser_.TraverseFromCorner(corner_id);
  103|  2.74M|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|    716|  void SetTraverser(const TraverserT& t) { traverser_ = t; }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|  2.70k|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  7.50k|  bool UpdatePointToAttributeIndexMapping(PointAttribute* attribute) override {
   49|  7.50k|    const auto* corner_table = traverser_.corner_table();
   50|  7.50k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  7.50k|    const size_t num_faces = mesh_->num_faces();
   52|  7.50k|    const size_t num_points = mesh_->num_points();
   53|  4.73M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 4.73M, False: 7.50k]
  ------------------
   54|  4.73M|      const auto& face = mesh_->face(f);
   55|  18.9M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 14.1M, False: 4.73M]
  ------------------
   56|  14.1M|        const PointIndex point_id = face[p];
   57|  14.1M|        const VertexIndex vert_id =
   58|  14.1M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  14.1M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 14.1M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  14.1M|        const AttributeValueIndex att_entry_id(
   63|  14.1M|            encoding_data_
   64|  14.1M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  14.1M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 14.1M]
  |  Branch (65:13): [True: 0, False: 14.1M]
  |  Branch (65:39): [True: 0, False: 14.1M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|  14.1M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  14.1M|      }
   71|  4.73M|    }
   72|  7.50k|    return true;
   73|  7.50k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|  2.59k|  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.59k|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|  2.59k|    traverser_.OnTraversalStart();
   82|  2.59k|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 2.59k]
  ------------------
   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.59k|    } else {
   89|  2.59k|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  2.62M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 2.62M, False: 2.59k]
  ------------------
   91|  2.62M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 2.62M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  2.62M|      }
   95|  2.59k|    }
   96|  2.59k|    traverser_.OnTraversalEnd();
   97|  2.59k|    return true;
   98|  2.59k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  2.62M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  2.62M|    return traverser_.TraverseFromCorner(corner_id);
  103|  2.62M|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|  2.70k|  void SetTraverser(const TraverserT& t) { traverser_ = t; }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|  2.98k|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  10.2k|  bool UpdatePointToAttributeIndexMapping(PointAttribute* attribute) override {
   49|  10.2k|    const auto* corner_table = traverser_.corner_table();
   50|  10.2k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  10.2k|    const size_t num_faces = mesh_->num_faces();
   52|  10.2k|    const size_t num_points = mesh_->num_points();
   53|  9.32M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 9.31M, False: 10.2k]
  ------------------
   54|  9.31M|      const auto& face = mesh_->face(f);
   55|  37.2M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 27.9M, False: 9.31M]
  ------------------
   56|  27.9M|        const PointIndex point_id = face[p];
   57|  27.9M|        const VertexIndex vert_id =
   58|  27.9M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  27.9M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 27.9M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  27.9M|        const AttributeValueIndex att_entry_id(
   63|  27.9M|            encoding_data_
   64|  27.9M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  27.9M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 27.9M]
  |  Branch (65:13): [True: 3, False: 27.9M]
  |  Branch (65:39): [True: 3, False: 27.9M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      3|          return false;
   68|      3|        }
   69|  27.9M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  27.9M|      }
   71|  9.31M|    }
   72|  10.2k|    return true;
   73|  10.2k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|  2.89k|  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.89k|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|  2.89k|    traverser_.OnTraversalStart();
   82|  2.89k|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 2.89k]
  ------------------
   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.89k|    } else {
   89|  2.89k|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  5.57M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 5.57M, False: 2.89k]
  ------------------
   91|  5.57M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 5.57M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  5.57M|      }
   95|  2.89k|    }
   96|  2.89k|    traverser_.OnTraversalEnd();
   97|  2.89k|    return true;
   98|  2.89k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  5.57M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  5.57M|    return traverser_.TraverseFromCorner(corner_id);
  103|  5.57M|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|  2.98k|  void SetTraverser(const TraverserT& t) { traverser_ = t; }

_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  5.97k|  virtual ~TraverserBase() = default;
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  34.3M|  inline const CornerTable* corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  17.7M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  17.7M|    return is_vertex_visited_[vert_id.value()];
   65|  17.7M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  2.81M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  2.81M|    is_vertex_visited_[vert_id.value()] = true;
   68|  2.81M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  8.18M|  inline TraversalObserverT& traversal_observer() {
   75|  8.18M|    return traversal_observer_;
   76|  8.18M|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  13.6M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  13.6M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 171k, False: 13.4M]
  ------------------
   47|   171k|      return true;  // Invalid faces are always considered as visited.
   48|   171k|    }
   49|  13.4M|    return is_face_visited_[face_id.value()];
   50|  13.6M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  5.37M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  5.37M|    is_face_visited_[face_id.value()] = true;
   62|  5.37M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  6.84k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  6.84k|  virtual ~TraverserBase() = default;
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  3.42k|                    TraversalObserver traversal_observer) {
   37|  3.42k|    corner_table_ = corner_table;
   38|  3.42k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  3.42k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  3.42k|    traversal_observer_ = traversal_observer;
   41|  3.42k|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  2.62M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  2.62M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 2.62M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  2.62M|    return is_face_visited_[corner_id.value() / 3];
   58|  2.62M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  47.4M|  inline const CornerTable* corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  5.57M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  5.57M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 5.57M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  5.57M|    return is_face_visited_[corner_id.value() / 3];
   58|  5.57M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  14.3M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  14.3M|    return is_vertex_visited_[vert_id.value()];
   65|  14.3M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  13.7M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  13.7M|    is_vertex_visited_[vert_id.value()] = true;
   68|  13.7M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  19.2M|  inline TraversalObserverT& traversal_observer() {
   75|  19.2M|    return traversal_observer_;
   76|  19.2M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  14.4M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  14.4M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 8.79M, False: 5.66M]
  ------------------
   47|  8.79M|      return true;  // Invalid faces are always considered as visited.
   48|  8.79M|    }
   49|  5.66M|    return is_face_visited_[face_id.value()];
   50|  14.4M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  5.57M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  5.57M|    is_face_visited_[face_id.value()] = true;
   62|  5.57M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  5.97k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  2.98k|                    TraversalObserver traversal_observer) {
   37|  2.98k|    corner_table_ = corner_table;
   38|  2.98k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  2.98k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  2.98k|    traversal_observer_ = traversal_observer;
   41|  2.98k|  }

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

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

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

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

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

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

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

_ZN5draco13DecoderBuffer28DecodeLeastSignificantBits32EjPj:
   57|  76.1M|  bool DecodeLeastSignificantBits32(uint32_t nbits, uint32_t* out_value) {
   58|  76.1M|    if (!bit_decoder_active()) {
  ------------------
  |  Branch (58:9): [True: 0, False: 76.1M]
  ------------------
   59|      0|      return false;
   60|      0|    }
   61|  76.1M|    return bit_decoder_.GetBits(nbits, out_value);
   62|  76.1M|  }
_ZN5draco13DecoderBuffer6DecodeEPvm:
   76|  1.92G|  bool Decode(void* out_data, size_t size_to_decode) {
   77|  1.92G|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (77:9): [True: 811, False: 1.92G]
  ------------------
   78|    811|      return false;  // Buffer overflow.
   79|    811|    }
   80|  1.92G|    memcpy(out_data, (data_ + pos_), size_to_decode);
   81|  1.92G|    pos_ += size_to_decode;
   82|  1.92G|    return true;
   83|  1.92G|  }
_ZN5draco13DecoderBuffer7AdvanceEl:
  105|  43.9k|  void Advance(int64_t bytes) { pos_ += bytes; }
_ZN5draco13DecoderBuffer21set_bitstream_versionEt:
  111|  15.6k|  void set_bitstream_version(uint16_t version) { bitstream_version_ = version; }
_ZNK5draco13DecoderBuffer9data_headEv:
  114|  67.1k|  const char* data_head() const { return data_ + pos_; }
_ZNK5draco13DecoderBuffer14remaining_sizeEv:
  115|   476k|  int64_t remaining_size() const { return data_size_ - pos_; }
_ZNK5draco13DecoderBuffer12decoded_sizeEv:
  116|  10.3k|  int64_t decoded_size() const { return pos_; }
_ZNK5draco13DecoderBuffer18bit_decoder_activeEv:
  117|  76.1M|  bool bit_decoder_active() const { return bit_mode_; }
_ZNK5draco13DecoderBuffer17bitstream_versionEv:
  120|  9.34M|  uint16_t bitstream_version() const { return bitstream_version_; }
_ZN5draco13DecoderBuffer10BitDecoder5resetEPKvm:
  130|  13.6k|    void reset(const void* b, size_t s) {
  131|  13.6k|      bit_offset_ = 0;
  132|  13.6k|      bit_buffer_ = static_cast<const uint8_t*>(b);
  133|  13.6k|      bit_buffer_end_ = bit_buffer_ + s;
  134|  13.6k|    }
_ZNK5draco13DecoderBuffer10BitDecoder11BitsDecodedEv:
  137|  11.6k|    uint64_t BitsDecoded() const { return static_cast<uint64_t>(bit_offset_); }
_ZN5draco13DecoderBuffer10BitDecoder7GetBitsEjPj:
  158|  76.1M|    bool GetBits(uint32_t nbits, uint32_t* x) {
  159|  76.1M|      if (nbits > 32) {
  ------------------
  |  Branch (159:11): [True: 14, False: 76.1M]
  ------------------
  160|     14|        return false;
  161|     14|      }
  162|  76.1M|      uint32_t value = 0;
  163|   169M|      for (uint32_t bit = 0; bit < nbits; ++bit) {
  ------------------
  |  Branch (163:30): [True: 92.8M, False: 76.1M]
  ------------------
  164|  92.8M|        value |= GetBit() << bit;
  165|  92.8M|      }
  166|  76.1M|      *x = value;
  167|  76.1M|      return true;
  168|  76.1M|    }
_ZN5draco13DecoderBuffer10BitDecoder6GetBitEv:
  173|  92.8M|    int GetBit() {
  174|  92.8M|      const size_t off = bit_offset_;
  175|  92.8M|      const size_t byte_offset = off >> 3;
  176|  92.8M|      const int bit_shift = static_cast<int>(off & 0x7);
  177|  92.8M|      if (bit_buffer_ + byte_offset < bit_buffer_end_) {
  ------------------
  |  Branch (177:11): [True: 80.3M, False: 12.4M]
  ------------------
  178|  80.3M|        const int bit = (bit_buffer_[byte_offset] >> bit_shift) & 1;
  179|  80.3M|        bit_offset_ = off + 1;
  180|  80.3M|        return bit;
  181|  80.3M|      }
  182|  12.4M|      return 0;
  183|  92.8M|    }
_ZN5draco13DecoderBuffer6DecodeIhEEbPT_:
   68|  25.9M|  bool Decode(T* out_val) {
   69|  25.9M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 4.87k, False: 25.9M]
  ------------------
   70|  4.87k|      return false;
   71|  4.87k|    }
   72|  25.9M|    pos_ += sizeof(T);
   73|  25.9M|    return true;
   74|  25.9M|  }
_ZN5draco13DecoderBuffer4PeekIhEEbPT_:
   87|  25.9M|  bool Peek(T* out_val) {
   88|  25.9M|    const size_t size_to_decode = sizeof(T);
   89|  25.9M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 4.87k, False: 25.9M]
  ------------------
   90|  4.87k|      return false;  // Buffer overflow.
   91|  4.87k|    }
   92|  25.9M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  25.9M|    return true;
   94|  25.9M|  }
_ZN5draco13DecoderBuffer6DecodeIiEEbPT_:
   68|  20.3k|  bool Decode(T* out_val) {
   69|  20.3k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 165, False: 20.2k]
  ------------------
   70|    165|      return false;
   71|    165|    }
   72|  20.2k|    pos_ += sizeof(T);
   73|  20.2k|    return true;
   74|  20.3k|  }
_ZN5draco13DecoderBuffer4PeekIiEEbPT_:
   87|  20.3k|  bool Peek(T* out_val) {
   88|  20.3k|    const size_t size_to_decode = sizeof(T);
   89|  20.3k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 165, False: 20.2k]
  ------------------
   90|    165|      return false;  // Buffer overflow.
   91|    165|    }
   92|  20.2k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  20.2k|    return true;
   94|  20.3k|  }
_ZN5draco13DecoderBuffer6DecodeIjEEbPT_:
   68|   730k|  bool Decode(T* out_val) {
   69|   730k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 215, False: 730k]
  ------------------
   70|    215|      return false;
   71|    215|    }
   72|   730k|    pos_ += sizeof(T);
   73|   730k|    return true;
   74|   730k|  }
_ZN5draco13DecoderBuffer4PeekIjEEbPT_:
   87|   730k|  bool Peek(T* out_val) {
   88|   730k|    const size_t size_to_decode = sizeof(T);
   89|   730k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 215, False: 730k]
  ------------------
   90|    215|      return false;  // Buffer overflow.
   91|    215|    }
   92|   730k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|   730k|    return true;
   94|   730k|  }
_ZN5draco13DecoderBuffer6DecodeIaEEbPT_:
   68|  35.4k|  bool Decode(T* out_val) {
   69|  35.4k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 495, False: 34.9k]
  ------------------
   70|    495|      return false;
   71|    495|    }
   72|  34.9k|    pos_ += sizeof(T);
   73|  34.9k|    return true;
   74|  35.4k|  }
_ZN5draco13DecoderBuffer4PeekIaEEbPT_:
   87|  35.4k|  bool Peek(T* out_val) {
   88|  35.4k|    const size_t size_to_decode = sizeof(T);
   89|  35.4k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 495, False: 34.9k]
  ------------------
   90|    495|      return false;  // Buffer overflow.
   91|    495|    }
   92|  34.9k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  34.9k|    return true;
   94|  35.4k|  }
_ZN5draco13DecoderBuffer6DecodeINS_13HoleEventDataEEEbPT_:
   68|  1.48M|  bool Decode(T* out_val) {
   69|  1.48M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 148, False: 1.48M]
  ------------------
   70|    148|      return false;
   71|    148|    }
   72|  1.48M|    pos_ += sizeof(T);
   73|  1.48M|    return true;
   74|  1.48M|  }
_ZN5draco13DecoderBuffer4PeekINS_13HoleEventDataEEEbPT_:
   87|  1.48M|  bool Peek(T* out_val) {
   88|  1.48M|    const size_t size_to_decode = sizeof(T);
   89|  1.48M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 148, False: 1.48M]
  ------------------
   90|    148|      return false;  // Buffer overflow.
   91|    148|    }
   92|  1.48M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.48M|    return true;
   94|  1.48M|  }
_ZN5draco13DecoderBuffer6DecodeItEEbPT_:
   68|  33.3k|  bool Decode(T* out_val) {
   69|  33.3k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 16, False: 33.3k]
  ------------------
   70|     16|      return false;
   71|     16|    }
   72|  33.3k|    pos_ += sizeof(T);
   73|  33.3k|    return true;
   74|  33.3k|  }
_ZN5draco13DecoderBuffer4PeekItEEbPT_:
   87|  33.3k|  bool Peek(T* out_val) {
   88|  33.3k|    const size_t size_to_decode = sizeof(T);
   89|  33.3k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 16, False: 33.3k]
  ------------------
   90|     16|      return false;  // Buffer overflow.
   91|     16|    }
   92|  33.3k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  33.3k|    return true;
   94|  33.3k|  }
_ZN5draco13DecoderBuffer6DecodeImEEbPT_:
   68|  3.13k|  bool Decode(T* out_val) {
   69|  3.13k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 28, False: 3.10k]
  ------------------
   70|     28|      return false;
   71|     28|    }
   72|  3.10k|    pos_ += sizeof(T);
   73|  3.10k|    return true;
   74|  3.13k|  }
_ZN5draco13DecoderBuffer4PeekImEEbPT_:
   87|  3.13k|  bool Peek(T* out_val) {
   88|  3.13k|    const size_t size_to_decode = sizeof(T);
   89|  3.13k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 28, False: 3.10k]
  ------------------
   90|     28|      return false;  // Buffer overflow.
   91|     28|    }
   92|  3.10k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  3.10k|    return true;
   94|  3.13k|  }
_ZN5draco13DecoderBuffer6DecodeIfEEbPT_:
   68|    264|  bool Decode(T* out_val) {
   69|    264|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 52, False: 212]
  ------------------
   70|     52|      return false;
   71|     52|    }
   72|    212|    pos_ += sizeof(T);
   73|    212|    return true;
   74|    264|  }
_ZN5draco13DecoderBuffer4PeekIfEEbPT_:
   87|    264|  bool Peek(T* out_val) {
   88|    264|    const size_t size_to_decode = sizeof(T);
   89|    264|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 52, False: 212]
  ------------------
   90|     52|      return false;  // Buffer overflow.
   91|     52|    }
   92|    212|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|    212|    return true;
   94|    264|  }

_ZNK5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EE5valueEv:
   73|   128M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EE5valueEv:
   73|   131M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEgeERKj:
   98|  15.1M|  constexpr bool operator>=(const ValueTypeT& val) const {
   99|  15.1M|    return value_ >= val;
  100|  15.1M|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EE5valueEv:
   73|   427M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EE5valueEv:
   73|  5.62G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKj:
   90|  33.9M|  constexpr bool operator<(const ValueTypeT& val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEaSERKS2_:
  151|   130M|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|   130M|    value_ = i.value_;
  153|   130M|    return *this;
  154|   130M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKS2_:
  151|   480M|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|   480M|    value_ = i.value_;
  153|   480M|    return *this;
  154|   480M|  }
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEppEv:
  102|  33.9M|  inline ThisIndexType& operator++() {
  103|  33.9M|    ++value_;
  104|  33.9M|    return *this;
  105|  33.9M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEeqERKS2_:
   75|  4.05G|  constexpr bool operator==(const IndexType& i) const {
   76|  4.05G|    return value_ == i.value_;
   77|  4.05G|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EE5valueEv:
   73|  1.66G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKS2_:
   87|  12.1k|  constexpr bool operator<(const IndexType& i) const {
   88|  12.1k|    return value_ < i.value_;
   89|  12.1k|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEeqERKS2_:
   75|   233M|  constexpr bool operator==(const IndexType& i) const {
   76|   233M|    return value_ == i.value_;
   77|   233M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEmiERKj:
  131|   252M|  constexpr ThisIndexType operator-(const ValueTypeT& val) const {
  132|   252M|    return ThisIndexType(value_ - val);
  133|   252M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEplERKj:
  125|  1.37G|  constexpr ThisIndexType operator+(const ValueTypeT& val) const {
  126|  1.37G|    return ThisIndexType(value_ + val);
  127|  1.37G|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEeqERKS2_:
   75|  28.1M|  constexpr bool operator==(const IndexType& i) const {
   76|  28.1M|    return value_ == i.value_;
   77|  28.1M|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEneERKS2_:
   81|   466M|  constexpr bool operator!=(const IndexType& i) const {
   82|   466M|    return value_ != i.value_;
   83|   466M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEneERKS2_:
   81|   584M|  constexpr bool operator!=(const IndexType& i) const {
   82|   584M|    return value_ != i.value_;
   83|   584M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEppEv:
  102|   908M|  inline ThisIndexType& operator++() {
  103|   908M|    ++value_;
  104|   908M|    return *this;
  105|   908M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEaSERKS2_:
  151|   810M|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|   810M|    value_ = i.value_;
  153|   810M|    return *this;
  154|   810M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEaSERKS2_:
  151|  1.95G|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|  1.95G|    value_ = i.value_;
  153|  1.95G|    return *this;
  154|  1.95G|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEgeERKj:
   98|  56.3M|  constexpr bool operator>=(const ValueTypeT& val) const {
   99|  56.3M|    return value_ >= val;
  100|  56.3M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEltERKj:
   90|  13.4M|  constexpr bool operator<(const ValueTypeT& val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ej:
   71|  1.96G|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2ERKS2_:
   70|  42.2G|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2Ej:
   71|   339M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2ERKS2_:
   70|  33.5G|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ev:
   69|   448M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEplERKj:
  125|  32.8M|  constexpr ThisIndexType operator+(const ValueTypeT& val) const {
  126|  32.8M|    return ThisIndexType(value_ + val);
  127|  32.8M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2Ej:
   71|   287M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKS2_:
   87|  37.9M|  constexpr bool operator<(const IndexType& i) const {
   88|  37.9M|    return value_ < i.value_;
   89|  37.9M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2ERKS2_:
   70|   301M|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ev:
   69|   480M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2ERKS2_:
   70|  92.8M|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2Ej:
   71|   102M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2ERKS2_:
   70|   366M|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEaSERKS2_:
  151|  6.43M|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|  6.43M|    value_ = i.value_;
  153|  6.43M|    return *this;
  154|  6.43M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEpLERKj:
  139|  13.4M|  inline ThisIndexType operator+=(const ValueTypeT& val) {
  140|  13.4M|    value_ += val;
  141|  13.4M|    return *this;
  142|  13.4M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKj:
  155|  45.4M|  inline ThisIndexType& operator=(const ValueTypeT& val) {
  156|  45.4M|    value_ = val;
  157|  45.4M|    return *this;
  158|  45.4M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ej:
   71|   434M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKj:
   90|  9.73M|  constexpr bool operator<(const ValueTypeT& val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEppEv:
  102|  9.72M|  inline ThisIndexType& operator++() {
  103|  9.72M|    ++value_;
  104|  9.72M|    return *this;
  105|  9.72M|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEltERKj:
   90|  28.8M|  constexpr bool operator<(const ValueTypeT& val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEppEv:
  102|  28.8M|  inline ThisIndexType& operator++() {
  103|  28.8M|    ++value_;
  104|  28.8M|    return *this;
  105|  28.8M|  }

_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|  28.8M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE5clearEv:
   48|  15.5k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE6resizeEmRKS5_:
   51|  26.9k|  void resize(size_t size, const ValueTypeT& val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   70|  85.1M|  inline reference operator[](const IndexTypeT& index) {
   71|  85.1M|    return vector_[index.value()];
   72|  85.1M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE9push_backERKS8_:
   62|  23.9k|  void push_back(const ValueTypeT& val) { vector_.push_back(val); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE4sizeEv:
   59|  30.2M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE6resizeEmRKS8_:
   51|  6.99k|  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|  15.1M|  inline reference operator[](const IndexTypeT& index) {
   71|  15.1M|    return vector_[index.value()];
   72|  15.1M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEixERKS3_:
   73|  35.3M|  inline const_reference operator[](const IndexTypeT& index) const {
   74|  35.3M|    return vector_[index.value()];
   75|  35.3M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE4sizeEv:
   59|   370M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE4sizeEv:
   59|  17.1M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   73|   525M|  inline const_reference operator[](const IndexTypeT& index) const {
   74|   525M|    return vector_[index.value()];
   75|   525M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   73|  1.49G|  inline const_reference operator[](const IndexTypeT& index) const {
   74|  1.49G|    return vector_[index.value()];
   75|  1.49G|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   70|   756M|  inline reference operator[](const IndexTypeT& index) {
   71|   756M|    return vector_[index.value()];
   72|   756M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   73|   110M|  inline const_reference operator[](const IndexTypeT& index) const {
   74|   110M|    return vector_[index.value()];
   75|   110M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   70|   648M|  inline reference operator[](const IndexTypeT& index) {
   71|   648M|    return vector_[index.value()];
   72|   648M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE9push_backERKS5_:
   62|   193M|  void push_back(const ValueTypeT& val) { vector_.push_back(val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   70|   431M|  inline reference operator[](const IndexTypeT& index) {
   71|   431M|    return vector_[index.value()];
   72|   431M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE6resizeEmRKi:
   51|  3.29k|  void resize(size_t size, const ValueTypeT& val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEixERKS3_:
   70|   384M|  inline reference operator[](const IndexTypeT& index) {
   71|   384M|    return vector_[index.value()];
   72|   384M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEC2Ev:
   39|  94.8k|  IndexTypeVector() {}
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4sizeEv:
   59|  2.74M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaEC2Ev:
   39|  90.3k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEC2Ev:
   39|  11.0k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EC2Ev:
   39|  11.0k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEC2Ev:
   39|  11.0k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_EC2Ev:
   39|  11.0k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE5clearEv:
   48|  23.2k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4swapERS4_:
   55|  23.2k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT>& arg) {
   56|  23.2k|    vector_.swap(arg.vector_);
   57|  23.2k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE5clearEv:
   48|  23.2k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE4swapERS4_:
   55|  23.2k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT>& arg) {
   56|  23.2k|    vector_.swap(arg.vector_);
   57|  23.2k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE6assignEmRKS5_:
   52|  11.0k|  void assign(size_t size, const ValueTypeT& val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_E6assignEmRKS3_:
   52|  11.0k|  void assign(size_t size, const ValueTypeT& val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE7reserveEm:
   49|  11.0k|  void reserve(size_t size) { vector_.reserve(size); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEC2Ev:
   39|  15.6k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEC2Ev:
   39|   114k|  IndexTypeVector() {}

_ZN5draco14DataTypeLengthENS_8DataTypeE:
   19|   156k|int32_t DataTypeLength(DataType dt) {
   20|   156k|  switch (dt) {
   21|  97.2k|    case DT_INT8:
  ------------------
  |  Branch (21:5): [True: 97.2k, False: 59.5k]
  ------------------
   22|   100k|    case DT_UINT8:
  ------------------
  |  Branch (22:5): [True: 3.64k, False: 153k]
  ------------------
   23|   100k|      return 1;
   24|  3.26k|    case DT_INT16:
  ------------------
  |  Branch (24:5): [True: 3.26k, False: 153k]
  ------------------
   25|  4.01k|    case DT_UINT16:
  ------------------
  |  Branch (25:5): [True: 746, False: 156k]
  ------------------
   26|  4.01k|      return 2;
   27|  42.0k|    case DT_INT32:
  ------------------
  |  Branch (27:5): [True: 42.0k, False: 114k]
  ------------------
   28|  43.1k|    case DT_UINT32:
  ------------------
  |  Branch (28:5): [True: 1.18k, False: 155k]
  ------------------
   29|  43.1k|      return 4;
   30|    700|    case DT_INT64:
  ------------------
  |  Branch (30:5): [True: 700, False: 156k]
  ------------------
   31|  1.45k|    case DT_UINT64:
  ------------------
  |  Branch (31:5): [True: 751, False: 156k]
  ------------------
   32|  1.45k|      return 8;
   33|  5.94k|    case DT_FLOAT32:
  ------------------
  |  Branch (33:5): [True: 5.94k, False: 150k]
  ------------------
   34|  5.94k|      return 4;
   35|    420|    case DT_FLOAT64:
  ------------------
  |  Branch (35:5): [True: 420, False: 156k]
  ------------------
   36|    420|      return 8;
   37|    894|    case DT_BOOL:
  ------------------
  |  Branch (37:5): [True: 894, False: 155k]
  ------------------
   38|    894|      return 1;
   39|      0|    default:
  ------------------
  |  Branch (39:5): [True: 0, False: 156k]
  ------------------
   40|      0|      return -1;
   41|   156k|  }
   42|   156k|}

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

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

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

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

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

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

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

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

_ZN5draco12DecodeVarintIjEEbPT_PNS_13DecoderBufferE:
   63|  2.32M|bool DecodeVarint(IntTypeT* out_val, DecoderBuffer* buffer) {
   64|  2.32M|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 2.32M, Folded]
  ------------------
   65|  2.32M|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 1.94k, False: 2.32M]
  ------------------
   66|  1.94k|      return false;
   67|  1.94k|    }
   68|  2.32M|  } 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|  2.32M|  return true;
   77|  2.32M|}
mesh_edgebreaker_decoder_impl.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  1.64M|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  1.64M|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  1.64M|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 93, False: 1.64M]
  ------------------
   33|     93|    return false;
   34|     93|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  1.64M|  uint8_t in;
   39|  1.64M|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 1.24k, False: 1.64M]
  ------------------
   40|  1.24k|    return false;
   41|  1.24k|  }
   42|  1.64M|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 20.2k, False: 1.62M]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  20.2k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 582, False: 19.6k]
  ------------------
   45|    582|      return false;
   46|    582|    }
   47|       |    // Append decoded info from this byte.
   48|  19.6k|    *out_val <<= 7;
   49|  19.6k|    *out_val |= in & ((1 << 7) - 1);
   50|  1.62M|  } else {
   51|       |    // Last byte reached
   52|  1.62M|    *out_val = in;
   53|  1.62M|  }
   54|  1.64M|  return true;
   55|  1.64M|}
mesh_sequential_decoder.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: 0, False: 10.2k]
  ------------------
   33|      0|    return false;
   34|      0|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  10.2k|  uint8_t in;
   39|  10.2k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 8, False: 10.2k]
  ------------------
   40|      8|    return false;
   41|      8|  }
   42|  10.2k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.27k, False: 8.93k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.27k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 4, False: 1.26k]
  ------------------
   45|      4|      return false;
   46|      4|    }
   47|       |    // Append decoded info from this byte.
   48|  1.26k|    *out_val <<= 7;
   49|  1.26k|    *out_val |= in & ((1 << 7) - 1);
   50|  8.93k|  } else {
   51|       |    // Last byte reached
   52|  8.93k|    *out_val = in;
   53|  8.93k|  }
   54|  10.2k|  return true;
   55|  10.2k|}
_ZN5draco12DecodeVarintImEEbPT_PNS_13DecoderBufferE:
   63|  10.8k|bool DecodeVarint(IntTypeT* out_val, DecoderBuffer* buffer) {
   64|  10.8k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 10.8k, Folded]
  ------------------
   65|  10.8k|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 170, False: 10.7k]
  ------------------
   66|    170|      return false;
   67|    170|    }
   68|  10.8k|  } 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|  10.7k|  return true;
   77|  10.8k|}
decoder_buffer.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  6.67k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  6.67k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  6.67k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 0, False: 6.67k]
  ------------------
   33|      0|    return false;
   34|      0|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  6.67k|  uint8_t in;
   39|  6.67k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 26, False: 6.65k]
  ------------------
   40|     26|    return false;
   41|     26|  }
   42|  6.65k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 13, False: 6.63k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|     13|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 0, False: 13]
  ------------------
   45|      0|      return false;
   46|      0|    }
   47|       |    // Append decoded info from this byte.
   48|     13|    *out_val <<= 7;
   49|     13|    *out_val |= in & ((1 << 7) - 1);
   50|  6.63k|  } else {
   51|       |    // Last byte reached
   52|  6.63k|    *out_val = in;
   53|  6.63k|  }
   54|  6.65k|  return true;
   55|  6.65k|}
metadata_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   537k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|   537k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   537k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 24, False: 537k]
  ------------------
   33|     24|    return false;
   34|     24|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   537k|  uint8_t in;
   39|   537k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 151, False: 536k]
  ------------------
   40|    151|    return false;
   41|    151|  }
   42|   536k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 3.17k, False: 533k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  3.17k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 134, False: 3.04k]
  ------------------
   45|    134|      return false;
   46|    134|    }
   47|       |    // Append decoded info from this byte.
   48|  3.04k|    *out_val <<= 7;
   49|  3.04k|    *out_val |= in & ((1 << 7) - 1);
   50|   533k|  } else {
   51|       |    // Last byte reached
   52|   533k|    *out_val = in;
   53|   533k|  }
   54|   536k|  return true;
   55|   536k|}
sequential_integer_attribute_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  6.32k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  6.32k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  6.32k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 3, False: 6.32k]
  ------------------
   33|      3|    return false;
   34|      3|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  6.32k|  uint8_t in;
   39|  6.32k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 57, False: 6.26k]
  ------------------
   40|     57|    return false;
   41|     57|  }
   42|  6.26k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 950, False: 5.31k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    950|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 44, False: 906]
  ------------------
   45|     44|      return false;
   46|     44|    }
   47|       |    // Append decoded info from this byte.
   48|    906|    *out_val <<= 7;
   49|    906|    *out_val |= in & ((1 << 7) - 1);
   50|  5.31k|  } else {
   51|       |    // Last byte reached
   52|  5.31k|    *out_val = in;
   53|  5.31k|  }
   54|  6.22k|  return true;
   55|  6.26k|}
rans_bit_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  29.3k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  29.3k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  29.3k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 4, False: 29.3k]
  ------------------
   33|      4|    return false;
   34|      4|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  29.3k|  uint8_t in;
   39|  29.3k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 40, False: 29.3k]
  ------------------
   40|     40|    return false;
   41|     40|  }
   42|  29.3k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 427, False: 28.9k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    427|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 28, False: 399]
  ------------------
   45|     28|      return false;
   46|     28|    }
   47|       |    // Append decoded info from this byte.
   48|    399|    *out_val <<= 7;
   49|    399|    *out_val |= in & ((1 << 7) - 1);
   50|  28.9k|  } else {
   51|       |    // Last byte reached
   52|  28.9k|    *out_val = in;
   53|  28.9k|  }
   54|  29.3k|  return true;
   55|  29.3k|}
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: 145, False: 10.1k]
  ------------------
   33|    145|    return false;
   34|    145|  }
   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: 121, False: 10.0k]
  ------------------
   40|    121|    return false;
   41|    121|  }
   42|  10.0k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 2.64k, False: 7.37k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  2.64k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 780, False: 1.86k]
  ------------------
   45|    780|      return false;
   46|    780|    }
   47|       |    // Append decoded info from this byte.
   48|  1.86k|    *out_val <<= 7;
   49|  1.86k|    *out_val |= in & ((1 << 7) - 1);
   50|  7.37k|  } else {
   51|       |    // Last byte reached
   52|  7.37k|    *out_val = in;
   53|  7.37k|  }
   54|  9.23k|  return true;
   55|  10.0k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  7.26k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  7.26k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  7.26k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 82, False: 7.18k]
  ------------------
   33|     82|    return false;
   34|     82|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  7.18k|  uint8_t in;
   39|  7.18k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 62, False: 7.11k]
  ------------------
   40|     62|    return false;
   41|     62|  }
   42|  7.11k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 3.05k, False: 4.06k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  3.05k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 959, False: 2.09k]
  ------------------
   45|    959|      return false;
   46|    959|    }
   47|       |    // Append decoded info from this byte.
   48|  2.09k|    *out_val <<= 7;
   49|  2.09k|    *out_val |= in & ((1 << 7) - 1);
   50|  4.06k|  } else {
   51|       |    // Last byte reached
   52|  4.06k|    *out_val = in;
   53|  4.06k|  }
   54|  6.16k|  return true;
   55|  7.11k|}
attributes_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   112k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|   112k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   112k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 17, False: 112k]
  ------------------
   33|     17|    return false;
   34|     17|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   112k|  uint8_t in;
   39|   112k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 39, False: 112k]
  ------------------
   40|     39|    return false;
   41|     39|  }
   42|   112k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 2.00k, False: 110k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  2.00k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 103, False: 1.90k]
  ------------------
   45|    103|      return false;
   46|    103|    }
   47|       |    // Append decoded info from this byte.
   48|  1.90k|    *out_val <<= 7;
   49|  1.90k|    *out_val |= in & ((1 << 7) - 1);
   50|   110k|  } else {
   51|       |    // Last byte reached
   52|   110k|    *out_val = in;
   53|   110k|  }
   54|   112k|  return true;
   55|   112k|}

_ZN5draco7VectorDIfLi3EEC2Ev:
   42|  58.2k|  VectorD() {
   43|   232k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 174k, False: 58.2k]
  ------------------
   44|   174k|      (*this)[i] = Scalar(0);
   45|   174k|    }
   46|  58.2k|  }
_ZN5draco7VectorDIfLi3EEixEi:
  114|   280k|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIfLi3EEixEi:
  115|   217k|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIlLi3EEixEi:
  115|   130M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIlLi3EEmiERKS1_:
  139|  14.4M|  Self operator-(const Self& o) const {
  140|  14.4M|    Self ret;
  141|  57.7M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 43.3M, False: 14.4M]
  ------------------
  142|  43.3M|      ret[i] = (*this)[i] - o[i];
  143|  43.3M|    }
  144|  14.4M|    return ret;
  145|  14.4M|  }
_ZN5draco12CrossProductIlTnPNSt3__19enable_ifIXaasr3std11is_integralIT_EE5valuesr3std9is_signedIS3_EE5valueEvE4typeELPv0EEENS_7VectorDIS3_Li3EEERKS9_SB_:
  325|  7.18M|                                 const VectorD<ScalarT, 3>& v) {
  326|       |  // Preventing accidental use with uint32_t and the like.
  327|  7.18M|  static_assert(std::is_signed<ScalarT>::value,
  328|  7.18M|                "ScalarT must be a signed type. ");
  329|  7.18M|  VectorD<ScalarT, 3> r;
  330|  7.18M|  typedef typename std::make_unsigned<ScalarT>::type ScalarUT;
  331|  7.18M|  const ScalarUT u0 = static_cast<ScalarUT>(u[0]);
  332|  7.18M|  const ScalarUT u1 = static_cast<ScalarUT>(u[1]);
  333|  7.18M|  const ScalarUT u2 = static_cast<ScalarUT>(u[2]);
  334|  7.18M|  const ScalarUT v0 = static_cast<ScalarUT>(v[0]);
  335|  7.18M|  const ScalarUT v1 = static_cast<ScalarUT>(v[1]);
  336|  7.18M|  const ScalarUT v2 = static_cast<ScalarUT>(v[2]);
  337|  7.18M|  r[0] = static_cast<ScalarT>((u1 * v2) - (u2 * v1));
  338|  7.18M|  r[1] = static_cast<ScalarT>((u2 * v0) - (u0 * v2));
  339|  7.18M|  r[2] = static_cast<ScalarT>((u0 * v1) - (u1 * v0));
  340|  7.18M|  return r;
  341|  7.18M|}
_ZN5draco7VectorDIlLi3EE4dataEv:
  284|  7.18M|  Scalar* data() { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE4dataEv:
  285|  7.18M|  const Scalar* data() const { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE6AbsSumEv:
  239|  3.37M|  Scalar AbsSum() const {
  240|  3.37M|    Scalar result(0);
  241|  13.5M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (241:21): [True: 10.1M, False: 3.36M]
  ------------------
  242|  10.1M|      Scalar next_value = std::abs(v_[i]);
  243|  10.1M|      if (result > std::numeric_limits<Scalar>::max() - next_value) {
  ------------------
  |  Branch (243:11): [True: 9.35k, False: 10.1M]
  ------------------
  244|       |        // Return the max if adding would have caused an overflow.
  245|  9.35k|        return std::numeric_limits<Scalar>::max();
  246|  9.35k|      }
  247|  10.1M|      result += next_value;
  248|  10.1M|    }
  249|  3.36M|    return result;
  250|  3.37M|  }
_ZNK5draco7VectorDIlLi3EEdvERKl:
  184|   167k|  Self operator/(const Scalar& o) const {
  185|   167k|    Self ret;
  186|   669k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (186:21): [True: 502k, False: 167k]
  ------------------
  187|   502k|      ret[i] = (*this)[i] / o;
  188|   502k|    }
  189|   167k|    return ret;
  190|   167k|  }
_ZN5draco7VectorDIlLi3EEixEi:
  114|   222M|  Scalar& operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEixEi:
  114|  17.2M|  Scalar& operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EE4dataEv:
  284|  10.1M|  Scalar* data() { return &(v_[0]); }
_ZNK5draco7VectorDIiLi3EEngEv:
  122|  2.86M|  Self operator-() const {
  123|  2.86M|    Self ret;
  124|  11.4M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (124:21): [True: 8.60M, False: 2.86M]
  ------------------
  125|  8.60M|      ret[i] = -(*this)[i];
  126|  8.60M|    }
  127|  2.86M|    return ret;
  128|  2.86M|  }
_ZNK5draco7VectorDIiLi3EEixEi:
  115|  8.60M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEmiERKS1_:
  139|  43.4M|  Self operator-(const Self& o) const {
  140|  43.4M|    Self ret;
  141|   130M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 86.8M, False: 43.4M]
  ------------------
  142|  86.8M|      ret[i] = (*this)[i] - o[i];
  143|  86.8M|    }
  144|  43.4M|    return ret;
  145|  43.4M|  }
_ZN5draco7VectorDIjLi2EEixEi:
  114|   521M|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEixEi:
  115|   781M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIiLi2EEixEi:
  114|   558M|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEplERKS1_:
  131|  86.8M|  Self operator+(const Self& o) const {
  132|  86.8M|    Self ret;
  133|   260M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (133:21): [True: 173M, False: 86.8M]
  ------------------
  134|   173M|      ret[i] = (*this)[i] + o[i];
  135|   173M|    }
  136|  86.8M|    return ret;
  137|  86.8M|  }
_ZNK5draco7VectorDIiLi2EEixEi:
  115|   721M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIiLi2EEmiERKS1_:
  139|  1.47M|  Self operator-(const Self& o) const {
  140|  1.47M|    Self ret;
  141|  4.41M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 2.94M, False: 1.47M]
  ------------------
  142|  2.94M|      ret[i] = (*this)[i] - o[i];
  143|  2.94M|    }
  144|  1.47M|    return ret;
  145|  1.47M|  }
_ZNK5draco7VectorDIiLi2EEplERKS1_:
  131|  1.47M|  Self operator+(const Self& o) const {
  132|  1.47M|    Self ret;
  133|  4.41M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (133:21): [True: 2.94M, False: 1.47M]
  ------------------
  134|  2.94M|      ret[i] = (*this)[i] + o[i];
  135|  2.94M|    }
  136|  1.47M|    return ret;
  137|  1.47M|  }
_ZNK5draco7VectorDIfLi2EEeqERKS1_:
  208|   611k|  bool operator==(const Self& o) const {
  209|  1.81M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (209:21): [True: 1.21M, False: 599k]
  ------------------
  210|  1.21M|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (210:11): [True: 11.3k, False: 1.20M]
  ------------------
  211|  11.3k|        return false;
  212|  11.3k|      }
  213|  1.21M|    }
  214|   599k|    return true;
  215|   611k|  }
_ZNK5draco7VectorDIfLi2EEixEi:
  115|  7.21M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIfLi3EEmiERKS1_:
  139|  23.4k|  Self operator-(const Self& o) const {
  140|  23.4k|    Self ret;
  141|  93.6k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 70.2k, False: 23.4k]
  ------------------
  142|  70.2k|      ret[i] = (*this)[i] - o[i];
  143|  70.2k|    }
  144|  23.4k|    return ret;
  145|  23.4k|  }
_ZNK5draco7VectorDIfLi3EE11SquaredNormEv:
  236|  12.0k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIfLi3EE3DotERKS1_:
  252|  12.6k|  Scalar Dot(const Self& o) const {
  253|  12.6k|    Scalar ret(0);
  254|  50.4k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (254:21): [True: 37.8k, False: 12.6k]
  ------------------
  255|  37.8k|      ret += (*this)[i] * o[i];
  256|  37.8k|    }
  257|  12.6k|    return ret;
  258|  12.6k|  }
_ZNK5draco7VectorDIfLi3EEmlERKf:
  176|    605|  Self operator*(const Scalar& o) const {
  177|    605|    Self ret;
  178|  2.42k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (178:21): [True: 1.81k, False: 605]
  ------------------
  179|  1.81k|      ret[i] = (*this)[i] * o;
  180|  1.81k|    }
  181|    605|    return ret;
  182|    605|  }
_ZNK5draco7VectorDIfLi2EEmiERKS1_:
  139|  11.3k|  Self operator-(const Self& o) const {
  140|  11.3k|    Self ret;
  141|  34.1k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 22.7k, False: 11.3k]
  ------------------
  142|  22.7k|      ret[i] = (*this)[i] - o[i];
  143|  22.7k|    }
  144|  11.3k|    return ret;
  145|  11.3k|  }
_ZN5draco7VectorDIfLi2EEC2Ev:
   42|  22.7k|  VectorD() {
   43|  68.3k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 45.5k, False: 22.7k]
  ------------------
   44|  45.5k|      (*this)[i] = Scalar(0);
   45|  45.5k|    }
   46|  22.7k|  }
_ZN5draco7VectorDIfLi2EEC2ERKfS3_:
   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|  }
_ZN5draco7VectorDIfLi2EEixEi:
  114|  91.0k|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIlLi2EEeqERKS1_:
  208|   874k|  bool operator==(const Self& o) const {
  209|  2.50M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (209:21): [True: 1.69M, False: 813k]
  ------------------
  210|  1.69M|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (210:11): [True: 61.6k, False: 1.62M]
  ------------------
  211|  61.6k|        return false;
  212|  61.6k|      }
  213|  1.69M|    }
  214|   813k|    return true;
  215|   874k|  }
_ZNK5draco7VectorDIlLi2EEixEi:
  115|  5.10M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIlLi3EEC2Ev:
   42|  43.1M|  VectorD() {
   43|   172M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 129M, False: 43.1M]
  ------------------
   44|   129M|      (*this)[i] = Scalar(0);
   45|   129M|    }
   46|  43.1M|  }
_ZNK5draco7VectorDIlLi3EE11SquaredNormEv:
  236|  65.7k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIlLi3EE3DotERKS1_:
  252|  70.1k|  Scalar Dot(const Self& o) const {
  253|  70.1k|    Scalar ret(0);
  254|   280k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (254:21): [True: 210k, False: 70.1k]
  ------------------
  255|   210k|      ret += (*this)[i] * o[i];
  256|   210k|    }
  257|  70.1k|    return ret;
  258|  70.1k|  }
_ZNK5draco7VectorDIlLi2EEmiERKS1_:
  139|  4.37k|  Self operator-(const Self& o) const {
  140|  4.37k|    Self ret;
  141|  13.1k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 8.74k, False: 4.37k]
  ------------------
  142|  8.74k|      ret[i] = (*this)[i] - o[i];
  143|  8.74k|    }
  144|  4.37k|    return ret;
  145|  4.37k|  }
_ZN5draco7VectorDImLi2EEC2IlLi2EEERKNS0_IT_XT0_EEE:
  104|  16.5k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t>& src_vector) {
  105|  49.5k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (105:21): [True: 33.0k, False: 16.5k]
  ------------------
  106|  33.0k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (106:11): [True: 33.0k, False: 0]
  ------------------
  107|  33.0k|        v_[i] = Scalar(src_vector[i]);
  108|  33.0k|      } else {
  109|      0|        v_[i] = Scalar(0);
  110|      0|      }
  111|  33.0k|    }
  112|  16.5k|  }
_ZNK5draco7VectorDImLi2EEmlERKm:
  176|  8.39k|  Self operator*(const Scalar& o) const {
  177|  8.39k|    Self ret;
  178|  25.1k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (178:21): [True: 16.7k, False: 8.39k]
  ------------------
  179|  16.7k|      ret[i] = (*this)[i] * o;
  180|  16.7k|    }
  181|  8.39k|    return ret;
  182|  8.39k|  }
_ZN5draco7VectorDImLi2EEC2Ev:
   42|  16.6k|  VectorD() {
   43|  49.9k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 33.2k, False: 16.6k]
  ------------------
   44|  33.2k|      (*this)[i] = Scalar(0);
   45|  33.2k|    }
   46|  16.6k|  }
_ZNK5draco7VectorDImLi2EEixEi:
  115|  66.2k|  const Scalar& operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDImLi2EEixEi:
  114|  66.5k|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDImLi2EEplERKS1_:
  131|  6.30k|  Self operator+(const Self& o) const {
  132|  6.30k|    Self ret;
  133|  18.9k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (133:21): [True: 12.6k, False: 6.30k]
  ------------------
  134|  12.6k|      ret[i] = (*this)[i] + o[i];
  135|  12.6k|    }
  136|  6.30k|    return ret;
  137|  6.30k|  }
_ZN5draco7VectorDIlLi2EEC2ImLi2EEERKNS0_IT_XT0_EEE:
  104|  8.25k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t>& src_vector) {
  105|  24.7k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (105:21): [True: 16.5k, False: 8.25k]
  ------------------
  106|  16.5k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (106:11): [True: 16.5k, False: 0]
  ------------------
  107|  16.5k|        v_[i] = Scalar(src_vector[i]);
  108|  16.5k|      } else {
  109|      0|        v_[i] = Scalar(0);
  110|      0|      }
  111|  16.5k|    }
  112|  8.25k|  }
_ZNK5draco7VectorDIlLi3EEplERKS1_:
  131|  4.12k|  Self operator+(const Self& o) const {
  132|  4.12k|    Self ret;
  133|  16.5k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (133:21): [True: 12.3k, False: 4.12k]
  ------------------
  134|  12.3k|      ret[i] = (*this)[i] + o[i];
  135|  12.3k|    }
  136|  4.12k|    return ret;
  137|  4.12k|  }
_ZN5dracomlIlLi3EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  294|  4.12k|    const ScalarT& o, const VectorD<ScalarT, dimension_t>& v) {
  295|  4.12k|  return v * o;
  296|  4.12k|}
_ZNK5draco7VectorDIlLi3EEmlERKl:
  176|  4.12k|  Self operator*(const Scalar& o) const {
  177|  4.12k|    Self ret;
  178|  16.5k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (178:21): [True: 12.3k, False: 4.12k]
  ------------------
  179|  12.3k|      ret[i] = (*this)[i] * o;
  180|  12.3k|    }
  181|  4.12k|    return ret;
  182|  4.12k|  }
_ZN5draco7VectorDIlLi2EEC2ERKlS3_:
   54|  1.75M|  VectorD(const Scalar& c0, const Scalar& c1) : v_({{c0, c1}}) {
   55|  1.75M|    DRACO_DCHECK_EQ(dimension, 2);
   56|  1.75M|    v_[0] = c0;
   57|  1.75M|    v_[1] = c1;
   58|  1.75M|  }
_ZNK5draco7VectorDIlLi2EEmlERKl:
  176|  4.12k|  Self operator*(const Scalar& o) const {
  177|  4.12k|    Self ret;
  178|  12.3k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (178:21): [True: 8.25k, False: 4.12k]
  ------------------
  179|  8.25k|      ret[i] = (*this)[i] * o;
  180|  8.25k|    }
  181|  4.12k|    return ret;
  182|  4.12k|  }
_ZN5draco7VectorDIlLi2EEC2Ev:
   42|  16.6k|  VectorD() {
   43|  50.0k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 33.3k, False: 16.6k]
  ------------------
   44|  33.3k|      (*this)[i] = Scalar(0);
   45|  33.3k|    }
   46|  16.6k|  }
_ZNK5draco7VectorDIlLi2EEdvERKl:
  184|  4.05k|  Self operator/(const Scalar& o) const {
  185|  4.05k|    Self ret;
  186|  12.1k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (186:21): [True: 8.10k, False: 4.05k]
  ------------------
  187|  8.10k|      ret[i] = (*this)[i] / o;
  188|  8.10k|    }
  189|  4.05k|    return ret;
  190|  4.05k|  }
_ZNK5draco7VectorDImLi2EEmiERKS1_:
  139|  1.94k|  Self operator-(const Self& o) const {
  140|  1.94k|    Self ret;
  141|  5.82k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 3.88k, False: 1.94k]
  ------------------
  142|  3.88k|      ret[i] = (*this)[i] - o[i];
  143|  3.88k|    }
  144|  1.94k|    return ret;
  145|  1.94k|  }
_ZN5draco7VectorDIlLi2EEixEi:
  114|  66.5k|  Scalar& operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEC2Ev:
   42|  2.86M|  VectorD() {
   43|  11.4M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 8.60M, False: 2.86M]
  ------------------
   44|  8.60M|      (*this)[i] = Scalar(0);
   45|  8.60M|    }
   46|  2.86M|  }
_ZN5draco7VectorDIiLi2EEC2ERKiS3_:
   54|   136M|  VectorD(const Scalar& c0, const Scalar& c1) : v_({{c0, c1}}) {
   55|   136M|    DRACO_DCHECK_EQ(dimension, 2);
   56|   136M|    v_[0] = c0;
   57|   136M|    v_[1] = c1;
   58|   136M|  }
_ZN5draco7VectorDIjLi2EEC2IiLi2EEERKNS0_IT_XT0_EEE:
  104|   260M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t>& src_vector) {
  105|   781M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (105:21): [True: 521M, False: 260M]
  ------------------
  106|   521M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (106:11): [True: 521M, False: 0]
  ------------------
  107|   521M|        v_[i] = Scalar(src_vector[i]);
  108|   521M|      } else {
  109|      0|        v_[i] = Scalar(0);
  110|      0|      }
  111|   521M|    }
  112|   260M|  }
_ZN5draco7VectorDIjLi2EEC2Ev:
   42|   130M|  VectorD() {
   43|   390M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 260M, False: 130M]
  ------------------
   44|   260M|      (*this)[i] = Scalar(0);
   45|   260M|    }
   46|   130M|  }
_ZN5draco7VectorDIiLi2EEC2IjLi2EEERKNS0_IT_XT0_EEE:
  104|   130M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t>& src_vector) {
  105|   390M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (105:21): [True: 260M, False: 130M]
  ------------------
  106|   260M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (106:11): [True: 260M, False: 0]
  ------------------
  107|   260M|        v_[i] = Scalar(src_vector[i]);
  108|   260M|      } else {
  109|      0|        v_[i] = Scalar(0);
  110|      0|      }
  111|   260M|    }
  112|   130M|  }
_ZN5draco7VectorDIiLi2EEC2ERKS1_:
   90|  48.0M|  VectorD(const Self& o) {
   91|   144M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (91:21): [True: 96.0M, False: 48.0M]
  ------------------
   92|  96.0M|      (*this)[i] = o[i];
   93|  96.0M|    }
   94|  48.0M|  }
_ZN5draco7VectorDIiLi2EEC2Ev:
   42|  2.94M|  VectorD() {
   43|  8.83M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 5.89M, False: 2.94M]
  ------------------
   44|  5.89M|      (*this)[i] = Scalar(0);
   45|  5.89M|    }
   46|  2.94M|  }

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

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

_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  228|  10.5k|      : corner_table_(table),
  229|  10.5k|        start_corner_(table->LeftMostCorner(vert_id)),
  230|  10.5k|        corner_(start_corner_),
  231|  10.5k|        left_traversal_(true) {}
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE3EndEv:
  244|  4.65M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEppEv:
  267|  94.3k|  VertexCornersIterator& operator++() {
  268|  94.3k|    Next();
  269|  94.3k|    return *this;
  270|  94.3k|  }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEE4NextEv:
  247|  3.98M|  void Next() {
  248|  3.98M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 3.89M, False: 89.9k]
  ------------------
  249|  3.89M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  3.89M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 24.6k, False: 3.87M]
  ------------------
  251|       |        // Open boundary reached.
  252|  24.6k|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  24.6k|        left_traversal_ = false;
  254|  3.87M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 644k, False: 3.22M]
  ------------------
  255|       |        // End reached.
  256|   644k|        corner_ = kInvalidCornerIndex;
  257|   644k|      }
  258|  3.89M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  89.9k|      corner_ = corner_table_->SwingRight(corner_);
  262|  89.9k|    }
  263|  3.98M|  }
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE6CornerEv:
  241|  6.93M|  CornerIndex Corner() const { return corner_; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE3EndEv:
  244|  6.01M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE6CornerEv:
  241|  5.74M|  CornerIndex Corner() const { return corner_; }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE4NextEv:
  247|  3.29M|  void Next() {
  248|  3.29M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 3.27M, False: 19.9k]
  ------------------
  249|  3.27M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  3.27M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 2.61M, False: 660k]
  ------------------
  251|       |        // Open boundary reached.
  252|  2.61M|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  2.61M|        left_traversal_ = false;
  254|  2.61M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 108k, False: 551k]
  ------------------
  255|       |        // End reached.
  256|   108k|        corner_ = kInvalidCornerIndex;
  257|   108k|      }
  258|  3.27M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  19.9k|      corner_ = corner_table_->SwingRight(corner_);
  262|  19.9k|    }
  263|  3.29M|  }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|  2.71M|      : corner_table_(table),
  236|  2.71M|        start_corner_(corner_id),
  237|  2.71M|        corner_(start_corner_),
  238|  2.71M|        left_traversal_(true) {}
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|   659k|      : corner_table_(table),
  236|   659k|        start_corner_(corner_id),
  237|   659k|        corner_(start_corner_),
  238|   659k|        left_traversal_(true) {}

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

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

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

_ZNK5draco24MeshAttributeCornerTable26IsCornerOppositeToSeamEdgeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   45|  85.5M|  inline bool IsCornerOppositeToSeamEdge(CornerIndex corner) const {
   46|  85.5M|    return is_edge_on_seam_[corner.value()];
   47|  85.5M|  }
_ZNK5draco24MeshAttributeCornerTable8OppositeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   49|  40.8M|  inline CornerIndex Opposite(CornerIndex corner) const {
   50|  40.8M|    if (corner == kInvalidCornerIndex || IsCornerOppositeToSeamEdge(corner)) {
  ------------------
  |  Branch (50:9): [True: 0, False: 40.8M]
  |  Branch (50:42): [True: 36.3M, False: 4.52M]
  ------------------
   51|  36.3M|      return kInvalidCornerIndex;
   52|  36.3M|    }
   53|  4.52M|    return corner_table_->Opposite(corner);
   54|  40.8M|  }
_ZNK5draco24MeshAttributeCornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   56|  55.9M|  inline CornerIndex Next(CornerIndex corner) const {
   57|  55.9M|    return corner_table_->Next(corner);
   58|  55.9M|  }
_ZNK5draco24MeshAttributeCornerTable8PreviousENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   60|  34.4M|  inline CornerIndex Previous(CornerIndex corner) const {
   61|  34.4M|    return corner_table_->Previous(corner);
   62|  34.4M|  }
_ZNK5draco24MeshAttributeCornerTable14IsCornerOnSeamENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   65|  6.55M|  inline bool IsCornerOnSeam(CornerIndex corner) const {
   66|  6.55M|    return is_vertex_on_seam_[corner_table_->Vertex(corner).value()];
   67|  6.55M|  }
_ZNK5draco24MeshAttributeCornerTable13GetLeftCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  5.00M|  inline CornerIndex GetLeftCorner(CornerIndex corner) const {
   72|  5.00M|    return Opposite(Previous(corner));
   73|  5.00M|  }
_ZNK5draco24MeshAttributeCornerTable14GetRightCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   74|  5.57M|  inline CornerIndex GetRightCorner(CornerIndex corner) const {
   75|  5.57M|    return Opposite(Next(corner));
   76|  5.57M|  }
_ZNK5draco24MeshAttributeCornerTable10SwingRightENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   79|  7.11M|  inline CornerIndex SwingRight(CornerIndex corner) const {
   80|  7.11M|    return Previous(Opposite(Previous(corner)));
   81|  7.11M|  }
_ZNK5draco24MeshAttributeCornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   84|  17.5M|  inline CornerIndex SwingLeft(CornerIndex corner) const {
   85|  17.5M|    return Next(Opposite(Next(corner)));
   86|  17.5M|  }
_ZNK5draco24MeshAttributeCornerTable12num_verticesEv:
   88|  18.1k|  int num_vertices() const {
   89|  18.1k|    return static_cast<int>(vertex_to_attribute_entry_id_map_.size());
   90|  18.1k|  }
_ZNK5draco24MeshAttributeCornerTable9num_facesEv:
   91|  5.88k|  int num_faces() const { return static_cast<int>(corner_table_->num_faces()); }
_ZNK5draco24MeshAttributeCornerTable11num_cornersEv:
   92|  2.52k|  int num_corners() const { return corner_table_->num_corners(); }
_ZNK5draco24MeshAttributeCornerTable6VertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   94|   138M|  VertexIndex Vertex(CornerIndex corner) const {
   95|   138M|    DRACO_DCHECK_LT(corner.value(), corner_to_vertex_map_.size());
   96|   138M|    return ConfidentVertex(corner);
   97|   138M|  }
_ZNK5draco24MeshAttributeCornerTable15ConfidentVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   98|   138M|  VertexIndex ConfidentVertex(CornerIndex corner) const {
   99|   138M|    return corner_to_vertex_map_[corner.value()];
  100|   138M|  }
_ZNK5draco24MeshAttributeCornerTable14LeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  106|  4.97M|  inline CornerIndex LeftMostCorner(VertexIndex v) const {
  107|  4.97M|    return vertex_to_left_most_corner_map_[v.value()];
  108|  4.97M|  }
_ZNK5draco24MeshAttributeCornerTable12IsOnBoundaryENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  122|  4.97M|  inline bool IsOnBoundary(VertexIndex vert) const {
  123|  4.97M|    const CornerIndex corner = LeftMostCorner(vert);
  124|  4.97M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (124:9): [True: 0, False: 4.97M]
  ------------------
  125|      0|      return true;
  126|      0|    }
  127|  4.97M|    if (SwingLeft(corner) == kInvalidCornerIndex) {
  ------------------
  |  Branch (127:9): [True: 4.41M, False: 562k]
  ------------------
  128|  4.41M|      return true;
  129|  4.41M|    }
  130|   562k|    return false;
  131|  4.97M|  }

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

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

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

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

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

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

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

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

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

