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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

_ZN5draco17OctahedronToolBoxC2Ev:
   53|  3.47k|      : quantization_bits_(-1),
   54|  3.47k|        max_quantized_value_(-1),
   55|  3.47k|        max_value_(-1),
   56|  3.47k|        dequantization_scale_(1.f),
   57|  3.47k|        center_value_(-1) {}
_ZN5draco17OctahedronToolBox19SetQuantizationBitsEi:
   59|  3.13k|  bool SetQuantizationBits(int32_t q) {
   60|  3.13k|    if (q < 2 || q > 30) {
  ------------------
  |  Branch (60:9): [True: 901, False: 2.22k]
  |  Branch (60:18): [True: 179, False: 2.05k]
  ------------------
   61|  1.08k|      return false;
   62|  1.08k|    }
   63|  2.05k|    quantization_bits_ = q;
   64|  2.05k|    max_quantized_value_ = (1u << quantization_bits_) - 1;
   65|  2.05k|    max_value_ = max_quantized_value_ - 1;
   66|  2.05k|    dequantization_scale_ = 2.f / max_value_;
   67|  2.05k|    center_value_ = max_value_ / 2;
   68|  2.05k|    return true;
   69|  3.13k|  }
_ZNK5draco17OctahedronToolBox28CanonicalizeOctahedralCoordsEiiPiS1_:
   76|  2.87M|                                           int32_t *out_t) const {
   77|  2.87M|    if ((s == 0 && t == 0) || (s == 0 && t == max_value_) ||
  ------------------
  |  Branch (77:10): [True: 2.64k, False: 2.87M]
  |  Branch (77:20): [True: 0, False: 2.64k]
  |  Branch (77:32): [True: 2.64k, False: 2.87M]
  |  Branch (77:42): [True: 0, False: 2.64k]
  ------------------
   78|  2.87M|        (s == max_value_ && t == 0)) {
  ------------------
  |  Branch (78:10): [True: 2.06M, False: 815k]
  |  Branch (78:29): [True: 4.61k, False: 2.05M]
  ------------------
   79|  4.61k|      s = max_value_;
   80|  4.61k|      t = max_value_;
   81|  2.87M|    } else if (s == 0 && t > center_value_) {
  ------------------
  |  Branch (81:16): [True: 2.64k, False: 2.87M]
  |  Branch (81:26): [True: 722, False: 1.92k]
  ------------------
   82|    722|      t = center_value_ - (t - center_value_);
   83|  2.87M|    } else if (s == max_value_ && t < center_value_) {
  ------------------
  |  Branch (83:16): [True: 2.05M, False: 814k]
  |  Branch (83:35): [True: 4.73k, False: 2.05M]
  ------------------
   84|  4.73k|      t = center_value_ + (center_value_ - t);
   85|  2.86M|    } else if (t == max_value_ && s < center_value_) {
  ------------------
  |  Branch (85:16): [True: 2.05M, False: 812k]
  |  Branch (85:35): [True: 182, False: 2.05M]
  ------------------
   86|    182|      s = center_value_ + (center_value_ - s);
   87|  2.86M|    } else if (t == 0 && s > center_value_) {
  ------------------
  |  Branch (87:16): [True: 3.98k, False: 2.86M]
  |  Branch (87:26): [True: 1.61k, False: 2.37k]
  ------------------
   88|  1.61k|      s = center_value_ - (s - center_value_);
   89|  1.61k|    }
   90|       |
   91|  2.87M|    *out_s = s;
   92|  2.87M|    *out_t = t;
   93|  2.87M|  }
_ZNK5draco17OctahedronToolBox40IntegerVectorToQuantizedOctahedralCoordsEPKiPiS3_:
   99|  2.87M|                                                       int32_t *out_t) const {
  100|  2.87M|    DRACO_DCHECK_EQ(
  101|  2.87M|        std::abs(int_vec[0]) + std::abs(int_vec[1]) + std::abs(int_vec[2]),
  102|  2.87M|        center_value_);
  103|  2.87M|    int32_t s, t;
  104|  2.87M|    if (int_vec[0] >= 0) {
  ------------------
  |  Branch (104:9): [True: 1.13M, False: 1.74M]
  ------------------
  105|       |      // Right hemisphere.
  106|  1.13M|      s = (int_vec[1] + center_value_);
  107|  1.13M|      t = (int_vec[2] + center_value_);
  108|  1.74M|    } else {
  109|       |      // Left hemisphere.
  110|  1.74M|      if (int_vec[1] < 0) {
  ------------------
  |  Branch (110:11): [True: 40.9k, False: 1.70M]
  ------------------
  111|  40.9k|        s = std::abs(int_vec[2]);
  112|  1.70M|      } else {
  113|  1.70M|        s = (max_value_ - std::abs(int_vec[2]));
  114|  1.70M|      }
  115|  1.74M|      if (int_vec[2] < 0) {
  ------------------
  |  Branch (115:11): [True: 47.1k, False: 1.69M]
  ------------------
  116|  47.1k|        t = std::abs(int_vec[1]);
  117|  1.69M|      } else {
  118|  1.69M|        t = (max_value_ - std::abs(int_vec[1]));
  119|  1.69M|      }
  120|  1.74M|    }
  121|  2.87M|    CanonicalizeOctahedralCoords(s, t, out_s, out_t);
  122|  2.87M|  }
_ZNK5draco17OctahedronToolBox37QuantizedOctahedralCoordsToUnitVectorEiiPf:
  198|   288k|                                                    float *out_vector) const {
  199|   288k|    OctahedralCoordsToUnitVector(in_s * dequantization_scale_ - 1.f,
  200|   288k|                                 in_t * dequantization_scale_ - 1.f,
  201|   288k|                                 out_vector);
  202|   288k|  }
_ZNK5draco17OctahedronToolBox11IsInDiamondERKiS2_:
  205|  2.80M|  inline bool IsInDiamond(const int32_t &s, const int32_t &t) const {
  206|       |    // Expect center already at origin.
  207|  2.80M|    DRACO_DCHECK_LE(s, center_value_);
  208|  2.80M|    DRACO_DCHECK_LE(t, center_value_);
  209|  2.80M|    DRACO_DCHECK_GE(s, -center_value_);
  210|  2.80M|    DRACO_DCHECK_GE(t, -center_value_);
  211|  2.80M|    const uint32_t st =
  212|  2.80M|        static_cast<uint32_t>(std::abs(s)) + static_cast<uint32_t>(std::abs(t));
  213|  2.80M|    return st <= center_value_;
  214|  2.80M|  }
_ZNK5draco17OctahedronToolBox13InvertDiamondEPiS1_:
  216|  3.63M|  void InvertDiamond(int32_t *s, int32_t *t) const {
  217|       |    // Expect center already at origin.
  218|  3.63M|    DRACO_DCHECK_LE(*s, center_value_);
  219|  3.63M|    DRACO_DCHECK_LE(*t, center_value_);
  220|  3.63M|    DRACO_DCHECK_GE(*s, -center_value_);
  221|  3.63M|    DRACO_DCHECK_GE(*t, -center_value_);
  222|  3.63M|    int32_t sign_s = 0;
  223|  3.63M|    int32_t sign_t = 0;
  224|  3.63M|    if (*s >= 0 && *t >= 0) {
  ------------------
  |  Branch (224:9): [True: 3.20M, False: 428k]
  |  Branch (224:20): [True: 3.05M, False: 158k]
  ------------------
  225|  3.05M|      sign_s = 1;
  226|  3.05M|      sign_t = 1;
  227|  3.05M|    } else if (*s <= 0 && *t <= 0) {
  ------------------
  |  Branch (227:16): [True: 450k, False: 135k]
  |  Branch (227:27): [True: 319k, False: 130k]
  ------------------
  228|   319k|      sign_s = -1;
  229|   319k|      sign_t = -1;
  230|   319k|    } else {
  231|   266k|      sign_s = (*s > 0) ? 1 : -1;
  ------------------
  |  Branch (231:16): [True: 135k, False: 130k]
  ------------------
  232|   266k|      sign_t = (*t > 0) ? 1 : -1;
  ------------------
  |  Branch (232:16): [True: 130k, False: 135k]
  ------------------
  233|   266k|    }
  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|  3.63M|    const uint32_t corner_point_s = sign_s * center_value_;
  239|  3.63M|    const uint32_t corner_point_t = sign_t * center_value_;
  240|  3.63M|    uint32_t us = *s;
  241|  3.63M|    uint32_t ut = *t;
  242|  3.63M|    us = us + us - corner_point_s;
  243|  3.63M|    ut = ut + ut - corner_point_t;
  244|  3.63M|    if (sign_s * sign_t >= 0) {
  ------------------
  |  Branch (244:9): [True: 3.37M, False: 266k]
  ------------------
  245|  3.37M|      uint32_t temp = us;
  246|  3.37M|      us = -ut;
  247|  3.37M|      ut = -temp;
  248|  3.37M|    } else {
  249|   266k|      std::swap(us, ut);
  250|   266k|    }
  251|  3.63M|    us = us + corner_point_s;
  252|  3.63M|    ut = ut + corner_point_t;
  253|       |
  254|  3.63M|    *s = us;
  255|  3.63M|    *t = ut;
  256|  3.63M|    *s /= 2;
  257|  3.63M|    *t /= 2;
  258|  3.63M|  }
_ZNK5draco17OctahedronToolBox6ModMaxEi:
  272|  5.61M|  int32_t ModMax(int32_t x) const {
  273|  5.61M|    if (x > this->center_value()) {
  ------------------
  |  Branch (273:9): [True: 19.5k, False: 5.59M]
  ------------------
  274|  19.5k|      return x - this->max_quantized_value();
  275|  19.5k|    }
  276|  5.59M|    if (x < -this->center_value()) {
  ------------------
  |  Branch (276:9): [True: 1.92k, False: 5.58M]
  ------------------
  277|  1.92k|      return x + this->max_quantized_value();
  278|  1.92k|    }
  279|  5.58M|    return x;
  280|  5.59M|  }
_ZNK5draco17OctahedronToolBox17quantization_bitsEv:
  291|  1.91k|  int32_t quantization_bits() const { return quantization_bits_; }
_ZNK5draco17OctahedronToolBox19max_quantized_valueEv:
  292|  21.5k|  int32_t max_quantized_value() const { return max_quantized_value_; }
_ZNK5draco17OctahedronToolBox12center_valueEv:
  294|  16.8M|  int32_t center_value() const { return center_value_; }
_ZNK5draco17OctahedronToolBox28OctahedralCoordsToUnitVectorEffPf:
  298|   288k|                                           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|   288k|    float y = in_s_scaled;
  329|   288k|    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|   288k|    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|   288k|    float x_offset = -x;
  342|   288k|    x_offset = x_offset < 0 ? 0 : x_offset;
  ------------------
  |  Branch (342:16): [True: 10.6k, False: 277k]
  ------------------
  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|   288k|    y += y < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (347:10): [True: 85.9k, False: 202k]
  ------------------
  348|   288k|    z += z < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (348:10): [True: 73.0k, False: 215k]
  ------------------
  349|       |
  350|       |    // Normalize the computed vector.
  351|   288k|    const float norm_squared = x * x + y * y + z * z;
  352|   288k|    if (norm_squared < 1e-6) {
  ------------------
  |  Branch (352:9): [True: 0, False: 288k]
  ------------------
  353|      0|      out_vector[0] = 0;
  354|      0|      out_vector[1] = 0;
  355|      0|      out_vector[2] = 0;
  356|   288k|    } else {
  357|   288k|      const float d = 1.0f / std::sqrt(norm_squared);
  358|   288k|      out_vector[0] = x * d;
  359|   288k|      out_vector[1] = y * d;
  360|   288k|      out_vector[2] = z * d;
  361|   288k|    }
  362|   288k|  }
_ZNK5draco17OctahedronToolBox25CanonicalizeIntegerVectorIiEEvPT_:
  173|  2.87M|  void CanonicalizeIntegerVector(T *vec) const {
  174|  2.87M|    static_assert(std::is_integral<T>::value, "T must be an integral type.");
  175|  2.87M|    static_assert(std::is_signed<T>::value, "T must be a signed type.");
  176|  2.87M|    const int64_t abs_sum = static_cast<int64_t>(std::abs(vec[0])) +
  177|  2.87M|                            static_cast<int64_t>(std::abs(vec[1])) +
  178|  2.87M|                            static_cast<int64_t>(std::abs(vec[2]));
  179|       |
  180|  2.87M|    if (abs_sum == 0) {
  ------------------
  |  Branch (180:9): [True: 2.65M, False: 227k]
  ------------------
  181|  2.65M|      vec[0] = center_value_;  // vec[1] == v[2] == 0
  182|  2.65M|    } else {
  183|   227k|      vec[0] =
  184|   227k|          (static_cast<int64_t>(vec[0]) * static_cast<int64_t>(center_value_)) /
  185|   227k|          abs_sum;
  186|   227k|      vec[1] =
  187|   227k|          (static_cast<int64_t>(vec[1]) * static_cast<int64_t>(center_value_)) /
  188|   227k|          abs_sum;
  189|   227k|      if (vec[2] >= 0) {
  ------------------
  |  Branch (189:11): [True: 120k, False: 106k]
  ------------------
  190|   120k|        vec[2] = center_value_ - std::abs(vec[0]) - std::abs(vec[1]);
  191|   120k|      } else {
  192|   106k|        vec[2] = -(center_value_ - std::abs(vec[0]) - std::abs(vec[1]));
  193|   106k|      }
  194|   227k|    }
  195|  2.87M|  }

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

_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    457|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    457|            attribute, transform, mesh_data),
   52|    457|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  193|    442|                                                                *buffer) {
  194|    442|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  195|    442|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    442|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (195:7): [True: 23, False: 419]
  ------------------
  196|       |    // Decode prediction mode.
  197|     23|    uint8_t mode;
  198|     23|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (198:9): [True: 1, False: 22]
  ------------------
  199|      1|      return false;
  200|      1|    }
  201|       |
  202|     22|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (202:9): [True: 16, False: 6]
  ------------------
  203|       |      // Unsupported mode.
  204|     16|      return false;
  205|     16|    }
  206|     22|  }
  207|    425|#endif
  208|       |
  209|       |  // Encode selected edges using separate rans bit coder for each context.
  210|  1.84k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (210:19): [True: 1.53k, False: 301]
  ------------------
  211|  1.53k|    uint32_t num_flags;
  212|  1.53k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (212:9): [True: 18, False: 1.52k]
  ------------------
  213|     18|      return false;
  214|     18|    }
  215|  1.52k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (215:9): [True: 67, False: 1.45k]
  ------------------
  216|     67|      return false;
  217|     67|    }
  218|  1.45k|    if (num_flags > 0) {
  ------------------
  |  Branch (218:9): [True: 612, False: 842]
  ------------------
  219|    612|      is_crease_edge_[i].resize(num_flags);
  220|    612|      RAnsBitDecoder decoder;
  221|    612|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (221:11): [True: 39, False: 573]
  ------------------
  222|     39|        return false;
  223|     39|      }
  224|  1.40M|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (224:28): [True: 1.40M, False: 573]
  ------------------
  225|  1.40M|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  226|  1.40M|      }
  227|    573|      decoder.EndDecoding();
  228|    573|    }
  229|  1.45k|  }
  230|    301|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  231|    301|                                     MeshDataT>::DecodePredictionData(buffer);
  232|    425|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    279|                          const PointIndex * /* entry_to_point_id_map */) {
   87|    279|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    279|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  1.39k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 1.11k, False: 279]
  ------------------
   93|  1.11k|    pred_vals[i].resize(num_components, 0);
   94|  1.11k|  }
   95|    279|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    279|                                         out_data);
   97|       |
   98|    279|  const CornerTable *const table = this->mesh_data().corner_table();
   99|    279|  const std::vector<int32_t> *const vertex_to_data_map =
  100|    279|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    279|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    279|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    279|  const int corner_map_size =
  109|    279|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|   846k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 846k, False: 157]
  ------------------
  111|   846k|    const CornerIndex start_corner_id =
  112|   846k|        this->mesh_data().data_to_corner_map()->at(p);
  113|       |
  114|   846k|    CornerIndex corner_id(start_corner_id);
  115|   846k|    int num_parallelograms = 0;
  116|   846k|    bool first_pass = true;
  117|  1.89M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (117:12): [True: 1.07M, False: 814k]
  ------------------
  118|  1.07M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (118:11): [True: 83.7k, False: 992k]
  ------------------
  119|  1.07M|              p, corner_id, table, *vertex_to_data_map, out_data,
  120|  1.07M|              num_components, &(pred_vals[num_parallelograms][0]))) {
  121|       |        // Parallelogram prediction applied and stored in
  122|       |        // |pred_vals[num_parallelograms]|
  123|  83.7k|        ++num_parallelograms;
  124|       |        // Stop processing when we reach the maximum number of allowed
  125|       |        // parallelograms.
  126|  83.7k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (126:13): [True: 581, False: 83.1k]
  ------------------
  127|    581|          break;
  128|    581|        }
  129|  83.7k|      }
  130|       |
  131|       |      // Proceed to the next corner attached to the vertex. First swing left
  132|       |      // and if we reach a boundary, swing right from the start corner.
  133|  1.07M|      if (first_pass) {
  ------------------
  |  Branch (133:11): [True: 1.03M, False: 41.0k]
  ------------------
  134|  1.03M|        corner_id = table->SwingLeft(corner_id);
  135|  1.03M|      } else {
  136|  41.0k|        corner_id = table->SwingRight(corner_id);
  137|  41.0k|      }
  138|  1.07M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (138:11): [True: 31.1k, False: 1.04M]
  ------------------
  139|  31.1k|        break;
  140|  31.1k|      }
  141|  1.04M|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (141:11): [True: 835k, False: 209k]
  |  Branch (141:47): [True: 814k, False: 20.0k]
  ------------------
  142|   814k|        first_pass = false;
  143|   814k|        corner_id = table->SwingRight(start_corner_id);
  144|   814k|      }
  145|  1.04M|    }
  146|       |
  147|       |    // Check which of the available parallelograms are actually used and compute
  148|       |    // the final predicted value.
  149|   846k|    int num_used_parallelograms = 0;
  150|   846k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (150:9): [True: 52.9k, False: 793k]
  ------------------
  151|  8.95M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (151:23): [True: 8.90M, False: 52.9k]
  ------------------
  152|  8.90M|        multi_pred_vals[i] = 0;
  153|  8.90M|      }
  154|       |      // Check which parallelograms are actually used.
  155|   136k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (155:23): [True: 83.6k, False: 52.8k]
  ------------------
  156|  83.6k|        const int context = num_parallelograms - 1;
  157|  83.6k|        const int pos = is_crease_edge_pos[context]++;
  158|  83.6k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (158:13): [True: 122, False: 83.5k]
  ------------------
  159|    122|          return false;
  160|    122|        }
  161|  83.5k|        const bool is_crease = is_crease_edge_[context][pos];
  162|  83.5k|        if (!is_crease) {
  ------------------
  |  Branch (162:13): [True: 12.9k, False: 70.6k]
  ------------------
  163|  12.9k|          ++num_used_parallelograms;
  164|  1.48M|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (164:27): [True: 1.46M, False: 12.9k]
  ------------------
  165|  1.46M|            multi_pred_vals[j] =
  166|  1.46M|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  167|  1.46M|          }
  168|  12.9k|        }
  169|  83.5k|      }
  170|  52.9k|    }
  171|   846k|    const int dst_offset = p * num_components;
  172|   846k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (172:9): [True: 840k, False: 6.24k]
  ------------------
  173|       |      // No parallelogram was valid.
  174|       |      // We use the last decoded point as a reference.
  175|   840k|      const int src_offset = (p - 1) * num_components;
  176|   840k|      this->transform().ComputeOriginalValue(
  177|   840k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  178|   840k|    } else {
  179|       |      // Compute the correction from the predicted value.
  180|   751k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (180:23): [True: 744k, False: 6.24k]
  ------------------
  181|   744k|        multi_pred_vals[c] /= num_used_parallelograms;
  182|   744k|      }
  183|  6.24k|      this->transform().ComputeOriginalValue(
  184|  6.24k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  185|  6.24k|    }
  186|   846k|  }
  187|    157|  return true;
  188|    279|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    494|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    494|            attribute, transform, mesh_data),
   52|    494|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  193|    480|                                                                *buffer) {
  194|    480|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  195|    480|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    480|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (195:7): [True: 3, False: 477]
  ------------------
  196|       |    // Decode prediction mode.
  197|      3|    uint8_t mode;
  198|      3|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (198:9): [True: 1, False: 2]
  ------------------
  199|      1|      return false;
  200|      1|    }
  201|       |
  202|      2|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (202:9): [True: 1, False: 1]
  ------------------
  203|       |      // Unsupported mode.
  204|      1|      return false;
  205|      1|    }
  206|      2|  }
  207|    478|#endif
  208|       |
  209|       |  // Encode selected edges using separate rans bit coder for each context.
  210|  2.06k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (210:19): [True: 1.71k, False: 357]
  ------------------
  211|  1.71k|    uint32_t num_flags;
  212|  1.71k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (212:9): [True: 15, False: 1.69k]
  ------------------
  213|     15|      return false;
  214|     15|    }
  215|  1.69k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (215:9): [True: 77, False: 1.62k]
  ------------------
  216|     77|      return false;
  217|     77|    }
  218|  1.62k|    if (num_flags > 0) {
  ------------------
  |  Branch (218:9): [True: 635, False: 985]
  ------------------
  219|    635|      is_crease_edge_[i].resize(num_flags);
  220|    635|      RAnsBitDecoder decoder;
  221|    635|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (221:11): [True: 29, False: 606]
  ------------------
  222|     29|        return false;
  223|     29|      }
  224|   915k|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (224:28): [True: 914k, False: 606]
  ------------------
  225|   914k|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  226|   914k|      }
  227|    606|      decoder.EndDecoding();
  228|    606|    }
  229|  1.62k|  }
  230|    357|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  231|    357|                                     MeshDataT>::DecodePredictionData(buffer);
  232|    478|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    316|                          const PointIndex * /* entry_to_point_id_map */) {
   87|    316|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    316|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  1.58k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 1.26k, False: 316]
  ------------------
   93|  1.26k|    pred_vals[i].resize(num_components, 0);
   94|  1.26k|  }
   95|    316|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    316|                                         out_data);
   97|       |
   98|    316|  const CornerTable *const table = this->mesh_data().corner_table();
   99|    316|  const std::vector<int32_t> *const vertex_to_data_map =
  100|    316|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    316|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    316|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    316|  const int corner_map_size =
  109|    316|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|   143k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 142k, False: 169]
  ------------------
  111|   142k|    const CornerIndex start_corner_id =
  112|   142k|        this->mesh_data().data_to_corner_map()->at(p);
  113|       |
  114|   142k|    CornerIndex corner_id(start_corner_id);
  115|   142k|    int num_parallelograms = 0;
  116|   142k|    bool first_pass = true;
  117|   862k|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (117:12): [True: 821k, False: 41.0k]
  ------------------
  118|   821k|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (118:11): [True: 240k, False: 580k]
  ------------------
  119|   821k|              p, corner_id, table, *vertex_to_data_map, out_data,
  120|   821k|              num_components, &(pred_vals[num_parallelograms][0]))) {
  121|       |        // Parallelogram prediction applied and stored in
  122|       |        // |pred_vals[num_parallelograms]|
  123|   240k|        ++num_parallelograms;
  124|       |        // Stop processing when we reach the maximum number of allowed
  125|       |        // parallelograms.
  126|   240k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (126:13): [True: 647, False: 240k]
  ------------------
  127|    647|          break;
  128|    647|        }
  129|   240k|      }
  130|       |
  131|       |      // Proceed to the next corner attached to the vertex. First swing left
  132|       |      // and if we reach a boundary, swing right from the start corner.
  133|   820k|      if (first_pass) {
  ------------------
  |  Branch (133:11): [True: 734k, False: 85.8k]
  ------------------
  134|   734k|        corner_id = table->SwingLeft(corner_id);
  135|   734k|      } else {
  136|  85.8k|        corner_id = table->SwingRight(corner_id);
  137|  85.8k|      }
  138|   820k|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (138:11): [True: 101k, False: 719k]
  ------------------
  139|   101k|        break;
  140|   101k|      }
  141|   719k|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (141:11): [True: 79.1k, False: 639k]
  |  Branch (141:47): [True: 41.0k, False: 38.1k]
  ------------------
  142|  41.0k|        first_pass = false;
  143|  41.0k|        corner_id = table->SwingRight(start_corner_id);
  144|  41.0k|      }
  145|   719k|    }
  146|       |
  147|       |    // Check which of the available parallelograms are actually used and compute
  148|       |    // the final predicted value.
  149|   142k|    int num_used_parallelograms = 0;
  150|   142k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (150:9): [True: 140k, False: 2.08k]
  ------------------
  151|  9.30M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (151:23): [True: 9.16M, False: 140k]
  ------------------
  152|  9.16M|        multi_pred_vals[i] = 0;
  153|  9.16M|      }
  154|       |      // Check which parallelograms are actually used.
  155|   381k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (155:23): [True: 240k, False: 140k]
  ------------------
  156|   240k|        const int context = num_parallelograms - 1;
  157|   240k|        const int pos = is_crease_edge_pos[context]++;
  158|   240k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (158:13): [True: 147, False: 240k]
  ------------------
  159|    147|          return false;
  160|    147|        }
  161|   240k|        const bool is_crease = is_crease_edge_[context][pos];
  162|   240k|        if (!is_crease) {
  ------------------
  |  Branch (162:13): [True: 10.3k, False: 230k]
  ------------------
  163|  10.3k|          ++num_used_parallelograms;
  164|   821k|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (164:27): [True: 810k, False: 10.3k]
  ------------------
  165|   810k|            multi_pred_vals[j] =
  166|   810k|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  167|   810k|          }
  168|  10.3k|        }
  169|   240k|      }
  170|   140k|    }
  171|   142k|    const int dst_offset = p * num_components;
  172|   142k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (172:9): [True: 138k, False: 4.45k]
  ------------------
  173|       |      // No parallelogram was valid.
  174|       |      // We use the last decoded point as a reference.
  175|   138k|      const int src_offset = (p - 1) * num_components;
  176|   138k|      this->transform().ComputeOriginalValue(
  177|   138k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  178|   138k|    } else {
  179|       |      // Compute the correction from the predicted value.
  180|   426k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (180:23): [True: 421k, False: 4.45k]
  ------------------
  181|   421k|        multi_pred_vals[c] /= num_used_parallelograms;
  182|   421k|      }
  183|  4.45k|      this->transform().ComputeOriginalValue(
  184|  4.45k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  185|  4.45k|    }
  186|   142k|  }
  187|    169|  return true;
  188|    316|}

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

_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|   825k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   313k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|   764k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   216k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  2.60k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  2.60k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|  7.36M|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  2.61k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  2.61k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|  3.14M|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    230|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    230|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    201|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    201|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    223|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    223|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    169|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    169|        mesh_data_(mesh_data) {}

_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    455|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    230|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    230|    DRACO_DCHECK_EQ(i, 0);
   70|    230|    (void)i;
   71|    230|    return GeometryAttribute::POSITION;
   72|    230|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    229|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    229|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 229]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    229|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 4, False: 225]
  ------------------
   79|      4|      return false;  // Currently works only for 3 component positions.
   80|      4|    }
   81|    225|    predictor_.SetPositionAttribute(*att);
   82|    225|    return true;
   83|    229|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    223|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    223|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 7, False: 216]
  ------------------
  145|      7|    return false;
  146|      7|  }
  147|       |
  148|    216|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    216|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    216|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 67, False: 149]
  ------------------
  150|     67|    uint8_t prediction_mode;
  151|     67|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 66]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|     66|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 2, False: 64]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      2|      return false;
  157|      2|    }
  158|       |
  159|     64|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 64]
  ------------------
  160|     64|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     64|  }
  164|    213|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    213|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 11, False: 202]
  ------------------
  168|     11|    return false;
  169|     11|  }
  170|       |
  171|    202|  return true;
  172|    213|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    202|                                      const PointIndex *entry_to_point_id_map) {
  103|    202|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    202|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    202|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    202|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    202|  const int corner_map_size =
  111|    202|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    202|  VectorD<int32_t, 3> pred_normal_3d;
  114|    202|  int32_t pred_normal_oct[2];
  115|       |
  116|   825k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 825k, False: 202]
  ------------------
  117|   825k|    const CornerIndex corner_id =
  118|   825k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   825k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   825k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   825k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   825k|                    octahedron_tool_box_.center_value());
  125|   825k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 663k, False: 161k]
  ------------------
  126|   663k|      pred_normal_3d = -pred_normal_3d;
  127|   663k|    }
  128|   825k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   825k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   825k|    const int data_offset = data_id * 2;
  132|   825k|    this->transform().ComputeOriginalValue(
  133|   825k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   825k|  }
  135|    202|  flip_normal_bit_decoder_.EndDecoding();
  136|    202|  return true;
  137|    202|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    202|  void SetQuantizationBits(int q) {
   85|    202|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    202|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    397|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    201|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    201|    DRACO_DCHECK_EQ(i, 0);
   70|    201|    (void)i;
   71|    201|    return GeometryAttribute::POSITION;
   72|    201|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    199|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    199|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 199]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    199|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 3, False: 196]
  ------------------
   79|      3|      return false;  // Currently works only for 3 component positions.
   80|      3|    }
   81|    196|    predictor_.SetPositionAttribute(*att);
   82|    196|    return true;
   83|    199|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    196|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    196|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 6, False: 190]
  ------------------
  145|      6|    return false;
  146|      6|  }
  147|       |
  148|    190|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    190|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    190|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 44, False: 146]
  ------------------
  150|     44|    uint8_t prediction_mode;
  151|     44|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 43]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|     43|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 1, False: 42]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      1|      return false;
  157|      1|    }
  158|       |
  159|     42|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 42]
  ------------------
  160|     42|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     42|  }
  164|    188|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    188|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 6, False: 182]
  ------------------
  168|      6|    return false;
  169|      6|  }
  170|       |
  171|    182|  return true;
  172|    188|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    182|                                      const PointIndex *entry_to_point_id_map) {
  103|    182|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    182|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    182|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    182|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    182|  const int corner_map_size =
  111|    182|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    182|  VectorD<int32_t, 3> pred_normal_3d;
  114|    182|  int32_t pred_normal_oct[2];
  115|       |
  116|   313k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 312k, False: 182]
  ------------------
  117|   312k|    const CornerIndex corner_id =
  118|   312k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   312k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   312k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   312k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   312k|                    octahedron_tool_box_.center_value());
  125|   312k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 243k, False: 69.7k]
  ------------------
  126|   243k|      pred_normal_3d = -pred_normal_3d;
  127|   243k|    }
  128|   312k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   312k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   312k|    const int data_offset = data_id * 2;
  132|   312k|    this->transform().ComputeOriginalValue(
  133|   312k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   312k|  }
  135|    182|  flip_normal_bit_decoder_.EndDecoding();
  136|    182|  return true;
  137|    182|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    182|  void SetQuantizationBits(int q) {
   85|    182|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    182|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    443|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    223|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    223|    DRACO_DCHECK_EQ(i, 0);
   70|    223|    (void)i;
   71|    223|    return GeometryAttribute::POSITION;
   72|    223|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    222|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    222|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 222]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    222|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 2, False: 220]
  ------------------
   79|      2|      return false;  // Currently works only for 3 component positions.
   80|      2|    }
   81|    220|    predictor_.SetPositionAttribute(*att);
   82|    220|    return true;
   83|    222|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    220|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    220|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 8, False: 212]
  ------------------
  145|      8|    return false;
  146|      8|  }
  147|       |
  148|    212|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    212|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    212|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 58, False: 154]
  ------------------
  150|     58|    uint8_t prediction_mode;
  151|     58|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 57]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|     57|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 6, False: 51]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      6|      return false;
  157|      6|    }
  158|       |
  159|     51|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 51]
  ------------------
  160|     51|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     51|  }
  164|    205|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    205|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 6, False: 199]
  ------------------
  168|      6|    return false;
  169|      6|  }
  170|       |
  171|    199|  return true;
  172|    205|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    199|                                      const PointIndex *entry_to_point_id_map) {
  103|    199|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    199|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    199|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    199|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    199|  const int corner_map_size =
  111|    199|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    199|  VectorD<int32_t, 3> pred_normal_3d;
  114|    199|  int32_t pred_normal_oct[2];
  115|       |
  116|   764k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 764k, False: 199]
  ------------------
  117|   764k|    const CornerIndex corner_id =
  118|   764k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   764k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   764k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   764k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   764k|                    octahedron_tool_box_.center_value());
  125|   764k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 405k, False: 359k]
  ------------------
  126|   405k|      pred_normal_3d = -pred_normal_3d;
  127|   405k|    }
  128|   764k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   764k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   764k|    const int data_offset = data_id * 2;
  132|   764k|    this->transform().ComputeOriginalValue(
  133|   764k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   764k|  }
  135|    199|  flip_normal_bit_decoder_.EndDecoding();
  136|    199|  return true;
  137|    199|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    199|  void SetQuantizationBits(int q) {
   85|    199|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    199|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    336|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    169|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    169|    DRACO_DCHECK_EQ(i, 0);
   70|    169|    (void)i;
   71|    169|    return GeometryAttribute::POSITION;
   72|    169|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    168|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    168|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 168]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    168|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 167]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    167|    predictor_.SetPositionAttribute(*att);
   82|    167|    return true;
   83|    168|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    167|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    167|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 9, False: 158]
  ------------------
  145|      9|    return false;
  146|      9|  }
  147|       |
  148|    158|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    158|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    158|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 16, False: 142]
  ------------------
  150|     16|    uint8_t prediction_mode;
  151|     16|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 0, False: 16]
  ------------------
  152|      0|      return false;
  153|      0|    }
  154|     16|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 1, False: 15]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      1|      return false;
  157|      1|    }
  158|       |
  159|     15|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 15]
  ------------------
  160|     15|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     15|  }
  164|    157|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    157|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 4, False: 153]
  ------------------
  168|      4|    return false;
  169|      4|  }
  170|       |
  171|    153|  return true;
  172|    157|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    153|                                      const PointIndex *entry_to_point_id_map) {
  103|    153|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    153|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    153|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    153|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    153|  const int corner_map_size =
  111|    153|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    153|  VectorD<int32_t, 3> pred_normal_3d;
  114|    153|  int32_t pred_normal_oct[2];
  115|       |
  116|   216k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 216k, False: 153]
  ------------------
  117|   216k|    const CornerIndex corner_id =
  118|   216k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   216k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   216k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   216k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   216k|                    octahedron_tool_box_.center_value());
  125|   216k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 202k, False: 14.3k]
  ------------------
  126|   202k|      pred_normal_3d = -pred_normal_3d;
  127|   202k|    }
  128|   216k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   216k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   216k|    const int data_offset = data_id * 2;
  132|   216k|    this->transform().ComputeOriginalValue(
  133|   216k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   216k|  }
  135|    153|  flip_normal_bit_decoder_.EndDecoding();
  136|    153|  return true;
  137|    153|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    153|  void SetQuantizationBits(int q) {
   85|    153|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    153|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    466|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    466|            attribute, transform, mesh_data),
   37|    466|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    927|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    466|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    466|    DRACO_DCHECK_EQ(i, 0);
   70|    466|    (void)i;
   71|    466|    return GeometryAttribute::POSITION;
   72|    466|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    463|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    463|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 463]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    463|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 2, False: 461]
  ------------------
   79|      2|      return false;  // Currently works only for 3 component positions.
   80|      2|    }
   81|    461|    predictor_.SetPositionAttribute(*att);
   82|    461|    return true;
   83|    463|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    461|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    461|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 36, False: 425]
  ------------------
  145|     36|    return false;
  146|     36|  }
  147|       |
  148|    425|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    425|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    425|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 229, False: 196]
  ------------------
  150|    229|    uint8_t prediction_mode;
  151|    229|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 2, False: 227]
  ------------------
  152|      2|      return false;
  153|      2|    }
  154|    227|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 4, False: 223]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      4|      return false;
  157|      4|    }
  158|       |
  159|    223|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 223]
  ------------------
  160|    223|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|    223|  }
  164|    419|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    419|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 24, False: 395]
  ------------------
  168|     24|    return false;
  169|     24|  }
  170|       |
  171|    395|  return true;
  172|    419|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    395|                                      const PointIndex *entry_to_point_id_map) {
  103|    395|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    395|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    395|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    395|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    395|  const int corner_map_size =
  111|    395|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    395|  VectorD<int32_t, 3> pred_normal_3d;
  114|    395|  int32_t pred_normal_oct[2];
  115|       |
  116|   489k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 489k, False: 395]
  ------------------
  117|   489k|    const CornerIndex corner_id =
  118|   489k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   489k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   489k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   489k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   489k|                    octahedron_tool_box_.center_value());
  125|   489k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 221k, False: 267k]
  ------------------
  126|   221k|      pred_normal_3d = -pred_normal_3d;
  127|   221k|    }
  128|   489k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   489k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   489k|    const int data_offset = data_id * 2;
  132|   489k|    this->transform().ComputeOriginalValue(
  133|   489k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   489k|  }
  135|    395|  flip_normal_bit_decoder_.EndDecoding();
  136|    395|  return true;
  137|    395|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    395|  void SetQuantizationBits(int q) {
   85|    395|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    395|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    450|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    450|            attribute, transform, mesh_data),
   37|    450|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    895|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    450|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    450|    DRACO_DCHECK_EQ(i, 0);
   70|    450|    (void)i;
   71|    450|    return GeometryAttribute::POSITION;
   72|    450|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    448|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    448|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 448]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    448|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 3, False: 445]
  ------------------
   79|      3|      return false;  // Currently works only for 3 component positions.
   80|      3|    }
   81|    445|    predictor_.SetPositionAttribute(*att);
   82|    445|    return true;
   83|    448|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    440|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    440|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 57, False: 383]
  ------------------
  145|     57|    return false;
  146|     57|  }
  147|       |
  148|    383|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    383|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    383|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 140, False: 243]
  ------------------
  150|    140|    uint8_t prediction_mode;
  151|    140|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 139]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|    139|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 2, False: 137]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      2|      return false;
  157|      2|    }
  158|       |
  159|    137|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 137]
  ------------------
  160|    137|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|    137|  }
  164|    380|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    380|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 19, False: 361]
  ------------------
  168|     19|    return false;
  169|     19|  }
  170|       |
  171|    361|  return true;
  172|    380|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    361|                                      const PointIndex *entry_to_point_id_map) {
  103|    361|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    361|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    361|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    361|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    361|  const int corner_map_size =
  111|    361|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    361|  VectorD<int32_t, 3> pred_normal_3d;
  114|    361|  int32_t pred_normal_oct[2];
  115|       |
  116|   269k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 268k, False: 361]
  ------------------
  117|   268k|    const CornerIndex corner_id =
  118|   268k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   268k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   268k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   268k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   268k|                    octahedron_tool_box_.center_value());
  125|   268k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 192k, False: 76.6k]
  ------------------
  126|   192k|      pred_normal_3d = -pred_normal_3d;
  127|   192k|    }
  128|   268k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   268k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   268k|    const int data_offset = data_id * 2;
  132|   268k|    this->transform().ComputeOriginalValue(
  133|   268k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   268k|  }
  135|    361|  flip_normal_bit_decoder_.EndDecoding();
  136|    361|  return true;
  137|    361|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    361|  void SetQuantizationBits(int q) {
   85|    361|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    361|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    230|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    230|            attribute, transform, mesh_data),
   37|    230|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    201|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    201|            attribute, transform, mesh_data),
   37|    201|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    223|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    223|            attribute, transform, mesh_data),
   37|    223|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    169|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    169|            attribute, transform, mesh_data),
   37|    169|        predictor_(mesh_data) {}

_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    294|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    294|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 59, False: 235]
  ------------------
  105|     59|      this->normal_prediction_mode_ = mode;
  106|     59|      return true;
  107|    235|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 235, False: 0]
  ------------------
  108|    235|      this->normal_prediction_mode_ = mode;
  109|    235|      return true;
  110|    235|    }
  111|      0|    return false;
  112|    294|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   825k|                             DataTypeT *prediction) override {
   42|   825k|    DRACO_DCHECK(this->IsInitialized());
   43|   825k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   825k|    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|   825k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   825k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   825k|    VectorD<int64_t, 3> normal;
   53|   825k|    CornerIndex c_next, c_prev;
   54|  1.75M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 925k, False: 825k]
  ------------------
   55|       |      // Getting corners.
   56|   925k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 318, False: 924k]
  ------------------
   57|    318|        c_next = corner_table->Next(corner_id);
   58|    318|        c_prev = corner_table->Previous(corner_id);
   59|   924k|      } else {
   60|   924k|        c_next = corner_table->Next(cit.Corner());
   61|   924k|        c_prev = corner_table->Previous(cit.Corner());
   62|   924k|      }
   63|   925k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   925k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   925k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   925k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   925k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   925k|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|   925k|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|   925k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   925k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   925k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   925k|      cit.Next();
   81|   925k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   825k|    constexpr int64_t upper_bound = 1 << 29;
   85|   825k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 212, False: 824k]
  ------------------
   86|    212|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    212|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 66, False: 146]
  ------------------
   88|     66|        const int64_t quotient = abs_sum / upper_bound;
   89|     66|        normal = normal / quotient;
   90|     66|      }
   91|   824k|    } else {
   92|   824k|      const int64_t abs_sum = normal.AbsSum();
   93|   824k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 3.32k, False: 821k]
  ------------------
   94|  3.32k|        const int64_t quotient = abs_sum / upper_bound;
   95|  3.32k|        normal = normal / quotient;
   96|  3.32k|      }
   97|   824k|    }
   98|   825k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   825k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   825k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   825k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   825k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    243|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    243|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 40, False: 203]
  ------------------
  105|     40|      this->normal_prediction_mode_ = mode;
  106|     40|      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|    243|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   312k|                             DataTypeT *prediction) override {
   42|   312k|    DRACO_DCHECK(this->IsInitialized());
   43|   312k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   312k|    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|   312k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   312k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   312k|    VectorD<int64_t, 3> normal;
   53|   312k|    CornerIndex c_next, c_prev;
   54|  2.17M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.86M, False: 312k]
  ------------------
   55|       |      // Getting corners.
   56|  1.86M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 240, False: 1.86M]
  ------------------
   57|    240|        c_next = corner_table->Next(corner_id);
   58|    240|        c_prev = corner_table->Previous(corner_id);
   59|  1.86M|      } else {
   60|  1.86M|        c_next = corner_table->Next(cit.Corner());
   61|  1.86M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.86M|      }
   63|  1.86M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.86M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.86M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.86M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.86M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.86M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.86M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.86M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.86M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.86M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.86M|      cit.Next();
   81|  1.86M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   312k|    constexpr int64_t upper_bound = 1 << 29;
   85|   312k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 160, False: 312k]
  ------------------
   86|    160|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    160|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 48, False: 112]
  ------------------
   88|     48|        const int64_t quotient = abs_sum / upper_bound;
   89|     48|        normal = normal / quotient;
   90|     48|      }
   91|   312k|    } else {
   92|   312k|      const int64_t abs_sum = normal.AbsSum();
   93|   312k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 112k, False: 200k]
  ------------------
   94|   112k|        const int64_t quotient = abs_sum / upper_bound;
   95|   112k|        normal = normal / quotient;
   96|   112k|      }
   97|   312k|    }
   98|   312k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   312k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   312k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   312k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   312k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    274|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    274|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 50, False: 224]
  ------------------
  105|     50|      this->normal_prediction_mode_ = mode;
  106|     50|      return true;
  107|    224|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 224, False: 0]
  ------------------
  108|    224|      this->normal_prediction_mode_ = mode;
  109|    224|      return true;
  110|    224|    }
  111|      0|    return false;
  112|    274|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   764k|                             DataTypeT *prediction) override {
   42|   764k|    DRACO_DCHECK(this->IsInitialized());
   43|   764k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   764k|    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|   764k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   764k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   764k|    VectorD<int64_t, 3> normal;
   53|   764k|    CornerIndex c_next, c_prev;
   54|  1.56M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 802k, False: 764k]
  ------------------
   55|       |      // Getting corners.
   56|   802k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 294, False: 802k]
  ------------------
   57|    294|        c_next = corner_table->Next(corner_id);
   58|    294|        c_prev = corner_table->Previous(corner_id);
   59|   802k|      } else {
   60|   802k|        c_next = corner_table->Next(cit.Corner());
   61|   802k|        c_prev = corner_table->Previous(cit.Corner());
   62|   802k|      }
   63|   802k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   802k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   802k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   802k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   802k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   802k|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|   802k|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|   802k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   802k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   802k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   802k|      cit.Next();
   81|   802k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   764k|    constexpr int64_t upper_bound = 1 << 29;
   85|   764k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 196, False: 764k]
  ------------------
   86|    196|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    196|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 44, False: 152]
  ------------------
   88|     44|        const int64_t quotient = abs_sum / upper_bound;
   89|     44|        normal = normal / quotient;
   90|     44|      }
   91|   764k|    } else {
   92|   764k|      const int64_t abs_sum = normal.AbsSum();
   93|   764k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 3.30k, False: 761k]
  ------------------
   94|  3.30k|        const int64_t quotient = abs_sum / upper_bound;
   95|  3.30k|        normal = normal / quotient;
   96|  3.30k|      }
   97|   764k|    }
   98|   764k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   764k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   764k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   764k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   764k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    184|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    184|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 14, False: 170]
  ------------------
  105|     14|      this->normal_prediction_mode_ = mode;
  106|     14|      return true;
  107|    170|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 170, False: 0]
  ------------------
  108|    170|      this->normal_prediction_mode_ = mode;
  109|    170|      return true;
  110|    170|    }
  111|      0|    return false;
  112|    184|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   216k|                             DataTypeT *prediction) override {
   42|   216k|    DRACO_DCHECK(this->IsInitialized());
   43|   216k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   216k|    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|   216k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   216k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   216k|    VectorD<int64_t, 3> normal;
   53|   216k|    CornerIndex c_next, c_prev;
   54|  1.50M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.29M, False: 216k]
  ------------------
   55|       |      // Getting corners.
   56|  1.29M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 78, False: 1.29M]
  ------------------
   57|     78|        c_next = corner_table->Next(corner_id);
   58|     78|        c_prev = corner_table->Previous(corner_id);
   59|  1.29M|      } else {
   60|  1.29M|        c_next = corner_table->Next(cit.Corner());
   61|  1.29M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.29M|      }
   63|  1.29M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.29M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.29M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.29M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.29M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.29M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.29M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.29M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.29M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.29M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.29M|      cit.Next();
   81|  1.29M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   216k|    constexpr int64_t upper_bound = 1 << 29;
   85|   216k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 52, False: 216k]
  ------------------
   86|     52|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|     52|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 18, False: 34]
  ------------------
   88|     18|        const int64_t quotient = abs_sum / upper_bound;
   89|     18|        normal = normal / quotient;
   90|     18|      }
   91|   216k|    } else {
   92|   216k|      const int64_t abs_sum = normal.AbsSum();
   93|   216k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 79.3k, False: 137k]
  ------------------
   94|  79.3k|        const int64_t quotient = abs_sum / upper_bound;
   95|  79.3k|        normal = normal / quotient;
   96|  79.3k|      }
   97|   216k|    }
   98|   216k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   216k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   216k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   216k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   216k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    466|      : Base(md) {
   35|    466|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    466|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    689|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    689|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 194, False: 495]
  ------------------
  105|    194|      this->normal_prediction_mode_ = mode;
  106|    194|      return true;
  107|    495|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 495, False: 0]
  ------------------
  108|    495|      this->normal_prediction_mode_ = mode;
  109|    495|      return true;
  110|    495|    }
  111|      0|    return false;
  112|    689|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   489k|                             DataTypeT *prediction) override {
   42|   489k|    DRACO_DCHECK(this->IsInitialized());
   43|   489k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   489k|    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|   489k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   489k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   489k|    VectorD<int64_t, 3> normal;
   53|   489k|    CornerIndex c_next, c_prev;
   54|  1.57M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.08M, False: 489k]
  ------------------
   55|       |      // Getting corners.
   56|  1.08M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 447k, False: 640k]
  ------------------
   57|   447k|        c_next = corner_table->Next(corner_id);
   58|   447k|        c_prev = corner_table->Previous(corner_id);
   59|   640k|      } else {
   60|   640k|        c_next = corner_table->Next(cit.Corner());
   61|   640k|        c_prev = corner_table->Previous(cit.Corner());
   62|   640k|      }
   63|  1.08M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.08M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.08M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.08M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.08M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.08M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.08M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.08M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.08M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.08M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.08M|      cit.Next();
   81|  1.08M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   489k|    constexpr int64_t upper_bound = 1 << 29;
   85|   489k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 75.6k, False: 413k]
  ------------------
   86|  75.6k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  75.6k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 407, False: 75.2k]
  ------------------
   88|    407|        const int64_t quotient = abs_sum / upper_bound;
   89|    407|        normal = normal / quotient;
   90|    407|      }
   91|   413k|    } else {
   92|   413k|      const int64_t abs_sum = normal.AbsSum();
   93|   413k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 2.10k, False: 411k]
  ------------------
   94|  2.10k|        const int64_t quotient = abs_sum / upper_bound;
   95|  2.10k|        normal = normal / quotient;
   96|  2.10k|      }
   97|   413k|    }
   98|   489k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   489k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   489k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   489k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   489k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    450|      : Base(md) {
   35|    450|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    450|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    587|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    587|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 124, False: 463]
  ------------------
  105|    124|      this->normal_prediction_mode_ = mode;
  106|    124|      return true;
  107|    463|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 463, False: 0]
  ------------------
  108|    463|      this->normal_prediction_mode_ = mode;
  109|    463|      return true;
  110|    463|    }
  111|      0|    return false;
  112|    587|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   268k|                             DataTypeT *prediction) override {
   42|   268k|    DRACO_DCHECK(this->IsInitialized());
   43|   268k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   268k|    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|   268k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   268k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   268k|    VectorD<int64_t, 3> normal;
   53|   268k|    CornerIndex c_next, c_prev;
   54|  1.84M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.57M, False: 268k]
  ------------------
   55|       |      // Getting corners.
   56|  1.57M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 393k, False: 1.18M]
  ------------------
   57|   393k|        c_next = corner_table->Next(corner_id);
   58|   393k|        c_prev = corner_table->Previous(corner_id);
   59|  1.18M|      } else {
   60|  1.18M|        c_next = corner_table->Next(cit.Corner());
   61|  1.18M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.18M|      }
   63|  1.57M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.57M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.57M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.57M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.57M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.57M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.57M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.57M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.57M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.57M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.57M|      cit.Next();
   81|  1.57M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   268k|    constexpr int64_t upper_bound = 1 << 29;
   85|   268k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 66.3k, False: 202k]
  ------------------
   86|  66.3k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  66.3k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 292, False: 66.0k]
  ------------------
   88|    292|        const int64_t quotient = abs_sum / upper_bound;
   89|    292|        normal = normal / quotient;
   90|    292|      }
   91|   202k|    } else {
   92|   202k|      const int64_t abs_sum = normal.AbsSum();
   93|   202k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 2.97k, False: 199k]
  ------------------
   94|  2.97k|        const int64_t quotient = abs_sum / upper_bound;
   95|  2.97k|        normal = normal / quotient;
   96|  2.97k|      }
   97|   202k|    }
   98|   268k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   268k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   268k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   268k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   268k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    230|      : Base(md) {
   35|    230|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    230|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    201|      : Base(md) {
   35|    201|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    201|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    223|      : Base(md) {
   35|    223|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    223|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    169|      : Base(md) {
   35|    169|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    169|  };

_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.67M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.67M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.67M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.67M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.67M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.67M|    return GetPositionForDataId(data_id);
   77|  2.67M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  2.67M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.67M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.67M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.67M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.67M|    VectorD<int64_t, 3> pos;
   68|  2.67M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.67M|    return pos;
   70|  2.67M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    225|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    225|    pos_attribute_ = &position_attribute;
   43|    225|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    202|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    202|    entry_to_point_id_map_ = map;
   46|    202|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  4.04M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  4.04M|    DRACO_DCHECK(this->IsInitialized());
   73|  4.04M|    const auto corner_table = mesh_data_.corner_table();
   74|  4.04M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  4.04M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  4.04M|    return GetPositionForDataId(data_id);
   77|  4.04M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  4.04M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  4.04M|    DRACO_DCHECK(this->IsInitialized());
   65|  4.04M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  4.04M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  4.04M|    VectorD<int64_t, 3> pos;
   68|  4.04M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  4.04M|    return pos;
   70|  4.04M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    196|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    196|    pos_attribute_ = &position_attribute;
   43|    196|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    182|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    182|    entry_to_point_id_map_ = map;
   46|    182|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.36M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.36M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.36M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.36M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.36M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.36M|    return GetPositionForDataId(data_id);
   77|  2.36M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  2.36M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.36M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.36M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.36M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.36M|    VectorD<int64_t, 3> pos;
   68|  2.36M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.36M|    return pos;
   70|  2.36M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    220|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    220|    pos_attribute_ = &position_attribute;
   43|    220|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    199|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    199|    entry_to_point_id_map_ = map;
   46|    199|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.79M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.79M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.79M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.79M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.79M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.79M|    return GetPositionForDataId(data_id);
   77|  2.79M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  2.79M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.79M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.79M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.79M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.79M|    VectorD<int64_t, 3> pos;
   68|  2.79M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.79M|    return pos;
   70|  2.79M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    167|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    167|    pos_attribute_ = &position_attribute;
   43|    167|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    153|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    153|    entry_to_point_id_map_ = map;
   46|    153|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    466|      : pos_attribute_(nullptr),
   36|    466|        entry_to_point_id_map_(nullptr),
   37|    466|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    466|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.66M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.66M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.66M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.66M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.66M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.66M|    return GetPositionForDataId(data_id);
   77|  2.66M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  2.66M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.66M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.66M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.66M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.66M|    VectorD<int64_t, 3> pos;
   68|  2.66M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.66M|    return pos;
   70|  2.66M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    461|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    461|    pos_attribute_ = &position_attribute;
   43|    461|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    395|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    395|    entry_to_point_id_map_ = map;
   46|    395|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    450|      : pos_attribute_(nullptr),
   36|    450|        entry_to_point_id_map_(nullptr),
   37|    450|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    450|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.42M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.42M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.42M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.42M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.42M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.42M|    return GetPositionForDataId(data_id);
   77|  3.42M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  3.42M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.42M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.42M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.42M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.42M|    VectorD<int64_t, 3> pos;
   68|  3.42M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.42M|    return pos;
   70|  3.42M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    445|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    445|    pos_attribute_ = &position_attribute;
   43|    445|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    361|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    361|    entry_to_point_id_map_ = map;
   46|    361|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    230|      : pos_attribute_(nullptr),
   36|    230|        entry_to_point_id_map_(nullptr),
   37|    230|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    230|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    201|      : pos_attribute_(nullptr),
   36|    201|        entry_to_point_id_map_(nullptr),
   37|    201|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    201|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    223|      : pos_attribute_(nullptr),
   36|    223|        entry_to_point_id_map_(nullptr),
   37|    223|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    223|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    169|      : pos_attribute_(nullptr),
   36|    169|        entry_to_point_id_map_(nullptr),
   37|    169|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    169|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}

_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    325|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    325|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    302|                          const PointIndex * /* entry_to_point_id_map */) {
   64|    302|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    302|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    302|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    302|      new DataTypeT[num_components]());
   70|       |
   71|    302|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    302|  const CornerTable *const table = this->mesh_data().corner_table();
   74|    302|  const std::vector<int32_t> *const vertex_to_data_map =
   75|    302|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    302|  const int corner_map_size =
   78|    302|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|   918k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (79:19): [True: 917k, False: 302]
  ------------------
   80|   917k|    const CornerIndex start_corner_id =
   81|   917k|        this->mesh_data().data_to_corner_map()->at(p);
   82|       |
   83|   917k|    CornerIndex corner_id(start_corner_id);
   84|   917k|    int num_parallelograms = 0;
   85|  33.1M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (85:21): [True: 32.2M, False: 917k]
  ------------------
   86|  32.2M|      pred_vals[i] = static_cast<DataTypeT>(0);
   87|  32.2M|    }
   88|  2.76M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (88:12): [True: 1.85M, False: 917k]
  ------------------
   89|  1.85M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (89:11): [True: 371k, False: 1.48M]
  ------------------
   90|  1.85M|              p, corner_id, table, *vertex_to_data_map, out_data,
   91|  1.85M|              num_components, parallelogram_pred_vals.get())) {
   92|  20.5M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (92:25): [True: 20.1M, False: 371k]
  ------------------
   93|  20.1M|          pred_vals[c] =
   94|  20.1M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   95|  20.1M|        }
   96|   371k|        ++num_parallelograms;
   97|   371k|      }
   98|       |
   99|       |      // Proceed to the next corner attached to the vertex.
  100|  1.85M|      corner_id = table->SwingRight(corner_id);
  101|  1.85M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (101:11): [True: 184k, False: 1.66M]
  ------------------
  102|   184k|        corner_id = kInvalidCornerIndex;
  103|   184k|      }
  104|  1.85M|    }
  105|       |
  106|   917k|    const int dst_offset = p * num_components;
  107|   917k|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (107:9): [True: 722k, False: 195k]
  ------------------
  108|       |      // No parallelogram was valid.
  109|       |      // We use the last decoded point as a reference.
  110|   722k|      const int src_offset = (p - 1) * num_components;
  111|   722k|      this->transform().ComputeOriginalValue(
  112|   722k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  113|   722k|    } else {
  114|       |      // Compute the correction from the predicted value.
  115|  10.5M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (115:23): [True: 10.3M, False: 195k]
  ------------------
  116|  10.3M|        pred_vals[c] /= num_parallelograms;
  117|  10.3M|      }
  118|   195k|      this->transform().ComputeOriginalValue(
  119|   195k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  120|   195k|    }
  121|   917k|  }
  122|    302|  return true;
  123|    302|}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    553|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    553|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    528|                          const PointIndex * /* entry_to_point_id_map */) {
   64|    528|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    528|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    528|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    528|      new DataTypeT[num_components]());
   70|       |
   71|    528|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    528|  const CornerTable *const table = this->mesh_data().corner_table();
   74|    528|  const std::vector<int32_t> *const vertex_to_data_map =
   75|    528|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    528|  const int corner_map_size =
   78|    528|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|   797k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (79:19): [True: 797k, False: 528]
  ------------------
   80|   797k|    const CornerIndex start_corner_id =
   81|   797k|        this->mesh_data().data_to_corner_map()->at(p);
   82|       |
   83|   797k|    CornerIndex corner_id(start_corner_id);
   84|   797k|    int num_parallelograms = 0;
   85|  23.0M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (85:21): [True: 22.2M, False: 797k]
  ------------------
   86|  22.2M|      pred_vals[i] = static_cast<DataTypeT>(0);
   87|  22.2M|    }
   88|  5.49M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (88:12): [True: 4.70M, False: 797k]
  ------------------
   89|  4.70M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (89:11): [True: 1.54M, False: 3.15M]
  ------------------
   90|  4.70M|              p, corner_id, table, *vertex_to_data_map, out_data,
   91|  4.70M|              num_components, parallelogram_pred_vals.get())) {
   92|  44.6M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (92:25): [True: 43.0M, False: 1.54M]
  ------------------
   93|  43.0M|          pred_vals[c] =
   94|  43.0M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   95|  43.0M|        }
   96|  1.54M|        ++num_parallelograms;
   97|  1.54M|      }
   98|       |
   99|       |      // Proceed to the next corner attached to the vertex.
  100|  4.70M|      corner_id = table->SwingRight(corner_id);
  101|  4.70M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (101:11): [True: 778k, False: 3.92M]
  ------------------
  102|   778k|        corner_id = kInvalidCornerIndex;
  103|   778k|      }
  104|  4.70M|    }
  105|       |
  106|   797k|    const int dst_offset = p * num_components;
  107|   797k|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (107:9): [True: 2.88k, False: 794k]
  ------------------
  108|       |      // No parallelogram was valid.
  109|       |      // We use the last decoded point as a reference.
  110|  2.88k|      const int src_offset = (p - 1) * num_components;
  111|  2.88k|      this->transform().ComputeOriginalValue(
  112|  2.88k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  113|   794k|    } else {
  114|       |      // Compute the correction from the predicted value.
  115|  22.9M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (115:23): [True: 22.1M, False: 794k]
  ------------------
  116|  22.1M|        pred_vals[c] /= num_parallelograms;
  117|  22.1M|      }
  118|   794k|      this->transform().ComputeOriginalValue(
  119|   794k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  120|   794k|    }
  121|   797k|  }
  122|    528|  return true;
  123|    528|}

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

_ZN5draco30ComputeParallelogramPredictionINS_24MeshAttributeCornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  4.28M|    int num_components, DataTypeT *out_prediction) {
   49|  4.28M|  const CornerIndex oci = table->Opposite(ci);
   50|  4.28M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 2.60M, False: 1.67M]
  ------------------
   51|  2.60M|    return false;
   52|  2.60M|  }
   53|  1.67M|  int vert_opp, vert_next, vert_prev;
   54|  1.67M|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  1.67M|                                        &vert_opp, &vert_next, &vert_prev);
   56|  1.67M|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 972k, False: 702k]
  |  Branch (56:35): [True: 769k, False: 202k]
  ------------------
   57|   769k|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 749k, False: 19.9k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|   749k|    const int v_opp_off = vert_opp * num_components;
   60|   749k|    const int v_next_off = vert_next * num_components;
   61|   749k|    const int v_prev_off = vert_prev * num_components;
   62|  41.7M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 41.0M, False: 749k]
  ------------------
   63|  41.0M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  41.0M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  41.0M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  41.0M|      const int64_t result =
   67|  41.0M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  41.0M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  41.0M|    }
   71|   749k|    return true;
   72|   749k|  }
   73|   924k|  return false;  // Not all data is available for prediction
   74|  1.67M|}
_ZN5draco23GetParallelogramEntriesINS_24MeshAttributeCornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  1.67M|    int *next_entry, int *prev_entry) {
   32|       |  // One vertex of the input |table| correspond to exactly one attribute value
   33|       |  // entry. The |table| can be either CornerTable for per-vertex attributes,
   34|       |  // or MeshAttributeCornerTable for attributes with interior seams.
   35|  1.67M|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  1.67M|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  1.67M|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  1.67M|}
_ZN5draco30ComputeParallelogramPredictionINS_11CornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  5.76M|    int num_components, DataTypeT *out_prediction) {
   49|  5.76M|  const CornerIndex oci = table->Opposite(ci);
   50|  5.76M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 56.4k, False: 5.71M]
  ------------------
   51|  56.4k|    return false;
   52|  56.4k|  }
   53|  5.71M|  int vert_opp, vert_next, vert_prev;
   54|  5.71M|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  5.71M|                                        &vert_opp, &vert_next, &vert_prev);
   56|  5.71M|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 2.94M, False: 2.76M]
  |  Branch (56:35): [True: 2.29M, False: 652k]
  ------------------
   57|  2.29M|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 2.03M, False: 258k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|  2.03M|    const int v_opp_off = vert_opp * num_components;
   60|  2.03M|    const int v_next_off = vert_next * num_components;
   61|  2.03M|    const int v_prev_off = vert_prev * num_components;
   62|  72.1M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 70.1M, False: 2.03M]
  ------------------
   63|  70.1M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  70.1M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  70.1M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  70.1M|      const int64_t result =
   67|  70.1M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  70.1M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  70.1M|    }
   71|  2.03M|    return true;
   72|  2.03M|  }
   73|  3.67M|  return false;  // Not all data is available for prediction
   74|  5.71M|}
_ZN5draco23GetParallelogramEntriesINS_11CornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  5.71M|    int *next_entry, int *prev_entry) {
   32|       |  // One vertex of the input |table| correspond to exactly one attribute value
   33|       |  // entry. The |table| can be either CornerTable for per-vertex attributes,
   34|       |  // or MeshAttributeCornerTable for attributes with interior seams.
   35|  5.71M|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  5.71M|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  5.71M|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  5.71M|}

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

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

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

_ZNK5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|    199|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    604|  bool AreCorrectionsPositive() override {
   71|    604|    return transform_.AreCorrectionsPositive();
   72|    604|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    185|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|    185|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 35, False: 150]
  ------------------
   50|     35|      return false;
   51|     35|    }
   52|    150|    return true;
   53|    185|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE9transformEv:
   81|  1.27M|  inline Transform &transform() { return transform_; }
_ZNK5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|    261|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    633|  bool AreCorrectionsPositive() override {
   71|    633|    return transform_.AreCorrectionsPositive();
   72|    633|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    246|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|    246|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 26, False: 220]
  ------------------
   50|     26|      return false;
   51|     26|    }
   52|    220|    return true;
   53|    246|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE9transformEv:
   81|  1.53M|  inline Transform &transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   46|  5.71k|      : attribute_(attribute), transform_(transform) {}
_ZNK5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22GetNumParentAttributesEv:
   58|  3.85k|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22AreCorrectionsPositiveEv:
   70|  5.46k|  bool AreCorrectionsPositive() override {
   71|  5.46k|    return transform_.AreCorrectionsPositive();
   72|  5.46k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|  4.21k|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|  4.21k|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 262, False: 3.94k]
  ------------------
   50|    262|      return false;
   51|    262|    }
   52|  3.94k|    return true;
   53|  4.21k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE9transformEv:
   81|  7.67M|  inline Transform &transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    630|      : attribute_(attribute), transform_(transform) {}
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    653|      : attribute_(attribute), transform_(transform) {}

_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    630|                                 const PointCloudDecoder *decoder) {
  188|    630|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    630|      method, att_id, decoder, TransformT());
  190|    630|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    630|                                 const TransformT &transform) {
  156|    630|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 630]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    630|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|    630|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 630, 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|    630|    const MeshDecoder *const mesh_decoder =
  167|    630|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|    630|    auto ret = CreateMeshPredictionScheme<
  170|    630|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    630|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    630|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    630|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 431, False: 199]
  ------------------
  174|    431|      return ret;
  175|    431|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    630|  }
  178|       |  // Create delta decoder.
  179|    199|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    199|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    630|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    246|      uint16_t bitstream_version) {
  143|    246|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    246|        method, attribute, transform, mesh_data, bitstream_version);
  145|    246|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    246|        uint16_t bitstream_version) {
  127|    246|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 230, False: 16]
  ------------------
  128|    230|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    230|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    230|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    230|                                                  mesh_data));
  132|    230|      }
  133|     16|      return nullptr;
  134|    246|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    206|      uint16_t bitstream_version) {
  143|    206|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    206|        method, attribute, transform, mesh_data, bitstream_version);
  145|    206|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    206|        uint16_t bitstream_version) {
  127|    206|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 201, False: 5]
  ------------------
  128|    201|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    201|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    201|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    201|                                                  mesh_data));
  132|    201|      }
  133|      5|      return nullptr;
  134|    206|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    653|                                 const PointCloudDecoder *decoder) {
  188|    653|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    653|      method, att_id, decoder, TransformT());
  190|    653|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    653|                                 const TransformT &transform) {
  156|    653|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 653]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    653|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|    653|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 653, 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|    653|    const MeshDecoder *const mesh_decoder =
  167|    653|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|    653|    auto ret = CreateMeshPredictionScheme<
  170|    653|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    653|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    653|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    653|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 392, False: 261]
  ------------------
  174|    392|      return ret;
  175|    392|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    653|  }
  178|       |  // Create delta decoder.
  179|    261|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    261|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    653|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__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_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    224|        uint16_t bitstream_version) {
  111|    224|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 223, False: 1]
  ------------------
  112|    223|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    223|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    223|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    223|                                                  mesh_data));
  116|    223|      }
  117|      1|      return nullptr;
  118|    224|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    172|      uint16_t bitstream_version) {
  143|    172|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    172|        method, attribute, transform, mesh_data, bitstream_version);
  145|    172|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    172|        uint16_t bitstream_version) {
  111|    172|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 169, False: 3]
  ------------------
  112|    169|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    169|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    169|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    169|                                                  mesh_data));
  116|    169|      }
  117|      3|      return nullptr;
  118|    172|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|  5.71k|                                 const PointCloudDecoder *decoder) {
  188|  5.71k|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|  5.71k|      method, att_id, decoder, TransformT());
  190|  5.71k|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|  5.71k|                                 const TransformT &transform) {
  156|  5.71k|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 5.71k]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|  5.71k|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|  5.71k|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 5.71k, 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|  5.71k|    const MeshDecoder *const mesh_decoder =
  167|  5.71k|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|  5.71k|    auto ret = CreateMeshPredictionScheme<
  170|  5.71k|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|  5.71k|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|  5.71k|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|  5.71k|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 5.21k, False: 499]
  ------------------
  174|  5.21k|      return ret;
  175|  5.21k|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|  5.71k|  }
  178|       |  // Create delta decoder.
  179|    499|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    499|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|  5.71k|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  2.60k|      uint16_t bitstream_version) {
  143|  2.60k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  2.60k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  2.60k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  2.60k|        uint16_t bitstream_version) {
   53|  2.60k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 881, False: 1.72k]
  ------------------
   54|    881|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    881|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    881|                                                         MeshDataT>(
   57|    881|                attribute, transform, mesh_data));
   58|    881|      }
   59|  1.72k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  1.72k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 325, False: 1.39k]
  ------------------
   61|    325|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    325|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    325|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    325|                                                  mesh_data));
   65|    325|      }
   66|  1.39k|#endif
   67|  1.39k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 457, False: 942]
  ------------------
   68|    457|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    457|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    457|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    457|                                                  mesh_data));
   72|    457|      }
   73|    942|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|    942|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 202, False: 740]
  ------------------
   75|    202|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    202|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    202|                                                     MeshDataT>(
   78|    202|                attribute, transform, mesh_data, bitstream_version));
   79|    202|      }
   80|    740|#endif
   81|    740|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 274, False: 466]
  ------------------
   82|    274|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    274|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    274|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    274|                                                  mesh_data));
   86|    274|      }
   87|    466|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    466|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 466, False: 0]
  ------------------
   89|    466|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    466|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    466|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    466|                                                  mesh_data));
   93|    466|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  2.60k|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  2.61k|      uint16_t bitstream_version) {
  143|  2.61k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  2.61k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  2.61k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  2.61k|        uint16_t bitstream_version) {
   53|  2.61k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 643, False: 1.96k]
  ------------------
   54|    643|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    643|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    643|                                                         MeshDataT>(
   57|    643|                attribute, transform, mesh_data));
   58|    643|      }
   59|  1.96k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  1.96k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 553, False: 1.41k]
  ------------------
   61|    553|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    553|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    553|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    553|                                                  mesh_data));
   65|    553|      }
   66|  1.41k|#endif
   67|  1.41k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 494, False: 921]
  ------------------
   68|    494|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    494|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    494|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    494|                                                  mesh_data));
   72|    494|      }
   73|    921|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|    921|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 201, False: 720]
  ------------------
   75|    201|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    201|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    201|                                                     MeshDataT>(
   78|    201|                attribute, transform, mesh_data, bitstream_version));
   79|    201|      }
   80|    720|#endif
   81|    720|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 270, False: 450]
  ------------------
   82|    270|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    270|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    270|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    270|                                                  mesh_data));
   86|    270|      }
   87|    450|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    450|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 450, False: 0]
  ------------------
   89|    450|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    450|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    450|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    450|                                                  mesh_data));
   93|    450|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  2.61k|    }

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

_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    630|    uint16_t bitstream_version) {
   38|    630|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|    630|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 630, False: 0]
  ------------------
   40|    630|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 114, False: 516]
  ------------------
   41|    516|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 4, False: 512]
  ------------------
   42|    512|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 2, False: 510]
  ------------------
   43|    510|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 0, False: 510]
  ------------------
   44|    510|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 457, False: 53]
  ------------------
   45|    584|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 7, False: 46]
  ------------------
   46|    584|    const CornerTable *const ct = source->GetCornerTable();
   47|    584|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|    584|        source->GetAttributeEncodingData(att_id);
   49|    584|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 132, False: 452]
  |  Branch (49:26): [True: 0, False: 452]
  ------------------
   50|       |      // No connectivity data found.
   51|    132|      return nullptr;
   52|    132|    }
   53|       |    // Connectivity data exists.
   54|    452|    const MeshAttributeCornerTable *const att_ct =
   55|    452|        source->GetAttributeCornerTable(att_id);
   56|    452|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 246, False: 206]
  ------------------
   57|    246|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    246|      MeshData md;
   59|    246|      md.Set(source->mesh(), att_ct,
   60|    246|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    246|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    246|      MeshPredictionSchemeFactoryT factory;
   63|    246|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    246|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 230, False: 16]
  ------------------
   65|    230|        return ret;
   66|    230|      }
   67|    246|    } else {
   68|    206|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    206|      MeshData md;
   70|    206|      md.Set(source->mesh(), ct,
   71|    206|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    206|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    206|      MeshPredictionSchemeFactoryT factory;
   74|    206|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    206|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 201, False: 5]
  ------------------
   76|    201|        return ret;
   77|    201|      }
   78|    206|    }
   79|    452|  }
   80|     67|  return nullptr;
   81|    630|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    653|    uint16_t bitstream_version) {
   38|    653|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|    653|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 653, False: 0]
  ------------------
   40|    653|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 21, False: 632]
  ------------------
   41|    632|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 31, False: 601]
  ------------------
   42|    601|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 4, False: 597]
  ------------------
   43|    597|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 11, False: 586]
  ------------------
   44|    586|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 463, False: 123]
  ------------------
   45|    571|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 41, False: 82]
  ------------------
   46|    571|    const CornerTable *const ct = source->GetCornerTable();
   47|    571|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|    571|        source->GetAttributeEncodingData(att_id);
   49|    571|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 175, False: 396]
  |  Branch (49:26): [True: 0, False: 396]
  ------------------
   50|       |      // No connectivity data found.
   51|    175|      return nullptr;
   52|    175|    }
   53|       |    // Connectivity data exists.
   54|    396|    const MeshAttributeCornerTable *const att_ct =
   55|    396|        source->GetAttributeCornerTable(att_id);
   56|    396|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 224, False: 172]
  ------------------
   57|    224|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    224|      MeshData md;
   59|    224|      md.Set(source->mesh(), att_ct,
   60|    224|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    224|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    224|      MeshPredictionSchemeFactoryT factory;
   63|    224|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    224|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 223, False: 1]
  ------------------
   65|    223|        return ret;
   66|    223|      }
   67|    224|    } else {
   68|    172|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    172|      MeshData md;
   70|    172|      md.Set(source->mesh(), ct,
   71|    172|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    172|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    172|      MeshPredictionSchemeFactoryT factory;
   74|    172|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    172|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 169, False: 3]
  ------------------
   76|    169|        return ret;
   77|    169|      }
   78|    172|    }
   79|    396|  }
   80|     86|  return nullptr;
   81|    653|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|  5.71k|    uint16_t bitstream_version) {
   38|  5.71k|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|  5.71k|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 5.71k, False: 0]
  ------------------
   40|  5.71k|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 1.63k, False: 4.08k]
  ------------------
   41|  4.08k|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 946, False: 3.13k]
  ------------------
   42|  3.13k|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 976, False: 2.16k]
  ------------------
   43|  2.16k|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 549, False: 1.61k]
  ------------------
   44|  1.61k|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 928, False: 686]
  ------------------
   45|  5.43k|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 403, False: 283]
  ------------------
   46|  5.43k|    const CornerTable *const ct = source->GetCornerTable();
   47|  5.43k|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|  5.43k|        source->GetAttributeEncodingData(att_id);
   49|  5.43k|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 216, False: 5.21k]
  |  Branch (49:26): [True: 0, False: 5.21k]
  ------------------
   50|       |      // No connectivity data found.
   51|    216|      return nullptr;
   52|    216|    }
   53|       |    // Connectivity data exists.
   54|  5.21k|    const MeshAttributeCornerTable *const att_ct =
   55|  5.21k|        source->GetAttributeCornerTable(att_id);
   56|  5.21k|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 2.60k, False: 2.61k]
  ------------------
   57|  2.60k|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|  2.60k|      MeshData md;
   59|  2.60k|      md.Set(source->mesh(), att_ct,
   60|  2.60k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|  2.60k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|  2.60k|      MeshPredictionSchemeFactoryT factory;
   63|  2.60k|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|  2.60k|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 2.60k, False: 0]
  ------------------
   65|  2.60k|        return ret;
   66|  2.60k|      }
   67|  2.61k|    } else {
   68|  2.61k|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|  2.61k|      MeshData md;
   70|  2.61k|      md.Set(source->mesh(), ct,
   71|  2.61k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|  2.61k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|  2.61k|      MeshPredictionSchemeFactoryT factory;
   74|  2.61k|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|  2.61k|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 2.61k, False: 0]
  ------------------
   76|  2.61k|        return ret;
   77|  2.61k|      }
   78|  2.61k|    }
   79|  5.21k|  }
   80|    283|  return nullptr;
   81|  5.71k|}

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

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

_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE14IsInBottomLeftERKNS_7VectorDIiLi2EEE:
   92|  1.53M|  bool IsInBottomLeft(const Point2 &p) const {
   93|  1.53M|    if (p[0] == 0 && p[1] == 0) {
  ------------------
  |  Branch (93:9): [True: 1.10M, False: 432k]
  |  Branch (93:22): [True: 1.01M, False: 85.6k]
  ------------------
   94|  1.01M|      return true;
   95|  1.01M|    }
   96|   517k|    return (p[0] < 0 && p[1] <= 0);
  ------------------
  |  Branch (96:13): [True: 250k, False: 267k]
  |  Branch (96:25): [True: 176k, False: 74.2k]
  ------------------
   97|  1.53M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE16GetRotationCountENS_7VectorDIiLi2EEE:
   50|  1.53M|  int32_t GetRotationCount(Point2 pred) const {
   51|  1.53M|    const DataType sign_x = pred[0];
   52|  1.53M|    const DataType sign_y = pred[1];
   53|       |
   54|  1.53M|    int32_t rotation_count = 0;
   55|  1.53M|    if (sign_x == 0) {
  ------------------
  |  Branch (55:9): [True: 1.10M, False: 432k]
  ------------------
   56|  1.10M|      if (sign_y == 0) {
  ------------------
  |  Branch (56:11): [True: 1.01M, False: 85.6k]
  ------------------
   57|  1.01M|        rotation_count = 0;
   58|  1.01M|      } else if (sign_y > 0) {
  ------------------
  |  Branch (58:18): [True: 64.1k, False: 21.4k]
  ------------------
   59|  64.1k|        rotation_count = 3;
   60|  64.1k|      } else {
   61|  21.4k|        rotation_count = 1;
   62|  21.4k|      }
   63|  1.10M|    } else if (sign_x > 0) {
  ------------------
  |  Branch (63:16): [True: 181k, False: 250k]
  ------------------
   64|   181k|      if (sign_y >= 0) {
  ------------------
  |  Branch (64:11): [True: 121k, False: 59.9k]
  ------------------
   65|   121k|        rotation_count = 2;
   66|   121k|      } else {
   67|  59.9k|        rotation_count = 1;
   68|  59.9k|      }
   69|   250k|    } else {
   70|   250k|      if (sign_y <= 0) {
  ------------------
  |  Branch (70:11): [True: 176k, False: 74.2k]
  ------------------
   71|   176k|        rotation_count = 0;
   72|   176k|      } else {
   73|  74.2k|        rotation_count = 3;
   74|  74.2k|      }
   75|   250k|    }
   76|  1.53M|    return rotation_count;
   77|  1.53M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE11RotatePointENS_7VectorDIiLi2EEEi:
   79|   683k|  Point2 RotatePoint(Point2 p, int32_t rotation_count) const {
   80|   683k|    switch (rotation_count) {
   81|   219k|      case 1:
  ------------------
  |  Branch (81:7): [True: 219k, False: 463k]
  ------------------
   82|   219k|        return Point2(p[1], -p[0]);
   83|   243k|      case 2:
  ------------------
  |  Branch (83:7): [True: 243k, False: 439k]
  ------------------
   84|   243k|        return Point2(-p[0], -p[1]);
   85|   219k|      case 3:
  ------------------
  |  Branch (85:7): [True: 219k, False: 463k]
  ------------------
   86|   219k|        return Point2(-p[1], p[0]);
   87|      0|      default:
  ------------------
  |  Branch (87:7): [True: 0, False: 683k]
  ------------------
   88|      0|        return p;
   89|   683k|    }
   90|   683k|  }
_ZN5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiEC2Ev:
   40|    653|  PredictionSchemeNormalOctahedronCanonicalizedTransformBase() : Base() {}

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

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

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

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

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

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

_ZN5draco37SequentialAttributeDecodersControllerC2ENSt3__110unique_ptrINS_15PointsSequencerENS1_14default_deleteIS3_EEEE:
   26|  35.2k|    : sequencer_(std::move(sequencer)) {}
_ZN5draco37SequentialAttributeDecodersController27DecodeAttributesDecoderDataEPNS_13DecoderBufferE:
   29|  9.20k|    DecoderBuffer *buffer) {
   30|  9.20k|  if (!AttributesDecoder::DecodeAttributesDecoderData(buffer)) {
  ------------------
  |  Branch (30:7): [True: 239, False: 8.96k]
  ------------------
   31|    239|    return false;
   32|    239|  }
   33|       |  // Decode unique ids of all sequential encoders and create them.
   34|  8.96k|  const int32_t num_attributes = GetNumAttributes();
   35|  8.96k|  sequential_decoders_.resize(num_attributes);
   36|  31.2k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (36:19): [True: 22.3k, False: 8.93k]
  ------------------
   37|  22.3k|    uint8_t decoder_type;
   38|  22.3k|    if (!buffer->Decode(&decoder_type)) {
  ------------------
  |  Branch (38:9): [True: 12, False: 22.3k]
  ------------------
   39|     12|      return false;
   40|     12|    }
   41|       |    // Create the decoder from the id.
   42|  22.3k|    sequential_decoders_[i] = CreateSequentialDecoder(decoder_type);
   43|  22.3k|    if (!sequential_decoders_[i]) {
  ------------------
  |  Branch (43:9): [True: 12, False: 22.3k]
  ------------------
   44|     12|      return false;
   45|     12|    }
   46|  22.3k|    if (!sequential_decoders_[i]->Init(GetDecoder(), GetAttributeId(i))) {
  ------------------
  |  Branch (46:9): [True: 5, False: 22.3k]
  ------------------
   47|      5|      return false;
   48|      5|    }
   49|  22.3k|  }
   50|  8.93k|  return true;
   51|  8.96k|}
_ZN5draco37SequentialAttributeDecodersController16DecodeAttributesEPNS_13DecoderBufferE:
   54|  6.26k|    DecoderBuffer *buffer) {
   55|  6.26k|  if (!sequencer_ || !sequencer_->GenerateSequence(&point_ids_)) {
  ------------------
  |  Branch (55:7): [True: 0, False: 6.26k]
  |  Branch (55:22): [True: 12, False: 6.25k]
  ------------------
   56|     12|    return false;
   57|     12|  }
   58|       |  // Initialize point to attribute value mapping for all decoded attributes.
   59|  6.25k|  const int32_t num_attributes = GetNumAttributes();
   60|  23.9k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (60:19): [True: 17.7k, False: 6.24k]
  ------------------
   61|  17.7k|    PointAttribute *const pa =
   62|  17.7k|        GetDecoder()->point_cloud()->attribute(GetAttributeId(i));
   63|  17.7k|    if (!sequencer_->UpdatePointToAttributeIndexMapping(pa)) {
  ------------------
  |  Branch (63:9): [True: 2, False: 17.7k]
  ------------------
   64|      2|      return false;
   65|      2|    }
   66|  17.7k|  }
   67|  6.24k|  return AttributesDecoder::DecodeAttributes(buffer);
   68|  6.25k|}
_ZN5draco37SequentialAttributeDecodersController24DecodePortableAttributesEPNS_13DecoderBufferE:
   71|  6.24k|    DecoderBuffer *in_buffer) {
   72|  6.24k|  const int32_t num_attributes = GetNumAttributes();
   73|  16.4k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (73:19): [True: 12.8k, False: 3.65k]
  ------------------
   74|  12.8k|    if (!sequential_decoders_[i]->DecodePortableAttribute(point_ids_,
  ------------------
  |  Branch (74:9): [True: 2.59k, False: 10.2k]
  ------------------
   75|  12.8k|                                                          in_buffer)) {
   76|  2.59k|      return false;
   77|  2.59k|    }
   78|  12.8k|  }
   79|  3.65k|  return true;
   80|  6.24k|}
_ZN5draco37SequentialAttributeDecodersController36DecodeDataNeededByPortableTransformsEPNS_13DecoderBufferE:
   83|  3.65k|    DecodeDataNeededByPortableTransforms(DecoderBuffer *in_buffer) {
   84|  3.65k|  const int32_t num_attributes = GetNumAttributes();
   85|  9.11k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (85:19): [True: 6.38k, False: 2.73k]
  ------------------
   86|  6.38k|    if (!sequential_decoders_[i]->DecodeDataNeededByPortableTransform(
  ------------------
  |  Branch (86:9): [True: 921, False: 5.46k]
  ------------------
   87|  6.38k|            point_ids_, in_buffer)) {
   88|    921|      return false;
   89|    921|    }
   90|  6.38k|  }
   91|  2.73k|  return true;
   92|  3.65k|}
_ZN5draco37SequentialAttributeDecodersController35TransformAttributesToOriginalFormatEv:
   95|  2.73k|    TransformAttributesToOriginalFormat() {
   96|  2.73k|  const int32_t num_attributes = GetNumAttributes();
   97|  7.03k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (97:19): [True: 4.69k, False: 2.33k]
  ------------------
   98|       |    // Check whether the attribute transform should be skipped.
   99|  4.69k|    if (GetDecoder()->options()) {
  ------------------
  |  Branch (99:9): [True: 4.69k, False: 0]
  ------------------
  100|  4.69k|      const PointAttribute *const attribute =
  101|  4.69k|          sequential_decoders_[i]->attribute();
  102|  4.69k|      const PointAttribute *const portable_attribute =
  103|  4.69k|          sequential_decoders_[i]->GetPortableAttribute();
  104|  4.69k|      if (portable_attribute &&
  ------------------
  |  Branch (104:11): [True: 4.19k, False: 504]
  |  Branch (104:11): [True: 792, False: 3.90k]
  ------------------
  105|  4.19k|          GetDecoder()->options()->GetAttributeBool(
  ------------------
  |  Branch (105:11): [True: 792, False: 3.39k]
  ------------------
  106|  4.19k|              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|    792|        sequential_decoders_[i]->attribute()->CopyFrom(*portable_attribute);
  113|    792|        continue;
  114|    792|      }
  115|  4.69k|    }
  116|  3.90k|    if (!sequential_decoders_[i]->TransformAttributeToOriginalFormat(
  ------------------
  |  Branch (116:9): [True: 394, False: 3.50k]
  ------------------
  117|  3.90k|            point_ids_)) {
  118|    394|      return false;
  119|    394|    }
  120|  3.90k|  }
  121|  2.33k|  return true;
  122|  2.73k|}
_ZN5draco37SequentialAttributeDecodersController23CreateSequentialDecoderEh:
  126|  22.3k|    uint8_t decoder_type) {
  127|  22.3k|  switch (decoder_type) {
  128|  2.05k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_GENERIC:
  ------------------
  |  Branch (128:5): [True: 2.05k, False: 20.2k]
  ------------------
  129|  2.05k|      return std::unique_ptr<SequentialAttributeDecoder>(
  130|  2.05k|          new SequentialAttributeDecoder());
  131|  18.0k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_INTEGER:
  ------------------
  |  Branch (131:5): [True: 18.0k, False: 4.28k]
  ------------------
  132|  18.0k|      return std::unique_ptr<SequentialAttributeDecoder>(
  133|  18.0k|          new SequentialIntegerAttributeDecoder());
  134|    705|    case SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION:
  ------------------
  |  Branch (134:5): [True: 705, False: 21.6k]
  ------------------
  135|    705|      return std::unique_ptr<SequentialAttributeDecoder>(
  136|    705|          new SequentialQuantizationAttributeDecoder());
  137|      0|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
  138|  1.51k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS:
  ------------------
  |  Branch (138:5): [True: 1.51k, False: 20.8k]
  ------------------
  139|  1.51k|      return std::unique_ptr<SequentialNormalAttributeDecoder>(
  140|  1.51k|          new SequentialNormalAttributeDecoder());
  141|      0|#endif
  142|     12|    default:
  ------------------
  |  Branch (142:5): [True: 12, False: 22.3k]
  ------------------
  143|     12|      break;
  144|  22.3k|  }
  145|       |  // Unknown or unsupported decoder type.
  146|     12|  return nullptr;
  147|  22.3k|}

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

_ZN5draco33SequentialIntegerAttributeDecoderC2Ev:
   23|  20.2k|SequentialIntegerAttributeDecoder::SequentialIntegerAttributeDecoder() {}
_ZN5draco33SequentialIntegerAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   26|  20.2k|                                             int attribute_id) {
   27|  20.2k|  if (!SequentialAttributeDecoder::Init(decoder, attribute_id)) {
  ------------------
  |  Branch (27:7): [True: 0, False: 20.2k]
  ------------------
   28|      0|    return false;
   29|      0|  }
   30|  20.2k|  return true;
   31|  20.2k|}
_ZN5draco33SequentialIntegerAttributeDecoder34TransformAttributeToOriginalFormatERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEE:
   34|  3.39k|    const std::vector<PointIndex> &point_ids) {
   35|  3.39k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   36|  3.39k|  if (decoder() &&
  ------------------
  |  Branch (36:7): [True: 3.39k, False: 0]
  ------------------
   37|  3.39k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.39k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (37:7): [True: 1, False: 3.39k]
  ------------------
   38|      1|    return true;  // Don't revert the transform here for older files.
   39|      1|  }
   40|  3.39k|#endif
   41|  3.39k|  return StoreValues(static_cast<uint32_t>(point_ids.size()));
   42|  3.39k|}
_ZN5draco33SequentialIntegerAttributeDecoder12DecodeValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   45|  12.0k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   46|       |  // Decode prediction scheme.
   47|  12.0k|  int8_t prediction_scheme_method;
   48|  12.0k|  if (!in_buffer->Decode(&prediction_scheme_method)) {
  ------------------
  |  Branch (48:7): [True: 214, False: 11.8k]
  ------------------
   49|    214|    return false;
   50|    214|  }
   51|       |  // Check that decoded prediction scheme method type is valid.
   52|  11.8k|  if (prediction_scheme_method < PREDICTION_NONE ||
  ------------------
  |  Branch (52:7): [True: 63, False: 11.8k]
  ------------------
   53|  11.8k|      prediction_scheme_method >= NUM_PREDICTION_SCHEMES) {
  ------------------
  |  Branch (53:7): [True: 151, False: 11.6k]
  ------------------
   54|    214|    return false;
   55|    214|  }
   56|  11.6k|  if (prediction_scheme_method != PREDICTION_NONE) {
  ------------------
  |  Branch (56:7): [True: 11.3k, False: 358]
  ------------------
   57|  11.3k|    int8_t prediction_transform_type;
   58|  11.3k|    if (!in_buffer->Decode(&prediction_transform_type)) {
  ------------------
  |  Branch (58:9): [True: 71, False: 11.2k]
  ------------------
   59|     71|      return false;
   60|     71|    }
   61|       |    // Check that decoded prediction scheme transform type is valid.
   62|  11.2k|    if (prediction_transform_type < PREDICTION_TRANSFORM_NONE ||
  ------------------
  |  Branch (62:9): [True: 27, False: 11.2k]
  ------------------
   63|  11.2k|        prediction_transform_type >= NUM_PREDICTION_SCHEME_TRANSFORM_TYPES) {
  ------------------
  |  Branch (63:9): [True: 78, False: 11.1k]
  ------------------
   64|    105|      return false;
   65|    105|    }
   66|  11.1k|    prediction_scheme_ = CreateIntPredictionScheme(
   67|  11.1k|        static_cast<PredictionSchemeMethod>(prediction_scheme_method),
   68|  11.1k|        static_cast<PredictionSchemeTransformType>(prediction_transform_type));
   69|  11.1k|  }
   70|       |
   71|  11.4k|  if (prediction_scheme_) {
  ------------------
  |  Branch (71:7): [True: 6.99k, False: 4.49k]
  ------------------
   72|  6.99k|    if (!InitPredictionScheme(prediction_scheme_.get())) {
  ------------------
  |  Branch (72:9): [True: 38, False: 6.96k]
  ------------------
   73|     38|      return false;
   74|     38|    }
   75|  6.99k|  }
   76|       |
   77|  11.4k|  if (!DecodeIntegerValues(point_ids, in_buffer)) {
  ------------------
  |  Branch (77:7): [True: 1.82k, False: 9.63k]
  ------------------
   78|  1.82k|    return false;
   79|  1.82k|  }
   80|       |
   81|  9.63k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   82|  9.63k|  const int32_t num_values = static_cast<uint32_t>(point_ids.size());
   83|  9.63k|  if (decoder() &&
  ------------------
  |  Branch (83:7): [True: 9.63k, False: 0]
  ------------------
   84|  9.63k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  9.63k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (84:7): [True: 24, False: 9.60k]
  ------------------
   85|       |    // For older files, revert the transform right after we decode the data.
   86|     24|    if (!StoreValues(num_values)) {
  ------------------
  |  Branch (86:9): [True: 1, False: 23]
  ------------------
   87|      1|      return false;
   88|      1|    }
   89|     24|  }
   90|  9.63k|#endif
   91|  9.63k|  return true;
   92|  9.63k|}
_ZN5draco33SequentialIntegerAttributeDecoder25CreateIntPredictionSchemeENS_22PredictionSchemeMethodENS_29PredictionSchemeTransformTypeE:
   97|  9.80k|    PredictionSchemeTransformType transform_type) {
   98|  9.80k|  if (transform_type != PREDICTION_TRANSFORM_WRAP) {
  ------------------
  |  Branch (98:7): [True: 4.08k, False: 5.71k]
  ------------------
   99|  4.08k|    return nullptr;  // For now we support only wrap transform.
  100|  4.08k|  }
  101|  5.71k|  return CreatePredictionSchemeForDecoder<
  102|  5.71k|      int32_t, PredictionSchemeWrapDecodingTransform<int32_t>>(
  103|  5.71k|      method, attribute_id(), decoder());
  104|  9.80k|}
_ZN5draco33SequentialIntegerAttributeDecoder19DecodeIntegerValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
  107|  11.4k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
  108|  11.4k|  const int num_components = GetNumValueComponents();
  109|  11.4k|  if (num_components <= 0) {
  ------------------
  |  Branch (109:7): [True: 0, False: 11.4k]
  ------------------
  110|      0|    return false;
  111|      0|  }
  112|  11.4k|  const size_t num_entries = point_ids.size();
  113|  11.4k|  const size_t num_values = num_entries * num_components;
  114|  11.4k|  PreparePortableAttribute(static_cast<int>(num_entries), num_components);
  115|  11.4k|  int32_t *const portable_attribute_data = GetPortableAttributeData();
  116|  11.4k|  if (portable_attribute_data == nullptr) {
  ------------------
  |  Branch (116:7): [True: 15, False: 11.4k]
  ------------------
  117|     15|    return false;
  118|     15|  }
  119|  11.4k|  uint8_t compressed;
  120|  11.4k|  if (!in_buffer->Decode(&compressed)) {
  ------------------
  |  Branch (120:7): [True: 38, False: 11.3k]
  ------------------
  121|     38|    return false;
  122|     38|  }
  123|  11.3k|  if (compressed > 0) {
  ------------------
  |  Branch (123:7): [True: 744, False: 10.6k]
  ------------------
  124|       |    // Decode compressed values.
  125|    744|    if (!DecodeSymbols(static_cast<uint32_t>(num_values), num_components,
  ------------------
  |  Branch (125:9): [True: 308, False: 436]
  ------------------
  126|    744|                       in_buffer,
  127|    744|                       reinterpret_cast<uint32_t *>(portable_attribute_data))) {
  128|    308|      return false;
  129|    308|    }
  130|  10.6k|  } else {
  131|       |    // Decode the integer data directly.
  132|       |    // Get the number of bytes for a given entry.
  133|  10.6k|    uint8_t num_bytes;
  134|  10.6k|    if (!in_buffer->Decode(&num_bytes)) {
  ------------------
  |  Branch (134:9): [True: 11, False: 10.6k]
  ------------------
  135|     11|      return false;
  136|     11|    }
  137|  10.6k|    if (num_bytes == DataTypeLength(DT_INT32)) {
  ------------------
  |  Branch (137:9): [True: 420, False: 10.2k]
  ------------------
  138|    420|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (138:11): [True: 0, False: 420]
  ------------------
  139|    420|          sizeof(int32_t) * num_values) {
  140|      0|        return false;
  141|      0|      }
  142|    420|      if (!in_buffer->Decode(portable_attribute_data,
  ------------------
  |  Branch (142:11): [True: 3, False: 417]
  ------------------
  143|    420|                             sizeof(int32_t) * num_values)) {
  144|      3|        return false;
  145|      3|      }
  146|  10.2k|    } else {
  147|  10.2k|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (147:11): [True: 24, False: 10.1k]
  ------------------
  148|  10.2k|          num_bytes * num_values) {
  149|     24|        return false;
  150|     24|      }
  151|  10.1k|      if (in_buffer->remaining_size() <
  ------------------
  |  Branch (151:11): [True: 24, False: 10.1k]
  ------------------
  152|  10.1k|          static_cast<int64_t>(num_bytes) * static_cast<int64_t>(num_values)) {
  153|     24|        return false;
  154|     24|      }
  155|  1.06G|      for (size_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (155:26): [True: 1.06G, False: 10.1k]
  ------------------
  156|  1.06G|        if (!in_buffer->Decode(portable_attribute_data + i, num_bytes)) {
  ------------------
  |  Branch (156:13): [True: 0, False: 1.06G]
  ------------------
  157|      0|          return false;
  158|      0|        }
  159|  1.06G|      }
  160|  10.1k|    }
  161|  10.6k|  }
  162|       |
  163|  11.0k|  if (num_values > 0 && (prediction_scheme_ == nullptr ||
  ------------------
  |  Branch (163:7): [True: 11.0k, False: 0]
  |  Branch (163:26): [True: 4.32k, False: 6.70k]
  ------------------
  164|  9.78k|                         !prediction_scheme_->AreCorrectionsPositive())) {
  ------------------
  |  Branch (164:26): [True: 5.46k, False: 1.23k]
  ------------------
  165|       |    // Convert the values back to the original signed format.
  166|  9.78k|    ConvertSymbolsToSignedInts(
  167|  9.78k|        reinterpret_cast<const uint32_t *>(portable_attribute_data),
  168|  9.78k|        static_cast<int>(num_values), portable_attribute_data);
  169|  9.78k|  }
  170|       |
  171|       |  // If the data was encoded with a prediction scheme, we must revert it.
  172|  11.0k|  if (prediction_scheme_) {
  ------------------
  |  Branch (172:7): [True: 6.70k, False: 4.32k]
  ------------------
  173|  6.70k|    if (!prediction_scheme_->DecodePredictionData(in_buffer)) {
  ------------------
  |  Branch (173:9): [True: 893, False: 5.81k]
  ------------------
  174|    893|      return false;
  175|    893|    }
  176|       |
  177|  5.81k|    if (num_values > 0) {
  ------------------
  |  Branch (177:9): [True: 5.81k, False: 0]
  ------------------
  178|  5.81k|      if (!prediction_scheme_->ComputeOriginalValues(
  ------------------
  |  Branch (178:11): [True: 501, False: 5.31k]
  ------------------
  179|  5.81k|              portable_attribute_data, portable_attribute_data,
  180|  5.81k|              static_cast<int>(num_values), num_components, point_ids.data())) {
  181|    501|        return false;
  182|    501|      }
  183|  5.81k|    }
  184|  5.81k|  }
  185|  9.63k|  return true;
  186|  11.0k|}
_ZN5draco33SequentialIntegerAttributeDecoder11StoreValuesEj:
  188|  2.84k|bool SequentialIntegerAttributeDecoder::StoreValues(uint32_t num_values) {
  189|  2.84k|  switch (attribute()->data_type()) {
  190|    178|    case DT_UINT8:
  ------------------
  |  Branch (190:5): [True: 178, False: 2.67k]
  ------------------
  191|    178|      StoreTypedValues<uint8_t>(num_values);
  192|    178|      break;
  193|  1.96k|    case DT_INT8:
  ------------------
  |  Branch (193:5): [True: 1.96k, False: 880]
  ------------------
  194|  1.96k|      StoreTypedValues<int8_t>(num_values);
  195|  1.96k|      break;
  196|     82|    case DT_UINT16:
  ------------------
  |  Branch (196:5): [True: 82, False: 2.76k]
  ------------------
  197|     82|      StoreTypedValues<uint16_t>(num_values);
  198|     82|      break;
  199|    150|    case DT_INT16:
  ------------------
  |  Branch (199:5): [True: 150, False: 2.69k]
  ------------------
  200|    150|      StoreTypedValues<int16_t>(num_values);
  201|    150|      break;
  202|    143|    case DT_UINT32:
  ------------------
  |  Branch (202:5): [True: 143, False: 2.70k]
  ------------------
  203|    143|      StoreTypedValues<uint32_t>(num_values);
  204|    143|      break;
  205|    217|    case DT_INT32:
  ------------------
  |  Branch (205:5): [True: 217, False: 2.63k]
  ------------------
  206|    217|      StoreTypedValues<int32_t>(num_values);
  207|    217|      break;
  208|    110|    default:
  ------------------
  |  Branch (208:5): [True: 110, False: 2.73k]
  ------------------
  209|    110|      return false;
  210|  2.84k|  }
  211|  2.73k|  return true;
  212|  2.84k|}
_ZN5draco33SequentialIntegerAttributeDecoder24PreparePortableAttributeEii:
  236|  11.4k|    int num_entries, int num_components) {
  237|  11.4k|  GeometryAttribute ga;
  238|  11.4k|  ga.Init(attribute()->attribute_type(), nullptr, num_components, DT_INT32,
  239|  11.4k|          false, num_components * DataTypeLength(DT_INT32), 0);
  240|  11.4k|  std::unique_ptr<PointAttribute> port_att(new PointAttribute(ga));
  241|  11.4k|  port_att->SetIdentityMapping();
  242|  11.4k|  port_att->Reset(num_entries);
  243|  11.4k|  port_att->set_unique_id(attribute()->unique_id());
  244|  11.4k|  SetPortableAttribute(std::move(port_att));
  245|  11.4k|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIhEEvj:
  215|    178|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    178|  const int num_components = attribute()->num_components();
  217|    178|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    178|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    178|      new AttributeTypeT[num_components]);
  220|    178|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    178|  int val_id = 0;
  222|    178|  int out_byte_pos = 0;
  223|   522k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 521k, False: 178]
  ------------------
  224|  9.18M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 8.66M, False: 521k]
  ------------------
  225|  8.66M|      const AttributeTypeT value =
  226|  8.66M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|  8.66M|      att_val[c] = value;
  228|  8.66M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|   521k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|   521k|    out_byte_pos += entry_size;
  232|   521k|  }
  233|    178|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIaEEvj:
  215|  1.96k|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|  1.96k|  const int num_components = attribute()->num_components();
  217|  1.96k|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|  1.96k|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|  1.96k|      new AttributeTypeT[num_components]);
  220|  1.96k|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|  1.96k|  int val_id = 0;
  222|  1.96k|  int out_byte_pos = 0;
  223|  5.83M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 5.83M, False: 1.96k]
  ------------------
  224|   394M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 388M, False: 5.83M]
  ------------------
  225|   388M|      const AttributeTypeT value =
  226|   388M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|   388M|      att_val[c] = value;
  228|   388M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|  5.83M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|  5.83M|    out_byte_pos += entry_size;
  232|  5.83M|  }
  233|  1.96k|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesItEEvj:
  215|     82|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|     82|  const int num_components = attribute()->num_components();
  217|     82|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|     82|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|     82|      new AttributeTypeT[num_components]);
  220|     82|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|     82|  int val_id = 0;
  222|     82|  int out_byte_pos = 0;
  223|   278k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 278k, False: 82]
  ------------------
  224|  14.1M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 13.8M, False: 278k]
  ------------------
  225|  13.8M|      const AttributeTypeT value =
  226|  13.8M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|  13.8M|      att_val[c] = value;
  228|  13.8M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|   278k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|   278k|    out_byte_pos += entry_size;
  232|   278k|  }
  233|     82|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIsEEvj:
  215|    150|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    150|  const int num_components = attribute()->num_components();
  217|    150|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    150|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    150|      new AttributeTypeT[num_components]);
  220|    150|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    150|  int val_id = 0;
  222|    150|  int out_byte_pos = 0;
  223|   444k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 443k, False: 150]
  ------------------
  224|  21.3M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 20.9M, False: 443k]
  ------------------
  225|  20.9M|      const AttributeTypeT value =
  226|  20.9M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|  20.9M|      att_val[c] = value;
  228|  20.9M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|   443k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|   443k|    out_byte_pos += entry_size;
  232|   443k|  }
  233|    150|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIjEEvj:
  215|    143|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    143|  const int num_components = attribute()->num_components();
  217|    143|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    143|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    143|      new AttributeTypeT[num_components]);
  220|    143|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    143|  int val_id = 0;
  222|    143|  int out_byte_pos = 0;
  223|   944k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 944k, False: 143]
  ------------------
  224|   177M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 176M, False: 944k]
  ------------------
  225|   176M|      const AttributeTypeT value =
  226|   176M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|   176M|      att_val[c] = value;
  228|   176M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|   944k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|   944k|    out_byte_pos += entry_size;
  232|   944k|  }
  233|    143|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIiEEvj:
  215|    217|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    217|  const int num_components = attribute()->num_components();
  217|    217|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    217|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    217|      new AttributeTypeT[num_components]);
  220|    217|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    217|  int val_id = 0;
  222|    217|  int out_byte_pos = 0;
  223|  1.75M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 1.75M, False: 217]
  ------------------
  224|   202M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 201M, False: 1.75M]
  ------------------
  225|   201M|      const AttributeTypeT value =
  226|   201M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|   201M|      att_val[c] = value;
  228|   201M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|  1.75M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|  1.75M|    out_byte_pos += entry_size;
  232|  1.75M|  }
  233|    217|}

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

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

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

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

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

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

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

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

_ZN5draco10AnsDecoderC2Ev:
   56|  34.6k|  AnsDecoder() : buf(nullptr), buf_offset(0), state(0) {}
rans_bit_decoder.cc:_ZN5dracoL13ans_read_initEPNS_10AnsDecoderEPKhi:
  300|  21.6k|                                const uint8_t *const buf, int offset) {
  301|  21.6k|  unsigned x;
  302|  21.6k|  if (offset < 1) {
  ------------------
  |  Branch (302:7): [True: 29, False: 21.6k]
  ------------------
  303|     29|    return 1;
  304|     29|  }
  305|  21.6k|  ans->buf = buf;
  306|  21.6k|  x = buf[offset - 1] >> 6;
  307|  21.6k|  if (x == 0) {
  ------------------
  |  Branch (307:7): [True: 19.0k, False: 2.59k]
  ------------------
  308|  19.0k|    ans->buf_offset = offset - 1;
  309|  19.0k|    ans->state = buf[offset - 1] & 0x3F;
  310|  19.0k|  } else if (x == 1) {
  ------------------
  |  Branch (310:14): [True: 2.27k, False: 312]
  ------------------
  311|  2.27k|    if (offset < 2) {
  ------------------
  |  Branch (311:9): [True: 2, False: 2.27k]
  ------------------
  312|      2|      return 1;
  313|      2|    }
  314|  2.27k|    ans->buf_offset = offset - 2;
  315|  2.27k|    ans->state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  316|  2.27k|  } else if (x == 2) {
  ------------------
  |  Branch (316:14): [True: 301, False: 11]
  ------------------
  317|    301|    if (offset < 3) {
  ------------------
  |  Branch (317:9): [True: 1, False: 300]
  ------------------
  318|      1|      return 1;
  319|      1|    }
  320|    300|    ans->buf_offset = offset - 3;
  321|    300|    ans->state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  322|    300|  } else {
  323|     11|    return 1;
  324|     11|  }
  325|  21.5k|  ans->state += DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  21.5k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  326|  21.5k|  if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   64|  21.5k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
                if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  21.5k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (326:7): [True: 1, False: 21.5k]
  ------------------
  327|      1|    return 1;
  328|      1|  }
  329|  21.5k|  return 0;
  330|  21.5k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|  2.27k|static uint32_t mem_get_le16(const void *vmem) {
   68|  2.27k|  uint32_t val;
   69|  2.27k|  const uint8_t *mem = (const uint8_t *)vmem;
   70|       |
   71|  2.27k|  val = mem[1] << 8;
   72|  2.27k|  val |= mem[0];
   73|  2.27k|  return val;
   74|  2.27k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    300|static uint32_t mem_get_le24(const void *vmem) {
   77|    300|  uint32_t val;
   78|    300|  const uint8_t *mem = (const uint8_t *)vmem;
   79|       |
   80|    300|  val = mem[2] << 16;
   81|    300|  val |= mem[1] << 8;
   82|    300|  val |= mem[0];
   83|    300|  return val;
   84|    300|}
rans_bit_decoder.cc:_ZN5dracoL14rabs_desc_readEPNS_10AnsDecoderEh:
  166|  12.3G|static inline int rabs_desc_read(struct AnsDecoder *ans, AnsP8 p0) {
  167|  12.3G|  int val;
  168|       |#if DRACO_ANS_IMPL1
  169|       |  unsigned l_s;
  170|       |#else
  171|  12.3G|  unsigned quot, rem, x, xn;
  172|  12.3G|#endif
  173|  12.3G|  const AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
  ------------------
  |  |   63|  12.3G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  174|  12.3G|  if (ans->state < DRACO_ANS_L_BASE && ans->buf_offset > 0) {
  ------------------
  |  |   64|  24.6G|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  |  Branch (174:7): [True: 10.8G, False: 1.45G]
  |  Branch (174:40): [True: 166k, False: 10.8G]
  ------------------
  175|   166k|    ans->state = ans->state * DRACO_ANS_IO_BASE + ans->buf[--ans->buf_offset];
  ------------------
  |  |   65|   166k|#define DRACO_ANS_IO_BASE 256
  ------------------
  176|   166k|  }
  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|  12.3G|  x = ans->state;
  184|  12.3G|  quot = x / DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|  12.3G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  185|  12.3G|  rem = x % DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|  12.3G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  186|  12.3G|  xn = quot * p;
  187|  12.3G|  val = rem < p;
  188|  12.3G|  if (UNPREDICTABLE(val)) {
  ------------------
  |  |  165|  24.6G|#define UNPREDICTABLE(x) x
  |  |  ------------------
  |  |  |  Branch (165:26): [True: 10.8G, False: 1.42G]
  |  |  ------------------
  ------------------
  189|  10.8G|    ans->state = xn + rem;
  190|  10.8G|  } else {
  191|       |    // ans->state = quot * p0 + rem - p;
  192|  1.42G|    ans->state = x - xn - p;
  193|  1.42G|  }
  194|  12.3G|#endif
  195|  12.3G|  return val;
  196|  12.3G|}
rans_bit_decoder.cc:_ZN5dracoL12ans_read_endEPNS_10AnsDecoderE:
  332|  47.8k|static inline int ans_read_end(struct AnsDecoder *const ans) {
  333|  47.8k|  return ans->state == DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  47.8k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  334|  47.8k|}
_ZN5draco11RAnsDecoderILi12EEC2Ev:
  416|  4.69k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi12EE24rans_build_look_up_tableEPKjj:
  481|  2.69k|                                       uint32_t num_symbols) {
  482|  2.69k|    lut_table_.resize(rans_precision);
  483|  2.69k|    probability_table_.resize(num_symbols);
  484|  2.69k|    uint32_t cum_prob = 0;
  485|  2.69k|    uint32_t act_prob = 0;
  486|  26.4k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 23.9k, False: 2.50k]
  ------------------
  487|  23.9k|      probability_table_[i].prob = token_probs[i];
  488|  23.9k|      probability_table_[i].cum_prob = cum_prob;
  489|  23.9k|      cum_prob += token_probs[i];
  490|  23.9k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 186, False: 23.7k]
  ------------------
  491|    186|        return false;
  492|    186|      }
  493|  9.34M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 9.32M, False: 23.7k]
  ------------------
  494|  9.32M|        lut_table_[j] = i;
  495|  9.32M|      }
  496|  23.7k|      act_prob = cum_prob;
  497|  23.7k|    }
  498|  2.50k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 294, False: 2.21k]
  ------------------
  499|    294|      return false;
  500|    294|    }
  501|  2.21k|    return true;
  502|  2.50k|  }
_ZN5draco11RAnsDecoderILi12EE9read_initEPKhi:
  421|  1.87k|  inline int read_init(const uint8_t *const buf, int offset) {
  422|  1.87k|    unsigned x;
  423|  1.87k|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 191, False: 1.68k]
  ------------------
  424|    191|      return 1;
  425|    191|    }
  426|  1.68k|    ans_.buf = buf;
  427|  1.68k|    x = buf[offset - 1] >> 6;
  428|  1.68k|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 1.00k, False: 679]
  ------------------
  429|  1.00k|      ans_.buf_offset = offset - 1;
  430|  1.00k|      ans_.state = buf[offset - 1] & 0x3F;
  431|  1.00k|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 305, False: 374]
  ------------------
  432|    305|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 70, False: 235]
  ------------------
  433|     70|        return 1;
  434|     70|      }
  435|    235|      ans_.buf_offset = offset - 2;
  436|    235|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    374|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 255, False: 119]
  ------------------
  438|    255|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 76, False: 179]
  ------------------
  439|     76|        return 1;
  440|     76|      }
  441|    179|      ans_.buf_offset = offset - 3;
  442|    179|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    179|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 119, False: 0]
  ------------------
  444|    119|      ans_.buf_offset = offset - 4;
  445|    119|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|    119|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|  1.54k|    ans_.state += l_rans_base;
  450|  1.54k|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  1.54k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 113, False: 1.42k]
  ------------------
  451|    113|      return 1;
  452|    113|    }
  453|  1.42k|    return 0;
  454|  1.54k|  }
symbol_decoding.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|    396|static uint32_t mem_get_le16(const void *vmem) {
   68|    396|  uint32_t val;
   69|    396|  const uint8_t *mem = (const uint8_t *)vmem;
   70|       |
   71|    396|  val = mem[1] << 8;
   72|    396|  val |= mem[0];
   73|    396|  return val;
   74|    396|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    282|static uint32_t mem_get_le24(const void *vmem) {
   77|    282|  uint32_t val;
   78|    282|  const uint8_t *mem = (const uint8_t *)vmem;
   79|       |
   80|    282|  val = mem[2] << 16;
   81|    282|  val |= mem[1] << 8;
   82|    282|  val |= mem[0];
   83|    282|  return val;
   84|    282|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le32EPKv:
   86|    455|static inline uint32_t mem_get_le32(const void *vmem) {
   87|    455|  uint32_t val;
   88|    455|  const uint8_t *mem = (const uint8_t *)vmem;
   89|       |
   90|    455|  val = mem[3] << 24;
   91|    455|  val |= mem[2] << 16;
   92|    455|  val |= mem[1] << 8;
   93|    455|  val |= mem[0];
   94|    455|  return val;
   95|    455|}
_ZN5draco11RAnsDecoderILi12EE9rans_readEv:
  462|   109M|  inline int rans_read() {
  463|   109M|    unsigned rem;
  464|   109M|    unsigned quo;
  465|   109M|    struct rans_dec_sym sym;
  466|   109M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 95.8M, False: 13.7M]
  |  Branch (466:40): [True: 25.5k, False: 95.8M]
  ------------------
  467|  25.5k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  25.5k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  25.5k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|   109M|    quo = ans_.state / rans_precision;
  472|   109M|    rem = ans_.state % rans_precision;
  473|   109M|    fetch_sym(&sym, rem);
  474|   109M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   109M|    return sym.val;
  476|   109M|  }
_ZN5draco11RAnsDecoderILi12EE9fetch_symEPNS_12rans_dec_symEj:
  505|   109M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   109M|    uint32_t symbol = lut_table_[rem];
  507|   109M|    out->val = symbol;
  508|   109M|    out->prob = probability_table_[symbol].prob;
  509|   109M|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   109M|  }
_ZN5draco11RAnsDecoderILi12EE8read_endEv:
  456|  1.35k|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi13EEC2Ev:
  416|    502|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi13EE24rans_build_look_up_tableEPKjj:
  481|    367|                                       uint32_t num_symbols) {
  482|    367|    lut_table_.resize(rans_precision);
  483|    367|    probability_table_.resize(num_symbols);
  484|    367|    uint32_t cum_prob = 0;
  485|    367|    uint32_t act_prob = 0;
  486|  11.8k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 11.4k, False: 349]
  ------------------
  487|  11.4k|      probability_table_[i].prob = token_probs[i];
  488|  11.4k|      probability_table_[i].cum_prob = cum_prob;
  489|  11.4k|      cum_prob += token_probs[i];
  490|  11.4k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 18, False: 11.4k]
  ------------------
  491|     18|        return false;
  492|     18|      }
  493|  2.71M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 2.70M, False: 11.4k]
  ------------------
  494|  2.70M|        lut_table_[j] = i;
  495|  2.70M|      }
  496|  11.4k|      act_prob = cum_prob;
  497|  11.4k|    }
  498|    349|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 29, False: 320]
  ------------------
  499|     29|      return false;
  500|     29|    }
  501|    320|    return true;
  502|    349|  }
_ZN5draco11RAnsDecoderILi13EE9read_initEPKhi:
  421|    236|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    236|    unsigned x;
  423|    236|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 9, False: 227]
  ------------------
  424|      9|      return 1;
  425|      9|    }
  426|    227|    ans_.buf = buf;
  427|    227|    x = buf[offset - 1] >> 6;
  428|    227|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 133, False: 94]
  ------------------
  429|    133|      ans_.buf_offset = offset - 1;
  430|    133|      ans_.state = buf[offset - 1] & 0x3F;
  431|    133|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 37, False: 57]
  ------------------
  432|     37|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 14, False: 23]
  ------------------
  433|     14|        return 1;
  434|     14|      }
  435|     23|      ans_.buf_offset = offset - 2;
  436|     23|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     57|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 24, False: 33]
  ------------------
  438|     24|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 9, False: 15]
  ------------------
  439|      9|        return 1;
  440|      9|      }
  441|     15|      ans_.buf_offset = offset - 3;
  442|     15|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     33|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 33, False: 0]
  ------------------
  444|     33|      ans_.buf_offset = offset - 4;
  445|     33|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     33|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|    204|    ans_.state += l_rans_base;
  450|    204|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    204|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 22, False: 182]
  ------------------
  451|     22|      return 1;
  452|     22|    }
  453|    182|    return 0;
  454|    204|  }
_ZN5draco11RAnsDecoderILi13EE9rans_readEv:
  462|  12.3M|  inline int rans_read() {
  463|  12.3M|    unsigned rem;
  464|  12.3M|    unsigned quo;
  465|  12.3M|    struct rans_dec_sym sym;
  466|  12.3M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 12.3M, False: 12.0k]
  |  Branch (466:40): [True: 2.96k, False: 12.3M]
  ------------------
  467|  2.96k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  2.96k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  2.96k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|  12.3M|    quo = ans_.state / rans_precision;
  472|  12.3M|    rem = ans_.state % rans_precision;
  473|  12.3M|    fetch_sym(&sym, rem);
  474|  12.3M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  12.3M|    return sym.val;
  476|  12.3M|  }
_ZN5draco11RAnsDecoderILi13EE9fetch_symEPNS_12rans_dec_symEj:
  505|  12.3M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  12.3M|    uint32_t symbol = lut_table_[rem];
  507|  12.3M|    out->val = symbol;
  508|  12.3M|    out->prob = probability_table_[symbol].prob;
  509|  12.3M|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  12.3M|  }
_ZN5draco11RAnsDecoderILi13EE8read_endEv:
  456|    182|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi15EEC2Ev:
  416|    433|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi15EE24rans_build_look_up_tableEPKjj:
  481|    300|                                       uint32_t num_symbols) {
  482|    300|    lut_table_.resize(rans_precision);
  483|    300|    probability_table_.resize(num_symbols);
  484|    300|    uint32_t cum_prob = 0;
  485|    300|    uint32_t act_prob = 0;
  486|  10.8k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 10.5k, False: 275]
  ------------------
  487|  10.5k|      probability_table_[i].prob = token_probs[i];
  488|  10.5k|      probability_table_[i].cum_prob = cum_prob;
  489|  10.5k|      cum_prob += token_probs[i];
  490|  10.5k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 25, False: 10.5k]
  ------------------
  491|     25|        return false;
  492|     25|      }
  493|  8.04M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 8.03M, False: 10.5k]
  ------------------
  494|  8.03M|        lut_table_[j] = i;
  495|  8.03M|      }
  496|  10.5k|      act_prob = cum_prob;
  497|  10.5k|    }
  498|    275|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 47, False: 228]
  ------------------
  499|     47|      return false;
  500|     47|    }
  501|    228|    return true;
  502|    275|  }
_ZN5draco11RAnsDecoderILi15EE9read_initEPKhi:
  421|    148|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    148|    unsigned x;
  423|    148|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 12, False: 136]
  ------------------
  424|     12|      return 1;
  425|     12|    }
  426|    136|    ans_.buf = buf;
  427|    136|    x = buf[offset - 1] >> 6;
  428|    136|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 30, False: 106]
  ------------------
  429|     30|      ans_.buf_offset = offset - 1;
  430|     30|      ans_.state = buf[offset - 1] & 0x3F;
  431|    106|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 21, False: 85]
  ------------------
  432|     21|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 11, False: 10]
  ------------------
  433|     11|        return 1;
  434|     11|      }
  435|     10|      ans_.buf_offset = offset - 2;
  436|     10|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     85|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 31, False: 54]
  ------------------
  438|     31|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 13, False: 18]
  ------------------
  439|     13|        return 1;
  440|     13|      }
  441|     18|      ans_.buf_offset = offset - 3;
  442|     18|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     54|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 54, False: 0]
  ------------------
  444|     54|      ans_.buf_offset = offset - 4;
  445|     54|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     54|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|    112|    ans_.state += l_rans_base;
  450|    112|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    112|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 36, False: 76]
  ------------------
  451|     36|      return 1;
  452|     36|    }
  453|     76|    return 0;
  454|    112|  }
_ZN5draco11RAnsDecoderILi15EE9rans_readEv:
  462|   573k|  inline int rans_read() {
  463|   573k|    unsigned rem;
  464|   573k|    unsigned quo;
  465|   573k|    struct rans_dec_sym sym;
  466|   573k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 204k, False: 369k]
  |  Branch (466:40): [True: 294, False: 203k]
  ------------------
  467|    294|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    294|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|    294|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|   573k|    quo = ans_.state / rans_precision;
  472|   573k|    rem = ans_.state % rans_precision;
  473|   573k|    fetch_sym(&sym, rem);
  474|   573k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   573k|    return sym.val;
  476|   573k|  }
_ZN5draco11RAnsDecoderILi15EE9fetch_symEPNS_12rans_dec_symEj:
  505|   573k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   573k|    uint32_t symbol = lut_table_[rem];
  507|   573k|    out->val = symbol;
  508|   573k|    out->prob = probability_table_[symbol].prob;
  509|   573k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   573k|  }
_ZN5draco11RAnsDecoderILi15EE8read_endEv:
  456|     76|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi16EEC2Ev:
  416|    375|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi16EE24rans_build_look_up_tableEPKjj:
  481|    229|                                       uint32_t num_symbols) {
  482|    229|    lut_table_.resize(rans_precision);
  483|    229|    probability_table_.resize(num_symbols);
  484|    229|    uint32_t cum_prob = 0;
  485|    229|    uint32_t act_prob = 0;
  486|  15.9k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 15.7k, False: 208]
  ------------------
  487|  15.7k|      probability_table_[i].prob = token_probs[i];
  488|  15.7k|      probability_table_[i].cum_prob = cum_prob;
  489|  15.7k|      cum_prob += token_probs[i];
  490|  15.7k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 21, False: 15.7k]
  ------------------
  491|     21|        return false;
  492|     21|      }
  493|  11.6M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 11.6M, False: 15.7k]
  ------------------
  494|  11.6M|        lut_table_[j] = i;
  495|  11.6M|      }
  496|  15.7k|      act_prob = cum_prob;
  497|  15.7k|    }
  498|    208|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 48, False: 160]
  ------------------
  499|     48|      return false;
  500|     48|    }
  501|    160|    return true;
  502|    208|  }
_ZN5draco11RAnsDecoderILi16EE9read_initEPKhi:
  421|     86|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     86|    unsigned x;
  423|     86|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 10, False: 76]
  ------------------
  424|     10|      return 1;
  425|     10|    }
  426|     76|    ans_.buf = buf;
  427|     76|    x = buf[offset - 1] >> 6;
  428|     76|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 34, False: 42]
  ------------------
  429|     34|      ans_.buf_offset = offset - 1;
  430|     34|      ans_.state = buf[offset - 1] & 0x3F;
  431|     42|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 16, False: 26]
  ------------------
  432|     16|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 2, False: 14]
  ------------------
  433|      2|        return 1;
  434|      2|      }
  435|     14|      ans_.buf_offset = offset - 2;
  436|     14|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     26|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 12, False: 14]
  ------------------
  438|     12|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 0, False: 12]
  ------------------
  439|      0|        return 1;
  440|      0|      }
  441|     12|      ans_.buf_offset = offset - 3;
  442|     12|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     14|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 14, False: 0]
  ------------------
  444|     14|      ans_.buf_offset = offset - 4;
  445|     14|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     14|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     74|    ans_.state += l_rans_base;
  450|     74|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     74|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 10, False: 64]
  ------------------
  451|     10|      return 1;
  452|     10|    }
  453|     64|    return 0;
  454|     74|  }
_ZN5draco11RAnsDecoderILi16EE9rans_readEv:
  462|   436k|  inline int rans_read() {
  463|   436k|    unsigned rem;
  464|   436k|    unsigned quo;
  465|   436k|    struct rans_dec_sym sym;
  466|   437k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 133k, False: 303k]
  |  Branch (466:40): [True: 1.05k, False: 132k]
  ------------------
  467|  1.05k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  1.05k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  1.05k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|   436k|    quo = ans_.state / rans_precision;
  472|   436k|    rem = ans_.state % rans_precision;
  473|   436k|    fetch_sym(&sym, rem);
  474|   436k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   436k|    return sym.val;
  476|   436k|  }
_ZN5draco11RAnsDecoderILi16EE9fetch_symEPNS_12rans_dec_symEj:
  505|   436k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   436k|    uint32_t symbol = lut_table_[rem];
  507|   436k|    out->val = symbol;
  508|   436k|    out->prob = probability_table_[symbol].prob;
  509|   436k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   436k|  }
_ZN5draco11RAnsDecoderILi16EE8read_endEv:
  456|     64|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi18EEC2Ev:
  416|    402|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi18EE24rans_build_look_up_tableEPKjj:
  481|    254|                                       uint32_t num_symbols) {
  482|    254|    lut_table_.resize(rans_precision);
  483|    254|    probability_table_.resize(num_symbols);
  484|    254|    uint32_t cum_prob = 0;
  485|    254|    uint32_t act_prob = 0;
  486|  4.93k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 4.71k, False: 220]
  ------------------
  487|  4.71k|      probability_table_[i].prob = token_probs[i];
  488|  4.71k|      probability_table_[i].cum_prob = cum_prob;
  489|  4.71k|      cum_prob += token_probs[i];
  490|  4.71k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 34, False: 4.67k]
  ------------------
  491|     34|        return false;
  492|     34|      }
  493|  52.6M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 52.6M, False: 4.67k]
  ------------------
  494|  52.6M|        lut_table_[j] = i;
  495|  52.6M|      }
  496|  4.67k|      act_prob = cum_prob;
  497|  4.67k|    }
  498|    220|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 40, False: 180]
  ------------------
  499|     40|      return false;
  500|     40|    }
  501|    180|    return true;
  502|    220|  }
_ZN5draco11RAnsDecoderILi18EE9read_initEPKhi:
  421|     97|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     97|    unsigned x;
  423|     97|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 4, False: 93]
  ------------------
  424|      4|      return 1;
  425|      4|    }
  426|     93|    ans_.buf = buf;
  427|     93|    x = buf[offset - 1] >> 6;
  428|     93|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 29, False: 64]
  ------------------
  429|     29|      ans_.buf_offset = offset - 1;
  430|     29|      ans_.state = buf[offset - 1] & 0x3F;
  431|     64|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 27, False: 37]
  ------------------
  432|     27|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 10, False: 17]
  ------------------
  433|     10|        return 1;
  434|     10|      }
  435|     17|      ans_.buf_offset = offset - 2;
  436|     17|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     37|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 14, False: 23]
  ------------------
  438|     14|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 11, False: 3]
  ------------------
  439|     11|        return 1;
  440|     11|      }
  441|      3|      ans_.buf_offset = offset - 3;
  442|      3|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     23|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 23, False: 0]
  ------------------
  444|     23|      ans_.buf_offset = offset - 4;
  445|     23|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     23|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     72|    ans_.state += l_rans_base;
  450|     72|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     72|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 10, False: 62]
  ------------------
  451|     10|      return 1;
  452|     10|    }
  453|     62|    return 0;
  454|     72|  }
_ZN5draco11RAnsDecoderILi18EE9rans_readEv:
  462|  81.8k|  inline int rans_read() {
  463|  81.8k|    unsigned rem;
  464|  81.8k|    unsigned quo;
  465|  81.8k|    struct rans_dec_sym sym;
  466|  83.7k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 61.8k, False: 21.9k]
  |  Branch (466:40): [True: 1.87k, False: 59.9k]
  ------------------
  467|  1.87k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  1.87k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  1.87k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|  81.8k|    quo = ans_.state / rans_precision;
  472|  81.8k|    rem = ans_.state % rans_precision;
  473|  81.8k|    fetch_sym(&sym, rem);
  474|  81.8k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  81.8k|    return sym.val;
  476|  81.8k|  }
_ZN5draco11RAnsDecoderILi18EE9fetch_symEPNS_12rans_dec_symEj:
  505|  81.8k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  81.8k|    uint32_t symbol = lut_table_[rem];
  507|  81.8k|    out->val = symbol;
  508|  81.8k|    out->prob = probability_table_[symbol].prob;
  509|  81.8k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  81.8k|  }
_ZN5draco11RAnsDecoderILi18EE8read_endEv:
  456|     62|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi19EEC2Ev:
  416|    409|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi19EE24rans_build_look_up_tableEPKjj:
  481|    263|                                       uint32_t num_symbols) {
  482|    263|    lut_table_.resize(rans_precision);
  483|    263|    probability_table_.resize(num_symbols);
  484|    263|    uint32_t cum_prob = 0;
  485|    263|    uint32_t act_prob = 0;
  486|  3.87k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 3.63k, False: 241]
  ------------------
  487|  3.63k|      probability_table_[i].prob = token_probs[i];
  488|  3.63k|      probability_table_[i].cum_prob = cum_prob;
  489|  3.63k|      cum_prob += token_probs[i];
  490|  3.63k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 22, False: 3.61k]
  ------------------
  491|     22|        return false;
  492|     22|      }
  493|   101M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 101M, False: 3.61k]
  ------------------
  494|   101M|        lut_table_[j] = i;
  495|   101M|      }
  496|  3.61k|      act_prob = cum_prob;
  497|  3.61k|    }
  498|    241|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 64, False: 177]
  ------------------
  499|     64|      return false;
  500|     64|    }
  501|    177|    return true;
  502|    241|  }
_ZN5draco11RAnsDecoderILi19EE9read_initEPKhi:
  421|    103|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    103|    unsigned x;
  423|    103|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 6, False: 97]
  ------------------
  424|      6|      return 1;
  425|      6|    }
  426|     97|    ans_.buf = buf;
  427|     97|    x = buf[offset - 1] >> 6;
  428|     97|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 25, False: 72]
  ------------------
  429|     25|      ans_.buf_offset = offset - 1;
  430|     25|      ans_.state = buf[offset - 1] & 0x3F;
  431|     72|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 26, False: 46]
  ------------------
  432|     26|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 8, False: 18]
  ------------------
  433|      8|        return 1;
  434|      8|      }
  435|     18|      ans_.buf_offset = offset - 2;
  436|     18|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     46|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 7, False: 39]
  ------------------
  438|      7|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 3, False: 4]
  ------------------
  439|      3|        return 1;
  440|      3|      }
  441|      4|      ans_.buf_offset = offset - 3;
  442|      4|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     39|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 39, False: 0]
  ------------------
  444|     39|      ans_.buf_offset = offset - 4;
  445|     39|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     39|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     86|    ans_.state += l_rans_base;
  450|     86|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     86|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 10, False: 76]
  ------------------
  451|     10|      return 1;
  452|     10|    }
  453|     76|    return 0;
  454|     86|  }
_ZN5draco11RAnsDecoderILi19EE9rans_readEv:
  462|  97.5k|  inline int rans_read() {
  463|  97.5k|    unsigned rem;
  464|  97.5k|    unsigned quo;
  465|  97.5k|    struct rans_dec_sym sym;
  466|  98.8k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 79.3k, False: 19.4k]
  |  Branch (466:40): [True: 1.26k, False: 78.0k]
  ------------------
  467|  1.26k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  1.26k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  1.26k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|  97.5k|    quo = ans_.state / rans_precision;
  472|  97.5k|    rem = ans_.state % rans_precision;
  473|  97.5k|    fetch_sym(&sym, rem);
  474|  97.5k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  97.5k|    return sym.val;
  476|  97.5k|  }
_ZN5draco11RAnsDecoderILi19EE9fetch_symEPNS_12rans_dec_symEj:
  505|  97.5k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  97.5k|    uint32_t symbol = lut_table_[rem];
  507|  97.5k|    out->val = symbol;
  508|  97.5k|    out->prob = probability_table_[symbol].prob;
  509|  97.5k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  97.5k|  }
_ZN5draco11RAnsDecoderILi19EE8read_endEv:
  456|     76|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi20EEC2Ev:
  416|  1.81k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi20EE24rans_build_look_up_tableEPKjj:
  481|  1.09k|                                       uint32_t num_symbols) {
  482|  1.09k|    lut_table_.resize(rans_precision);
  483|  1.09k|    probability_table_.resize(num_symbols);
  484|  1.09k|    uint32_t cum_prob = 0;
  485|  1.09k|    uint32_t act_prob = 0;
  486|  48.3k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 47.2k, False: 1.04k]
  ------------------
  487|  47.2k|      probability_table_[i].prob = token_probs[i];
  488|  47.2k|      probability_table_[i].cum_prob = cum_prob;
  489|  47.2k|      cum_prob += token_probs[i];
  490|  47.2k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 47, False: 47.2k]
  ------------------
  491|     47|        return false;
  492|     47|      }
  493|  1.00G|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 1.00G, False: 47.2k]
  ------------------
  494|  1.00G|        lut_table_[j] = i;
  495|  1.00G|      }
  496|  47.2k|      act_prob = cum_prob;
  497|  47.2k|    }
  498|  1.04k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 131, False: 917]
  ------------------
  499|    131|      return false;
  500|    131|    }
  501|    917|    return true;
  502|  1.04k|  }
_ZN5draco11RAnsDecoderILi20EE9read_initEPKhi:
  421|    542|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    542|    unsigned x;
  423|    542|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 48, False: 494]
  ------------------
  424|     48|      return 1;
  425|     48|    }
  426|    494|    ans_.buf = buf;
  427|    494|    x = buf[offset - 1] >> 6;
  428|    494|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 129, False: 365]
  ------------------
  429|    129|      ans_.buf_offset = offset - 1;
  430|    129|      ans_.state = buf[offset - 1] & 0x3F;
  431|    365|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 105, False: 260]
  ------------------
  432|    105|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 26, False: 79]
  ------------------
  433|     26|        return 1;
  434|     26|      }
  435|     79|      ans_.buf_offset = offset - 2;
  436|     79|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    260|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 87, False: 173]
  ------------------
  438|     87|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 36, False: 51]
  ------------------
  439|     36|        return 1;
  440|     36|      }
  441|     51|      ans_.buf_offset = offset - 3;
  442|     51|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    173|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 173, False: 0]
  ------------------
  444|    173|      ans_.buf_offset = offset - 4;
  445|    173|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|    173|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|    432|    ans_.state += l_rans_base;
  450|    432|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    432|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 66, False: 366]
  ------------------
  451|     66|      return 1;
  452|     66|    }
  453|    366|    return 0;
  454|    432|  }
_ZN5draco11RAnsDecoderILi20EE9rans_readEv:
  462|   970k|  inline int rans_read() {
  463|   970k|    unsigned rem;
  464|   970k|    unsigned quo;
  465|   970k|    struct rans_dec_sym sym;
  466|   974k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 701k, False: 272k]
  |  Branch (466:40): [True: 4.68k, False: 697k]
  ------------------
  467|  4.68k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  4.68k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  4.68k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|   970k|    quo = ans_.state / rans_precision;
  472|   970k|    rem = ans_.state % rans_precision;
  473|   970k|    fetch_sym(&sym, rem);
  474|   970k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   970k|    return sym.val;
  476|   970k|  }
_ZN5draco11RAnsDecoderILi20EE9fetch_symEPNS_12rans_dec_symEj:
  505|   970k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   970k|    uint32_t symbol = lut_table_[rem];
  507|   970k|    out->val = symbol;
  508|   970k|    out->prob = probability_table_[symbol].prob;
  509|   970k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   970k|  }
_ZN5draco11RAnsDecoderILi20EE8read_endEv:
  456|    366|  inline int read_end() { return ans_.state == l_rans_base; }

_ZN5draco17RAnsSymbolDecoderILi5EEC2Ev:
   33|  1.38k|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi5EE6CreateEPNS_13DecoderBufferE:
   59|  1.38k|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|  1.38k|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 1.38k]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|  1.38k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|  1.38k|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.38k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 157, False: 1.22k]
  ------------------
   67|    157|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 6, False: 151]
  ------------------
   68|      6|      return false;
   69|      6|    }
   70|       |
   71|    157|  } else
   72|  1.22k|#endif
   73|  1.22k|  {
   74|  1.22k|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 37, False: 1.19k]
  ------------------
   75|     37|      return false;
   76|     37|    }
   77|  1.22k|  }
   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.34k|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 141, False: 1.20k]
  ------------------
   83|    141|    return false;
   84|    141|  }
   85|  1.20k|  probability_table_.resize(num_symbols_);
   86|  1.20k|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 357, False: 844]
  ------------------
   87|    357|    return true;
   88|    357|  }
   89|       |  // Decode the table.
   90|  60.1k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 59.6k, False: 544]
  ------------------
   91|  59.6k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  59.6k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 73, False: 59.5k]
  ------------------
   95|     73|      return false;
   96|     73|    }
   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|  59.5k|    const int token = prob_data & 3;
  102|  59.5k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 21.0k, False: 38.5k]
  ------------------
  103|  21.0k|      const uint32_t offset = prob_data >> 2;
  104|  21.0k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 195, False: 20.8k]
  ------------------
  105|    195|        return false;
  106|    195|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   965k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 944k, False: 20.8k]
  ------------------
  109|   944k|        probability_table_[i + j] = 0;
  110|   944k|      }
  111|  20.8k|      i += offset;
  112|  38.5k|    } else {
  113|  38.5k|      const int extra_bytes = token;
  114|  38.5k|      uint32_t prob = prob_data >> 2;
  115|  70.8k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 32.2k, False: 38.5k]
  ------------------
  116|  32.2k|        uint8_t eb;
  117|  32.2k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 32, False: 32.2k]
  ------------------
  118|     32|          return false;
  119|     32|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  32.2k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  32.2k|      }
  124|  38.5k|      probability_table_[i] = prob;
  125|  38.5k|    }
  126|  59.5k|  }
  127|    544|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 143, False: 401]
  ------------------
  128|    143|    return false;
  129|    143|  }
  130|    401|  return true;
  131|    544|}
_ZN5draco17RAnsSymbolDecoderILi5EE13StartDecodingEPNS_13DecoderBufferE:
  135|    708|    DecoderBuffer *buffer) {
  136|    708|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    708|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    708|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    708|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 58, False: 650]
  ------------------
  140|     58|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 4, False: 54]
  ------------------
  141|      4|      return false;
  142|      4|    }
  143|       |
  144|     58|  } else
  145|    650|#endif
  146|    650|  {
  147|    650|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 16, False: 634]
  ------------------
  148|     16|      return false;
  149|     16|    }
  150|    650|  }
  151|    688|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 86, False: 602]
  ------------------
  152|     86|    return false;
  153|     86|  }
  154|    602|  const uint8_t *const data_head =
  155|    602|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    602|  buffer->Advance(bytes_encoded);
  158|    602|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 161, False: 441]
  ------------------
  159|    161|    return false;
  160|    161|  }
  161|    441|  return true;
  162|    602|}
_ZNK5draco17RAnsSymbolDecoderILi5EE11num_symbolsEv:
   38|    504|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi5EE12DecodeSymbolEv:
   43|  13.6M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi5EE11EndDecodingEv:
  165|    369|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    369|  ans_.read_end();
  167|    369|}
_ZN5draco17RAnsSymbolDecoderILi1EEC2Ev:
   33|    613|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi1EE6CreateEPNS_13DecoderBufferE:
   59|    613|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    613|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 613]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    613|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    613|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    613|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 59, False: 554]
  ------------------
   67|     59|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 5, False: 54]
  ------------------
   68|      5|      return false;
   69|      5|    }
   70|       |
   71|     59|  } else
   72|    554|#endif
   73|    554|  {
   74|    554|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 14, False: 540]
  ------------------
   75|     14|      return false;
   76|     14|    }
   77|    554|  }
   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|    594|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 55, False: 539]
  ------------------
   83|     55|    return false;
   84|     55|  }
   85|    539|  probability_table_.resize(num_symbols_);
   86|    539|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 31, False: 508]
  ------------------
   87|     31|    return true;
   88|     31|  }
   89|       |  // Decode the table.
   90|  1.75M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.75M, False: 360]
  ------------------
   91|  1.75M|    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.75M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 60, False: 1.75M]
  ------------------
   95|     60|      return false;
   96|     60|    }
   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.75M|    const int token = prob_data & 3;
  102|  1.75M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 857k, False: 900k]
  ------------------
  103|   857k|      const uint32_t offset = prob_data >> 2;
  104|   857k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 62, False: 857k]
  ------------------
  105|     62|        return false;
  106|     62|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  45.3M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 44.4M, False: 857k]
  ------------------
  109|  44.4M|        probability_table_[i + j] = 0;
  110|  44.4M|      }
  111|   857k|      i += offset;
  112|   900k|    } else {
  113|   900k|      const int extra_bytes = token;
  114|   900k|      uint32_t prob = prob_data >> 2;
  115|  1.68M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 786k, False: 900k]
  ------------------
  116|   786k|        uint8_t eb;
  117|   786k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 26, False: 786k]
  ------------------
  118|     26|          return false;
  119|     26|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   786k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   786k|      }
  124|   900k|      probability_table_[i] = prob;
  125|   900k|    }
  126|  1.75M|  }
  127|    360|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 149, False: 211]
  ------------------
  128|    149|    return false;
  129|    149|  }
  130|    211|  return true;
  131|    360|}
_ZNK5draco17RAnsSymbolDecoderILi1EE11num_symbolsEv:
   38|    242|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi1EE13StartDecodingEPNS_13DecoderBufferE:
  135|    211|    DecoderBuffer *buffer) {
  136|    211|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    211|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    211|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    211|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 3, False: 208]
  ------------------
  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|    208|#endif
  146|    208|  {
  147|    208|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 12, False: 196]
  ------------------
  148|     12|      return false;
  149|     12|    }
  150|    208|  }
  151|    199|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 40, False: 159]
  ------------------
  152|     40|    return false;
  153|     40|  }
  154|    159|  const uint8_t *const data_head =
  155|    159|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    159|  buffer->Advance(bytes_encoded);
  158|    159|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 38, False: 121]
  ------------------
  159|     38|    return false;
  160|     38|  }
  161|    121|  return true;
  162|    159|}
_ZN5draco17RAnsSymbolDecoderILi1EE12DecodeSymbolEv:
   43|  29.9M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi1EE11EndDecodingEv:
  165|    121|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    121|  ans_.read_end();
  167|    121|}
_ZN5draco17RAnsSymbolDecoderILi2EEC2Ev:
   33|    524|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi2EE6CreateEPNS_13DecoderBufferE:
   59|    524|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    524|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 524]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    524|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    524|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    524|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 64, False: 460]
  ------------------
   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|    460|#endif
   73|    460|  {
   74|    460|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 11, False: 449]
  ------------------
   75|     11|      return false;
   76|     11|    }
   77|    460|  }
   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|    513|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 36, False: 477]
  ------------------
   83|     36|    return false;
   84|     36|  }
   85|    477|  probability_table_.resize(num_symbols_);
   86|    477|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 466]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|   378k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 377k, False: 345]
  ------------------
   91|   377k|    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|   377k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 48, False: 377k]
  ------------------
   95|     48|      return false;
   96|     48|    }
   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|   377k|    const int token = prob_data & 3;
  102|   377k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 283k, False: 94.6k]
  ------------------
  103|   283k|      const uint32_t offset = prob_data >> 2;
  104|   283k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 48, False: 282k]
  ------------------
  105|     48|        return false;
  106|     48|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  3.91M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 3.63M, False: 282k]
  ------------------
  109|  3.63M|        probability_table_[i + j] = 0;
  110|  3.63M|      }
  111|   282k|      i += offset;
  112|   282k|    } else {
  113|  94.6k|      const int extra_bytes = token;
  114|  94.6k|      uint32_t prob = prob_data >> 2;
  115|   173k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 78.9k, False: 94.6k]
  ------------------
  116|  78.9k|        uint8_t eb;
  117|  78.9k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 25, False: 78.9k]
  ------------------
  118|     25|          return false;
  119|     25|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  78.9k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  78.9k|      }
  124|  94.6k|      probability_table_[i] = prob;
  125|  94.6k|    }
  126|   377k|  }
  127|    345|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 37, False: 308]
  ------------------
  128|     37|    return false;
  129|     37|  }
  130|    308|  return true;
  131|    345|}
_ZNK5draco17RAnsSymbolDecoderILi2EE11num_symbolsEv:
   38|    319|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi2EE13StartDecodingEPNS_13DecoderBufferE:
  135|    308|    DecoderBuffer *buffer) {
  136|    308|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    308|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    308|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    308|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 33, False: 275]
  ------------------
  140|     33|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 33]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     33|  } else
  145|    275|#endif
  146|    275|  {
  147|    275|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 3, False: 272]
  ------------------
  148|      3|      return false;
  149|      3|    }
  150|    275|  }
  151|    305|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 75, False: 230]
  ------------------
  152|     75|    return false;
  153|     75|  }
  154|    230|  const uint8_t *const data_head =
  155|    230|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    230|  buffer->Advance(bytes_encoded);
  158|    230|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 36, False: 194]
  ------------------
  159|     36|    return false;
  160|     36|  }
  161|    194|  return true;
  162|    230|}
_ZN5draco17RAnsSymbolDecoderILi2EE12DecodeSymbolEv:
   43|  1.85M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi2EE11EndDecodingEv:
  165|    194|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    194|  ans_.read_end();
  167|    194|}
_ZN5draco17RAnsSymbolDecoderILi3EEC2Ev:
   33|    551|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi3EE6CreateEPNS_13DecoderBufferE:
   59|    551|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    551|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 551]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    551|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    551|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    551|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 78, False: 473]
  ------------------
   67|     78|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 77]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     78|  } else
   72|    473|#endif
   73|    473|  {
   74|    473|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 465]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    473|  }
   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|    542|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 20, False: 522]
  ------------------
   83|     20|    return false;
   84|     20|  }
   85|    522|  probability_table_.resize(num_symbols_);
   86|    522|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 13, False: 509]
  ------------------
   87|     13|    return true;
   88|     13|  }
   89|       |  // Decode the table.
   90|  28.2k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 27.8k, False: 399]
  ------------------
   91|  27.8k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  27.8k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 47, False: 27.7k]
  ------------------
   95|     47|      return false;
   96|     47|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  27.7k|    const int token = prob_data & 3;
  102|  27.7k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 8.44k, False: 19.3k]
  ------------------
  103|  8.44k|      const uint32_t offset = prob_data >> 2;
  104|  8.44k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 43, False: 8.40k]
  ------------------
  105|     43|        return false;
  106|     43|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   372k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 364k, False: 8.40k]
  ------------------
  109|   364k|        probability_table_[i + j] = 0;
  110|   364k|      }
  111|  8.40k|      i += offset;
  112|  19.3k|    } else {
  113|  19.3k|      const int extra_bytes = token;
  114|  19.3k|      uint32_t prob = prob_data >> 2;
  115|  35.9k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 16.6k, False: 19.3k]
  ------------------
  116|  16.6k|        uint8_t eb;
  117|  16.6k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 20, False: 16.6k]
  ------------------
  118|     20|          return false;
  119|     20|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  16.6k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  16.6k|      }
  124|  19.3k|      probability_table_[i] = prob;
  125|  19.3k|    }
  126|  27.7k|  }
  127|    399|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 47, False: 352]
  ------------------
  128|     47|    return false;
  129|     47|  }
  130|    352|  return true;
  131|    399|}
_ZNK5draco17RAnsSymbolDecoderILi3EE11num_symbolsEv:
   38|    365|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi3EE13StartDecodingEPNS_13DecoderBufferE:
  135|    352|    DecoderBuffer *buffer) {
  136|    352|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    352|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    352|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    352|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 63, False: 289]
  ------------------
  140|     63|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 63]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     63|  } else
  145|    289|#endif
  146|    289|  {
  147|    289|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 16, False: 273]
  ------------------
  148|     16|      return false;
  149|     16|    }
  150|    289|  }
  151|    336|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 126, False: 210]
  ------------------
  152|    126|    return false;
  153|    126|  }
  154|    210|  const uint8_t *const data_head =
  155|    210|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    210|  buffer->Advance(bytes_encoded);
  158|    210|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 58, False: 152]
  ------------------
  159|     58|    return false;
  160|     58|  }
  161|    152|  return true;
  162|    210|}
_ZN5draco17RAnsSymbolDecoderILi3EE12DecodeSymbolEv:
   43|  3.05M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi3EE11EndDecodingEv:
  165|    152|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    152|  ans_.read_end();
  167|    152|}
_ZN5draco17RAnsSymbolDecoderILi4EEC2Ev:
   33|    371|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi4EE6CreateEPNS_13DecoderBufferE:
   59|    371|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    371|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 371]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    371|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    371|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    371|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 10, False: 361]
  ------------------
   67|     10|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 10]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     10|  } else
   72|    361|#endif
   73|    361|  {
   74|    361|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 7, False: 354]
  ------------------
   75|      7|      return false;
   76|      7|    }
   77|    361|  }
   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|    364|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 13, False: 351]
  ------------------
   83|     13|    return false;
   84|     13|  }
   85|    351|  probability_table_.resize(num_symbols_);
   86|    351|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 18, False: 333]
  ------------------
   87|     18|    return true;
   88|     18|  }
   89|       |  // Decode the table.
   90|   595k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 595k, False: 244]
  ------------------
   91|   595k|    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|   595k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 35, False: 595k]
  ------------------
   95|     35|      return false;
   96|     35|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   595k|    const int token = prob_data & 3;
  102|   595k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 582k, False: 13.0k]
  ------------------
  103|   582k|      const uint32_t offset = prob_data >> 2;
  104|   582k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 41, False: 582k]
  ------------------
  105|     41|        return false;
  106|     41|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  33.4M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 32.8M, False: 582k]
  ------------------
  109|  32.8M|        probability_table_[i + j] = 0;
  110|  32.8M|      }
  111|   582k|      i += offset;
  112|   582k|    } else {
  113|  13.0k|      const int extra_bytes = token;
  114|  13.0k|      uint32_t prob = prob_data >> 2;
  115|  21.7k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 8.66k, False: 13.0k]
  ------------------
  116|  8.66k|        uint8_t eb;
  117|  8.66k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 13, False: 8.65k]
  ------------------
  118|     13|          return false;
  119|     13|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  8.65k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  8.65k|      }
  124|  13.0k|      probability_table_[i] = prob;
  125|  13.0k|    }
  126|   595k|  }
  127|    244|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 31, False: 213]
  ------------------
  128|     31|    return false;
  129|     31|  }
  130|    213|  return true;
  131|    244|}
_ZNK5draco17RAnsSymbolDecoderILi4EE11num_symbolsEv:
   38|    231|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi4EE13StartDecodingEPNS_13DecoderBufferE:
  135|    213|    DecoderBuffer *buffer) {
  136|    213|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    213|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    213|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    213|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 1, False: 212]
  ------------------
  140|      1|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 1]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      1|  } else
  145|    212|#endif
  146|    212|  {
  147|    212|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 14, False: 198]
  ------------------
  148|     14|      return false;
  149|     14|    }
  150|    212|  }
  151|    199|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 12, False: 187]
  ------------------
  152|     12|    return false;
  153|     12|  }
  154|    187|  const uint8_t *const data_head =
  155|    187|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    187|  buffer->Advance(bytes_encoded);
  158|    187|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 44, False: 143]
  ------------------
  159|     44|    return false;
  160|     44|  }
  161|    143|  return true;
  162|    187|}
_ZN5draco17RAnsSymbolDecoderILi4EE12DecodeSymbolEv:
   43|  8.84M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi4EE11EndDecodingEv:
  165|    143|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    143|  ans_.read_end();
  167|    143|}
_ZN5draco17RAnsSymbolDecoderILi6EEC2Ev:
   33|    431|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi6EE6CreateEPNS_13DecoderBufferE:
   59|    431|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    431|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 431]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    431|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    431|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    431|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 76, False: 355]
  ------------------
   67|     76|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 76]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     76|  } else
   72|    355|#endif
   73|    355|  {
   74|    355|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 10, False: 345]
  ------------------
   75|     10|      return false;
   76|     10|    }
   77|    355|  }
   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|    421|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 42, False: 379]
  ------------------
   83|     42|    return false;
   84|     42|  }
   85|    379|  probability_table_.resize(num_symbols_);
   86|    379|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 8, False: 371]
  ------------------
   87|      8|    return true;
   88|      8|  }
   89|       |  // Decode the table.
   90|  10.5k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 10.2k, False: 294]
  ------------------
   91|  10.2k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  10.2k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 36, False: 10.1k]
  ------------------
   95|     36|      return false;
   96|     36|    }
   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|  10.1k|    const int token = prob_data & 3;
  102|  10.1k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 4.86k, False: 5.32k]
  ------------------
  103|  4.86k|      const uint32_t offset = prob_data >> 2;
  104|  4.86k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 25, False: 4.84k]
  ------------------
  105|     25|        return false;
  106|     25|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   182k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 177k, False: 4.84k]
  ------------------
  109|   177k|        probability_table_[i + j] = 0;
  110|   177k|      }
  111|  4.84k|      i += offset;
  112|  5.32k|    } else {
  113|  5.32k|      const int extra_bytes = token;
  114|  5.32k|      uint32_t prob = prob_data >> 2;
  115|  8.78k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 3.47k, False: 5.30k]
  ------------------
  116|  3.47k|        uint8_t eb;
  117|  3.47k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 16, False: 3.45k]
  ------------------
  118|     16|          return false;
  119|     16|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  3.45k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  3.45k|      }
  124|  5.30k|      probability_table_[i] = prob;
  125|  5.30k|    }
  126|  10.1k|  }
  127|    294|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 23, False: 271]
  ------------------
  128|     23|    return false;
  129|     23|  }
  130|    271|  return true;
  131|    294|}
_ZNK5draco17RAnsSymbolDecoderILi6EE11num_symbolsEv:
   38|    279|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi6EE13StartDecodingEPNS_13DecoderBufferE:
  135|    271|    DecoderBuffer *buffer) {
  136|    271|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    271|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    271|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    271|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 50, False: 221]
  ------------------
  140|     50|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 3, False: 47]
  ------------------
  141|      3|      return false;
  142|      3|    }
  143|       |
  144|     50|  } else
  145|    221|#endif
  146|    221|  {
  147|    221|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 5, False: 216]
  ------------------
  148|      5|      return false;
  149|      5|    }
  150|    221|  }
  151|    263|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 81, False: 182]
  ------------------
  152|     81|    return false;
  153|     81|  }
  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: 42, False: 140]
  ------------------
  159|     42|    return false;
  160|     42|  }
  161|    140|  return true;
  162|    182|}
_ZN5draco17RAnsSymbolDecoderILi6EE12DecodeSymbolEv:
   43|  6.41M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi6EE11EndDecodingEv:
  165|    140|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    140|  ans_.read_end();
  167|    140|}
_ZN5draco17RAnsSymbolDecoderILi7EEC2Ev:
   33|    377|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi7EE6CreateEPNS_13DecoderBufferE:
   59|    377|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    377|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 377]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    377|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    377|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    377|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 52, False: 325]
  ------------------
   67|     52|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 52]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     52|  } else
   72|    325|#endif
   73|    325|  {
   74|    325|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 317]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    325|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    369|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 11, False: 358]
  ------------------
   83|     11|    return false;
   84|     11|  }
   85|    358|  probability_table_.resize(num_symbols_);
   86|    358|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 347]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|  1.51M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.51M, False: 224]
  ------------------
   91|  1.51M|    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.51M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 61, False: 1.51M]
  ------------------
   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.51M|    const int token = prob_data & 3;
  102|  1.51M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 427k, False: 1.08M]
  ------------------
  103|   427k|      const uint32_t offset = prob_data >> 2;
  104|   427k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 39, False: 427k]
  ------------------
  105|     39|        return false;
  106|     39|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  19.3M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 18.9M, False: 427k]
  ------------------
  109|  18.9M|        probability_table_[i + j] = 0;
  110|  18.9M|      }
  111|   427k|      i += offset;
  112|  1.08M|    } else {
  113|  1.08M|      const int extra_bytes = token;
  114|  1.08M|      uint32_t prob = prob_data >> 2;
  115|  1.76M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 676k, False: 1.08M]
  ------------------
  116|   676k|        uint8_t eb;
  117|   676k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 23, False: 676k]
  ------------------
  118|     23|          return false;
  119|     23|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   676k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   676k|      }
  124|  1.08M|      probability_table_[i] = prob;
  125|  1.08M|    }
  126|  1.51M|  }
  127|    224|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 22, False: 202]
  ------------------
  128|     22|    return false;
  129|     22|  }
  130|    202|  return true;
  131|    224|}
_ZNK5draco17RAnsSymbolDecoderILi7EE11num_symbolsEv:
   38|    213|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi7EE13StartDecodingEPNS_13DecoderBufferE:
  135|    202|    DecoderBuffer *buffer) {
  136|    202|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    202|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    202|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    202|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 29, False: 173]
  ------------------
  140|     29|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 27]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     29|  } else
  145|    173|#endif
  146|    173|  {
  147|    173|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 9, False: 164]
  ------------------
  148|      9|      return false;
  149|      9|    }
  150|    173|  }
  151|    191|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 53, False: 138]
  ------------------
  152|     53|    return false;
  153|     53|  }
  154|    138|  const uint8_t *const data_head =
  155|    138|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    138|  buffer->Advance(bytes_encoded);
  158|    138|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 29, False: 109]
  ------------------
  159|     29|    return false;
  160|     29|  }
  161|    109|  return true;
  162|    138|}
_ZN5draco17RAnsSymbolDecoderILi7EE12DecodeSymbolEv:
   43|  25.6M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi7EE11EndDecodingEv:
  165|    109|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    109|  ans_.read_end();
  167|    109|}
_ZN5draco17RAnsSymbolDecoderILi8EEC2Ev:
   33|    443|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi8EE6CreateEPNS_13DecoderBufferE:
   59|    443|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    443|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 443]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    443|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    443|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    443|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 86, False: 357]
  ------------------
   67|     86|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 84]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     86|  } else
   72|    357|#endif
   73|    357|  {
   74|    357|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 10, False: 347]
  ------------------
   75|     10|      return false;
   76|     10|    }
   77|    357|  }
   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|    431|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 33, False: 398]
  ------------------
   83|     33|    return false;
   84|     33|  }
   85|    398|  probability_table_.resize(num_symbols_);
   86|    398|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 387]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|   846k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 846k, False: 284]
  ------------------
   91|   846k|    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|   846k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 51, False: 846k]
  ------------------
   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|   846k|    const int token = prob_data & 3;
  102|   846k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 219k, False: 627k]
  ------------------
  103|   219k|      const uint32_t offset = prob_data >> 2;
  104|   219k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 37, False: 219k]
  ------------------
  105|     37|        return false;
  106|     37|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  11.1M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 10.8M, False: 219k]
  ------------------
  109|  10.8M|        probability_table_[i + j] = 0;
  110|  10.8M|      }
  111|   219k|      i += offset;
  112|   627k|    } else {
  113|   627k|      const int extra_bytes = token;
  114|   627k|      uint32_t prob = prob_data >> 2;
  115|   810k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 183k, False: 627k]
  ------------------
  116|   183k|        uint8_t eb;
  117|   183k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 15, False: 183k]
  ------------------
  118|     15|          return false;
  119|     15|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   183k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   183k|      }
  124|   627k|      probability_table_[i] = prob;
  125|   627k|    }
  126|   846k|  }
  127|    284|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 28, False: 256]
  ------------------
  128|     28|    return false;
  129|     28|  }
  130|    256|  return true;
  131|    284|}
_ZNK5draco17RAnsSymbolDecoderILi8EE11num_symbolsEv:
   38|    267|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi8EE13StartDecodingEPNS_13DecoderBufferE:
  135|    256|    DecoderBuffer *buffer) {
  136|    256|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    256|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    256|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    256|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 42, False: 214]
  ------------------
  140|     42|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 42]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     42|  } else
  145|    214|#endif
  146|    214|  {
  147|    214|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 214]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    214|  }
  151|    256|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 85, False: 171]
  ------------------
  152|     85|    return false;
  153|     85|  }
  154|    171|  const uint8_t *const data_head =
  155|    171|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    171|  buffer->Advance(bytes_encoded);
  158|    171|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 42, False: 129]
  ------------------
  159|     42|    return false;
  160|     42|  }
  161|    129|  return true;
  162|    171|}
_ZN5draco17RAnsSymbolDecoderILi8EE12DecodeSymbolEv:
   43|  20.1M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi8EE11EndDecodingEv:
  165|    129|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    129|  ans_.read_end();
  167|    129|}
_ZN5draco17RAnsSymbolDecoderILi9EEC2Ev:
   33|    502|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi9EE6CreateEPNS_13DecoderBufferE:
   59|    502|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    502|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 502]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    502|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    502|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    502|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 33, False: 469]
  ------------------
   67|     33|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 33]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     33|  } else
   72|    469|#endif
   73|    469|  {
   74|    469|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 11, False: 458]
  ------------------
   75|     11|      return false;
   76|     11|    }
   77|    469|  }
   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|    491|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 21, False: 470]
  ------------------
   83|     21|    return false;
   84|     21|  }
   85|    470|  probability_table_.resize(num_symbols_);
   86|    470|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 9, False: 461]
  ------------------
   87|      9|    return true;
   88|      9|  }
   89|       |  // Decode the table.
   90|   139k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 139k, False: 367]
  ------------------
   91|   139k|    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|   139k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 47, False: 139k]
  ------------------
   95|     47|      return false;
   96|     47|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   139k|    const int token = prob_data & 3;
  102|   139k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 15.0k, False: 124k]
  ------------------
  103|  15.0k|      const uint32_t offset = prob_data >> 2;
  104|  15.0k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 26, False: 14.9k]
  ------------------
  105|     26|        return false;
  106|     26|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   471k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 456k, False: 14.9k]
  ------------------
  109|   456k|        probability_table_[i + j] = 0;
  110|   456k|      }
  111|  14.9k|      i += offset;
  112|   124k|    } else {
  113|   124k|      const int extra_bytes = token;
  114|   124k|      uint32_t prob = prob_data >> 2;
  115|   162k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 37.7k, False: 124k]
  ------------------
  116|  37.7k|        uint8_t eb;
  117|  37.7k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 21, False: 37.7k]
  ------------------
  118|     21|          return false;
  119|     21|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  37.7k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  37.7k|      }
  124|   124k|      probability_table_[i] = prob;
  125|   124k|    }
  126|   139k|  }
  127|    367|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 47, False: 320]
  ------------------
  128|     47|    return false;
  129|     47|  }
  130|    320|  return true;
  131|    367|}
_ZNK5draco17RAnsSymbolDecoderILi9EE11num_symbolsEv:
   38|    329|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi9EE13StartDecodingEPNS_13DecoderBufferE:
  135|    320|    DecoderBuffer *buffer) {
  136|    320|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    320|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    320|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    320|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 17, False: 303]
  ------------------
  140|     17|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 16]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     17|  } else
  145|    303|#endif
  146|    303|  {
  147|    303|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 4, False: 299]
  ------------------
  148|      4|      return false;
  149|      4|    }
  150|    303|  }
  151|    315|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 79, False: 236]
  ------------------
  152|     79|    return false;
  153|     79|  }
  154|    236|  const uint8_t *const data_head =
  155|    236|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    236|  buffer->Advance(bytes_encoded);
  158|    236|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 54, False: 182]
  ------------------
  159|     54|    return false;
  160|     54|  }
  161|    182|  return true;
  162|    236|}
_ZN5draco17RAnsSymbolDecoderILi9EE12DecodeSymbolEv:
   43|  12.3M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi9EE11EndDecodingEv:
  165|    182|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    182|  ans_.read_end();
  167|    182|}
_ZN5draco17RAnsSymbolDecoderILi10EEC2Ev:
   33|    433|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi10EE6CreateEPNS_13DecoderBufferE:
   59|    433|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    433|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 433]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    433|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    433|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    433|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 40, False: 393]
  ------------------
   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|    393|#endif
   73|    393|  {
   74|    393|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 11, False: 382]
  ------------------
   75|     11|      return false;
   76|     11|    }
   77|    393|  }
   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|    422|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 16, False: 406]
  ------------------
   83|     16|    return false;
   84|     16|  }
   85|    406|  probability_table_.resize(num_symbols_);
   86|    406|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 5, False: 401]
  ------------------
   87|      5|    return true;
   88|      5|  }
   89|       |  // Decode the table.
   90|   122k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 122k, False: 300]
  ------------------
   91|   122k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|   122k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 46, False: 122k]
  ------------------
   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|   122k|    const int token = prob_data & 3;
  102|   122k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 31.6k, False: 90.4k]
  ------------------
  103|  31.6k|      const uint32_t offset = prob_data >> 2;
  104|  31.6k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 36, False: 31.5k]
  ------------------
  105|     36|        return false;
  106|     36|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   830k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 799k, False: 31.5k]
  ------------------
  109|   799k|        probability_table_[i + j] = 0;
  110|   799k|      }
  111|  31.5k|      i += offset;
  112|  90.4k|    } else {
  113|  90.4k|      const int extra_bytes = token;
  114|  90.4k|      uint32_t prob = prob_data >> 2;
  115|   182k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 92.0k, False: 90.4k]
  ------------------
  116|  92.0k|        uint8_t eb;
  117|  92.0k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 19, False: 92.0k]
  ------------------
  118|     19|          return false;
  119|     19|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  92.0k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  92.0k|      }
  124|  90.4k|      probability_table_[i] = prob;
  125|  90.4k|    }
  126|   122k|  }
  127|    300|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 72, False: 228]
  ------------------
  128|     72|    return false;
  129|     72|  }
  130|    228|  return true;
  131|    300|}
_ZNK5draco17RAnsSymbolDecoderILi10EE11num_symbolsEv:
   38|    233|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi10EE13StartDecodingEPNS_13DecoderBufferE:
  135|    228|    DecoderBuffer *buffer) {
  136|    228|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    228|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    228|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    228|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 28, False: 200]
  ------------------
  140|     28|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 27]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     28|  } else
  145|    200|#endif
  146|    200|  {
  147|    200|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 2, False: 198]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|    200|  }
  151|    225|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 77, False: 148]
  ------------------
  152|     77|    return false;
  153|     77|  }
  154|    148|  const uint8_t *const data_head =
  155|    148|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    148|  buffer->Advance(bytes_encoded);
  158|    148|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 72, False: 76]
  ------------------
  159|     72|    return false;
  160|     72|  }
  161|     76|  return true;
  162|    148|}
_ZN5draco17RAnsSymbolDecoderILi10EE12DecodeSymbolEv:
   43|   573k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi10EE11EndDecodingEv:
  165|     76|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     76|  ans_.read_end();
  167|     76|}
_ZN5draco17RAnsSymbolDecoderILi11EEC2Ev:
   33|    375|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi11EE6CreateEPNS_13DecoderBufferE:
   59|    375|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    375|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 375]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    375|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    375|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    375|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 29, False: 346]
  ------------------
   67|     29|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 29]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     29|  } else
   72|    346|#endif
   73|    346|  {
   74|    346|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 12, False: 334]
  ------------------
   75|     12|      return false;
   76|     12|    }
   77|    346|  }
   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|    363|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 26, False: 337]
  ------------------
   83|     26|    return false;
   84|     26|  }
   85|    337|  probability_table_.resize(num_symbols_);
   86|    337|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 14, False: 323]
  ------------------
   87|     14|    return true;
   88|     14|  }
   89|       |  // Decode the table.
   90|  41.5k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 41.3k, False: 229]
  ------------------
   91|  41.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|  41.3k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 42, False: 41.2k]
  ------------------
   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|  41.2k|    const int token = prob_data & 3;
  102|  41.2k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 15.1k, False: 26.1k]
  ------------------
  103|  15.1k|      const uint32_t offset = prob_data >> 2;
  104|  15.1k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 37, False: 15.1k]
  ------------------
  105|     37|        return false;
  106|     37|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   534k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 519k, False: 15.1k]
  ------------------
  109|   519k|        probability_table_[i + j] = 0;
  110|   519k|      }
  111|  15.1k|      i += offset;
  112|  26.1k|    } else {
  113|  26.1k|      const int extra_bytes = token;
  114|  26.1k|      uint32_t prob = prob_data >> 2;
  115|  44.4k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 18.3k, False: 26.0k]
  ------------------
  116|  18.3k|        uint8_t eb;
  117|  18.3k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 15, False: 18.3k]
  ------------------
  118|     15|          return false;
  119|     15|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  18.3k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  18.3k|      }
  124|  26.0k|      probability_table_[i] = prob;
  125|  26.0k|    }
  126|  41.2k|  }
  127|    229|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 69, False: 160]
  ------------------
  128|     69|    return false;
  129|     69|  }
  130|    160|  return true;
  131|    229|}
_ZNK5draco17RAnsSymbolDecoderILi11EE11num_symbolsEv:
   38|    174|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi11EE13StartDecodingEPNS_13DecoderBufferE:
  135|    160|    DecoderBuffer *buffer) {
  136|    160|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    160|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    160|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    160|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 160]
  ------------------
  140|      0|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 0]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      0|  } else
  145|    160|#endif
  146|    160|  {
  147|    160|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 9, False: 151]
  ------------------
  148|      9|      return false;
  149|      9|    }
  150|    160|  }
  151|    151|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 65, False: 86]
  ------------------
  152|     65|    return false;
  153|     65|  }
  154|     86|  const uint8_t *const data_head =
  155|     86|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     86|  buffer->Advance(bytes_encoded);
  158|     86|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 22, False: 64]
  ------------------
  159|     22|    return false;
  160|     22|  }
  161|     64|  return true;
  162|     86|}
_ZN5draco17RAnsSymbolDecoderILi11EE12DecodeSymbolEv:
   43|   436k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi11EE11EndDecodingEv:
  165|     64|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     64|  ans_.read_end();
  167|     64|}
_ZN5draco17RAnsSymbolDecoderILi12EEC2Ev:
   33|    402|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi12EE6CreateEPNS_13DecoderBufferE:
   59|    402|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    402|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 402]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    402|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    402|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    402|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 44, False: 358]
  ------------------
   67|     44|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 44]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     44|  } else
   72|    358|#endif
   73|    358|  {
   74|    358|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 14, False: 344]
  ------------------
   75|     14|      return false;
   76|     14|    }
   77|    358|  }
   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|    388|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 11, False: 377]
  ------------------
   83|     11|    return false;
   84|     11|  }
   85|    377|  probability_table_.resize(num_symbols_);
   86|    377|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 5, False: 372]
  ------------------
   87|      5|    return true;
   88|      5|  }
   89|       |  // Decode the table.
   90|  1.25M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.25M, False: 254]
  ------------------
   91|  1.25M|    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.25M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 72, False: 1.25M]
  ------------------
   95|     72|      return false;
   96|     72|    }
   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.25M|    const int token = prob_data & 3;
  102|  1.25M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 913k, False: 342k]
  ------------------
  103|   913k|      const uint32_t offset = prob_data >> 2;
  104|   913k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 33, False: 913k]
  ------------------
  105|     33|        return false;
  106|     33|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  39.1M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 38.2M, False: 913k]
  ------------------
  109|  38.2M|        probability_table_[i + j] = 0;
  110|  38.2M|      }
  111|   913k|      i += offset;
  112|   913k|    } else {
  113|   342k|      const int extra_bytes = token;
  114|   342k|      uint32_t prob = prob_data >> 2;
  115|   645k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 302k, False: 342k]
  ------------------
  116|   302k|        uint8_t eb;
  117|   302k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 13, False: 302k]
  ------------------
  118|     13|          return false;
  119|     13|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   302k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   302k|      }
  124|   342k|      probability_table_[i] = prob;
  125|   342k|    }
  126|  1.25M|  }
  127|    254|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 74, False: 180]
  ------------------
  128|     74|    return false;
  129|     74|  }
  130|    180|  return true;
  131|    254|}
_ZNK5draco17RAnsSymbolDecoderILi12EE11num_symbolsEv:
   38|    185|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi12EE13StartDecodingEPNS_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: 21, False: 159]
  ------------------
  140|     21|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 19]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     21|  } else
  145|    159|#endif
  146|    159|  {
  147|    159|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 3, False: 156]
  ------------------
  148|      3|      return false;
  149|      3|    }
  150|    159|  }
  151|    175|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 78, False: 97]
  ------------------
  152|     78|    return false;
  153|     78|  }
  154|     97|  const uint8_t *const data_head =
  155|     97|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     97|  buffer->Advance(bytes_encoded);
  158|     97|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 35, False: 62]
  ------------------
  159|     35|    return false;
  160|     35|  }
  161|     62|  return true;
  162|     97|}
_ZN5draco17RAnsSymbolDecoderILi12EE12DecodeSymbolEv:
   43|  81.8k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi12EE11EndDecodingEv:
  165|     62|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     62|  ans_.read_end();
  167|     62|}
_ZN5draco17RAnsSymbolDecoderILi13EEC2Ev:
   33|    409|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi13EE6CreateEPNS_13DecoderBufferE:
   59|    409|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    409|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 409]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    409|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    409|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    409|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 25, False: 384]
  ------------------
   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|    384|#endif
   73|    384|  {
   74|    384|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 13, False: 371]
  ------------------
   75|     13|      return false;
   76|     13|    }
   77|    384|  }
   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|    396|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 18, False: 378]
  ------------------
   83|     18|    return false;
   84|     18|  }
   85|    378|  probability_table_.resize(num_symbols_);
   86|    378|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 367]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|  1.65M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.65M, False: 263]
  ------------------
   91|  1.65M|    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.65M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 54, False: 1.65M]
  ------------------
   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|  1.65M|    const int token = prob_data & 3;
  102|  1.65M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 862k, False: 791k]
  ------------------
  103|   862k|      const uint32_t offset = prob_data >> 2;
  104|   862k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 30, False: 862k]
  ------------------
  105|     30|        return false;
  106|     30|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  48.0M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 47.2M, False: 862k]
  ------------------
  109|  47.2M|        probability_table_[i + j] = 0;
  110|  47.2M|      }
  111|   862k|      i += offset;
  112|   862k|    } else {
  113|   791k|      const int extra_bytes = token;
  114|   791k|      uint32_t prob = prob_data >> 2;
  115|  1.17M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 385k, False: 791k]
  ------------------
  116|   385k|        uint8_t eb;
  117|   385k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 20, False: 385k]
  ------------------
  118|     20|          return false;
  119|     20|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   385k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   385k|      }
  124|   791k|      probability_table_[i] = prob;
  125|   791k|    }
  126|  1.65M|  }
  127|    263|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 86, False: 177]
  ------------------
  128|     86|    return false;
  129|     86|  }
  130|    177|  return true;
  131|    263|}
_ZNK5draco17RAnsSymbolDecoderILi13EE11num_symbolsEv:
   38|    188|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi13EE13StartDecodingEPNS_13DecoderBufferE:
  135|    177|    DecoderBuffer *buffer) {
  136|    177|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    177|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    177|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    177|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 177]
  ------------------
  140|      0|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 0]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      0|  } else
  145|    177|#endif
  146|    177|  {
  147|    177|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 177]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    177|  }
  151|    177|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 74, False: 103]
  ------------------
  152|     74|    return false;
  153|     74|  }
  154|    103|  const uint8_t *const data_head =
  155|    103|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    103|  buffer->Advance(bytes_encoded);
  158|    103|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 27, False: 76]
  ------------------
  159|     27|    return false;
  160|     27|  }
  161|     76|  return true;
  162|    103|}
_ZN5draco17RAnsSymbolDecoderILi13EE12DecodeSymbolEv:
   43|  97.5k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi13EE11EndDecodingEv:
  165|     76|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     76|  ans_.read_end();
  167|     76|}
_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: 51, False: 319]
  ------------------
   67|     51|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 49]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     51|  } else
   72|    319|#endif
   73|    319|  {
   74|    319|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 5, False: 314]
  ------------------
   75|      5|      return false;
   76|      5|    }
   77|    319|  }
   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|    363|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 17, False: 346]
  ------------------
   83|     17|    return false;
   84|     17|  }
   85|    346|  probability_table_.resize(num_symbols_);
   86|    346|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 10, False: 336]
  ------------------
   87|     10|    return true;
   88|     10|  }
   89|       |  // Decode the table.
   90|   364k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 363k, False: 218]
  ------------------
   91|   363k|    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|   363k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 53, False: 363k]
  ------------------
   95|     53|      return false;
   96|     53|    }
   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|   363k|    const int token = prob_data & 3;
  102|   363k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 237k, False: 126k]
  ------------------
  103|   237k|      const uint32_t offset = prob_data >> 2;
  104|   237k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 44, False: 237k]
  ------------------
  105|     44|        return false;
  106|     44|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  10.1M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 9.96M, False: 237k]
  ------------------
  109|  9.96M|        probability_table_[i + j] = 0;
  110|  9.96M|      }
  111|   237k|      i += offset;
  112|   237k|    } else {
  113|   126k|      const int extra_bytes = token;
  114|   126k|      uint32_t prob = prob_data >> 2;
  115|   214k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 88.1k, False: 126k]
  ------------------
  116|  88.1k|        uint8_t eb;
  117|  88.1k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 21, False: 88.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|  88.1k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  88.1k|      }
  124|   126k|      probability_table_[i] = prob;
  125|   126k|    }
  126|   363k|  }
  127|    218|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 38, False: 180]
  ------------------
  128|     38|    return false;
  129|     38|  }
  130|    180|  return true;
  131|    218|}
_ZNK5draco17RAnsSymbolDecoderILi14EE11num_symbolsEv:
   38|    190|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi14EE13StartDecodingEPNS_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: 23, False: 157]
  ------------------
  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|    157|#endif
  146|    157|  {
  147|    157|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 7, False: 150]
  ------------------
  148|      7|      return false;
  149|      7|    }
  150|    157|  }
  151|    172|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 70, False: 102]
  ------------------
  152|     70|    return false;
  153|     70|  }
  154|    102|  const uint8_t *const data_head =
  155|    102|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    102|  buffer->Advance(bytes_encoded);
  158|    102|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 34, False: 68]
  ------------------
  159|     34|    return false;
  160|     34|  }
  161|     68|  return true;
  162|    102|}
_ZN5draco17RAnsSymbolDecoderILi14EE12DecodeSymbolEv:
   43|  97.3k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi14EE11EndDecodingEv:
  165|     68|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     68|  ans_.read_end();
  167|     68|}
_ZN5draco17RAnsSymbolDecoderILi15EEC2Ev:
   33|    396|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi15EE6CreateEPNS_13DecoderBufferE:
   59|    396|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    396|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 396]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    396|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    396|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    396|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 82, False: 314]
  ------------------
   67|     82|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 5, False: 77]
  ------------------
   68|      5|      return false;
   69|      5|    }
   70|       |
   71|     82|  } else
   72|    314|#endif
   73|    314|  {
   74|    314|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 4, False: 310]
  ------------------
   75|      4|      return false;
   76|      4|    }
   77|    314|  }
   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: 26, False: 361]
  ------------------
   83|     26|    return false;
   84|     26|  }
   85|    361|  probability_table_.resize(num_symbols_);
   86|    361|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 10, False: 351]
  ------------------
   87|     10|    return true;
   88|     10|  }
   89|       |  // Decode the table.
   90|  1.53M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.53M, False: 245]
  ------------------
   91|  1.53M|    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.53M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 49, False: 1.53M]
  ------------------
   95|     49|      return false;
   96|     49|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  1.53M|    const int token = prob_data & 3;
  102|  1.53M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 1.38M, False: 152k]
  ------------------
  103|  1.38M|      const uint32_t offset = prob_data >> 2;
  104|  1.38M|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 37, False: 1.38M]
  ------------------
  105|     37|        return false;
  106|     37|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  80.8M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 79.4M, False: 1.38M]
  ------------------
  109|  79.4M|        probability_table_[i + j] = 0;
  110|  79.4M|      }
  111|  1.38M|      i += offset;
  112|  1.38M|    } else {
  113|   152k|      const int extra_bytes = token;
  114|   152k|      uint32_t prob = prob_data >> 2;
  115|   267k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 114k, False: 152k]
  ------------------
  116|   114k|        uint8_t eb;
  117|   114k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 20, False: 114k]
  ------------------
  118|     20|          return false;
  119|     20|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   114k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   114k|      }
  124|   152k|      probability_table_[i] = prob;
  125|   152k|    }
  126|  1.53M|  }
  127|    245|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 35, False: 210]
  ------------------
  128|     35|    return false;
  129|     35|  }
  130|    210|  return true;
  131|    245|}
_ZNK5draco17RAnsSymbolDecoderILi15EE11num_symbolsEv:
   38|    220|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi15EE13StartDecodingEPNS_13DecoderBufferE:
  135|    210|    DecoderBuffer *buffer) {
  136|    210|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    210|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    210|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    210|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 45, False: 165]
  ------------------
  140|     45|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 44]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     45|  } else
  145|    165|#endif
  146|    165|  {
  147|    165|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 7, False: 158]
  ------------------
  148|      7|      return false;
  149|      7|    }
  150|    165|  }
  151|    202|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 70, False: 132]
  ------------------
  152|     70|    return false;
  153|     70|  }
  154|    132|  const uint8_t *const data_head =
  155|    132|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    132|  buffer->Advance(bytes_encoded);
  158|    132|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 49, False: 83]
  ------------------
  159|     49|    return false;
  160|     49|  }
  161|     83|  return true;
  162|    132|}
_ZN5draco17RAnsSymbolDecoderILi15EE12DecodeSymbolEv:
   43|   366k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi15EE11EndDecodingEv:
  165|     83|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     83|  ans_.read_end();
  167|     83|}
_ZN5draco17RAnsSymbolDecoderILi16EEC2Ev:
   33|    343|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi16EE6CreateEPNS_13DecoderBufferE:
   59|    343|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    343|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 343]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    343|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    343|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    343|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 27, False: 316]
  ------------------
   67|     27|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 26]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     27|  } else
   72|    316|#endif
   73|    316|  {
   74|    316|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 10, False: 306]
  ------------------
   75|     10|      return false;
   76|     10|    }
   77|    316|  }
   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|    332|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 20, False: 312]
  ------------------
   83|     20|    return false;
   84|     20|  }
   85|    312|  probability_table_.resize(num_symbols_);
   86|    312|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 301]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|   340k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 340k, False: 202]
  ------------------
   91|   340k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|   340k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 48, False: 340k]
  ------------------
   95|     48|      return false;
   96|     48|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   340k|    const int token = prob_data & 3;
  102|   340k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 52.8k, False: 287k]
  ------------------
  103|  52.8k|      const uint32_t offset = prob_data >> 2;
  104|  52.8k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 25, False: 52.8k]
  ------------------
  105|     25|        return false;
  106|     25|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  1.82M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 1.77M, False: 52.8k]
  ------------------
  109|  1.77M|        probability_table_[i + j] = 0;
  110|  1.77M|      }
  111|  52.8k|      i += offset;
  112|   287k|    } else {
  113|   287k|      const int extra_bytes = token;
  114|   287k|      uint32_t prob = prob_data >> 2;
  115|   533k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 245k, False: 287k]
  ------------------
  116|   245k|        uint8_t eb;
  117|   245k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 26, False: 245k]
  ------------------
  118|     26|          return false;
  119|     26|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   245k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   245k|      }
  124|   287k|      probability_table_[i] = prob;
  125|   287k|    }
  126|   340k|  }
  127|    202|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 34, False: 168]
  ------------------
  128|     34|    return false;
  129|     34|  }
  130|    168|  return true;
  131|    202|}
_ZNK5draco17RAnsSymbolDecoderILi16EE11num_symbolsEv:
   38|    179|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi16EE13StartDecodingEPNS_13DecoderBufferE:
  135|    168|    DecoderBuffer *buffer) {
  136|    168|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    168|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    168|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    168|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 7, False: 161]
  ------------------
  140|      7|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 6]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|      7|  } else
  145|    161|#endif
  146|    161|  {
  147|    161|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 161]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    161|  }
  151|    167|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 65, False: 102]
  ------------------
  152|     65|    return false;
  153|     65|  }
  154|    102|  const uint8_t *const data_head =
  155|    102|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    102|  buffer->Advance(bytes_encoded);
  158|    102|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 33, False: 69]
  ------------------
  159|     33|    return false;
  160|     33|  }
  161|     69|  return true;
  162|    102|}
_ZN5draco17RAnsSymbolDecoderILi16EE12DecodeSymbolEv:
   43|   140k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi16EE11EndDecodingEv:
  165|     69|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     69|  ans_.read_end();
  167|     69|}
_ZN5draco17RAnsSymbolDecoderILi17EEC2Ev:
   33|    359|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi17EE6CreateEPNS_13DecoderBufferE:
   59|    359|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    359|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 359]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    359|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    359|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    359|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 59, False: 300]
  ------------------
   67|     59|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 4, False: 55]
  ------------------
   68|      4|      return false;
   69|      4|    }
   70|       |
   71|     59|  } else
   72|    300|#endif
   73|    300|  {
   74|    300|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 292]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    300|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    347|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 31, False: 316]
  ------------------
   83|     31|    return false;
   84|     31|  }
   85|    316|  probability_table_.resize(num_symbols_);
   86|    316|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 305]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|  11.0k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 10.7k, False: 224]
  ------------------
   91|  10.7k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  10.7k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 45, False: 10.7k]
  ------------------
   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|  10.7k|    const int token = prob_data & 3;
  102|  10.7k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 4.10k, False: 6.64k]
  ------------------
  103|  4.10k|      const uint32_t offset = prob_data >> 2;
  104|  4.10k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 23, False: 4.07k]
  ------------------
  105|     23|        return false;
  106|     23|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   161k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 156k, False: 4.07k]
  ------------------
  109|   156k|        probability_table_[i + j] = 0;
  110|   156k|      }
  111|  4.07k|      i += offset;
  112|  6.64k|    } else {
  113|  6.64k|      const int extra_bytes = token;
  114|  6.64k|      uint32_t prob = prob_data >> 2;
  115|  11.0k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 4.43k, False: 6.63k]
  ------------------
  116|  4.43k|        uint8_t eb;
  117|  4.43k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 13, False: 4.42k]
  ------------------
  118|     13|          return false;
  119|     13|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  4.42k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  4.42k|      }
  124|  6.63k|      probability_table_[i] = prob;
  125|  6.63k|    }
  126|  10.7k|  }
  127|    224|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 37, False: 187]
  ------------------
  128|     37|    return false;
  129|     37|  }
  130|    187|  return true;
  131|    224|}
_ZNK5draco17RAnsSymbolDecoderILi17EE11num_symbolsEv:
   38|    198|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi17EE13StartDecodingEPNS_13DecoderBufferE:
  135|    187|    DecoderBuffer *buffer) {
  136|    187|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    187|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    187|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    187|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 30, False: 157]
  ------------------
  140|     30|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 29]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     30|  } else
  145|    157|#endif
  146|    157|  {
  147|    157|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 157]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    157|  }
  151|    186|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 81, False: 105]
  ------------------
  152|     81|    return false;
  153|     81|  }
  154|    105|  const uint8_t *const data_head =
  155|    105|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    105|  buffer->Advance(bytes_encoded);
  158|    105|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 27, False: 78]
  ------------------
  159|     27|    return false;
  160|     27|  }
  161|     78|  return true;
  162|    105|}
_ZN5draco17RAnsSymbolDecoderILi17EE12DecodeSymbolEv:
   43|   288k|  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|    350|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi18EE6CreateEPNS_13DecoderBufferE:
   59|    350|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    350|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 350]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    350|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    350|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    350|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 66, False: 284]
  ------------------
   67|     66|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 65]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     66|  } else
   72|    284|#endif
   73|    284|  {
   74|    284|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 3, False: 281]
  ------------------
   75|      3|      return false;
   76|      3|    }
   77|    284|  }
   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|    346|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 22, False: 324]
  ------------------
   83|     22|    return false;
   84|     22|  }
   85|    324|  probability_table_.resize(num_symbols_);
   86|    324|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 9, False: 315]
  ------------------
   87|      9|    return true;
   88|      9|  }
   89|       |  // Decode the table.
   90|   591k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 591k, False: 206]
  ------------------
   91|   591k|    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|   591k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 45, False: 591k]
  ------------------
   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|   591k|    const int token = prob_data & 3;
  102|   591k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 116k, False: 474k]
  ------------------
  103|   116k|      const uint32_t offset = prob_data >> 2;
  104|   116k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 31, False: 116k]
  ------------------
  105|     31|        return false;
  106|     31|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  5.30M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 5.18M, False: 116k]
  ------------------
  109|  5.18M|        probability_table_[i + j] = 0;
  110|  5.18M|      }
  111|   116k|      i += offset;
  112|   474k|    } else {
  113|   474k|      const int extra_bytes = token;
  114|   474k|      uint32_t prob = prob_data >> 2;
  115|   897k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 422k, False: 474k]
  ------------------
  116|   422k|        uint8_t eb;
  117|   422k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 33, False: 422k]
  ------------------
  118|     33|          return false;
  119|     33|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   422k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   422k|      }
  124|   474k|      probability_table_[i] = prob;
  125|   474k|    }
  126|   591k|  }
  127|    206|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 34, False: 172]
  ------------------
  128|     34|    return false;
  129|     34|  }
  130|    172|  return true;
  131|    206|}
_ZNK5draco17RAnsSymbolDecoderILi18EE11num_symbolsEv:
   38|    181|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi18EE13StartDecodingEPNS_13DecoderBufferE:
  135|    172|    DecoderBuffer *buffer) {
  136|    172|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    172|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    172|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    172|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 34, False: 138]
  ------------------
  140|     34|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 32]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     34|  } else
  145|    138|#endif
  146|    138|  {
  147|    138|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 138]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    138|  }
  151|    170|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 69, False: 101]
  ------------------
  152|     69|    return false;
  153|     69|  }
  154|    101|  const uint8_t *const data_head =
  155|    101|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    101|  buffer->Advance(bytes_encoded);
  158|    101|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 33, False: 68]
  ------------------
  159|     33|    return false;
  160|     33|  }
  161|     68|  return true;
  162|    101|}
_ZN5draco17RAnsSymbolDecoderILi18EE12DecodeSymbolEv:
   43|  76.4k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi18EE11EndDecodingEv:
  165|     68|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     68|  ans_.read_end();
  167|     68|}

_ZN5draco13DecodeSymbolsEjiPNS_13DecoderBufferEPj:
   33|  12.6k|                   DecoderBuffer *src_buffer, uint32_t *out_values) {
   34|  12.6k|  if (num_values == 0) {
  ------------------
  |  Branch (34:7): [True: 49, False: 12.6k]
  ------------------
   35|     49|    return true;
   36|     49|  }
   37|       |  // Decode which scheme to use.
   38|  12.6k|  uint8_t scheme;
   39|  12.6k|  if (!src_buffer->Decode(&scheme)) {
  ------------------
  |  Branch (39:7): [True: 178, False: 12.4k]
  ------------------
   40|    178|    return false;
   41|    178|  }
   42|  12.4k|  if (scheme == SYMBOL_CODING_TAGGED) {
  ------------------
  |  Branch (42:7): [True: 1.18k, False: 11.2k]
  ------------------
   43|  1.18k|    return DecodeTaggedSymbols<RAnsSymbolDecoder>(num_values, num_components,
   44|  1.18k|                                                  src_buffer, out_values);
   45|  11.2k|  } else if (scheme == SYMBOL_CODING_RAW) {
  ------------------
  |  Branch (45:14): [True: 8.03k, False: 3.23k]
  ------------------
   46|  8.03k|    return DecodeRawSymbols<RAnsSymbolDecoder>(num_values, src_buffer,
   47|  8.03k|                                               out_values);
   48|  8.03k|  }
   49|  3.23k|  return false;
   50|  12.4k|}
_ZN5draco19DecodeTaggedSymbolsINS_17RAnsSymbolDecoderEEEbjiPNS_13DecoderBufferEPj:
   54|  1.18k|                         DecoderBuffer *src_buffer, uint32_t *out_values) {
   55|       |  // Decode the encoded data.
   56|  1.18k|  SymbolDecoderT<5> tag_decoder;
   57|  1.18k|  if (!tag_decoder.Create(src_buffer)) {
  ------------------
  |  Branch (57:7): [True: 585, False: 598]
  ------------------
   58|    585|    return false;
   59|    585|  }
   60|       |
   61|    598|  if (!tag_decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (61:7): [True: 254, False: 344]
  ------------------
   62|    254|    return false;
   63|    254|  }
   64|       |
   65|    344|  if (num_values > 0 && tag_decoder.num_symbols() == 0) {
  ------------------
  |  Branch (65:7): [True: 344, False: 0]
  |  Branch (65:25): [True: 58, False: 286]
  ------------------
   66|     58|    return false;  // Wrong number of symbols.
   67|     58|  }
   68|       |
   69|       |  // src_buffer now points behind the encoded tag data (to the place where the
   70|       |  // values are encoded).
   71|    286|  src_buffer->StartBitDecoding(false, nullptr);
   72|    286|  int value_id = 0;
   73|  4.03M|  for (uint32_t i = 0; i < num_values; i += num_components) {
  ------------------
  |  Branch (73:24): [True: 4.03M, False: 272]
  ------------------
   74|       |    // Decode the tag.
   75|  4.03M|    const uint32_t bit_length = tag_decoder.DecodeSymbol();
   76|       |    // Decode the actual value.
   77|  10.5M|    for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (77:21): [True: 6.50M, False: 4.03M]
  ------------------
   78|  6.50M|      uint32_t val;
   79|  6.50M|      if (!src_buffer->DecodeLeastSignificantBits32(bit_length, &val)) {
  ------------------
  |  Branch (79:11): [True: 14, False: 6.50M]
  ------------------
   80|     14|        return false;
   81|     14|      }
   82|  6.50M|      out_values[value_id++] = val;
   83|  6.50M|    }
   84|  4.03M|  }
   85|    272|  tag_decoder.EndDecoding();
   86|    272|  src_buffer->EndBitDecoding();
   87|    272|  return true;
   88|    286|}
_ZN5draco16DecodeRawSymbolsINS_17RAnsSymbolDecoderEEEbjPNS_13DecoderBufferEPj:
  116|  8.03k|                      uint32_t *out_values) {
  117|  8.03k|  uint8_t max_bit_length;
  118|  8.03k|  if (!src_buffer->Decode(&max_bit_length)) {
  ------------------
  |  Branch (118:7): [True: 60, False: 7.97k]
  ------------------
  119|     60|    return false;
  120|     60|  }
  121|  7.97k|  switch (max_bit_length) {
  122|    613|    case 1:
  ------------------
  |  Branch (122:5): [True: 613, False: 7.36k]
  ------------------
  123|    613|      return DecodeRawSymbolsInternal<SymbolDecoderT<1>>(num_values, src_buffer,
  124|    613|                                                         out_values);
  125|    524|    case 2:
  ------------------
  |  Branch (125:5): [True: 524, False: 7.45k]
  ------------------
  126|    524|      return DecodeRawSymbolsInternal<SymbolDecoderT<2>>(num_values, src_buffer,
  127|    524|                                                         out_values);
  128|    551|    case 3:
  ------------------
  |  Branch (128:5): [True: 551, False: 7.42k]
  ------------------
  129|    551|      return DecodeRawSymbolsInternal<SymbolDecoderT<3>>(num_values, src_buffer,
  130|    551|                                                         out_values);
  131|    371|    case 4:
  ------------------
  |  Branch (131:5): [True: 371, False: 7.60k]
  ------------------
  132|    371|      return DecodeRawSymbolsInternal<SymbolDecoderT<4>>(num_values, src_buffer,
  133|    371|                                                         out_values);
  134|    202|    case 5:
  ------------------
  |  Branch (134:5): [True: 202, False: 7.77k]
  ------------------
  135|    202|      return DecodeRawSymbolsInternal<SymbolDecoderT<5>>(num_values, src_buffer,
  136|    202|                                                         out_values);
  137|    431|    case 6:
  ------------------
  |  Branch (137:5): [True: 431, False: 7.54k]
  ------------------
  138|    431|      return DecodeRawSymbolsInternal<SymbolDecoderT<6>>(num_values, src_buffer,
  139|    431|                                                         out_values);
  140|    377|    case 7:
  ------------------
  |  Branch (140:5): [True: 377, False: 7.59k]
  ------------------
  141|    377|      return DecodeRawSymbolsInternal<SymbolDecoderT<7>>(num_values, src_buffer,
  142|    377|                                                         out_values);
  143|    443|    case 8:
  ------------------
  |  Branch (143:5): [True: 443, False: 7.53k]
  ------------------
  144|    443|      return DecodeRawSymbolsInternal<SymbolDecoderT<8>>(num_values, src_buffer,
  145|    443|                                                         out_values);
  146|    502|    case 9:
  ------------------
  |  Branch (146:5): [True: 502, False: 7.47k]
  ------------------
  147|    502|      return DecodeRawSymbolsInternal<SymbolDecoderT<9>>(num_values, src_buffer,
  148|    502|                                                         out_values);
  149|    433|    case 10:
  ------------------
  |  Branch (149:5): [True: 433, False: 7.54k]
  ------------------
  150|    433|      return DecodeRawSymbolsInternal<SymbolDecoderT<10>>(
  151|    433|          num_values, src_buffer, out_values);
  152|    375|    case 11:
  ------------------
  |  Branch (152:5): [True: 375, False: 7.59k]
  ------------------
  153|    375|      return DecodeRawSymbolsInternal<SymbolDecoderT<11>>(
  154|    375|          num_values, src_buffer, out_values);
  155|    402|    case 12:
  ------------------
  |  Branch (155:5): [True: 402, False: 7.57k]
  ------------------
  156|    402|      return DecodeRawSymbolsInternal<SymbolDecoderT<12>>(
  157|    402|          num_values, src_buffer, out_values);
  158|    409|    case 13:
  ------------------
  |  Branch (158:5): [True: 409, False: 7.56k]
  ------------------
  159|    409|      return DecodeRawSymbolsInternal<SymbolDecoderT<13>>(
  160|    409|          num_values, src_buffer, out_values);
  161|    370|    case 14:
  ------------------
  |  Branch (161:5): [True: 370, False: 7.60k]
  ------------------
  162|    370|      return DecodeRawSymbolsInternal<SymbolDecoderT<14>>(
  163|    370|          num_values, src_buffer, out_values);
  164|    396|    case 15:
  ------------------
  |  Branch (164:5): [True: 396, False: 7.57k]
  ------------------
  165|    396|      return DecodeRawSymbolsInternal<SymbolDecoderT<15>>(
  166|    396|          num_values, src_buffer, out_values);
  167|    343|    case 16:
  ------------------
  |  Branch (167:5): [True: 343, False: 7.63k]
  ------------------
  168|    343|      return DecodeRawSymbolsInternal<SymbolDecoderT<16>>(
  169|    343|          num_values, src_buffer, out_values);
  170|    359|    case 17:
  ------------------
  |  Branch (170:5): [True: 359, False: 7.61k]
  ------------------
  171|    359|      return DecodeRawSymbolsInternal<SymbolDecoderT<17>>(
  172|    359|          num_values, src_buffer, out_values);
  173|    350|    case 18:
  ------------------
  |  Branch (173:5): [True: 350, False: 7.62k]
  ------------------
  174|    350|      return DecodeRawSymbolsInternal<SymbolDecoderT<18>>(
  175|    350|          num_values, src_buffer, out_values);
  176|    523|    default:
  ------------------
  |  Branch (176:5): [True: 523, False: 7.45k]
  ------------------
  177|    523|      return false;
  178|  7.97k|  }
  179|  7.97k|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi1EEEEEbjPNS_13DecoderBufferEPj:
   92|    613|                              uint32_t *out_values) {
   93|    613|  SymbolDecoderT decoder;
   94|    613|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 371, False: 242]
  ------------------
   95|    371|    return false;
   96|    371|  }
   97|       |
   98|    242|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 242, False: 0]
  |  Branch (98:25): [True: 31, False: 211]
  ------------------
   99|     31|    return false;  // Wrong number of symbols.
  100|     31|  }
  101|       |
  102|    211|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 90, False: 121]
  ------------------
  103|     90|    return false;
  104|     90|  }
  105|  29.9M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 29.9M, False: 121]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  29.9M|    const uint32_t value = decoder.DecodeSymbol();
  108|  29.9M|    out_values[i] = value;
  109|  29.9M|  }
  110|    121|  decoder.EndDecoding();
  111|    121|  return true;
  112|    211|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi2EEEEEbjPNS_13DecoderBufferEPj:
   92|    524|                              uint32_t *out_values) {
   93|    524|  SymbolDecoderT decoder;
   94|    524|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 205, False: 319]
  ------------------
   95|    205|    return false;
   96|    205|  }
   97|       |
   98|    319|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 319, False: 0]
  |  Branch (98:25): [True: 11, False: 308]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    308|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 114, False: 194]
  ------------------
  103|    114|    return false;
  104|    114|  }
  105|  1.85M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 1.85M, False: 194]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  1.85M|    const uint32_t value = decoder.DecodeSymbol();
  108|  1.85M|    out_values[i] = value;
  109|  1.85M|  }
  110|    194|  decoder.EndDecoding();
  111|    194|  return true;
  112|    308|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi3EEEEEbjPNS_13DecoderBufferEPj:
   92|    551|                              uint32_t *out_values) {
   93|    551|  SymbolDecoderT decoder;
   94|    551|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 186, False: 365]
  ------------------
   95|    186|    return false;
   96|    186|  }
   97|       |
   98|    365|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 365, False: 0]
  |  Branch (98:25): [True: 13, False: 352]
  ------------------
   99|     13|    return false;  // Wrong number of symbols.
  100|     13|  }
  101|       |
  102|    352|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 200, False: 152]
  ------------------
  103|    200|    return false;
  104|    200|  }
  105|  3.05M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 3.05M, False: 152]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  3.05M|    const uint32_t value = decoder.DecodeSymbol();
  108|  3.05M|    out_values[i] = value;
  109|  3.05M|  }
  110|    152|  decoder.EndDecoding();
  111|    152|  return true;
  112|    352|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi4EEEEEbjPNS_13DecoderBufferEPj:
   92|    371|                              uint32_t *out_values) {
   93|    371|  SymbolDecoderT decoder;
   94|    371|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 140, False: 231]
  ------------------
   95|    140|    return false;
   96|    140|  }
   97|       |
   98|    231|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 231, False: 0]
  |  Branch (98:25): [True: 18, False: 213]
  ------------------
   99|     18|    return false;  // Wrong number of symbols.
  100|     18|  }
  101|       |
  102|    213|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 70, False: 143]
  ------------------
  103|     70|    return false;
  104|     70|  }
  105|  8.84M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 8.84M, False: 143]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  8.84M|    const uint32_t value = decoder.DecodeSymbol();
  108|  8.84M|    out_values[i] = value;
  109|  8.84M|  }
  110|    143|  decoder.EndDecoding();
  111|    143|  return true;
  112|    213|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi5EEEEEbjPNS_13DecoderBufferEPj:
   92|    202|                              uint32_t *out_values) {
   93|    202|  SymbolDecoderT decoder;
   94|    202|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 42, False: 160]
  ------------------
   95|     42|    return false;
   96|     42|  }
   97|       |
   98|    160|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 160, False: 0]
  |  Branch (98:25): [True: 50, False: 110]
  ------------------
   99|     50|    return false;  // Wrong number of symbols.
  100|     50|  }
  101|       |
  102|    110|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 13, False: 97]
  ------------------
  103|     13|    return false;
  104|     13|  }
  105|  9.62M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 9.62M, False: 97]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  9.62M|    const uint32_t value = decoder.DecodeSymbol();
  108|  9.62M|    out_values[i] = value;
  109|  9.62M|  }
  110|     97|  decoder.EndDecoding();
  111|     97|  return true;
  112|    110|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi6EEEEEbjPNS_13DecoderBufferEPj:
   92|    431|                              uint32_t *out_values) {
   93|    431|  SymbolDecoderT decoder;
   94|    431|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 152, False: 279]
  ------------------
   95|    152|    return false;
   96|    152|  }
   97|       |
   98|    279|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 279, False: 0]
  |  Branch (98:25): [True: 8, False: 271]
  ------------------
   99|      8|    return false;  // Wrong number of symbols.
  100|      8|  }
  101|       |
  102|    271|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 131, False: 140]
  ------------------
  103|    131|    return false;
  104|    131|  }
  105|  6.41M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 6.41M, False: 140]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  6.41M|    const uint32_t value = decoder.DecodeSymbol();
  108|  6.41M|    out_values[i] = value;
  109|  6.41M|  }
  110|    140|  decoder.EndDecoding();
  111|    140|  return true;
  112|    271|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi7EEEEEbjPNS_13DecoderBufferEPj:
   92|    377|                              uint32_t *out_values) {
   93|    377|  SymbolDecoderT decoder;
   94|    377|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 164, False: 213]
  ------------------
   95|    164|    return false;
   96|    164|  }
   97|       |
   98|    213|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 213, False: 0]
  |  Branch (98:25): [True: 11, False: 202]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    202|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 93, False: 109]
  ------------------
  103|     93|    return false;
  104|     93|  }
  105|  25.6M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 25.6M, False: 109]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  25.6M|    const uint32_t value = decoder.DecodeSymbol();
  108|  25.6M|    out_values[i] = value;
  109|  25.6M|  }
  110|    109|  decoder.EndDecoding();
  111|    109|  return true;
  112|    202|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi8EEEEEbjPNS_13DecoderBufferEPj:
   92|    443|                              uint32_t *out_values) {
   93|    443|  SymbolDecoderT decoder;
   94|    443|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 176, False: 267]
  ------------------
   95|    176|    return false;
   96|    176|  }
   97|       |
   98|    267|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 267, False: 0]
  |  Branch (98:25): [True: 11, False: 256]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    256|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 127, False: 129]
  ------------------
  103|    127|    return false;
  104|    127|  }
  105|  20.1M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 20.1M, False: 129]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  20.1M|    const uint32_t value = decoder.DecodeSymbol();
  108|  20.1M|    out_values[i] = value;
  109|  20.1M|  }
  110|    129|  decoder.EndDecoding();
  111|    129|  return true;
  112|    256|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi9EEEEEbjPNS_13DecoderBufferEPj:
   92|    502|                              uint32_t *out_values) {
   93|    502|  SymbolDecoderT decoder;
   94|    502|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 173, False: 329]
  ------------------
   95|    173|    return false;
   96|    173|  }
   97|       |
   98|    329|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 329, False: 0]
  |  Branch (98:25): [True: 9, False: 320]
  ------------------
   99|      9|    return false;  // Wrong number of symbols.
  100|      9|  }
  101|       |
  102|    320|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 138, False: 182]
  ------------------
  103|    138|    return false;
  104|    138|  }
  105|  12.3M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 12.3M, False: 182]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  12.3M|    const uint32_t value = decoder.DecodeSymbol();
  108|  12.3M|    out_values[i] = value;
  109|  12.3M|  }
  110|    182|  decoder.EndDecoding();
  111|    182|  return true;
  112|    320|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi10EEEEEbjPNS_13DecoderBufferEPj:
   92|    433|                              uint32_t *out_values) {
   93|    433|  SymbolDecoderT decoder;
   94|    433|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 200, False: 233]
  ------------------
   95|    200|    return false;
   96|    200|  }
   97|       |
   98|    233|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 233, False: 0]
  |  Branch (98:25): [True: 5, False: 228]
  ------------------
   99|      5|    return false;  // Wrong number of symbols.
  100|      5|  }
  101|       |
  102|    228|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 152, False: 76]
  ------------------
  103|    152|    return false;
  104|    152|  }
  105|   573k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 573k, False: 76]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   573k|    const uint32_t value = decoder.DecodeSymbol();
  108|   573k|    out_values[i] = value;
  109|   573k|  }
  110|     76|  decoder.EndDecoding();
  111|     76|  return true;
  112|    228|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi11EEEEEbjPNS_13DecoderBufferEPj:
   92|    375|                              uint32_t *out_values) {
   93|    375|  SymbolDecoderT decoder;
   94|    375|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 201, False: 174]
  ------------------
   95|    201|    return false;
   96|    201|  }
   97|       |
   98|    174|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 174, False: 0]
  |  Branch (98:25): [True: 14, False: 160]
  ------------------
   99|     14|    return false;  // Wrong number of symbols.
  100|     14|  }
  101|       |
  102|    160|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 96, False: 64]
  ------------------
  103|     96|    return false;
  104|     96|  }
  105|   436k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 436k, False: 64]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   436k|    const uint32_t value = decoder.DecodeSymbol();
  108|   436k|    out_values[i] = value;
  109|   436k|  }
  110|     64|  decoder.EndDecoding();
  111|     64|  return true;
  112|    160|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi12EEEEEbjPNS_13DecoderBufferEPj:
   92|    402|                              uint32_t *out_values) {
   93|    402|  SymbolDecoderT decoder;
   94|    402|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 217, False: 185]
  ------------------
   95|    217|    return false;
   96|    217|  }
   97|       |
   98|    185|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 185, False: 0]
  |  Branch (98:25): [True: 5, False: 180]
  ------------------
   99|      5|    return false;  // Wrong number of symbols.
  100|      5|  }
  101|       |
  102|    180|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 118, False: 62]
  ------------------
  103|    118|    return false;
  104|    118|  }
  105|  81.9k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 81.8k, False: 62]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  81.8k|    const uint32_t value = decoder.DecodeSymbol();
  108|  81.8k|    out_values[i] = value;
  109|  81.8k|  }
  110|     62|  decoder.EndDecoding();
  111|     62|  return true;
  112|    180|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi13EEEEEbjPNS_13DecoderBufferEPj:
   92|    409|                              uint32_t *out_values) {
   93|    409|  SymbolDecoderT decoder;
   94|    409|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 221, False: 188]
  ------------------
   95|    221|    return false;
   96|    221|  }
   97|       |
   98|    188|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 188, False: 0]
  |  Branch (98:25): [True: 11, False: 177]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    177|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 101, False: 76]
  ------------------
  103|    101|    return false;
  104|    101|  }
  105|  97.6k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 97.5k, False: 76]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  97.5k|    const uint32_t value = decoder.DecodeSymbol();
  108|  97.5k|    out_values[i] = value;
  109|  97.5k|  }
  110|     76|  decoder.EndDecoding();
  111|     76|  return true;
  112|    177|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi14EEEEEbjPNS_13DecoderBufferEPj:
   92|    370|                              uint32_t *out_values) {
   93|    370|  SymbolDecoderT decoder;
   94|    370|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 180, False: 190]
  ------------------
   95|    180|    return false;
   96|    180|  }
   97|       |
   98|    190|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 190, False: 0]
  |  Branch (98:25): [True: 10, False: 180]
  ------------------
   99|     10|    return false;  // Wrong number of symbols.
  100|     10|  }
  101|       |
  102|    180|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 112, False: 68]
  ------------------
  103|    112|    return false;
  104|    112|  }
  105|  97.3k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 97.3k, False: 68]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  97.3k|    const uint32_t value = decoder.DecodeSymbol();
  108|  97.3k|    out_values[i] = value;
  109|  97.3k|  }
  110|     68|  decoder.EndDecoding();
  111|     68|  return true;
  112|    180|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi15EEEEEbjPNS_13DecoderBufferEPj:
   92|    396|                              uint32_t *out_values) {
   93|    396|  SymbolDecoderT decoder;
   94|    396|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 176, False: 220]
  ------------------
   95|    176|    return false;
   96|    176|  }
   97|       |
   98|    220|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 220, False: 0]
  |  Branch (98:25): [True: 10, False: 210]
  ------------------
   99|     10|    return false;  // Wrong number of symbols.
  100|     10|  }
  101|       |
  102|    210|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 127, False: 83]
  ------------------
  103|    127|    return false;
  104|    127|  }
  105|   366k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 366k, False: 83]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   366k|    const uint32_t value = decoder.DecodeSymbol();
  108|   366k|    out_values[i] = value;
  109|   366k|  }
  110|     83|  decoder.EndDecoding();
  111|     83|  return true;
  112|    210|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi16EEEEEbjPNS_13DecoderBufferEPj:
   92|    343|                              uint32_t *out_values) {
   93|    343|  SymbolDecoderT decoder;
   94|    343|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 164, False: 179]
  ------------------
   95|    164|    return false;
   96|    164|  }
   97|       |
   98|    179|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 179, False: 0]
  |  Branch (98:25): [True: 11, False: 168]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    168|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 99, False: 69]
  ------------------
  103|     99|    return false;
  104|     99|  }
  105|   140k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 140k, False: 69]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   140k|    const uint32_t value = decoder.DecodeSymbol();
  108|   140k|    out_values[i] = value;
  109|   140k|  }
  110|     69|  decoder.EndDecoding();
  111|     69|  return true;
  112|    168|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi17EEEEEbjPNS_13DecoderBufferEPj:
   92|    359|                              uint32_t *out_values) {
   93|    359|  SymbolDecoderT decoder;
   94|    359|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 161, False: 198]
  ------------------
   95|    161|    return false;
   96|    161|  }
   97|       |
   98|    198|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 198, False: 0]
  |  Branch (98:25): [True: 11, False: 187]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    187|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 109, False: 78]
  ------------------
  103|    109|    return false;
  104|    109|  }
  105|   288k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 288k, False: 78]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   288k|    const uint32_t value = decoder.DecodeSymbol();
  108|   288k|    out_values[i] = value;
  109|   288k|  }
  110|     78|  decoder.EndDecoding();
  111|     78|  return true;
  112|    187|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi18EEEEEbjPNS_13DecoderBufferEPj:
   92|    350|                              uint32_t *out_values) {
   93|    350|  SymbolDecoderT decoder;
   94|    350|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 169, False: 181]
  ------------------
   95|    169|    return false;
   96|    169|  }
   97|       |
   98|    181|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 181, False: 0]
  |  Branch (98:25): [True: 9, False: 172]
  ------------------
   99|      9|    return false;  // Wrong number of symbols.
  100|      9|  }
  101|       |
  102|    172|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 104, False: 68]
  ------------------
  103|    104|    return false;
  104|    104|  }
  105|  76.5k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 76.4k, False: 68]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  76.4k|    const uint32_t value = decoder.DecodeSymbol();
  108|  76.4k|    out_values[i] = value;
  109|  76.4k|  }
  110|     68|  decoder.EndDecoding();
  111|     68|  return true;
  112|    172|}

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

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

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

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

_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEEC2Ev:
   48|  3.72k|    : decoder_(nullptr),
   49|  3.72k|      last_symbol_id_(-1),
   50|  3.72k|      last_vert_id_(-1),
   51|  3.72k|      last_face_id_(-1),
   52|  3.72k|      num_new_vertices_(0),
   53|  3.72k|      num_encoded_vertices_(0),
   54|  3.72k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  3.72k|    MeshEdgebreakerDecoder *decoder) {
   59|  3.72k|  decoder_ = decoder;
   60|  3.72k|  return true;
   61|  3.72k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE23GetAttributeCornerTableEi:
   66|  3.83k|    int att_id) const {
   67|  5.18k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 4.35k, False: 828]
  ------------------
   68|  4.35k|    const int decoder_id = attribute_data_[i].decoder_id;
   69|  4.35k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 1.34k, False: 3.01k]
  |  Branch (69:27): [True: 0, False: 3.01k]
  ------------------
   70|  1.34k|      continue;
   71|  1.34k|    }
   72|  3.01k|    const AttributesDecoderInterface *const dec =
   73|  3.01k|        decoder_->attributes_decoder(decoder_id);
   74|  6.20k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 6.19k, False: 6]
  ------------------
   75|  6.19k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 3.00k, False: 3.18k]
  ------------------
   76|  3.00k|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 2.04k, False: 964]
  ------------------
   77|  2.04k|          return &attribute_data_[i].connectivity_data;
   78|  2.04k|        }
   79|    964|        return nullptr;
   80|  3.00k|      }
   81|  6.19k|    }
   82|  3.01k|  }
   83|    828|  return nullptr;
   84|  3.83k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE24GetAttributeEncodingDataEi:
   89|  3.83k|    int att_id) const {
   90|  5.18k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 4.35k, False: 828]
  ------------------
   91|  4.35k|    const int decoder_id = attribute_data_[i].decoder_id;
   92|  4.35k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 1.34k, False: 3.01k]
  |  Branch (92:27): [True: 0, False: 3.01k]
  ------------------
   93|  1.34k|      continue;
   94|  1.34k|    }
   95|  3.01k|    const AttributesDecoderInterface *const dec =
   96|  3.01k|        decoder_->attributes_decoder(decoder_id);
   97|  6.20k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 6.19k, False: 6]
  ------------------
   98|  6.19k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 3.00k, False: 3.18k]
  ------------------
   99|  3.00k|        return &attribute_data_[i].encoding_data;
  100|  3.00k|      }
  101|  6.19k|    }
  102|  3.01k|  }
  103|    828|  return &pos_encoding_data_;
  104|  3.83k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE23CreateAttributesDecoderEi:
  130|  3.12k|    int32_t att_decoder_id) {
  131|  3.12k|  int8_t att_data_id;
  132|  3.12k|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 11, False: 3.11k]
  ------------------
  133|     11|    return false;
  134|     11|  }
  135|  3.11k|  uint8_t decoder_type;
  136|  3.11k|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 6, False: 3.10k]
  ------------------
  137|      6|    return false;
  138|      6|  }
  139|       |
  140|  3.10k|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 2.44k, False: 667]
  ------------------
  141|  2.44k|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 90, False: 2.35k]
  ------------------
  142|     90|      return false;  // Unexpected attribute data.
  143|     90|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|  2.35k|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 4, False: 2.34k]
  ------------------
  148|      4|      return false;
  149|      4|    }
  150|       |
  151|  2.34k|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|  2.34k|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    667|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 2, False: 665]
  ------------------
  155|      2|      return false;  // Some other decoder is already using the data. Error.
  156|      2|    }
  157|    665|    pos_data_decoder_id_ = att_decoder_id;
  158|    665|  }
  159|       |
  160|  3.01k|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|  3.01k|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  3.01k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 3.00k, False: 6]
  ------------------
  162|  3.00k|    uint8_t traversal_method_encoded;
  163|  3.00k|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 6, False: 3.00k]
  ------------------
  164|      6|      return false;
  165|      6|    }
  166|       |    // Check that decoded traversal method is valid.
  167|  3.00k|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 20, False: 2.98k]
  ------------------
  168|     20|      return false;
  169|     20|    }
  170|  2.98k|    traversal_method =
  171|  2.98k|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|  2.98k|  }
  173|       |
  174|  2.98k|  const Mesh *mesh = decoder_->mesh();
  175|  2.98k|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|  2.98k|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 1.42k, False: 1.56k]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|  1.42k|    MeshAttributeIndicesEncodingData *encoding_data = nullptr;
  181|  1.42k|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 646, False: 778]
  ------------------
  182|    646|      encoding_data = &pos_encoding_data_;
  183|    778|    } else {
  184|    778|      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|    778|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|    778|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|  1.42k|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 198, False: 1.22k]
  ------------------
  191|    198|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|    198|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|    198|          AttTraverser;
  194|    198|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|  1.22k|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 1.22k, False: 0]
  ------------------
  196|  1.22k|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|  1.22k|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|  1.22k|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|  1.22k|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|  1.56k|  } else {
  203|  1.56k|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 13, False: 1.54k]
  ------------------
  204|     13|      return false;  // Unsupported method.
  205|     13|    }
  206|  1.54k|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 4, False: 1.54k]
  ------------------
  207|      4|      return false;  // Attribute data must be specified.
  208|      4|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|  1.54k|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|  1.54k|        AttObserver;
  214|  1.54k|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|  1.54k|        AttTraverser;
  216|       |
  217|  1.54k|    MeshAttributeIndicesEncodingData *const encoding_data =
  218|  1.54k|        &attribute_data_[att_data_id].encoding_data;
  219|  1.54k|    const MeshAttributeCornerTable *const corner_table =
  220|  1.54k|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|  1.54k|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|  1.54k|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|  1.54k|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|  1.54k|                             encoding_data);
  227|       |
  228|  1.54k|    AttTraverser att_traverser;
  229|  1.54k|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|  1.54k|    traversal_sequencer->SetTraverser(att_traverser);
  232|  1.54k|    sequencer = std::move(traversal_sequencer);
  233|  1.54k|  }
  234|       |
  235|  2.96k|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 2.96k]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|  2.96k|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|  2.96k|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|  2.96k|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|  2.96k|                                        std::move(att_controller));
  244|  2.96k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18DecodeConnectivityEv:
  247|  3.72k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  3.72k|  num_new_vertices_ = 0;
  249|  3.72k|  new_to_parent_vertex_map_.clear();
  250|  3.72k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  3.72k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.72k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 569, False: 3.15k]
  ------------------
  252|    569|    uint32_t num_new_verts;
  253|    569|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    569|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 196, False: 373]
  ------------------
  254|    196|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 196]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    373|    } else {
  258|    373|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 373]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    373|    }
  262|    569|    num_new_vertices_ = num_new_verts;
  263|    569|  }
  264|  3.72k|#endif
  265|       |
  266|  3.72k|  uint32_t num_encoded_vertices;
  267|  3.72k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  3.72k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.72k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 196, False: 3.52k]
  ------------------
  269|    196|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 196]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    196|  } else
  274|  3.52k|#endif
  275|  3.52k|  {
  276|  3.52k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 1, False: 3.52k]
  ------------------
  277|      1|      return false;
  278|      1|    }
  279|  3.52k|  }
  280|  3.72k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  3.72k|  uint32_t num_faces;
  283|  3.72k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  3.72k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.72k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 196, False: 3.52k]
  ------------------
  285|    196|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 196]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    196|  } else
  290|  3.52k|#endif
  291|  3.52k|  {
  292|  3.52k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 3.52k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  3.52k|  }
  296|  3.72k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 5, False: 3.71k]
  ------------------
  297|      5|    return false;  // Draco cannot handle this many faces.
  298|      5|  }
  299|       |
  300|  3.71k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 4, False: 3.71k]
  ------------------
  301|      4|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      4|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|  3.71k|  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.71k|  const uint64_t num_encoded_vertices_64 =
  311|  3.71k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  3.71k|  const uint64_t max_num_vertex_edges =
  313|  3.71k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  3.71k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 2, False: 3.71k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      2|    return false;
  317|      2|  }
  318|       |
  319|  3.71k|  uint8_t num_attribute_data;
  320|  3.71k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 3.71k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  3.71k|  uint32_t num_encoded_symbols;
  325|  3.71k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  3.71k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.71k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 186, False: 3.52k]
  ------------------
  327|    186|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 186]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    186|  } else
  332|  3.52k|#endif
  333|  3.52k|  {
  334|  3.52k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 3.52k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  3.52k|  }
  338|       |
  339|  3.71k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 11, False: 3.70k]
  ------------------
  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|     11|    return false;
  344|     11|  }
  345|  3.70k|  const uint32_t max_encoded_faces =
  346|  3.70k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  3.70k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 17, False: 3.68k]
  ------------------
  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|     17|    return false;
  352|     17|  }
  353|       |
  354|  3.68k|  uint32_t num_encoded_split_symbols;
  355|  3.68k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  3.68k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.68k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 163, False: 3.52k]
  ------------------
  357|    163|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 163]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    163|  } else
  362|  3.52k|#endif
  363|  3.52k|  {
  364|  3.52k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 3.52k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  3.52k|  }
  368|       |
  369|  3.68k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 18, False: 3.66k]
  ------------------
  370|     18|    return false;  // Split symbols are a sub-set of all symbols.
  371|     18|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  3.66k|  vertex_traversal_length_.clear();
  375|  3.66k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  3.66k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 3.66k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  3.66k|  processed_corner_ids_.clear();
  380|  3.66k|  processed_corner_ids_.reserve(num_faces);
  381|  3.66k|  processed_connectivity_corners_.clear();
  382|  3.66k|  processed_connectivity_corners_.reserve(num_faces);
  383|  3.66k|  topology_split_data_.clear();
  384|  3.66k|  hole_event_data_.clear();
  385|  3.66k|  init_face_configurations_.clear();
  386|  3.66k|  init_corners_.clear();
  387|       |
  388|  3.66k|  last_symbol_id_ = -1;
  389|  3.66k|  last_face_id_ = -1;
  390|  3.66k|  last_vert_id_ = -1;
  391|       |
  392|  3.66k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  3.66k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  3.66k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 1, False: 3.66k]
  ------------------
  397|  3.66k|          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.66k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  3.66k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  3.66k|  int32_t topology_split_decoded_bytes = -1;
  410|  3.66k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.66k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 521, False: 3.14k]
  ------------------
  411|    521|    uint32_t encoded_connectivity_size;
  412|    521|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    521|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 150, False: 371]
  ------------------
  413|    150|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 3, False: 147]
  ------------------
  414|      3|        return false;
  415|      3|      }
  416|    371|    } else {
  417|    371|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 1, False: 370]
  ------------------
  418|      1|        return false;
  419|      1|      }
  420|    371|    }
  421|    517|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 2, False: 515]
  ------------------
  422|    515|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 19, False: 496]
  ------------------
  423|     21|      return false;
  424|     21|    }
  425|    496|    DecoderBuffer event_buffer;
  426|    496|    event_buffer.Init(
  427|    496|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    496|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    496|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    496|    topology_split_decoded_bytes =
  432|    496|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    496|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 134, False: 362]
  ------------------
  434|    134|      return false;
  435|    134|    }
  436|       |
  437|    496|  } else
  438|  3.14k|#endif
  439|  3.14k|  {
  440|  3.14k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 16, False: 3.12k]
  ------------------
  441|     16|      return false;
  442|     16|    }
  443|  3.14k|  }
  444|       |
  445|  3.49k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  3.49k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  3.49k|                                           num_encoded_split_symbols);
  449|  3.49k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  3.49k|  DecoderBuffer traversal_end_buffer;
  452|  3.49k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 104, False: 3.38k]
  ------------------
  453|    104|    return false;
  454|    104|  }
  455|       |
  456|  3.38k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  3.38k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 274, False: 3.11k]
  ------------------
  458|    274|    return false;
  459|    274|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|  3.11k|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|  3.11k|                           traversal_end_buffer.remaining_size(),
  464|  3.11k|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|  3.11k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|  3.11k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.11k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 269, False: 2.84k]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|    269|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|    269|  }
  471|  3.11k|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|  3.11k|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 3.05k, False: 57]
  ------------------
  475|  3.05k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|  3.05k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  3.05k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 260, False: 2.79k]
  ------------------
  477|  1.62k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 1.36k, False: 260]
  ------------------
  478|  1.36k|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 1.36k]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|  1.36k|      }
  482|       |
  483|    260|    } else
  484|  2.79k|#endif
  485|  2.79k|    {
  486|   366k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 363k, False: 2.79k]
  ------------------
  487|   363k|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 363k]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|   363k|      }
  491|  2.79k|    }
  492|  3.05k|  }
  493|  3.11k|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  8.67k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 5.56k, False: 3.11k]
  ------------------
  498|  5.56k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|   868k|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 868k, False: 5.56k]
  ------------------
  501|   868k|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|   868k|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  5.56k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 5.56k]
  ------------------
  505|  5.56k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  5.56k|  }
  509|       |
  510|  3.11k|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  8.67k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 5.56k, False: 3.11k]
  ------------------
  512|       |    // For non-position attributes, preallocate the vertex to value mapping
  513|       |    // using the maximum number of vertices from the base corner table and the
  514|       |    // attribute corner table (since the attribute decoder may use either of
  515|       |    // it).
  516|  5.56k|    int32_t att_connectivity_verts =
  517|  5.56k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  5.56k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 639, False: 4.92k]
  ------------------
  519|    639|      att_connectivity_verts = corner_table_->num_vertices();
  520|    639|    }
  521|  5.56k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  5.56k|  }
  523|  3.11k|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 4, False: 3.10k]
  ------------------
  524|      4|    return false;
  525|      4|  }
  526|  3.10k|  return true;
  527|  3.11k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE19OnAttributesDecodedEv:
  530|    674|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|    674|  return true;
  532|    674|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18DecodeConnectivityEi:
  536|  3.38k|    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|  3.38k|  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|  3.38k|  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|  3.38k|  std::vector<VertexIndex> invalid_vertices;
  558|  3.38k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  3.38k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  3.38k|  int num_faces = 0;
  562|  31.1M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 31.1M, False: 3.19k]
  ------------------
  563|  31.1M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  31.1M|    bool check_topology_split = false;
  566|  31.1M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  31.1M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 13.9M, False: 17.2M]
  ------------------
  568|       |      // Create a new face between two edges on the open boundary.
  569|       |      // The first edge is opposite to the corner "a" from the image below.
  570|       |      // The other edge is opposite to the corner "b" that can be reached
  571|       |      // through a CCW traversal around the vertex "v".
  572|       |      // One new active boundary edge is created, opposite to the new corner
  573|       |      // "x".
  574|       |      //
  575|       |      //     *-------*
  576|       |      //    / \     / \
  577|       |      //   /   \   /   \
  578|       |      //  /     \ /     \
  579|       |      // *-------v-------*
  580|       |      //  \b    /x\    a/
  581|       |      //   \   /   \   /
  582|       |      //    \ /  C  \ /
  583|       |      //     *.......*
  584|       |
  585|       |      // Find the corner "b" from the corner "a" which is the corner on the
  586|       |      // top of the active stack.
  587|  13.9M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 0, False: 13.9M]
  ------------------
  588|      0|        return -1;
  589|      0|      }
  590|       |
  591|  13.9M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  13.9M|      const VertexIndex vertex_x =
  593|  13.9M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  13.9M|      const CornerIndex corner_b =
  595|  13.9M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  13.9M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 128, False: 13.9M]
  ------------------
  598|       |        // All matched corners must be different.
  599|    128|        return -1;
  600|    128|      }
  601|  13.9M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 13.9M]
  |  Branch (601:11): [True: 0, False: 13.9M]
  ------------------
  602|  13.9M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 13.9M]
  ------------------
  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|  13.9M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  13.9M|      SetOppositeCorners(corner_a, corner + 1);
  612|  13.9M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  13.9M|      const VertexIndex vert_a_prev =
  616|  13.9M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  13.9M|      const VertexIndex vert_b_next =
  618|  13.9M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  13.9M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 13.9M]
  |  Branch (619:38): [True: 0, False: 13.9M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  13.9M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  13.9M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  13.9M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  13.9M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  13.9M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  13.9M|      active_corner_stack.back() = corner;
  631|  17.2M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 5.40M, False: 11.8M]
  |  Branch (631:40): [True: 3.63M, False: 8.24M]
  ------------------
  632|       |      // Create a new face extending from the open boundary edge opposite to the
  633|       |      // corner "a" from the image below. Two new boundary edges are created
  634|       |      // opposite to corners "r" and "l". New active corner is set to either "r"
  635|       |      // or "l" depending on the decoded symbol. One new vertex is created
  636|       |      // at the opposite corner to corner "a".
  637|       |      //     *-------*
  638|       |      //    /a\     / \
  639|       |      //   /   \   /   \
  640|       |      //  /     \ /     \
  641|       |      // *-------v-------*
  642|       |      //  .l   r.
  643|       |      //   .   .
  644|       |      //    . .
  645|       |      //     *
  646|  9.04M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 0, False: 9.04M]
  ------------------
  647|      0|        return -1;
  648|      0|      }
  649|  9.04M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  9.04M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 9.04M]
  ------------------
  651|       |        // Active corner is already opposite to an existing face, which should
  652|       |        // not happen unless the input was tampered with.
  653|      0|        return -1;
  654|      0|      }
  655|       |
  656|       |      // First corner on the new face is either corner "l" or "r".
  657|  9.04M|      const CornerIndex corner(3 * face.value());
  658|  9.04M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  9.04M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 5.40M, False: 3.63M]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  5.40M|        opp_corner = corner + 2;
  662|  5.40M|        corner_l = corner + 1;
  663|  5.40M|        corner_r = corner;
  664|  5.40M|      } else {
  665|       |        // "l" is the new first corner.
  666|  3.63M|        opp_corner = corner + 1;
  667|  3.63M|        corner_l = corner;
  668|  3.63M|        corner_r = corner + 2;
  669|  3.63M|      }
  670|  9.04M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  9.04M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  9.04M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 1, False: 9.04M]
  ------------------
  675|      1|        return -1;  // Unexpected number of decoded vertices.
  676|      1|      }
  677|       |
  678|  9.04M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  9.04M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  9.04M|      const VertexIndex vertex_r =
  682|  9.04M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  9.04M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  9.04M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  9.04M|      corner_table_->MapCornerToVertex(
  688|  9.04M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  9.04M|      active_corner_stack.back() = corner;
  690|  9.04M|      check_topology_split = true;
  691|  9.04M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 4.07M, False: 4.16M]
  ------------------
  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.07M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 0, False: 4.07M]
  ------------------
  703|      0|        return -1;
  704|      0|      }
  705|  4.07M|      const CornerIndex corner_b = active_corner_stack.back();
  706|  4.07M|      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.07M|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  4.07M|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 200, False: 4.07M]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|    200|        active_corner_stack.push_back(it->second);
  714|    200|      }
  715|  4.07M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 16, False: 4.07M]
  ------------------
  716|     16|        return -1;
  717|     16|      }
  718|  4.07M|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  4.07M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 4.07M]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  4.07M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 4, False: 4.07M]
  |  Branch (724:11): [True: 4, False: 4.07M]
  ------------------
  725|  4.07M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 4.07M]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|      4|        return -1;
  729|      4|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  4.07M|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  4.07M|      SetOppositeCorners(corner_a, corner + 2);
  735|  4.07M|      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.07M|      const VertexIndex vertex_p =
  739|  4.07M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  4.07M|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  4.07M|      corner_table_->MapCornerToVertex(
  742|  4.07M|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  4.07M|      const VertexIndex vert_b_prev =
  744|  4.07M|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  4.07M|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  4.07M|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  4.07M|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  4.07M|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  4.07M|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  4.07M|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  4.07M|                                       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.07M|      const CornerIndex first_corner = corner_n;
  757|  16.0M|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 12.0M, False: 4.07M]
  ------------------
  758|  12.0M|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|  12.0M|        corner_n = corner_table_->SwingLeft(corner_n);
  760|  12.0M|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 3, False: 12.0M]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      3|          return -1;
  764|      3|        }
  765|  12.0M|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  4.07M|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  4.07M|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 1.52M, False: 2.55M]
  ------------------
  770|  1.52M|        invalid_vertices.push_back(vertex_n);
  771|  1.52M|      }
  772|  4.07M|      active_corner_stack.back() = corner;
  773|  4.16M|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 4.16M, False: 0]
  ------------------
  774|  4.16M|      const CornerIndex corner(3 * face.value());
  775|  4.16M|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  4.16M|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  4.16M|      corner_table_->MapCornerToVertex(corner + 1,
  779|  4.16M|                                       corner_table_->AddNewVertex());
  780|  4.16M|      corner_table_->MapCornerToVertex(corner + 2,
  781|  4.16M|                                       corner_table_->AddNewVertex());
  782|       |
  783|  4.16M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 3, False: 4.16M]
  ------------------
  784|      3|        return -1;  // Unexpected number of decoded vertices.
  785|      3|      }
  786|       |
  787|  4.16M|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  4.16M|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  4.16M|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  4.16M|      active_corner_stack.push_back(corner);
  792|  4.16M|      check_topology_split = true;
  793|  4.16M|    } else {
  794|       |      // Error. Unknown symbol decoded.
  795|      0|      return -1;
  796|      0|    }
  797|       |    // Inform the traversal decoder that a new corner has been reached.
  798|  31.1M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  31.1M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 13.2M, False: 17.9M]
  ------------------
  801|       |      // Check for topology splits happens only for TOPOLOGY_L, TOPOLOGY_R and
  802|       |      // TOPOLOGY_E symbols because those are the symbols that correspond to
  803|       |      // faces that can be directly connected a TOPOLOGY_S face through the
  804|       |      // topology split event.
  805|       |      // If a topology split is detected, we need to add a new active edge
  806|       |      // onto the active_corner_stack because it will be used later when the
  807|       |      // corresponding TOPOLOGY_S event is decoded.
  808|       |
  809|       |      // Symbol id used by the encoder (reverse).
  810|  13.2M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  13.2M|      EdgeFaceName split_edge;
  812|  13.2M|      int encoder_split_symbol_id;
  813|  13.2M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 2.37k, False: 13.2M]
  ------------------
  814|  13.2M|                             &encoder_split_symbol_id)) {
  815|  2.37k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 37, False: 2.33k]
  ------------------
  816|     37|          return -1;  // Wrong split symbol id.
  817|     37|        }
  818|       |        // Symbol was part of a topology split. Now we need to determine which
  819|       |        // edge should be added to the active edges stack.
  820|  2.33k|        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.33k|        CornerIndex new_active_corner;
  831|  2.33k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 1.21k, False: 1.12k]
  ------------------
  832|  1.21k|          new_active_corner = corner_table_->Next(act_top_corner);
  833|  1.21k|        } else {
  834|  1.12k|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|  1.12k|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  2.33k|        const int decoder_split_symbol_id =
  839|  2.33k|            num_symbols - encoder_split_symbol_id - 1;
  840|  2.33k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  2.33k|            new_active_corner;
  842|  2.33k|      }
  843|  13.2M|    }
  844|  31.1M|  }
  845|  3.19k|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 3.19k]
  ------------------
  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|  42.7k|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 39.6k, False: 3.12k]
  ------------------
  850|  39.6k|    const CornerIndex corner = active_corner_stack.back();
  851|  39.6k|    active_corner_stack.pop_back();
  852|  39.6k|    const bool interior_face =
  853|  39.6k|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  39.6k|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 27.5k, False: 12.0k]
  ------------------
  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|  27.5k|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 20, False: 27.5k]
  ------------------
  877|     20|        return -1;  // More faces than expected added to the mesh.
  878|     20|      }
  879|       |
  880|  27.5k|      const CornerIndex corner_a = corner;
  881|  27.5k|      const VertexIndex vert_n =
  882|  27.5k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  27.5k|      const CornerIndex corner_b =
  884|  27.5k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  27.5k|      const VertexIndex vert_x =
  887|  27.5k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  27.5k|      const CornerIndex corner_c =
  889|  27.5k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  27.5k|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 2, False: 27.5k]
  |  Branch (891:33): [True: 38, False: 27.5k]
  |  Branch (891:55): [True: 0, False: 27.5k]
  ------------------
  892|       |        // All matched corners must be different.
  893|     40|        return -1;
  894|     40|      }
  895|  27.5k|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 9, False: 27.5k]
  |  Branch (895:11): [True: 11, False: 27.5k]
  ------------------
  896|  27.5k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 1, False: 27.5k]
  ------------------
  897|  27.5k|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 1, False: 27.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|     11|        return -1;
  901|     11|      }
  902|       |
  903|  27.5k|      const VertexIndex vert_p =
  904|  27.5k|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  27.5k|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  27.5k|      const CornerIndex new_corner(3 * face.value());
  909|  27.5k|      SetOppositeCorners(new_corner, corner);
  910|  27.5k|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  27.5k|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  27.5k|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  27.5k|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  27.5k|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|   110k|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 82.5k, False: 27.5k]
  ------------------
  920|  82.5k|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|  82.5k|      }
  922|       |
  923|  27.5k|      init_face_configurations_.push_back(true);
  924|  27.5k|      init_corners_.push_back(new_corner);
  925|  27.5k|    } else {
  926|       |      // The initial face wasn't interior and the traversal had to start from
  927|       |      // an open boundary. In this case no new face is added, but we need to
  928|       |      // keep record about the first opposite corner to this boundary.
  929|  12.0k|      init_face_configurations_.push_back(false);
  930|  12.0k|      init_corners_.push_back(corner);
  931|  12.0k|    }
  932|  39.6k|  }
  933|  3.12k|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 9, False: 3.11k]
  ------------------
  934|      9|    return -1;  // Unexpected number of decoded faces.
  935|      9|  }
  936|       |
  937|  3.11k|  int num_vertices = corner_table_->num_vertices();
  938|       |  // If any vertex was marked as isolated, we want to remove it from the corner
  939|       |  // table to ensure that all vertices in range <0, num_vertices> are valid.
  940|  10.1k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 10.1k, False: 3.11k]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  10.1k|    VertexIndex src_vert(num_vertices - 1);
  943|  11.3k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 1.26k, False: 10.1k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|  1.26k|      src_vert = VertexIndex(--num_vertices - 1);
  946|  1.26k|    }
  947|  10.1k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 1.26k, False: 8.83k]
  ------------------
  948|  1.26k|      continue;  // No need to swap anything.
  949|  1.26k|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  8.83k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  91.8k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 82.9k, False: 8.83k]
  ------------------
  954|  82.9k|      const CornerIndex cid = vcit.Corner();
  955|  82.9k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 2, False: 82.9k]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      2|        return -1;
  959|      2|      }
  960|  82.9k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  82.9k|    }
  962|  8.83k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  8.83k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  8.83k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  8.83k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  8.83k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  8.83k|    num_vertices--;
  972|  8.83k|  }
  973|  3.11k|  return num_vertices;
  974|  3.11k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  3.64k|    DecoderBuffer *decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  3.64k|  uint32_t num_topology_splits;
  982|  3.64k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  3.64k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.64k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 127, False: 3.51k]
  ------------------
  984|    127|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 1, False: 126]
  ------------------
  985|      1|      return -1;
  986|      1|    }
  987|       |
  988|    127|  } else
  989|  3.51k|#endif
  990|  3.51k|  {
  991|  3.51k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 3.51k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  3.51k|  }
  995|  3.63k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 1.80k, False: 1.83k]
  ------------------
  996|  1.80k|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 7, False: 1.80k]
  ------------------
  997|  1.80k|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|      7|      return -1;
  999|      7|    }
 1000|  1.80k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|  1.80k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  1.80k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 62, False: 1.73k]
  ------------------
 1002|  71.6k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 71.6k, False: 22]
  ------------------
 1003|  71.6k|        TopologySplitEventData event_data;
 1004|  71.6k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 22, False: 71.6k]
  ------------------
 1005|     22|          return -1;
 1006|     22|        }
 1007|  71.6k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 14, False: 71.6k]
  ------------------
 1008|     14|          return -1;
 1009|     14|        }
 1010|  71.6k|        uint8_t edge_data;
 1011|  71.6k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 4, False: 71.5k]
  ------------------
 1012|      4|          return -1;
 1013|      4|        }
 1014|  71.5k|        event_data.source_edge = edge_data & 1;
 1015|  71.5k|        topology_split_data_.push_back(event_data);
 1016|  71.5k|      }
 1017|       |
 1018|     62|    } else
 1019|  1.73k|#endif
 1020|  1.73k|    {
 1021|       |      // Decode source and split symbol ids using delta and varint coding. See
 1022|       |      // description in mesh_edgebreaker_encoder_impl.cc for more details.
 1023|  1.73k|      int last_source_symbol_id = 0;
 1024|  7.06k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 5.34k, False: 1.72k]
  ------------------
 1025|  5.34k|        TopologySplitEventData event_data;
 1026|  5.34k|        uint32_t delta;
 1027|  5.34k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 4, False: 5.33k]
  ------------------
 1028|      4|          return -1;
 1029|      4|        }
 1030|  5.33k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  5.33k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 4, False: 5.33k]
  ------------------
 1032|      4|          return -1;
 1033|      4|        }
 1034|  5.33k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 6, False: 5.32k]
  ------------------
 1035|      6|          return -1;
 1036|      6|        }
 1037|  5.32k|        event_data.split_symbol_id =
 1038|  5.32k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  5.32k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  5.32k|        topology_split_data_.push_back(event_data);
 1041|  5.32k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|  1.72k|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  6.70k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 4.98k, False: 1.72k]
  ------------------
 1045|  4.98k|        uint32_t edge_data;
 1046|  4.98k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  4.98k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 1.32k, False: 3.66k]
  ------------------
 1047|  1.32k|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  3.66k|        } else {
 1049|  3.66k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  3.66k|        }
 1051|  4.98k|        TopologySplitEventData &event_data = topology_split_data_[i];
 1052|  4.98k|        event_data.source_edge = edge_data & 1;
 1053|  4.98k|      }
 1054|  1.72k|      decoder_buffer->EndBitDecoding();
 1055|  1.72k|    }
 1056|  1.80k|  }
 1057|  3.57k|  uint32_t num_hole_events = 0;
 1058|  3.57k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  3.57k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.57k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 82, False: 3.49k]
  ------------------
 1060|     82|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 3, False: 79]
  ------------------
 1061|      3|      return -1;
 1062|      3|    }
 1063|  3.49k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  3.49k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 321, False: 3.17k]
  ------------------
 1064|    321|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 8, False: 313]
  ------------------
 1065|      8|      return -1;
 1066|      8|    }
 1067|    321|  }
 1068|  3.56k|#endif
 1069|  3.56k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 108, False: 3.45k]
  ------------------
 1070|    108|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|    108|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    108|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 60, False: 48]
  ------------------
 1072|   357k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 357k, False: 7]
  ------------------
 1073|   357k|        HoleEventData event_data;
 1074|   357k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 53, False: 357k]
  ------------------
 1075|     53|          return -1;
 1076|     53|        }
 1077|   357k|        hole_event_data_.push_back(event_data);
 1078|   357k|      }
 1079|       |
 1080|     60|    } else
 1081|     48|#endif
 1082|     48|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     48|      int last_symbol_id = 0;
 1085|   731k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 731k, False: 24]
  ------------------
 1086|   731k|        HoleEventData event_data;
 1087|   731k|        uint32_t delta;
 1088|   731k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 24, False: 731k]
  ------------------
 1089|     24|          return -1;
 1090|     24|        }
 1091|   731k|        event_data.symbol_id = delta + last_symbol_id;
 1092|   731k|        last_symbol_id = event_data.symbol_id;
 1093|   731k|        hole_event_data_.push_back(event_data);
 1094|   731k|      }
 1095|     48|    }
 1096|    108|  }
 1097|  3.49k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  3.56k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|  1.36k|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|  1.36k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|  1.36k|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|  5.46k|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 4.10k, False: 1.36k]
  ------------------
 1109|  4.10k|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|  4.10k|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 1.51k, False: 2.58k]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|  3.38k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 1.86k, False: 1.51k]
  ------------------
 1114|  1.86k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|  1.86k|      }
 1116|  1.51k|      continue;
 1117|  1.51k|    }
 1118|       |
 1119|  6.51k|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 3.93k, False: 2.58k]
  ------------------
 1120|  3.93k|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|  3.93k|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 2.20k, False: 1.72k]
  ------------------
 1122|  2.20k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|  2.20k|      }
 1124|  3.93k|    }
 1125|  2.58k|  }
 1126|  1.36k|  return true;
 1127|  1.36k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|   363k|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|   363k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|   363k|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|   363k|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  1.45M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 1.09M, False: 363k]
  ------------------
 1139|  1.09M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  1.09M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 61.1k, False: 1.03M]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   173k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 112k, False: 61.1k]
  ------------------
 1144|   112k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   112k|      }
 1146|  61.1k|      continue;
 1147|  61.1k|    }
 1148|  1.03M|    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.03M|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 515k, False: 515k]
  ------------------
 1151|   515k|      continue;
 1152|   515k|    }
 1153|       |
 1154|  1.47M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 959k, False: 515k]
  ------------------
 1155|   959k|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|   959k|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 751k, False: 208k]
  ------------------
 1157|   751k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|   751k|      }
 1159|   959k|    }
 1160|   515k|  }
 1161|   363k|  return true;
 1162|   363k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE21AssignPointsToCornersEi:
 1166|  3.11k|    int num_connectivity_verts) {
 1167|       |  // Map between the existing and deduplicated point ids.
 1168|       |  // Note that at this point we have one point id for each corner of the
 1169|       |  // mesh so there is corner_table_->num_corners() point ids.
 1170|  3.11k|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|  3.11k|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 57, False: 3.05k]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|   181k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 181k, False: 57]
  ------------------
 1176|   181k|      Mesh::Face face;
 1177|   181k|      const CornerIndex start_corner(3 * f.value());
 1178|   725k|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 543k, False: 181k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|   543k|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|   543k|        face[c] = vert_id;
 1182|   543k|      }
 1183|   181k|      decoder_->mesh()->SetFace(f, face);
 1184|   181k|    }
 1185|     57|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|     57|    return true;
 1187|     57|  }
 1188|       |  // Else we need to deduplicate multiple attributes.
 1189|       |
 1190|       |  // Map between point id and an associated corner id. Only one corner for
 1191|       |  // each point is stored. The corners are used to sample the attribute values
 1192|       |  // in the last stage of the deduplication.
 1193|  3.05k|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|  3.05k|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|   246k|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 243k, False: 3.05k]
  ------------------
 1197|   243k|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|   243k|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 21.1k, False: 222k]
  ------------------
 1199|  21.1k|      continue;  // Isolated vertex.
 1200|  21.1k|    }
 1201|   222k|    CornerIndex deduplication_first_corner = c;
 1202|   222k|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 62.6k, False: 159k]
  ------------------
 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|  62.6k|      deduplication_first_corner = c;
 1206|   159k|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|   219k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 179k, False: 40.1k]
  ------------------
 1210|   179k|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 40.1k, False: 139k]
  ------------------
 1211|  40.1k|          continue;  // No seam for this attribute, ignore it.
 1212|  40.1k|        }
 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|   139k|        const VertexIndex vert_id =
 1217|   139k|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|   139k|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|   139k|        bool seam_found = false;
 1220|   227k|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 208k, False: 19.2k]
  ------------------
 1221|   208k|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 4, False: 208k]
  ------------------
 1222|      4|            return false;
 1223|      4|          }
 1224|   208k|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 119k, False: 88.4k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|   119k|            deduplication_first_corner = act_c;
 1227|   119k|            seam_found = true;
 1228|   119k|            break;
 1229|   119k|          }
 1230|  88.4k|          act_c = corner_table_->SwingRight(act_c);
 1231|  88.4k|        }
 1232|   139k|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 119k, False: 19.2k]
  ------------------
 1233|   119k|          break;  // No reason to process other attributes if we found a seam.
 1234|   119k|        }
 1235|   139k|      }
 1236|   159k|    }
 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|   222k|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|   222k|    corner_to_point_map[c.value()] =
 1246|   222k|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|   222k|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|   222k|    CornerIndex prev_c = c;
 1250|   222k|    c = corner_table_->SwingRight(c);
 1251|  1.11M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 1.04M, False: 63.3k]
  |  Branch (1251:40): [True: 889k, False: 159k]
  ------------------
 1252|   889k|      bool attribute_seam = false;
 1253|  1.22M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 1.01M, False: 212k]
  ------------------
 1254|  1.01M|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 676k, False: 338k]
  ------------------
 1255|  1.01M|            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|   676k|          attribute_seam = true;
 1259|   676k|          break;
 1260|   676k|        }
 1261|  1.01M|      }
 1262|   889k|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 676k, False: 212k]
  ------------------
 1263|   676k|        corner_to_point_map[c.value()] =
 1264|   676k|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|   676k|        point_to_corner_map.push_back(c.value());
 1266|   676k|      } else {
 1267|   212k|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|   212k|      }
 1269|   889k|      prev_c = c;
 1270|   889k|      c = corner_table_->SwingRight(c);
 1271|   889k|    }
 1272|   222k|  }
 1273|       |  // Add faces.
 1274|   368k|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 365k, False: 3.05k]
  ------------------
 1275|   365k|    Mesh::Face face;
 1276|  1.46M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 1.09M, False: 365k]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|  1.09M|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|  1.09M|    }
 1280|   365k|    decoder_->mesh()->SetFace(f, face);
 1281|   365k|  }
 1282|  3.05k|  decoder_->point_cloud()->set_num_points(
 1283|  3.05k|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|  3.05k|  return true;
 1285|  3.05k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEEC2Ev:
   48|  2.29k|    : decoder_(nullptr),
   49|  2.29k|      last_symbol_id_(-1),
   50|  2.29k|      last_vert_id_(-1),
   51|  2.29k|      last_face_id_(-1),
   52|  2.29k|      num_new_vertices_(0),
   53|  2.29k|      num_encoded_vertices_(0),
   54|  2.29k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  2.29k|    MeshEdgebreakerDecoder *decoder) {
   59|  2.29k|  decoder_ = decoder;
   60|  2.29k|  return true;
   61|  2.29k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE23GetAttributeCornerTableEi:
   66|  1.95k|    int att_id) const {
   67|  3.01k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 2.39k, False: 617]
  ------------------
   68|  2.39k|    const int decoder_id = attribute_data_[i].decoder_id;
   69|  2.39k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 1.05k, False: 1.34k]
  |  Branch (69:27): [True: 0, False: 1.34k]
  ------------------
   70|  1.05k|      continue;
   71|  1.05k|    }
   72|  1.34k|    const AttributesDecoderInterface *const dec =
   73|  1.34k|        decoder_->attributes_decoder(decoder_id);
   74|  3.81k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 3.80k, False: 3]
  ------------------
   75|  3.80k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 1.33k, False: 2.47k]
  ------------------
   76|  1.33k|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 1.00k, False: 332]
  ------------------
   77|  1.00k|          return &attribute_data_[i].connectivity_data;
   78|  1.00k|        }
   79|    332|        return nullptr;
   80|  1.33k|      }
   81|  3.80k|    }
   82|  1.34k|  }
   83|    617|  return nullptr;
   84|  1.95k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE24GetAttributeEncodingDataEi:
   89|  1.95k|    int att_id) const {
   90|  3.01k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 2.39k, False: 617]
  ------------------
   91|  2.39k|    const int decoder_id = attribute_data_[i].decoder_id;
   92|  2.39k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 1.05k, False: 1.34k]
  |  Branch (92:27): [True: 0, False: 1.34k]
  ------------------
   93|  1.05k|      continue;
   94|  1.05k|    }
   95|  1.34k|    const AttributesDecoderInterface *const dec =
   96|  1.34k|        decoder_->attributes_decoder(decoder_id);
   97|  3.81k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 3.80k, False: 3]
  ------------------
   98|  3.80k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 1.33k, False: 2.47k]
  ------------------
   99|  1.33k|        return &attribute_data_[i].encoding_data;
  100|  1.33k|      }
  101|  3.80k|    }
  102|  1.34k|  }
  103|    617|  return &pos_encoding_data_;
  104|  1.95k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE23CreateAttributesDecoderEi:
  130|  1.54k|    int32_t att_decoder_id) {
  131|  1.54k|  int8_t att_data_id;
  132|  1.54k|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 31, False: 1.51k]
  ------------------
  133|     31|    return false;
  134|     31|  }
  135|  1.51k|  uint8_t decoder_type;
  136|  1.51k|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 21, False: 1.49k]
  ------------------
  137|     21|    return false;
  138|     21|  }
  139|       |
  140|  1.49k|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 1.03k, False: 453]
  ------------------
  141|  1.03k|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 65, False: 974]
  ------------------
  142|     65|      return false;  // Unexpected attribute data.
  143|     65|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|    974|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 5, False: 969]
  ------------------
  148|      5|      return false;
  149|      5|    }
  150|       |
  151|    969|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|    969|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    453|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 2, False: 451]
  ------------------
  155|      2|      return false;  // Some other decoder is already using the data. Error.
  156|      2|    }
  157|    451|    pos_data_decoder_id_ = att_decoder_id;
  158|    451|  }
  159|       |
  160|  1.42k|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|  1.42k|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  1.42k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 1.42k, False: 0]
  ------------------
  162|  1.42k|    uint8_t traversal_method_encoded;
  163|  1.42k|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 13, False: 1.40k]
  ------------------
  164|     13|      return false;
  165|     13|    }
  166|       |    // Check that decoded traversal method is valid.
  167|  1.40k|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 25, False: 1.38k]
  ------------------
  168|     25|      return false;
  169|     25|    }
  170|  1.38k|    traversal_method =
  171|  1.38k|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|  1.38k|  }
  173|       |
  174|  1.38k|  const Mesh *mesh = decoder_->mesh();
  175|  1.38k|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|  1.38k|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 684, False: 698]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|    684|    MeshAttributeIndicesEncodingData *encoding_data = nullptr;
  181|    684|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 424, False: 260]
  ------------------
  182|    424|      encoding_data = &pos_encoding_data_;
  183|    424|    } else {
  184|    260|      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|    260|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|    260|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|    684|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 268, False: 416]
  ------------------
  191|    268|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|    268|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|    268|          AttTraverser;
  194|    268|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|    416|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 416, False: 0]
  ------------------
  196|    416|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|    416|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|    416|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|    416|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|    698|  } else {
  203|    698|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 3, False: 695]
  ------------------
  204|      3|      return false;  // Unsupported method.
  205|      3|    }
  206|    695|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 5, False: 690]
  ------------------
  207|      5|      return false;  // Attribute data must be specified.
  208|      5|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|    690|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|    690|        AttObserver;
  214|    690|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|    690|        AttTraverser;
  216|       |
  217|    690|    MeshAttributeIndicesEncodingData *const encoding_data =
  218|    690|        &attribute_data_[att_data_id].encoding_data;
  219|    690|    const MeshAttributeCornerTable *const corner_table =
  220|    690|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|    690|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|    690|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|    690|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|    690|                             encoding_data);
  227|       |
  228|    690|    AttTraverser att_traverser;
  229|    690|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|    690|    traversal_sequencer->SetTraverser(att_traverser);
  232|    690|    sequencer = std::move(traversal_sequencer);
  233|    690|  }
  234|       |
  235|  1.37k|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 1.37k]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|  1.37k|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|  1.37k|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|  1.37k|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|  1.37k|                                        std::move(att_controller));
  244|  1.37k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18DecodeConnectivityEv:
  247|  2.29k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  2.29k|  num_new_vertices_ = 0;
  249|  2.29k|  new_to_parent_vertex_map_.clear();
  250|  2.29k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  2.29k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.29k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 688, False: 1.60k]
  ------------------
  252|    688|    uint32_t num_new_verts;
  253|    688|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    688|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 241, False: 447]
  ------------------
  254|    241|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 241]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    447|    } else {
  258|    447|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 447]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    447|    }
  262|    688|    num_new_vertices_ = num_new_verts;
  263|    688|  }
  264|  2.29k|#endif
  265|       |
  266|  2.29k|  uint32_t num_encoded_vertices;
  267|  2.29k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  2.29k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.29k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 241, False: 2.04k]
  ------------------
  269|    241|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 241]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    241|  } else
  274|  2.04k|#endif
  275|  2.04k|  {
  276|  2.04k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 2.04k]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|  2.04k|  }
  280|  2.29k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  2.29k|  uint32_t num_faces;
  283|  2.29k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  2.29k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.29k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 241, False: 2.04k]
  ------------------
  285|    241|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 241]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    241|  } else
  290|  2.04k|#endif
  291|  2.04k|  {
  292|  2.04k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 2.04k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  2.04k|  }
  296|  2.29k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 0, False: 2.29k]
  ------------------
  297|      0|    return false;  // Draco cannot handle this many faces.
  298|      0|  }
  299|       |
  300|  2.29k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 7, False: 2.28k]
  ------------------
  301|      7|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      7|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|  2.28k|  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.28k|  const uint64_t num_encoded_vertices_64 =
  311|  2.28k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  2.28k|  const uint64_t max_num_vertex_edges =
  313|  2.28k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  2.28k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 1, False: 2.28k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      1|    return false;
  317|      1|  }
  318|       |
  319|  2.28k|  uint8_t num_attribute_data;
  320|  2.28k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 2.28k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  2.28k|  uint32_t num_encoded_symbols;
  325|  2.28k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  2.28k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.28k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 234, False: 2.04k]
  ------------------
  327|    234|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 234]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    234|  } else
  332|  2.04k|#endif
  333|  2.04k|  {
  334|  2.04k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 2.04k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  2.04k|  }
  338|       |
  339|  2.28k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 10, False: 2.27k]
  ------------------
  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|     10|    return false;
  344|     10|  }
  345|  2.27k|  const uint32_t max_encoded_faces =
  346|  2.27k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  2.27k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 21, False: 2.25k]
  ------------------
  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|     21|    return false;
  352|     21|  }
  353|       |
  354|  2.25k|  uint32_t num_encoded_split_symbols;
  355|  2.25k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  2.25k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.25k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 210, False: 2.04k]
  ------------------
  357|    210|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 210]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    210|  } else
  362|  2.04k|#endif
  363|  2.04k|  {
  364|  2.04k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 2.04k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  2.04k|  }
  368|       |
  369|  2.25k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 16, False: 2.23k]
  ------------------
  370|     16|    return false;  // Split symbols are a sub-set of all symbols.
  371|     16|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  2.23k|  vertex_traversal_length_.clear();
  375|  2.23k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  2.23k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 2.23k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  2.23k|  processed_corner_ids_.clear();
  380|  2.23k|  processed_corner_ids_.reserve(num_faces);
  381|  2.23k|  processed_connectivity_corners_.clear();
  382|  2.23k|  processed_connectivity_corners_.reserve(num_faces);
  383|  2.23k|  topology_split_data_.clear();
  384|  2.23k|  hole_event_data_.clear();
  385|  2.23k|  init_face_configurations_.clear();
  386|  2.23k|  init_corners_.clear();
  387|       |
  388|  2.23k|  last_symbol_id_ = -1;
  389|  2.23k|  last_face_id_ = -1;
  390|  2.23k|  last_vert_id_ = -1;
  391|       |
  392|  2.23k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  2.23k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  2.23k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 1, False: 2.23k]
  ------------------
  397|  2.23k|          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.23k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  2.23k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  2.23k|  int32_t topology_split_decoded_bytes = -1;
  410|  2.23k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.23k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 643, False: 1.59k]
  ------------------
  411|    643|    uint32_t encoded_connectivity_size;
  412|    643|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    643|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 200, False: 443]
  ------------------
  413|    200|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 0, False: 200]
  ------------------
  414|      0|        return false;
  415|      0|      }
  416|    443|    } else {
  417|    443|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 443]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|    443|    }
  421|    643|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 2, False: 641]
  ------------------
  422|    641|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 28, False: 613]
  ------------------
  423|     30|      return false;
  424|     30|    }
  425|    613|    DecoderBuffer event_buffer;
  426|    613|    event_buffer.Init(
  427|    613|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    613|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    613|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    613|    topology_split_decoded_bytes =
  432|    613|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    613|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 204, False: 409]
  ------------------
  434|    204|      return false;
  435|    204|    }
  436|       |
  437|    613|  } else
  438|  1.59k|#endif
  439|  1.59k|  {
  440|  1.59k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 25, False: 1.56k]
  ------------------
  441|     25|      return false;
  442|     25|    }
  443|  1.59k|  }
  444|       |
  445|  1.97k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  1.97k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  1.97k|                                           num_encoded_split_symbols);
  449|  1.97k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  1.97k|  DecoderBuffer traversal_end_buffer;
  452|  1.97k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 163, False: 1.81k]
  ------------------
  453|    163|    return false;
  454|    163|  }
  455|       |
  456|  1.81k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  1.81k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 233, False: 1.57k]
  ------------------
  458|    233|    return false;
  459|    233|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|  1.57k|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|  1.57k|                           traversal_end_buffer.remaining_size(),
  464|  1.57k|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|  1.57k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|  1.57k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.57k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 307, False: 1.27k]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|    307|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|    307|  }
  471|  1.57k|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|  1.57k|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 1.41k, False: 166]
  ------------------
  475|  1.41k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|  1.41k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  1.41k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 234, False: 1.17k]
  ------------------
  477|   575k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 574k, False: 234]
  ------------------
  478|   574k|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 574k]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|   574k|      }
  482|       |
  483|    234|    } else
  484|  1.17k|#endif
  485|  1.17k|    {
  486|  9.11M|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 9.11M, False: 1.17k]
  ------------------
  487|  9.11M|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 9.11M]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|  9.11M|      }
  491|  1.17k|    }
  492|  1.41k|  }
  493|  1.57k|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  3.55k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 1.97k, False: 1.57k]
  ------------------
  498|  1.97k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  14.5M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 14.5M, False: 1.97k]
  ------------------
  501|  14.5M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  14.5M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  1.97k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 1.97k]
  ------------------
  505|  1.97k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  1.97k|  }
  509|       |
  510|  1.57k|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  3.55k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 1.97k, False: 1.57k]
  ------------------
  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.97k|    int32_t att_connectivity_verts =
  517|  1.97k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  1.97k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 433, False: 1.54k]
  ------------------
  519|    433|      att_connectivity_verts = corner_table_->num_vertices();
  520|    433|    }
  521|  1.97k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  1.97k|  }
  523|  1.57k|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 9, False: 1.57k]
  ------------------
  524|      9|    return false;
  525|      9|  }
  526|  1.57k|  return true;
  527|  1.57k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE19OnAttributesDecodedEv:
  530|    311|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|    311|  return true;
  532|    311|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18DecodeConnectivityEi:
  536|  1.81k|    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.81k|  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.81k|  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.81k|  std::vector<VertexIndex> invalid_vertices;
  558|  1.81k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  1.81k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  1.81k|  int num_faces = 0;
  562|  85.4M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 85.4M, False: 1.68k]
  ------------------
  563|  85.4M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  85.4M|    bool check_topology_split = false;
  566|  85.4M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  85.4M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 41.7M, False: 43.6M]
  ------------------
  568|       |      // Create a new face between two edges on the open boundary.
  569|       |      // The first edge is opposite to the corner "a" from the image below.
  570|       |      // The other edge is opposite to the corner "b" that can be reached
  571|       |      // through a CCW traversal around the vertex "v".
  572|       |      // One new active boundary edge is created, opposite to the new corner
  573|       |      // "x".
  574|       |      //
  575|       |      //     *-------*
  576|       |      //    / \     / \
  577|       |      //   /   \   /   \
  578|       |      //  /     \ /     \
  579|       |      // *-------v-------*
  580|       |      //  \b    /x\    a/
  581|       |      //   \   /   \   /
  582|       |      //    \ /  C  \ /
  583|       |      //     *.......*
  584|       |
  585|       |      // Find the corner "b" from the corner "a" which is the corner on the
  586|       |      // top of the active stack.
  587|  41.7M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 0, False: 41.7M]
  ------------------
  588|      0|        return -1;
  589|      0|      }
  590|       |
  591|  41.7M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  41.7M|      const VertexIndex vertex_x =
  593|  41.7M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  41.7M|      const CornerIndex corner_b =
  595|  41.7M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  41.7M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 29, False: 41.7M]
  ------------------
  598|       |        // All matched corners must be different.
  599|     29|        return -1;
  600|     29|      }
  601|  41.7M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 41.7M]
  |  Branch (601:11): [True: 0, False: 41.7M]
  ------------------
  602|  41.7M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 41.7M]
  ------------------
  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|  41.7M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  41.7M|      SetOppositeCorners(corner_a, corner + 1);
  612|  41.7M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  41.7M|      const VertexIndex vert_a_prev =
  616|  41.7M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  41.7M|      const VertexIndex vert_b_next =
  618|  41.7M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  41.7M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 41.7M]
  |  Branch (619:38): [True: 0, False: 41.7M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  41.7M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  41.7M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  41.7M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  41.7M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  41.7M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  41.7M|      active_corner_stack.back() = corner;
  631|  43.6M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 43.5M, False: 88.4k]
  |  Branch (631:40): [True: 18.0k, False: 70.3k]
  ------------------
  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|  43.5M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 0, False: 43.5M]
  ------------------
  647|      0|        return -1;
  648|      0|      }
  649|  43.5M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  43.5M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 43.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|  43.5M|      const CornerIndex corner(3 * face.value());
  658|  43.5M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  43.5M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 43.5M, False: 18.0k]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  43.5M|        opp_corner = corner + 2;
  662|  43.5M|        corner_l = corner + 1;
  663|  43.5M|        corner_r = corner;
  664|  43.5M|      } else {
  665|       |        // "l" is the new first corner.
  666|  18.0k|        opp_corner = corner + 1;
  667|  18.0k|        corner_l = corner;
  668|  18.0k|        corner_r = corner + 2;
  669|  18.0k|      }
  670|  43.5M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  43.5M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  43.5M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 9, False: 43.5M]
  ------------------
  675|      9|        return -1;  // Unexpected number of decoded vertices.
  676|      9|      }
  677|       |
  678|  43.5M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  43.5M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  43.5M|      const VertexIndex vertex_r =
  682|  43.5M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  43.5M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  43.5M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  43.5M|      corner_table_->MapCornerToVertex(
  688|  43.5M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  43.5M|      active_corner_stack.back() = corner;
  690|  43.5M|      check_topology_split = true;
  691|  43.5M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 16.1k, False: 54.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|  16.1k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 0, False: 16.1k]
  ------------------
  703|      0|        return -1;
  704|      0|      }
  705|  16.1k|      const CornerIndex corner_b = active_corner_stack.back();
  706|  16.1k|      active_corner_stack.pop_back();
  707|       |
  708|       |      // Corner "a" can correspond either to a normal active edge, or to an edge
  709|       |      // created from the topology split event.
  710|  16.1k|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  16.1k|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 40, False: 16.1k]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|     40|        active_corner_stack.push_back(it->second);
  714|     40|      }
  715|  16.1k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 16, False: 16.1k]
  ------------------
  716|     16|        return -1;
  717|     16|      }
  718|  16.1k|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  16.1k|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 16.1k]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  16.1k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 8, False: 16.1k]
  |  Branch (724:11): [True: 8, False: 16.1k]
  ------------------
  725|  16.1k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 16.1k]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|      8|        return -1;
  729|      8|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  16.1k|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  16.1k|      SetOppositeCorners(corner_a, corner + 2);
  735|  16.1k|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  16.1k|      const VertexIndex vertex_p =
  739|  16.1k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  16.1k|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  16.1k|      corner_table_->MapCornerToVertex(
  742|  16.1k|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  16.1k|      const VertexIndex vert_b_prev =
  744|  16.1k|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  16.1k|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  16.1k|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  16.1k|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  16.1k|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  16.1k|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  16.1k|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  16.1k|                                       corner_table_->LeftMostCorner(vertex_n));
  753|       |
  754|       |      // Also update the vertex id at corner "n" and all corners that are
  755|       |      // connected to it in the CCW direction.
  756|  16.1k|      const CornerIndex first_corner = corner_n;
  757|  77.0k|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 60.9k, False: 16.1k]
  ------------------
  758|  60.9k|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|  60.9k|        corner_n = corner_table_->SwingLeft(corner_n);
  760|  60.9k|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 5, False: 60.9k]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      5|          return -1;
  764|      5|        }
  765|  60.9k|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  16.1k|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  16.1k|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 4.14k, False: 11.9k]
  ------------------
  770|  4.14k|        invalid_vertices.push_back(vertex_n);
  771|  4.14k|      }
  772|  16.1k|      active_corner_stack.back() = corner;
  773|  54.2k|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 54.2k, False: 0]
  ------------------
  774|  54.2k|      const CornerIndex corner(3 * face.value());
  775|  54.2k|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  54.2k|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  54.2k|      corner_table_->MapCornerToVertex(corner + 1,
  779|  54.2k|                                       corner_table_->AddNewVertex());
  780|  54.2k|      corner_table_->MapCornerToVertex(corner + 2,
  781|  54.2k|                                       corner_table_->AddNewVertex());
  782|       |
  783|  54.2k|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 5, False: 54.2k]
  ------------------
  784|      5|        return -1;  // Unexpected number of decoded vertices.
  785|      5|      }
  786|       |
  787|  54.2k|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  54.2k|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  54.2k|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  54.2k|      active_corner_stack.push_back(corner);
  792|  54.2k|      check_topology_split = true;
  793|  54.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|  85.4M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  85.4M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 43.6M, False: 41.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|  43.6M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  43.6M|      EdgeFaceName split_edge;
  812|  43.6M|      int encoder_split_symbol_id;
  813|  43.6M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 2.28k, False: 43.6M]
  ------------------
  814|  43.6M|                             &encoder_split_symbol_id)) {
  815|  2.28k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 54, False: 2.23k]
  ------------------
  816|     54|          return -1;  // Wrong split symbol id.
  817|     54|        }
  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.23k|        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.23k|        CornerIndex new_active_corner;
  831|  2.23k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 756, False: 1.47k]
  ------------------
  832|    756|          new_active_corner = corner_table_->Next(act_top_corner);
  833|  1.47k|        } else {
  834|  1.47k|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|  1.47k|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  2.23k|        const int decoder_split_symbol_id =
  839|  2.23k|            num_symbols - encoder_split_symbol_id - 1;
  840|  2.23k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  2.23k|            new_active_corner;
  842|  2.23k|      }
  843|  43.6M|    }
  844|  85.4M|  }
  845|  1.68k|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 1.68k]
  ------------------
  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|  37.9k|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 36.2k, False: 1.65k]
  ------------------
  850|  36.2k|    const CornerIndex corner = active_corner_stack.back();
  851|  36.2k|    active_corner_stack.pop_back();
  852|  36.2k|    const bool interior_face =
  853|  36.2k|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  36.2k|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 26.8k, False: 9.42k]
  ------------------
  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.8k|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 15, False: 26.8k]
  ------------------
  877|     15|        return -1;  // More faces than expected added to the mesh.
  878|     15|      }
  879|       |
  880|  26.8k|      const CornerIndex corner_a = corner;
  881|  26.8k|      const VertexIndex vert_n =
  882|  26.8k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  26.8k|      const CornerIndex corner_b =
  884|  26.8k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  26.8k|      const VertexIndex vert_x =
  887|  26.8k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  26.8k|      const CornerIndex corner_c =
  889|  26.8k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  26.8k|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 2, False: 26.8k]
  |  Branch (891:33): [True: 8, False: 26.8k]
  |  Branch (891:55): [True: 0, False: 26.8k]
  ------------------
  892|       |        // All matched corners must be different.
  893|     10|        return -1;
  894|     10|      }
  895|  26.8k|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 6, False: 26.8k]
  |  Branch (895:11): [True: 6, False: 26.8k]
  ------------------
  896|  26.8k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 0, False: 26.8k]
  ------------------
  897|  26.8k|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 0, False: 26.8k]
  ------------------
  898|       |        // One of the corners is already opposite to an existing face, which
  899|       |        // should not happen unless the input was tampered with.
  900|      6|        return -1;
  901|      6|      }
  902|       |
  903|  26.8k|      const VertexIndex vert_p =
  904|  26.8k|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  26.8k|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  26.8k|      const CornerIndex new_corner(3 * face.value());
  909|  26.8k|      SetOppositeCorners(new_corner, corner);
  910|  26.8k|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  26.8k|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  26.8k|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  26.8k|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  26.8k|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|   107k|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 80.4k, False: 26.8k]
  ------------------
  920|  80.4k|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|  80.4k|      }
  922|       |
  923|  26.8k|      init_face_configurations_.push_back(true);
  924|  26.8k|      init_corners_.push_back(new_corner);
  925|  26.8k|    } 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|  9.42k|      init_face_configurations_.push_back(false);
  930|  9.42k|      init_corners_.push_back(corner);
  931|  9.42k|    }
  932|  36.2k|  }
  933|  1.65k|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 72, False: 1.58k]
  ------------------
  934|     72|    return -1;  // Unexpected number of decoded faces.
  935|     72|  }
  936|       |
  937|  1.58k|  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.94k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 1.94k, False: 1.57k]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  1.94k|    VertexIndex src_vert(num_vertices - 1);
  943|  2.14k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 206, False: 1.94k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|    206|      src_vert = VertexIndex(--num_vertices - 1);
  946|    206|    }
  947|  1.94k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 206, False: 1.73k]
  ------------------
  948|    206|      continue;  // No need to swap anything.
  949|    206|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  1.73k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  8.84k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 7.11k, False: 1.73k]
  ------------------
  954|  7.11k|      const CornerIndex cid = vcit.Corner();
  955|  7.11k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 4, False: 7.11k]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      4|        return -1;
  959|      4|      }
  960|  7.11k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  7.11k|    }
  962|  1.73k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  1.73k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  1.73k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  1.73k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  1.73k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  1.73k|    num_vertices--;
  972|  1.73k|  }
  973|  1.57k|  return num_vertices;
  974|  1.58k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  2.20k|    DecoderBuffer *decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  2.20k|  uint32_t num_topology_splits;
  982|  2.20k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  2.20k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.20k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 171, False: 2.03k]
  ------------------
  984|    171|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 1, False: 170]
  ------------------
  985|      1|      return -1;
  986|      1|    }
  987|       |
  988|    171|  } else
  989|  2.03k|#endif
  990|  2.03k|  {
  991|  2.03k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 2.03k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  2.03k|  }
  995|  2.20k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 901, False: 1.30k]
  ------------------
  996|    901|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 44, False: 857]
  ------------------
  997|    901|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|     44|      return -1;
  999|     44|    }
 1000|    857|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|    857|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    857|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 96, False: 761]
  ------------------
 1002|   304k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 304k, False: 55]
  ------------------
 1003|   304k|        TopologySplitEventData event_data;
 1004|   304k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 28, False: 304k]
  ------------------
 1005|     28|          return -1;
 1006|     28|        }
 1007|   304k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 8, False: 304k]
  ------------------
 1008|      8|          return -1;
 1009|      8|        }
 1010|   304k|        uint8_t edge_data;
 1011|   304k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 5, False: 304k]
  ------------------
 1012|      5|          return -1;
 1013|      5|        }
 1014|   304k|        event_data.source_edge = edge_data & 1;
 1015|   304k|        topology_split_data_.push_back(event_data);
 1016|   304k|      }
 1017|       |
 1018|     96|    } else
 1019|    761|#endif
 1020|    761|    {
 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|    761|      int last_source_symbol_id = 0;
 1024|  47.8k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 47.1k, False: 738]
  ------------------
 1025|  47.1k|        TopologySplitEventData event_data;
 1026|  47.1k|        uint32_t delta;
 1027|  47.1k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 6, False: 47.1k]
  ------------------
 1028|      6|          return -1;
 1029|      6|        }
 1030|  47.1k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  47.1k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 3, False: 47.1k]
  ------------------
 1032|      3|          return -1;
 1033|      3|        }
 1034|  47.1k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 14, False: 47.1k]
  ------------------
 1035|     14|          return -1;
 1036|     14|        }
 1037|  47.1k|        event_data.split_symbol_id =
 1038|  47.1k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  47.1k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  47.1k|        topology_split_data_.push_back(event_data);
 1041|  47.1k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|    738|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  47.0k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 46.3k, False: 738]
  ------------------
 1045|  46.3k|        uint32_t edge_data;
 1046|  46.3k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  46.3k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 3.19k, False: 43.1k]
  ------------------
 1047|  3.19k|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  43.1k|        } else {
 1049|  43.1k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  43.1k|        }
 1051|  46.3k|        TopologySplitEventData &event_data = topology_split_data_[i];
 1052|  46.3k|        event_data.source_edge = edge_data & 1;
 1053|  46.3k|      }
 1054|    738|      decoder_buffer->EndBitDecoding();
 1055|    738|    }
 1056|    857|  }
 1057|  2.09k|  uint32_t num_hole_events = 0;
 1058|  2.09k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  2.09k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.09k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 112, False: 1.98k]
  ------------------
 1060|    112|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 5, False: 107]
  ------------------
 1061|      5|      return -1;
 1062|      5|    }
 1063|  1.98k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  1.98k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 322, False: 1.66k]
  ------------------
 1064|    322|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 11, False: 311]
  ------------------
 1065|     11|      return -1;
 1066|     11|    }
 1067|    322|  }
 1068|  2.07k|#endif
 1069|  2.07k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 128, False: 1.95k]
  ------------------
 1070|    128|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|    128|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    128|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 90, False: 38]
  ------------------
 1072|  1.07M|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 1.07M, False: 9]
  ------------------
 1073|  1.07M|        HoleEventData event_data;
 1074|  1.07M|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 81, False: 1.07M]
  ------------------
 1075|     81|          return -1;
 1076|     81|        }
 1077|  1.07M|        hole_event_data_.push_back(event_data);
 1078|  1.07M|      }
 1079|       |
 1080|     90|    } else
 1081|     38|#endif
 1082|     38|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     38|      int last_symbol_id = 0;
 1085|   151k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 151k, False: 15]
  ------------------
 1086|   151k|        HoleEventData event_data;
 1087|   151k|        uint32_t delta;
 1088|   151k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 23, False: 151k]
  ------------------
 1089|     23|          return -1;
 1090|     23|        }
 1091|   151k|        event_data.symbol_id = delta + last_symbol_id;
 1092|   151k|        last_symbol_id = event_data.symbol_id;
 1093|   151k|        hole_event_data_.push_back(event_data);
 1094|   151k|      }
 1095|     38|    }
 1096|    128|  }
 1097|  1.97k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  2.07k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|   574k|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|   574k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|   574k|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|  2.29M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 1.72M, False: 574k]
  ------------------
 1109|  1.72M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|  1.72M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 7.94k, False: 1.71M]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|  16.2k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 8.29k, False: 7.94k]
  ------------------
 1114|  8.29k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|  8.29k|      }
 1116|  7.94k|      continue;
 1117|  7.94k|    }
 1118|       |
 1119|  3.43M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 1.72M, False: 1.71M]
  ------------------
 1120|  1.72M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|  1.72M|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 604k, False: 1.11M]
  ------------------
 1122|   604k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|   604k|      }
 1124|  1.72M|    }
 1125|  1.71M|  }
 1126|   574k|  return true;
 1127|   574k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|  9.11M|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|  9.11M|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|  9.11M|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|  9.11M|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  36.4M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 27.3M, False: 9.11M]
  ------------------
 1139|  27.3M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  27.3M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 112k, False: 27.2M]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   268k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 155k, False: 112k]
  ------------------
 1144|   155k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   155k|      }
 1146|   112k|      continue;
 1147|   112k|    }
 1148|  27.2M|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|  27.2M|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 13.6M, False: 13.6M]
  ------------------
 1151|  13.6M|      continue;
 1152|  13.6M|    }
 1153|       |
 1154|  30.3M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 16.7M, False: 13.6M]
  ------------------
 1155|  16.7M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  16.7M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 13.8M, False: 2.90M]
  ------------------
 1157|  13.8M|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|  13.8M|      }
 1159|  16.7M|    }
 1160|  13.6M|  }
 1161|  9.11M|  return true;
 1162|  9.11M|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE21AssignPointsToCornersEi:
 1166|  1.57k|    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.57k|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|  1.57k|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 166, False: 1.41k]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|  1.69M|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 1.69M, False: 166]
  ------------------
 1176|  1.69M|      Mesh::Face face;
 1177|  1.69M|      const CornerIndex start_corner(3 * f.value());
 1178|  6.79M|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 5.09M, False: 1.69M]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|  5.09M|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|  5.09M|        face[c] = vert_id;
 1182|  5.09M|      }
 1183|  1.69M|      decoder_->mesh()->SetFace(f, face);
 1184|  1.69M|    }
 1185|    166|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|    166|    return true;
 1187|    166|  }
 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.41k|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|  1.41k|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|  4.88M|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 4.88M, False: 1.40k]
  ------------------
 1197|  4.88M|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|  4.88M|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 2.90k, False: 4.88M]
  ------------------
 1199|  2.90k|      continue;  // Isolated vertex.
 1200|  2.90k|    }
 1201|  4.88M|    CornerIndex deduplication_first_corner = c;
 1202|  4.88M|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 119k, False: 4.76M]
  ------------------
 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|   119k|      deduplication_first_corner = c;
 1206|  4.76M|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|  5.50M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 4.88M, False: 615k]
  ------------------
 1210|  4.88M|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 726k, False: 4.16M]
  ------------------
 1211|   726k|          continue;  // No seam for this attribute, ignore it.
 1212|   726k|        }
 1213|       |        // Else there needs to be at least one seam edge.
 1214|       |
 1215|       |        // At this point, we use identity mapping between corners and point ids.
 1216|  4.16M|        const VertexIndex vert_id =
 1217|  4.16M|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|  4.16M|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|  4.16M|        bool seam_found = false;
 1220|  4.26M|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 4.25M, False: 13.1k]
  ------------------
 1221|  4.25M|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 9, False: 4.25M]
  ------------------
 1222|      9|            return false;
 1223|      9|          }
 1224|  4.25M|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 4.14M, False: 108k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|  4.14M|            deduplication_first_corner = act_c;
 1227|  4.14M|            seam_found = true;
 1228|  4.14M|            break;
 1229|  4.14M|          }
 1230|   108k|          act_c = corner_table_->SwingRight(act_c);
 1231|   108k|        }
 1232|  4.16M|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 4.14M, False: 13.1k]
  ------------------
 1233|  4.14M|          break;  // No reason to process other attributes if we found a seam.
 1234|  4.14M|        }
 1235|  4.16M|      }
 1236|  4.76M|    }
 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|  4.88M|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|  4.88M|    corner_to_point_map[c.value()] =
 1246|  4.88M|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|  4.88M|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|  4.88M|    CornerIndex prev_c = c;
 1250|  4.88M|    c = corner_table_->SwingRight(c);
 1251|  28.9M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 28.7M, False: 120k]
  |  Branch (1251:40): [True: 24.0M, False: 4.76M]
  ------------------
 1252|  24.0M|      bool attribute_seam = false;
 1253|  27.8M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 24.6M, False: 3.16M]
  ------------------
 1254|  24.6M|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 20.8M, False: 3.80M]
  ------------------
 1255|  24.6M|            attribute_data_[i].connectivity_data.Vertex(prev_c)) {
 1256|       |          // Attribute index changed from the previous corner. We need to add a
 1257|       |          // new point here.
 1258|  20.8M|          attribute_seam = true;
 1259|  20.8M|          break;
 1260|  20.8M|        }
 1261|  24.6M|      }
 1262|  24.0M|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 20.8M, False: 3.16M]
  ------------------
 1263|  20.8M|        corner_to_point_map[c.value()] =
 1264|  20.8M|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|  20.8M|        point_to_corner_map.push_back(c.value());
 1266|  20.8M|      } else {
 1267|  3.16M|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|  3.16M|      }
 1269|  24.0M|      prev_c = c;
 1270|  24.0M|      c = corner_table_->SwingRight(c);
 1271|  24.0M|    }
 1272|  4.88M|  }
 1273|       |  // Add faces.
 1274|  9.63M|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 9.63M, False: 1.40k]
  ------------------
 1275|  9.63M|    Mesh::Face face;
 1276|  38.5M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 28.9M, False: 9.63M]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|  28.9M|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|  28.9M|    }
 1280|  9.63M|    decoder_->mesh()->SetFace(f, face);
 1281|  9.63M|  }
 1282|  1.40k|  decoder_->point_cloud()->set_num_points(
 1283|  1.40k|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|  1.40k|  return true;
 1285|  1.41k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEEC2Ev:
   48|  2.89k|    : decoder_(nullptr),
   49|  2.89k|      last_symbol_id_(-1),
   50|  2.89k|      last_vert_id_(-1),
   51|  2.89k|      last_face_id_(-1),
   52|  2.89k|      num_new_vertices_(0),
   53|  2.89k|      num_encoded_vertices_(0),
   54|  2.89k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  2.89k|    MeshEdgebreakerDecoder *decoder) {
   59|  2.89k|  decoder_ = decoder;
   60|  2.89k|  return true;
   61|  2.89k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE23GetAttributeCornerTableEi:
   66|    273|    int att_id) const {
   67|    376|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 150, False: 226]
  ------------------
   68|    150|    const int decoder_id = attribute_data_[i].decoder_id;
   69|    150|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 90, False: 60]
  |  Branch (69:27): [True: 0, False: 60]
  ------------------
   70|     90|      continue;
   71|     90|    }
   72|     60|    const AttributesDecoderInterface *const dec =
   73|     60|        decoder_->attributes_decoder(decoder_id);
   74|    130|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 117, False: 13]
  ------------------
   75|    117|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 47, False: 70]
  ------------------
   76|     47|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 25, False: 22]
  ------------------
   77|     25|          return &attribute_data_[i].connectivity_data;
   78|     25|        }
   79|     22|        return nullptr;
   80|     47|      }
   81|    117|    }
   82|     60|  }
   83|    226|  return nullptr;
   84|    273|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE24GetAttributeEncodingDataEi:
   89|    273|    int att_id) const {
   90|    376|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 150, False: 226]
  ------------------
   91|    150|    const int decoder_id = attribute_data_[i].decoder_id;
   92|    150|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 90, False: 60]
  |  Branch (92:27): [True: 0, False: 60]
  ------------------
   93|     90|      continue;
   94|     90|    }
   95|     60|    const AttributesDecoderInterface *const dec =
   96|     60|        decoder_->attributes_decoder(decoder_id);
   97|    130|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 117, False: 13]
  ------------------
   98|    117|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 47, False: 70]
  ------------------
   99|     47|        return &attribute_data_[i].encoding_data;
  100|     47|      }
  101|    117|    }
  102|     60|  }
  103|    226|  return &pos_encoding_data_;
  104|    273|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE23CreateAttributesDecoderEi:
  130|    345|    int32_t att_decoder_id) {
  131|    345|  int8_t att_data_id;
  132|    345|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 16, False: 329]
  ------------------
  133|     16|    return false;
  134|     16|  }
  135|    329|  uint8_t decoder_type;
  136|    329|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 8, False: 321]
  ------------------
  137|      8|    return false;
  138|      8|  }
  139|       |
  140|    321|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 156, False: 165]
  ------------------
  141|    156|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 28, False: 128]
  ------------------
  142|     28|      return false;  // Unexpected attribute data.
  143|     28|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|    128|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 6, False: 122]
  ------------------
  148|      6|      return false;
  149|      6|    }
  150|       |
  151|    122|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|    165|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    165|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 1, False: 164]
  ------------------
  155|      1|      return false;  // Some other decoder is already using the data. Error.
  156|      1|    }
  157|    164|    pos_data_decoder_id_ = att_decoder_id;
  158|    164|  }
  159|       |
  160|    286|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|    286|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    286|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 286, False: 0]
  ------------------
  162|    286|    uint8_t traversal_method_encoded;
  163|    286|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 7, False: 279]
  ------------------
  164|      7|      return false;
  165|      7|    }
  166|       |    // Check that decoded traversal method is valid.
  167|    279|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 21, False: 258]
  ------------------
  168|     21|      return false;
  169|     21|    }
  170|    258|    traversal_method =
  171|    258|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|    258|  }
  173|       |
  174|    258|  const Mesh *mesh = decoder_->mesh();
  175|    258|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|    258|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 205, False: 53]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|    205|    MeshAttributeIndicesEncodingData *encoding_data = nullptr;
  181|    205|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 144, False: 61]
  ------------------
  182|    144|      encoding_data = &pos_encoding_data_;
  183|    144|    } else {
  184|     61|      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|     61|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|     61|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|    205|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 56, False: 149]
  ------------------
  191|     56|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|     56|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|     56|          AttTraverser;
  194|     56|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|    149|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 149, False: 0]
  ------------------
  196|    149|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|    149|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|    149|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|    149|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|    205|  } else {
  203|     53|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 3, False: 50]
  ------------------
  204|      3|      return false;  // Unsupported method.
  205|      3|    }
  206|     50|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 2, False: 48]
  ------------------
  207|      2|      return false;  // Attribute data must be specified.
  208|      2|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|     48|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|     48|        AttObserver;
  214|     48|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|     48|        AttTraverser;
  216|       |
  217|     48|    MeshAttributeIndicesEncodingData *const encoding_data =
  218|     48|        &attribute_data_[att_data_id].encoding_data;
  219|     48|    const MeshAttributeCornerTable *const corner_table =
  220|     48|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|     48|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|     48|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|     48|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|     48|                             encoding_data);
  227|       |
  228|     48|    AttTraverser att_traverser;
  229|     48|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|     48|    traversal_sequencer->SetTraverser(att_traverser);
  232|     48|    sequencer = std::move(traversal_sequencer);
  233|     48|  }
  234|       |
  235|    253|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 253]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|    253|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|    253|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|    253|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|    253|                                        std::move(att_controller));
  244|    253|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18DecodeConnectivityEv:
  247|  2.89k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  2.89k|  num_new_vertices_ = 0;
  249|  2.89k|  new_to_parent_vertex_map_.clear();
  250|  2.89k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  2.89k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.89k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 524, False: 2.36k]
  ------------------
  252|    524|    uint32_t num_new_verts;
  253|    524|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    524|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 339, False: 185]
  ------------------
  254|    339|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 339]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    339|    } else {
  258|    185|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 185]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    185|    }
  262|    524|    num_new_vertices_ = num_new_verts;
  263|    524|  }
  264|  2.89k|#endif
  265|       |
  266|  2.89k|  uint32_t num_encoded_vertices;
  267|  2.89k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  2.89k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.89k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 339, False: 2.55k]
  ------------------
  269|    339|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 339]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    339|  } 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|  2.89k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  2.89k|  uint32_t num_faces;
  283|  2.89k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  2.89k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.89k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 339, False: 2.55k]
  ------------------
  285|    339|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 339]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    339|  } 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|  2.89k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 2, False: 2.89k]
  ------------------
  297|      2|    return false;  // Draco cannot handle this many faces.
  298|      2|  }
  299|       |
  300|  2.89k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 5, False: 2.88k]
  ------------------
  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.88k|  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.88k|  const uint64_t num_encoded_vertices_64 =
  311|  2.88k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  2.88k|  const uint64_t max_num_vertex_edges =
  313|  2.88k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  2.88k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 3, False: 2.88k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      3|    return false;
  317|      3|  }
  318|       |
  319|  2.88k|  uint8_t num_attribute_data;
  320|  2.88k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 2.88k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  2.88k|  uint32_t num_encoded_symbols;
  325|  2.88k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  2.88k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.88k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 335, False: 2.54k]
  ------------------
  327|    335|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 335]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    335|  } 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|  2.88k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 10, False: 2.87k]
  ------------------
  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|     10|    return false;
  344|     10|  }
  345|  2.87k|  const uint32_t max_encoded_faces =
  346|  2.87k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  2.87k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 21, False: 2.85k]
  ------------------
  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|     21|    return false;
  352|     21|  }
  353|       |
  354|  2.85k|  uint32_t num_encoded_split_symbols;
  355|  2.85k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  2.85k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.85k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 320, False: 2.53k]
  ------------------
  357|    320|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 320]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    320|  } else
  362|  2.53k|#endif
  363|  2.53k|  {
  364|  2.53k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 2.53k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  2.53k|  }
  368|       |
  369|  2.85k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 10, False: 2.84k]
  ------------------
  370|     10|    return false;  // Split symbols are a sub-set of all symbols.
  371|     10|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  2.84k|  vertex_traversal_length_.clear();
  375|  2.84k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  2.84k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 2.84k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  2.84k|  processed_corner_ids_.clear();
  380|  2.84k|  processed_corner_ids_.reserve(num_faces);
  381|  2.84k|  processed_connectivity_corners_.clear();
  382|  2.84k|  processed_connectivity_corners_.reserve(num_faces);
  383|  2.84k|  topology_split_data_.clear();
  384|  2.84k|  hole_event_data_.clear();
  385|  2.84k|  init_face_configurations_.clear();
  386|  2.84k|  init_corners_.clear();
  387|       |
  388|  2.84k|  last_symbol_id_ = -1;
  389|  2.84k|  last_face_id_ = -1;
  390|  2.84k|  last_vert_id_ = -1;
  391|       |
  392|  2.84k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  2.84k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  2.84k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 0, False: 2.84k]
  ------------------
  397|  2.84k|          num_faces, num_encoded_vertices_ + num_encoded_split_symbols)) {
  398|      0|    return false;
  399|      0|  }
  400|       |
  401|       |  // Start with all vertices marked as holes (boundaries).
  402|       |  // Only vertices decoded with TOPOLOGY_C symbol (and the initial face) will
  403|       |  // be marked as non hole vertices. We need to allocate the array larger
  404|       |  // because split symbols can create extra vertices during the decoding
  405|       |  // process (these extra vertices are then eliminated during deduplication).
  406|  2.84k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  2.84k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  2.84k|  int32_t topology_split_decoded_bytes = -1;
  410|  2.84k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.84k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 500, False: 2.34k]
  ------------------
  411|    500|    uint32_t encoded_connectivity_size;
  412|    500|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    500|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 317, False: 183]
  ------------------
  413|    317|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 5, False: 312]
  ------------------
  414|      5|        return false;
  415|      5|      }
  416|    317|    } else {
  417|    183|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 183]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|    183|    }
  421|    495|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 3, False: 492]
  ------------------
  422|    492|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 31, False: 461]
  ------------------
  423|     34|      return false;
  424|     34|    }
  425|    461|    DecoderBuffer event_buffer;
  426|    461|    event_buffer.Init(
  427|    461|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    461|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    461|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    461|    topology_split_decoded_bytes =
  432|    461|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    461|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 90, False: 371]
  ------------------
  434|     90|      return false;
  435|     90|    }
  436|       |
  437|    461|  } else
  438|  2.34k|#endif
  439|  2.34k|  {
  440|  2.34k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 34, False: 2.30k]
  ------------------
  441|     34|      return false;
  442|     34|    }
  443|  2.34k|  }
  444|       |
  445|  2.67k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  2.67k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  2.67k|                                           num_encoded_split_symbols);
  449|  2.67k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  2.67k|  DecoderBuffer traversal_end_buffer;
  452|  2.67k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 1.32k, False: 1.35k]
  ------------------
  453|  1.32k|    return false;
  454|  1.32k|  }
  455|       |
  456|  1.35k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  1.35k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 1.01k, False: 336]
  ------------------
  458|  1.01k|    return false;
  459|  1.01k|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|    336|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|    336|                           traversal_end_buffer.remaining_size(),
  464|    336|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|    336|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|    336|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    336|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 6, False: 330]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|      6|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|      6|  }
  471|    336|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|    336|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 207, False: 129]
  ------------------
  475|    207|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|    207|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|    207|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 5, False: 202]
  ------------------
  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|    202|#endif
  485|    202|    {
  486|   877k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 877k, False: 202]
  ------------------
  487|   877k|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 877k]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|   877k|      }
  491|    202|    }
  492|    207|  }
  493|    336|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  1.11k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 782, False: 336]
  ------------------
  498|    782|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  2.28M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 2.28M, False: 782]
  ------------------
  501|  2.28M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  2.28M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|    782|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 782]
  ------------------
  505|    782|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|    782|  }
  509|       |
  510|    336|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  1.11k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 782, False: 336]
  ------------------
  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|    782|    int32_t att_connectivity_verts =
  517|    782|        attribute_data_[i].connectivity_data.num_vertices();
  518|    782|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 1, False: 781]
  ------------------
  519|      1|      att_connectivity_verts = corner_table_->num_vertices();
  520|      1|    }
  521|    782|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|    782|  }
  523|    336|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 10, False: 326]
  ------------------
  524|     10|    return false;
  525|     10|  }
  526|    326|  return true;
  527|    336|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE19OnAttributesDecodedEv:
  530|     31|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|     31|  return true;
  532|     31|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18DecodeConnectivityEi:
  536|  1.35k|    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.35k|  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.35k|  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.35k|  std::vector<VertexIndex> invalid_vertices;
  558|  1.35k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  1.35k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  1.35k|  int num_faces = 0;
  562|  75.9M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 75.9M, False: 504]
  ------------------
  563|  75.9M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  75.9M|    bool check_topology_split = false;
  566|  75.9M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  75.9M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 4.86M, False: 71.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|  4.86M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 140, False: 4.86M]
  ------------------
  588|    140|        return -1;
  589|    140|      }
  590|       |
  591|  4.86M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  4.86M|      const VertexIndex vertex_x =
  593|  4.86M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  4.86M|      const CornerIndex corner_b =
  595|  4.86M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  4.86M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 306, False: 4.86M]
  ------------------
  598|       |        // All matched corners must be different.
  599|    306|        return -1;
  600|    306|      }
  601|  4.86M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 4.86M]
  |  Branch (601:11): [True: 0, False: 4.86M]
  ------------------
  602|  4.86M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 4.86M]
  ------------------
  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|  4.86M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  4.86M|      SetOppositeCorners(corner_a, corner + 1);
  612|  4.86M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  4.86M|      const VertexIndex vert_a_prev =
  616|  4.86M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  4.86M|      const VertexIndex vert_b_next =
  618|  4.86M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  4.86M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 4.86M]
  |  Branch (619:38): [True: 0, False: 4.86M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  4.86M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  4.86M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  4.86M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  4.86M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  4.86M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  4.86M|      active_corner_stack.back() = corner;
  631|  71.0M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 1.94k, False: 71.0M]
  |  Branch (631:40): [True: 61.4M, False: 9.59M]
  ------------------
  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|  61.4M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 1, False: 61.4M]
  ------------------
  647|      1|        return -1;
  648|      1|      }
  649|  61.4M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  61.4M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 61.4M]
  ------------------
  651|       |        // Active corner is already opposite to an existing face, which should
  652|       |        // not happen unless the input was tampered with.
  653|      0|        return -1;
  654|      0|      }
  655|       |
  656|       |      // First corner on the new face is either corner "l" or "r".
  657|  61.4M|      const CornerIndex corner(3 * face.value());
  658|  61.4M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  61.4M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 1.94k, False: 61.4M]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  1.94k|        opp_corner = corner + 2;
  662|  1.94k|        corner_l = corner + 1;
  663|  1.94k|        corner_r = corner;
  664|  61.4M|      } else {
  665|       |        // "l" is the new first corner.
  666|  61.4M|        opp_corner = corner + 1;
  667|  61.4M|        corner_l = corner;
  668|  61.4M|        corner_r = corner + 2;
  669|  61.4M|      }
  670|  61.4M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  61.4M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  61.4M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 9, False: 61.4M]
  ------------------
  675|      9|        return -1;  // Unexpected number of decoded vertices.
  676|      9|      }
  677|       |
  678|  61.4M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  61.4M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  61.4M|      const VertexIndex vertex_r =
  682|  61.4M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  61.4M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  61.4M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  61.4M|      corner_table_->MapCornerToVertex(
  688|  61.4M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  61.4M|      active_corner_stack.back() = corner;
  690|  61.4M|      check_topology_split = true;
  691|  61.4M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 33.2k, False: 9.56M]
  ------------------
  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|  33.2k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 1, False: 33.2k]
  ------------------
  703|      1|        return -1;
  704|      1|      }
  705|  33.2k|      const CornerIndex corner_b = active_corner_stack.back();
  706|  33.2k|      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|  33.2k|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  33.2k|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 41, False: 33.2k]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|     41|        active_corner_stack.push_back(it->second);
  714|     41|      }
  715|  33.2k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 47, False: 33.2k]
  ------------------
  716|     47|        return -1;
  717|     47|      }
  718|  33.2k|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  33.2k|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 33.2k]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  33.2k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 4, False: 33.1k]
  |  Branch (724:11): [True: 4, False: 33.1k]
  ------------------
  725|  33.1k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 33.1k]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|      4|        return -1;
  729|      4|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  33.1k|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  33.1k|      SetOppositeCorners(corner_a, corner + 2);
  735|  33.1k|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  33.1k|      const VertexIndex vertex_p =
  739|  33.1k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  33.1k|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  33.1k|      corner_table_->MapCornerToVertex(
  742|  33.1k|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  33.1k|      const VertexIndex vert_b_prev =
  744|  33.1k|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  33.1k|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  33.1k|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  33.1k|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  33.1k|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  33.1k|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  33.1k|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  33.1k|                                       corner_table_->LeftMostCorner(vertex_n));
  753|       |
  754|       |      // Also update the vertex id at corner "n" and all corners that are
  755|       |      // connected to it in the CCW direction.
  756|  33.1k|      const CornerIndex first_corner = corner_n;
  757|   644k|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 611k, False: 33.1k]
  ------------------
  758|   611k|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|   611k|        corner_n = corner_table_->SwingLeft(corner_n);
  760|   611k|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 3, False: 611k]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      3|          return -1;
  764|      3|        }
  765|   611k|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  33.1k|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  33.1k|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 32.4k, False: 757]
  ------------------
  770|  32.4k|        invalid_vertices.push_back(vertex_n);
  771|  32.4k|      }
  772|  33.1k|      active_corner_stack.back() = corner;
  773|  9.56M|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 9.56M, False: 261]
  ------------------
  774|  9.56M|      const CornerIndex corner(3 * face.value());
  775|  9.56M|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  9.56M|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  9.56M|      corner_table_->MapCornerToVertex(corner + 1,
  779|  9.56M|                                       corner_table_->AddNewVertex());
  780|  9.56M|      corner_table_->MapCornerToVertex(corner + 2,
  781|  9.56M|                                       corner_table_->AddNewVertex());
  782|       |
  783|  9.56M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 9, False: 9.56M]
  ------------------
  784|      9|        return -1;  // Unexpected number of decoded vertices.
  785|      9|      }
  786|       |
  787|  9.56M|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  9.56M|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  9.56M|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  9.56M|      active_corner_stack.push_back(corner);
  792|  9.56M|      check_topology_split = true;
  793|  9.56M|    } else {
  794|       |      // Error. Unknown symbol decoded.
  795|    261|      return -1;
  796|    261|    }
  797|       |    // Inform the traversal decoder that a new corner has been reached.
  798|  75.9M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  75.9M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 71.0M, False: 4.89M]
  ------------------
  801|       |      // Check for topology splits happens only for TOPOLOGY_L, TOPOLOGY_R and
  802|       |      // TOPOLOGY_E symbols because those are the symbols that correspond to
  803|       |      // faces that can be directly connected a TOPOLOGY_S face through the
  804|       |      // topology split event.
  805|       |      // If a topology split is detected, we need to add a new active edge
  806|       |      // onto the active_corner_stack because it will be used later when the
  807|       |      // corresponding TOPOLOGY_S event is decoded.
  808|       |
  809|       |      // Symbol id used by the encoder (reverse).
  810|  71.0M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  71.0M|      EdgeFaceName split_edge;
  812|  71.0M|      int encoder_split_symbol_id;
  813|  71.0M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 1.72k, False: 71.0M]
  ------------------
  814|  71.0M|                             &encoder_split_symbol_id)) {
  815|  1.72k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 67, False: 1.65k]
  ------------------
  816|     67|          return -1;  // Wrong split symbol id.
  817|     67|        }
  818|       |        // Symbol was part of a topology split. Now we need to determine which
  819|       |        // edge should be added to the active edges stack.
  820|  1.65k|        const CornerIndex act_top_corner = active_corner_stack.back();
  821|       |        // The current symbol has one active edge (stored in act_top_corner) and
  822|       |        // two remaining inactive edges that are attached to it.
  823|       |        //              *
  824|       |        //             / \
  825|       |        //  left_edge /   \ right_edge
  826|       |        //           /     \
  827|       |        //          *.......*
  828|       |        //         active_edge
  829|       |
  830|  1.65k|        CornerIndex new_active_corner;
  831|  1.65k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 771, False: 882]
  ------------------
  832|    771|          new_active_corner = corner_table_->Next(act_top_corner);
  833|    882|        } else {
  834|    882|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|    882|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  1.65k|        const int decoder_split_symbol_id =
  839|  1.65k|            num_symbols - encoder_split_symbol_id - 1;
  840|  1.65k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  1.65k|            new_active_corner;
  842|  1.65k|      }
  843|  71.0M|    }
  844|  75.9M|  }
  845|    504|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 504]
  ------------------
  846|      0|    return -1;  // Unexpected number of decoded vertices.
  847|      0|  }
  848|       |  // Decode start faces and connect them to the faces from the active stack.
  849|  8.33M|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 8.33M, False: 431]
  ------------------
  850|  8.33M|    const CornerIndex corner = active_corner_stack.back();
  851|  8.33M|    active_corner_stack.pop_back();
  852|  8.33M|    const bool interior_face =
  853|  8.33M|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  8.33M|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 2.95M, False: 5.38M]
  ------------------
  855|       |      // The start face is interior, we need to find three corners that are
  856|       |      // opposite to it. The first opposite corner "a" is the corner from the
  857|       |      // top of the active corner stack and the remaining two corners "b" and
  858|       |      // "c" are then the next corners from the left-most corners of vertices
  859|       |      // "n" and "x" respectively.
  860|       |      //
  861|       |      //           *-------*
  862|       |      //          / \     / \
  863|       |      //         /   \   /   \
  864|       |      //        /     \ /     \
  865|       |      //       *-------p-------*
  866|       |      //      / \a    . .    c/ \
  867|       |      //     /   \   .   .   /   \
  868|       |      //    /     \ .  I  . /     \
  869|       |      //   *-------n.......x------*
  870|       |      //    \     / \     / \     /
  871|       |      //     \   /   \   /   \   /
  872|       |      //      \ /     \b/     \ /
  873|       |      //       *-------*-------*
  874|       |      //
  875|       |
  876|  2.95M|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 69, False: 2.95M]
  ------------------
  877|     69|        return -1;  // More faces than expected added to the mesh.
  878|     69|      }
  879|       |
  880|  2.95M|      const CornerIndex corner_a = corner;
  881|  2.95M|      const VertexIndex vert_n =
  882|  2.95M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  2.95M|      const CornerIndex corner_b =
  884|  2.95M|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  2.95M|      const VertexIndex vert_x =
  887|  2.95M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  2.95M|      const CornerIndex corner_c =
  889|  2.95M|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  2.95M|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 1, False: 2.95M]
  |  Branch (891:33): [True: 3, False: 2.95M]
  |  Branch (891:55): [True: 0, False: 2.95M]
  ------------------
  892|       |        // All matched corners must be different.
  893|      4|        return -1;
  894|      4|      }
  895|  2.95M|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 0, False: 2.95M]
  |  Branch (895:11): [True: 0, False: 2.95M]
  ------------------
  896|  2.95M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 0, False: 2.95M]
  ------------------
  897|  2.95M|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 0, False: 2.95M]
  ------------------
  898|       |        // One of the corners is already opposite to an existing face, which
  899|       |        // should not happen unless the input was tampered with.
  900|      0|        return -1;
  901|      0|      }
  902|       |
  903|  2.95M|      const VertexIndex vert_p =
  904|  2.95M|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  2.95M|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  2.95M|      const CornerIndex new_corner(3 * face.value());
  909|  2.95M|      SetOppositeCorners(new_corner, corner);
  910|  2.95M|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  2.95M|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  2.95M|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  2.95M|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  2.95M|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|  11.8M|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 8.85M, False: 2.95M]
  ------------------
  920|  8.85M|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|  8.85M|      }
  922|       |
  923|  2.95M|      init_face_configurations_.push_back(true);
  924|  2.95M|      init_corners_.push_back(new_corner);
  925|  5.38M|    } 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.38M|      init_face_configurations_.push_back(false);
  930|  5.38M|      init_corners_.push_back(corner);
  931|  5.38M|    }
  932|  8.33M|  }
  933|    431|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 92, False: 339]
  ------------------
  934|     92|    return -1;  // Unexpected number of decoded faces.
  935|     92|  }
  936|       |
  937|    339|  int num_vertices = corner_table_->num_vertices();
  938|       |  // If any vertex was marked as isolated, we want to remove it from the corner
  939|       |  // table to ensure that all vertices in range <0, num_vertices> are valid.
  940|  3.61k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 3.61k, False: 336]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  3.61k|    VertexIndex src_vert(num_vertices - 1);
  943|  4.35k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 741, False: 3.61k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|    741|      src_vert = VertexIndex(--num_vertices - 1);
  946|    741|    }
  947|  3.61k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 550, False: 3.06k]
  ------------------
  948|    550|      continue;  // No need to swap anything.
  949|    550|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  3.06k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  12.3k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 9.29k, False: 3.06k]
  ------------------
  954|  9.29k|      const CornerIndex cid = vcit.Corner();
  955|  9.29k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 3, False: 9.29k]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      3|        return -1;
  959|      3|      }
  960|  9.29k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  9.29k|    }
  962|  3.06k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  3.06k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  3.06k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  3.06k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  3.06k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  3.06k|    num_vertices--;
  972|  3.06k|  }
  973|    336|  return num_vertices;
  974|    339|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  2.80k|    DecoderBuffer *decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  2.80k|  uint32_t num_topology_splits;
  982|  2.80k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  2.80k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.80k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 285, False: 2.51k]
  ------------------
  984|    285|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 1, False: 284]
  ------------------
  985|      1|      return -1;
  986|      1|    }
  987|       |
  988|    285|  } else
  989|  2.51k|#endif
  990|  2.51k|  {
  991|  2.51k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 2.51k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  2.51k|  }
  995|  2.80k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 625, False: 2.17k]
  ------------------
  996|    625|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 26, False: 599]
  ------------------
  997|    625|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|     26|      return -1;
  999|     26|    }
 1000|    599|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|    599|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    599|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 36, False: 563]
  ------------------
 1002|   138k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 138k, False: 4]
  ------------------
 1003|   138k|        TopologySplitEventData event_data;
 1004|   138k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 19, False: 138k]
  ------------------
 1005|     19|          return -1;
 1006|     19|        }
 1007|   138k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 11, False: 138k]
  ------------------
 1008|     11|          return -1;
 1009|     11|        }
 1010|   138k|        uint8_t edge_data;
 1011|   138k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 2, False: 138k]
  ------------------
 1012|      2|          return -1;
 1013|      2|        }
 1014|   138k|        event_data.source_edge = edge_data & 1;
 1015|   138k|        topology_split_data_.push_back(event_data);
 1016|   138k|      }
 1017|       |
 1018|     36|    } else
 1019|    563|#endif
 1020|    563|    {
 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|    563|      int last_source_symbol_id = 0;
 1024|  4.77k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 4.23k, False: 541]
  ------------------
 1025|  4.23k|        TopologySplitEventData event_data;
 1026|  4.23k|        uint32_t delta;
 1027|  4.23k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 8, False: 4.22k]
  ------------------
 1028|      8|          return -1;
 1029|      8|        }
 1030|  4.22k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  4.22k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 6, False: 4.22k]
  ------------------
 1032|      6|          return -1;
 1033|      6|        }
 1034|  4.22k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 8, False: 4.21k]
  ------------------
 1035|      8|          return -1;
 1036|      8|        }
 1037|  4.21k|        event_data.split_symbol_id =
 1038|  4.21k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  4.21k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  4.21k|        topology_split_data_.push_back(event_data);
 1041|  4.21k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|    541|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  4.36k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 3.82k, False: 541]
  ------------------
 1045|  3.82k|        uint32_t edge_data;
 1046|  3.82k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.82k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 692, False: 3.13k]
  ------------------
 1047|    692|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  3.13k|        } else {
 1049|  3.13k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  3.13k|        }
 1051|  3.82k|        TopologySplitEventData &event_data = topology_split_data_[i];
 1052|  3.82k|        event_data.source_edge = edge_data & 1;
 1053|  3.82k|      }
 1054|    541|      decoder_buffer->EndBitDecoding();
 1055|    541|    }
 1056|    599|  }
 1057|  2.72k|  uint32_t num_hole_events = 0;
 1058|  2.72k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  2.72k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.72k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 241, False: 2.48k]
  ------------------
 1060|    241|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 2, False: 239]
  ------------------
 1061|      2|      return -1;
 1062|      2|    }
 1063|  2.48k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  2.48k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 159, False: 2.32k]
  ------------------
 1064|    159|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 5, False: 154]
  ------------------
 1065|      5|      return -1;
 1066|      5|    }
 1067|    159|  }
 1068|  2.71k|#endif
 1069|  2.71k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 57, False: 2.65k]
  ------------------
 1070|     57|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     57|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     57|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 19, False: 38]
  ------------------
 1072|  42.9k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 42.9k, False: 1]
  ------------------
 1073|  42.9k|        HoleEventData event_data;
 1074|  42.9k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 18, False: 42.9k]
  ------------------
 1075|     18|          return -1;
 1076|     18|        }
 1077|  42.9k|        hole_event_data_.push_back(event_data);
 1078|  42.9k|      }
 1079|       |
 1080|     19|    } else
 1081|     38|#endif
 1082|     38|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     38|      int last_symbol_id = 0;
 1085|  26.5k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 26.5k, False: 20]
  ------------------
 1086|  26.5k|        HoleEventData event_data;
 1087|  26.5k|        uint32_t delta;
 1088|  26.5k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 18, False: 26.5k]
  ------------------
 1089|     18|          return -1;
 1090|     18|        }
 1091|  26.5k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  26.5k|        last_symbol_id = event_data.symbol_id;
 1093|  26.5k|        hole_event_data_.push_back(event_data);
 1094|  26.5k|      }
 1095|     38|    }
 1096|     57|  }
 1097|  2.67k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  2.71k|}
_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|   877k|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|   877k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|   877k|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|   877k|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  3.51M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 2.63M, False: 877k]
  ------------------
 1139|  2.63M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  2.63M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 434k, False: 2.19M]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|  1.30M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 869k, False: 434k]
  ------------------
 1144|   869k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   869k|      }
 1146|   434k|      continue;
 1147|   434k|    }
 1148|  2.19M|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|  2.19M|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 1.09M, False: 1.09M]
  ------------------
 1151|  1.09M|      continue;
 1152|  1.09M|    }
 1153|       |
 1154|  3.29M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 2.19M, False: 1.09M]
  ------------------
 1155|  2.19M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  2.19M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 1.41M, False: 777k]
  ------------------
 1157|  1.41M|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|  1.41M|      }
 1159|  2.19M|    }
 1160|  1.09M|  }
 1161|   877k|  return true;
 1162|   877k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE21AssignPointsToCornersEi:
 1166|    336|    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|    336|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|    336|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 129, False: 207]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|   116k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 116k, False: 129]
  ------------------
 1176|   116k|      Mesh::Face face;
 1177|   116k|      const CornerIndex start_corner(3 * f.value());
 1178|   466k|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 349k, False: 116k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|   349k|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|   349k|        face[c] = vert_id;
 1182|   349k|      }
 1183|   116k|      decoder_->mesh()->SetFace(f, face);
 1184|   116k|    }
 1185|    129|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|    129|    return true;
 1187|    129|  }
 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|    207|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|    207|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|   644k|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 644k, False: 197]
  ------------------
 1197|   644k|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|   644k|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 100, False: 644k]
  ------------------
 1199|    100|      continue;  // Isolated vertex.
 1200|    100|    }
 1201|   644k|    CornerIndex deduplication_first_corner = c;
 1202|   644k|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 434k, False: 209k]
  ------------------
 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|   434k|      deduplication_first_corner = c;
 1206|   434k|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|   355k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 294k, False: 60.6k]
  ------------------
 1210|   294k|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 141k, False: 153k]
  ------------------
 1211|   141k|          continue;  // No seam for this attribute, ignore it.
 1212|   141k|        }
 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|   153k|        const VertexIndex vert_id =
 1217|   153k|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|   153k|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|   153k|        bool seam_found = false;
 1220|   179k|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 175k, False: 4.27k]
  ------------------
 1221|   175k|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 10, False: 175k]
  ------------------
 1222|     10|            return false;
 1223|     10|          }
 1224|   175k|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 148k, False: 26.1k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|   148k|            deduplication_first_corner = act_c;
 1227|   148k|            seam_found = true;
 1228|   148k|            break;
 1229|   148k|          }
 1230|  26.1k|          act_c = corner_table_->SwingRight(act_c);
 1231|  26.1k|        }
 1232|   153k|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 148k, False: 4.27k]
  ------------------
 1233|   148k|          break;  // No reason to process other attributes if we found a seam.
 1234|   148k|        }
 1235|   153k|      }
 1236|   209k|    }
 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|   644k|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|   644k|    corner_to_point_map[c.value()] =
 1246|   644k|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|   644k|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|   644k|    CornerIndex prev_c = c;
 1250|   644k|    c = corner_table_->SwingRight(c);
 1251|  2.63M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 2.19M, False: 434k]
  |  Branch (1251:40): [True: 1.98M, False: 209k]
  ------------------
 1252|  1.98M|      bool attribute_seam = false;
 1253|  3.26M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 2.79M, False: 475k]
  ------------------
 1254|  2.79M|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 1.51M, False: 1.27M]
  ------------------
 1255|  2.79M|            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.51M|          attribute_seam = true;
 1259|  1.51M|          break;
 1260|  1.51M|        }
 1261|  2.79M|      }
 1262|  1.98M|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 1.51M, False: 475k]
  ------------------
 1263|  1.51M|        corner_to_point_map[c.value()] =
 1264|  1.51M|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|  1.51M|        point_to_corner_map.push_back(c.value());
 1266|  1.51M|      } else {
 1267|   475k|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|   475k|      }
 1269|  1.98M|      prev_c = c;
 1270|  1.98M|      c = corner_table_->SwingRight(c);
 1271|  1.98M|    }
 1272|   644k|  }
 1273|       |  // Add faces.
 1274|   813k|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 813k, False: 197]
  ------------------
 1275|   813k|    Mesh::Face face;
 1276|  3.25M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 2.43M, False: 813k]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|  2.43M|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|  2.43M|    }
 1280|   813k|    decoder_->mesh()->SetFace(f, face);
 1281|   813k|  }
 1282|    197|  decoder_->point_cloud()->set_num_points(
 1283|    197|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|    197|  return true;
 1285|    207|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    198|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|    198|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    198|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    198|  const Mesh *mesh = decoder_->mesh();
  115|    198|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    198|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    198|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    198|                           encoding_data);
  120|       |
  121|    198|  TraverserT att_traverser;
  122|    198|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    198|  traversal_sequencer->SetTraverser(att_traverser);
  125|    198|  return std::move(traversal_sequencer);
  126|    198|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|  1.22k|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|  1.22k|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|  1.22k|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|  1.22k|  const Mesh *mesh = decoder_->mesh();
  115|  1.22k|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|  1.22k|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|  1.22k|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|  1.22k|                           encoding_data);
  120|       |
  121|  1.22k|  TraverserT att_traverser;
  122|  1.22k|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|  1.22k|  traversal_sequencer->SetTraverser(att_traverser);
  125|  1.22k|  return std::move(traversal_sequencer);
  126|  1.22k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    268|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|    268|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    268|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    268|  const Mesh *mesh = decoder_->mesh();
  115|    268|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    268|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    268|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    268|                           encoding_data);
  120|       |
  121|    268|  TraverserT att_traverser;
  122|    268|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    268|  traversal_sequencer->SetTraverser(att_traverser);
  125|    268|  return std::move(traversal_sequencer);
  126|    268|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    416|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|    416|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    416|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    416|  const Mesh *mesh = decoder_->mesh();
  115|    416|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    416|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    416|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    416|                           encoding_data);
  120|       |
  121|    416|  TraverserT att_traverser;
  122|    416|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    416|  traversal_sequencer->SetTraverser(att_traverser);
  125|    416|  return std::move(traversal_sequencer);
  126|    416|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|     56|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|     56|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|     56|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|     56|  const Mesh *mesh = decoder_->mesh();
  115|     56|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|     56|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|     56|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|     56|                           encoding_data);
  120|       |
  121|     56|  TraverserT att_traverser;
  122|     56|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|     56|  traversal_sequencer->SetTraverser(att_traverser);
  125|     56|  return std::move(traversal_sequencer);
  126|     56|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    149|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|    149|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    149|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    149|  const Mesh *mesh = decoder_->mesh();
  115|    149|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    149|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    149|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    149|                           encoding_data);
  120|       |
  121|    149|  TraverserT att_traverser;
  122|    149|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    149|  traversal_sequencer->SetTraverser(att_traverser);
  125|    149|  return std::move(traversal_sequencer);
  126|    149|}

_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE10GetDecoderEv:
   65|  10.4k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE14GetCornerTableEv:
   66|  3.83k|  const CornerTable *GetCornerTable() const override {
   67|  3.83k|    return corner_table_.get();
   68|  3.83k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  13.2M|                       int *out_encoder_split_symbol_id) {
   87|  13.2M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 1.91M, False: 11.2M]
  ------------------
   88|  1.91M|      return false;
   89|  1.91M|    }
   90|  11.2M|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 37, False: 11.2M]
  ------------------
   91|  11.2M|        static_cast<uint32_t>(encoder_symbol_id)) {
   92|       |      // Something is wrong; if the desired source symbol is greater than the
   93|       |      // current encoder_symbol_id, we missed it, or the input was tampered
   94|       |      // (|encoder_symbol_id| keeps decreasing).
   95|       |      // Return invalid symbol id to notify the decoder that there was an
   96|       |      // error.
   97|     37|      *out_encoder_split_symbol_id = -1;
   98|     37|      return true;
   99|     37|    }
  100|  11.2M|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 11.2M, False: 2.33k]
  ------------------
  101|  11.2M|      return false;
  102|  11.2M|    }
  103|  2.33k|    *out_face_edge =
  104|  2.33k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  2.33k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  2.33k|    topology_split_data_.pop_back();
  108|  2.33k|    return true;
  109|  11.2M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  45.0M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  45.0M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  45.0M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  45.0M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE13AttributeDataC2Ev:
  210|  10.1k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE10GetDecoderEv:
   65|  5.92k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE14GetCornerTableEv:
   66|  3.92k|  const CornerTable *GetCornerTable() const override {
   67|  3.92k|    return corner_table_.get();
   68|  3.92k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  43.6M|                       int *out_encoder_split_symbol_id) {
   87|  43.6M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 42.9M, False: 660k]
  ------------------
   88|  42.9M|      return false;
   89|  42.9M|    }
   90|   660k|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 54, False: 660k]
  ------------------
   91|   660k|        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|     54|      *out_encoder_split_symbol_id = -1;
   98|     54|      return true;
   99|     54|    }
  100|   660k|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 658k, False: 2.23k]
  ------------------
  101|   658k|      return false;
  102|   658k|    }
  103|  2.23k|    *out_face_edge =
  104|  2.23k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  2.23k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  2.23k|    topology_split_data_.pop_back();
  108|  2.23k|    return true;
  109|   660k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|   127M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|   127M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|   127M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|   127M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE13AttributeDataC2Ev:
  210|  15.8k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE10GetDecoderEv:
   65|  14.7k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE14GetCornerTableEv:
   66|  2.95k|  const CornerTable *GetCornerTable() const override {
   67|  2.95k|    return corner_table_.get();
   68|  2.95k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  71.0M|                       int *out_encoder_split_symbol_id) {
   87|  71.0M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 70.6M, False: 313k]
  ------------------
   88|  70.6M|      return false;
   89|  70.6M|    }
   90|   313k|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 67, False: 313k]
  ------------------
   91|   313k|        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|     67|      *out_encoder_split_symbol_id = -1;
   98|     67|      return true;
   99|     67|    }
  100|   313k|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 311k, False: 1.65k]
  ------------------
  101|   311k|      return false;
  102|   311k|    }
  103|  1.65k|    *out_face_edge =
  104|  1.65k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  1.65k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  1.65k|    topology_split_data_.pop_back();
  108|  1.65k|    return true;
  109|   313k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  80.0M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  80.0M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  80.0M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  80.0M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE13AttributeDataC2Ev:
  210|  8.32k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}

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

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

_ZN5draco31MeshEdgebreakerTraversalDecoderC2Ev:
   33|  8.90k|      : attribute_connectivity_decoders_(nullptr),
   34|  8.90k|        num_attribute_data_(0),
   35|  8.90k|        decoder_impl_(nullptr) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder4InitEPNS_35MeshEdgebreakerDecoderImplInterfaceE:
   36|  8.14k|  void Init(MeshEdgebreakerDecoderImplInterface *decoder) {
   37|  8.14k|    decoder_impl_ = decoder;
   38|  8.14k|    buffer_.Init(decoder->GetDecoder()->buffer()->data_head(),
   39|  8.14k|                 decoder->GetDecoder()->buffer()->remaining_size(),
   40|  8.14k|                 decoder->GetDecoder()->buffer()->bitstream_version());
   41|  8.14k|  }
_ZNK5draco31MeshEdgebreakerTraversalDecoder16BitstreamVersionEv:
   44|  6.74k|  uint16_t BitstreamVersion() const {
   45|  6.74k|    return decoder_impl_->GetDecoder()->bitstream_version();
   46|  6.74k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder21SetNumEncodedVerticesEi:
   50|  3.49k|  void SetNumEncodedVertices(int /* num_vertices */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19SetNumAttributeDataEi:
   54|  8.14k|  void SetNumAttributeData(int num_data) { num_attribute_data_ = num_data; }
_ZN5draco31MeshEdgebreakerTraversalDecoder5StartEPNS_13DecoderBufferE:
   59|  5.46k|  bool Start(DecoderBuffer *out_buffer) {
   60|       |    // Decode symbols from the main buffer decoder and face configurations from
   61|       |    // the start_face_buffer decoder.
   62|  5.46k|    if (!DecodeTraversalSymbols()) {
  ------------------
  |  Branch (62:9): [True: 78, False: 5.38k]
  ------------------
   63|     78|      return false;
   64|     78|    }
   65|       |
   66|  5.38k|    if (!DecodeStartFaces()) {
  ------------------
  |  Branch (66:9): [True: 110, False: 5.27k]
  ------------------
   67|    110|      return false;
   68|    110|    }
   69|       |
   70|  5.27k|    if (!DecodeAttributeSeams()) {
  ------------------
  |  Branch (70:9): [True: 15, False: 5.26k]
  ------------------
   71|     15|      return false;
   72|     15|    }
   73|  5.26k|    *out_buffer = buffer_;
   74|  5.26k|    return true;
   75|  5.27k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder28DecodeStartFaceConfigurationEv:
   78|  8.41M|  inline bool DecodeStartFaceConfiguration() {
   79|  8.41M|    uint32_t face_configuration;
   80|  8.41M|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   81|  8.41M|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  8.41M|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (81:9): [True: 1.63k, False: 8.41M]
  ------------------
   82|  1.63k|      start_face_buffer_.DecodeLeastSignificantBits32(1, &face_configuration);
   83|       |
   84|  1.63k|    } else
   85|  8.41M|#endif
   86|  8.41M|    {
   87|  8.41M|      face_configuration = start_face_decoder_.DecodeNextBit();
   88|  8.41M|    }
   89|  8.41M|    return face_configuration;
   90|  8.41M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder12DecodeSymbolEv:
   93|  31.3M|  inline uint32_t DecodeSymbol() {
   94|  31.3M|    uint32_t symbol;
   95|  31.3M|    symbol_buffer_.DecodeLeastSignificantBits32(1, &symbol);
   96|  31.3M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (96:9): [True: 13.9M, False: 17.4M]
  ------------------
   97|  13.9M|      return symbol;
   98|  13.9M|    }
   99|       |    // Else decode two additional bits.
  100|  17.4M|    uint32_t symbol_suffix;
  101|  17.4M|    symbol_buffer_.DecodeLeastSignificantBits32(2, &symbol_suffix);
  102|  17.4M|    symbol |= (symbol_suffix << 1);
  103|  17.4M|    return symbol;
  104|  31.3M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder22NewActiveCornerReachedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  31.1M|  inline void NewActiveCornerReached(CornerIndex /* corner */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder13MergeVerticesENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_:
  111|  4.07M|  inline void MergeVertices(VertexIndex /* dest */, VertexIndex /* source */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19DecodeAttributeSeamEi:
  117|  21.6M|  inline bool DecodeAttributeSeam(int attribute) {
  118|  21.6M|    return attribute_connectivity_decoders_[attribute].DecodeNextBit();
  119|  21.6M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder4DoneEv:
  122|  5.02k|  void Done() {
  123|  5.02k|    if (symbol_buffer_.bit_decoder_active()) {
  ------------------
  |  Branch (123:9): [True: 4.69k, False: 330]
  ------------------
  124|  4.69k|      symbol_buffer_.EndBitDecoding();
  125|  4.69k|    }
  126|  5.02k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  127|  5.02k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  5.02k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (127:9): [True: 582, False: 4.44k]
  ------------------
  128|    582|      start_face_buffer_.EndBitDecoding();
  129|       |
  130|    582|    } else
  131|  4.44k|#endif
  132|  4.44k|    {
  133|  4.44k|      start_face_decoder_.EndDecoding();
  134|  4.44k|    }
  135|  5.02k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder6bufferEv:
  138|  2.50k|  DecoderBuffer *buffer() { return &buffer_; }
_ZN5draco31MeshEdgebreakerTraversalDecoder22DecodeTraversalSymbolsEv:
  140|  5.83k|  bool DecodeTraversalSymbols() {
  141|  5.83k|    uint64_t traversal_size;
  142|  5.83k|    symbol_buffer_ = buffer_;
  143|  5.83k|    if (!symbol_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (143:9): [True: 23, False: 5.81k]
  ------------------
  144|     23|      return false;
  145|     23|    }
  146|  5.81k|    buffer_ = symbol_buffer_;
  147|  5.81k|    if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (147:9): [True: 116, False: 5.69k]
  ------------------
  148|    116|      return false;
  149|    116|    }
  150|  5.69k|    buffer_.Advance(traversal_size);
  151|  5.69k|    return true;
  152|  5.81k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder16DecodeStartFacesEv:
  154|  8.00k|  bool DecodeStartFaces() {
  155|       |    // Create a decoder that is set to the end of the encoded traversal data.
  156|  8.00k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  157|  8.00k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  8.00k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (157:9): [True: 1.05k, False: 6.94k]
  ------------------
  158|  1.05k|      start_face_buffer_ = buffer_;
  159|  1.05k|      uint64_t traversal_size;
  160|  1.05k|      if (!start_face_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (160:11): [True: 3, False: 1.05k]
  ------------------
  161|      3|        return false;
  162|      3|      }
  163|  1.05k|      buffer_ = start_face_buffer_;
  164|  1.05k|      if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (164:11): [True: 186, False: 867]
  ------------------
  165|    186|        return false;
  166|    186|      }
  167|    867|      buffer_.Advance(traversal_size);
  168|    867|      return true;
  169|  1.05k|    }
  170|  6.94k|#endif
  171|  6.94k|    return start_face_decoder_.StartDecoding(&buffer_);
  172|  8.00k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder20DecodeAttributeSeamsEv:
  174|  7.79k|  bool DecodeAttributeSeams() {
  175|       |    // Prepare attribute decoding.
  176|  7.79k|    if (num_attribute_data_ > 0) {
  ------------------
  |  Branch (176:9): [True: 5.16k, False: 2.63k]
  ------------------
  177|  5.16k|      attribute_connectivity_decoders_ = std::unique_ptr<BinaryDecoder[]>(
  178|  5.16k|          new BinaryDecoder[num_attribute_data_]);
  179|  14.5k|      for (int i = 0; i < num_attribute_data_; ++i) {
  ------------------
  |  Branch (179:23): [True: 9.38k, False: 5.12k]
  ------------------
  180|  9.38k|        if (!attribute_connectivity_decoders_[i].StartDecoding(&buffer_)) {
  ------------------
  |  Branch (180:13): [True: 34, False: 9.34k]
  ------------------
  181|     34|          return false;
  182|     34|        }
  183|  9.38k|      }
  184|  5.16k|    }
  185|  7.76k|    return true;
  186|  7.79k|  }

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

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

_ZN5draco21MeshSequentialDecoderC2Ev:
   27|  3.63k|MeshSequentialDecoder::MeshSequentialDecoder() {}
_ZN5draco21MeshSequentialDecoder18DecodeConnectivityEv:
   29|  3.34k|bool MeshSequentialDecoder::DecodeConnectivity() {
   30|  3.34k|  uint32_t num_faces;
   31|  3.34k|  uint32_t num_points;
   32|  3.34k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   33|  3.34k|  if (bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.34k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (33:7): [True: 591, False: 2.75k]
  ------------------
   34|    591|    if (!buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (34:9): [True: 0, False: 591]
  ------------------
   35|      0|      return false;
   36|      0|    }
   37|    591|    if (!buffer()->Decode(&num_points)) {
  ------------------
  |  Branch (37:9): [True: 0, False: 591]
  ------------------
   38|      0|      return false;
   39|      0|    }
   40|       |
   41|    591|  } else
   42|  2.75k|#endif
   43|  2.75k|  {
   44|  2.75k|    if (!DecodeVarint(&num_faces, buffer())) {
  ------------------
  |  Branch (44:9): [True: 0, False: 2.75k]
  ------------------
   45|      0|      return false;
   46|      0|    }
   47|  2.75k|    if (!DecodeVarint(&num_points, buffer())) {
  ------------------
  |  Branch (47:9): [True: 0, False: 2.75k]
  ------------------
   48|      0|      return false;
   49|      0|    }
   50|  2.75k|  }
   51|       |
   52|       |  // Check that num_faces and num_points are valid values.
   53|  3.34k|  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.34k|  if (faces_64 > 0xffffffff / 3) {
  ------------------
  |  Branch (55:7): [True: 0, False: 3.34k]
  ------------------
   56|      0|    return false;
   57|      0|  }
   58|  3.34k|  if (faces_64 > buffer()->remaining_size() / 3) {
  ------------------
  |  Branch (58:7): [True: 5, False: 3.33k]
  ------------------
   59|       |    // The number of faces is unreasonably high, because face indices do not
   60|       |    // fit in the remaining size of the buffer.
   61|      5|    return false;
   62|      5|  }
   63|  3.33k|  uint8_t connectivity_method;
   64|  3.33k|  if (!buffer()->Decode(&connectivity_method)) {
  ------------------
  |  Branch (64:7): [True: 0, False: 3.33k]
  ------------------
   65|      0|    return false;
   66|      0|  }
   67|  3.33k|  if (connectivity_method == 0) {
  ------------------
  |  Branch (67:7): [True: 2.38k, False: 952]
  ------------------
   68|  2.38k|    if (!DecodeAndDecompressIndices(num_faces)) {
  ------------------
  |  Branch (68:9): [True: 2.23k, False: 154]
  ------------------
   69|  2.23k|      return false;
   70|  2.23k|    }
   71|  2.38k|  } else {
   72|    952|    if (num_points < 256) {
  ------------------
  |  Branch (72:9): [True: 653, False: 299]
  ------------------
   73|       |      // Decode indices as uint8_t.
   74|  26.9k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (74:28): [True: 26.2k, False: 651]
  ------------------
   75|  26.2k|        Mesh::Face face;
   76|   105k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (76:25): [True: 78.8k, False: 26.2k]
  ------------------
   77|  78.8k|          uint8_t val;
   78|  78.8k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (78:15): [True: 2, False: 78.8k]
  ------------------
   79|      2|            return false;
   80|      2|          }
   81|  78.8k|          face[j] = val;
   82|  78.8k|        }
   83|  26.2k|        mesh()->AddFace(face);
   84|  26.2k|      }
   85|    653|    } else if (num_points < (1 << 16)) {
  ------------------
  |  Branch (85:16): [True: 205, False: 94]
  ------------------
   86|       |      // Decode indices as uint16_t.
   87|   346k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (87:28): [True: 345k, False: 186]
  ------------------
   88|   345k|        Mesh::Face face;
   89|  1.38M|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (89:25): [True: 1.03M, False: 345k]
  ------------------
   90|  1.03M|          uint16_t val;
   91|  1.03M|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (91:15): [True: 19, False: 1.03M]
  ------------------
   92|     19|            return false;
   93|     19|          }
   94|  1.03M|          face[j] = val;
   95|  1.03M|        }
   96|   345k|        mesh()->AddFace(face);
   97|   345k|      }
   98|    205|    } else if (num_points < (1 << 21) &&
  ------------------
  |  Branch (98:16): [True: 29, False: 65]
  ------------------
   99|     29|               bitstream_version() >= DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|     29|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (99:16): [True: 21, False: 8]
  ------------------
  100|       |      // Decode indices as uint32_t.
  101|    728|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (101:28): [True: 716, False: 12]
  ------------------
  102|    716|        Mesh::Face face;
  103|  2.84k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (103:25): [True: 2.13k, False: 707]
  ------------------
  104|  2.13k|          uint32_t val;
  105|  2.13k|          if (!DecodeVarint(&val, buffer())) {
  ------------------
  |  Branch (105:15): [True: 9, False: 2.12k]
  ------------------
  106|      9|            return false;
  107|      9|          }
  108|  2.12k|          face[j] = val;
  109|  2.12k|        }
  110|    707|        mesh()->AddFace(face);
  111|    707|      }
  112|     73|    } else {
  113|       |      // Decode faces as uint32_t (default).
  114|  21.6k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (114:28): [True: 21.5k, False: 54]
  ------------------
  115|  21.5k|        Mesh::Face face;
  116|  86.1k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (116:25): [True: 64.6k, False: 21.5k]
  ------------------
  117|  64.6k|          uint32_t val;
  118|  64.6k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (118:15): [True: 19, False: 64.6k]
  ------------------
  119|     19|            return false;
  120|     19|          }
  121|  64.6k|          face[j] = val;
  122|  64.6k|        }
  123|  21.5k|        mesh()->AddFace(face);
  124|  21.5k|      }
  125|     73|    }
  126|    952|  }
  127|  1.05k|  point_cloud()->set_num_points(num_points);
  128|  1.05k|  return true;
  129|  3.33k|}
_ZN5draco21MeshSequentialDecoder23CreateAttributesDecoderEi:
  131|  30.6k|bool MeshSequentialDecoder::CreateAttributesDecoder(int32_t att_decoder_id) {
  132|       |  // Always create the basic attribute decoder.
  133|  30.6k|  return SetAttributesDecoder(
  134|  30.6k|      att_decoder_id,
  135|  30.6k|      std::unique_ptr<AttributesDecoder>(
  136|  30.6k|          new SequentialAttributeDecodersController(
  137|  30.6k|              std::unique_ptr<PointsSequencer>(
  138|  30.6k|                  new LinearSequencer(point_cloud()->num_points())))));
  139|  30.6k|}
_ZN5draco21MeshSequentialDecoder26DecodeAndDecompressIndicesEj:
  141|  2.38k|bool MeshSequentialDecoder::DecodeAndDecompressIndices(uint32_t num_faces) {
  142|       |  // Get decoded indices differences that were encoded with an entropy code.
  143|  2.38k|  std::vector<uint32_t> indices_buffer(num_faces * 3);
  144|  2.38k|  if (!DecodeSymbols(num_faces * 3, 1, buffer(), indices_buffer.data())) {
  ------------------
  |  Branch (144:7): [True: 2.12k, False: 260]
  ------------------
  145|  2.12k|    return false;
  146|  2.12k|  }
  147|       |  // Reconstruct the indices from the differences.
  148|       |  // See MeshSequentialEncoder::CompressAndEncodeIndices() for more details.
  149|    260|  int32_t last_index_value = 0;  // This will always be >= 0.
  150|    260|  int vertex_index = 0;
  151|  3.90k|  for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (151:24): [True: 3.74k, False: 154]
  ------------------
  152|  3.74k|    Mesh::Face face;
  153|  14.7k|    for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (153:21): [True: 11.0k, False: 3.64k]
  ------------------
  154|  11.0k|      const uint32_t encoded_val = indices_buffer[vertex_index++];
  155|  11.0k|      int32_t index_diff = (encoded_val >> 1);
  156|  11.0k|      if (encoded_val & 1) {
  ------------------
  |  Branch (156:11): [True: 1.16k, False: 9.92k]
  ------------------
  157|  1.16k|        if (index_diff > last_index_value) {
  ------------------
  |  Branch (157:13): [True: 61, False: 1.10k]
  ------------------
  158|       |          // Subtracting index_diff would result in a negative index.
  159|     61|          return false;
  160|     61|        }
  161|  1.10k|        index_diff = -index_diff;
  162|  9.92k|      } else {
  163|  9.92k|        if (index_diff >
  ------------------
  |  Branch (163:13): [True: 45, False: 9.88k]
  ------------------
  164|  9.92k|            (std::numeric_limits<int32_t>::max() - last_index_value)) {
  165|       |          // Adding index_diff to last_index_value would overflow.
  166|     45|          return false;
  167|     45|        }
  168|  9.92k|      }
  169|  10.9k|      const int32_t index_value = index_diff + last_index_value;
  170|  10.9k|      face[j] = index_value;
  171|  10.9k|      last_index_value = index_value;
  172|  10.9k|    }
  173|  3.64k|    mesh()->AddFace(face);
  174|  3.64k|  }
  175|    154|  return true;
  176|    260|}

_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  1.68k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  1.85M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  1.85M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 1.79M, False: 56.6k]
  ------------------
   61|  1.79M|      return true;  // Already traversed.
   62|  1.79M|    }
   63|       |
   64|  56.6k|    corner_traversal_stack_.clear();
   65|  56.6k|    corner_traversal_stack_.push_back(corner_id);
   66|       |    // For the first face, check the remaining corners as they may not be
   67|       |    // processed yet.
   68|  56.6k|    const VertexIndex next_vert =
   69|  56.6k|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  56.6k|    const VertexIndex prev_vert =
   71|  56.6k|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  56.6k|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 56.6k]
  |  Branch (72:45): [True: 0, False: 56.6k]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  56.6k|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 55.8k, False: 832]
  ------------------
   76|  55.8k|      this->MarkVertexVisited(next_vert);
   77|  55.8k|      this->traversal_observer().OnNewVertexVisited(
   78|  55.8k|          next_vert, this->corner_table()->Next(corner_id));
   79|  55.8k|    }
   80|  56.6k|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 5.20k, False: 51.4k]
  ------------------
   81|  5.20k|      this->MarkVertexVisited(prev_vert);
   82|  5.20k|      this->traversal_observer().OnNewVertexVisited(
   83|  5.20k|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  5.20k|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|   125k|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 69.1k, False: 56.6k]
  ------------------
   88|       |      // Currently processed corner.
   89|  69.1k|      corner_id = corner_traversal_stack_.back();
   90|  69.1k|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  69.1k|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 69.1k]
  |  Branch (92:47): [True: 760, False: 68.3k]
  ------------------
   93|       |        // This face has been already traversed.
   94|    760|        corner_traversal_stack_.pop_back();
   95|    760|        continue;
   96|    760|      }
   97|  1.85M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 1.85M, Folded]
  ------------------
   98|  1.85M|        this->MarkFaceVisited(face_id);
   99|  1.85M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  1.85M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  1.85M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 1.85M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  1.85M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 912k, False: 942k]
  ------------------
  105|   912k|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|   912k|          this->MarkVertexVisited(vert_id);
  107|   912k|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|   912k|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 888k, False: 24.4k]
  ------------------
  109|   888k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   888k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   888k|            continue;
  112|   888k|          }
  113|   912k|        }
  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|   967k|        const CornerIndex right_corner_id =
  118|   967k|            this->corner_table()->GetRightCorner(corner_id);
  119|   967k|        const CornerIndex left_corner_id =
  120|   967k|            this->corner_table()->GetLeftCorner(corner_id);
  121|   967k|        const FaceIndex right_face_id(
  122|   967k|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 18.8k, False: 948k]
  ------------------
  123|   967k|                 ? kInvalidFaceIndex
  124|   967k|                 : FaceIndex(right_corner_id.value() / 3)));
  125|   967k|        const FaceIndex left_face_id(
  126|   967k|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 60.9k, False: 906k]
  ------------------
  127|   967k|                 ? kInvalidFaceIndex
  128|   967k|                 : FaceIndex(left_corner_id.value() / 3)));
  129|   967k|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 922k, False: 45.1k]
  ------------------
  130|       |          // Right face has been already visited.
  131|   922k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 62.1k, False: 860k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  62.1k|            corner_traversal_stack_.pop_back();
  134|  62.1k|            break;  // Break from the while (true) loop.
  135|   860k|          } else {
  136|       |            // Go to the left face.
  137|   860k|            corner_id = left_corner_id;
  138|   860k|            face_id = left_face_id;
  139|   860k|          }
  140|   922k|        } else {
  141|       |          // Right face was not visited.
  142|  45.1k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 38.8k, False: 6.20k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  38.8k|            corner_id = right_corner_id;
  145|  38.8k|            face_id = right_face_id;
  146|  38.8k|          } else {
  147|       |            // Both neighboring faces are unvisited, we need to visit both of
  148|       |            // them.
  149|       |
  150|       |            // Split the traversal.
  151|       |            // First make the top of the current corner stack point to the left
  152|       |            // face (this one will be processed second).
  153|  6.20k|            corner_traversal_stack_.back() = left_corner_id;
  154|       |            // Add a new corner to the top of the stack (right face needs to
  155|       |            // be traversed first).
  156|  6.20k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  6.20k|            break;
  159|  6.20k|          }
  160|  45.1k|        }
  161|   967k|      }
  162|  68.3k|    }
  163|  56.6k|    return true;
  164|  56.6k|  }
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  1.68k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  3.58k|  DepthFirstTraverser() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  2.20k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  4.33M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  4.33M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 1.56M, False: 2.76M]
  ------------------
   61|  1.56M|      return true;  // Already traversed.
   62|  1.56M|    }
   63|       |
   64|  2.76M|    corner_traversal_stack_.clear();
   65|  2.76M|    corner_traversal_stack_.push_back(corner_id);
   66|       |    // For the first face, check the remaining corners as they may not be
   67|       |    // processed yet.
   68|  2.76M|    const VertexIndex next_vert =
   69|  2.76M|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  2.76M|    const VertexIndex prev_vert =
   71|  2.76M|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  2.76M|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 2.76M]
  |  Branch (72:45): [True: 0, False: 2.76M]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  2.76M|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 2.76M, False: 1.32k]
  ------------------
   76|  2.76M|      this->MarkVertexVisited(next_vert);
   77|  2.76M|      this->traversal_observer().OnNewVertexVisited(
   78|  2.76M|          next_vert, this->corner_table()->Next(corner_id));
   79|  2.76M|    }
   80|  2.76M|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 2.73M, False: 34.2k]
  ------------------
   81|  2.73M|      this->MarkVertexVisited(prev_vert);
   82|  2.73M|      this->traversal_observer().OnNewVertexVisited(
   83|  2.73M|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  2.73M|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|  5.57M|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 2.81M, False: 2.76M]
  ------------------
   88|       |      // Currently processed corner.
   89|  2.81M|      corner_id = corner_traversal_stack_.back();
   90|  2.81M|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  2.81M|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 2.81M]
  |  Branch (92:47): [True: 4.93k, False: 2.80M]
  ------------------
   93|       |        // This face has been already traversed.
   94|  4.93k|        corner_traversal_stack_.pop_back();
   95|  4.93k|        continue;
   96|  4.93k|      }
   97|  4.33M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 4.33M, Folded]
  ------------------
   98|  4.33M|        this->MarkFaceVisited(face_id);
   99|  4.33M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  4.33M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  4.33M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 4.33M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  4.33M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 3.53M, False: 797k]
  ------------------
  105|  3.53M|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|  3.53M|          this->MarkVertexVisited(vert_id);
  107|  3.53M|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|  3.53M|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 750k, False: 2.78M]
  ------------------
  109|   750k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   750k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   750k|            continue;
  112|   750k|          }
  113|  3.53M|        }
  114|       |        // The current vertex has been already visited or it was on a boundary.
  115|       |        // We need to determine whether we can visit any of it's neighboring
  116|       |        // faces.
  117|  3.58M|        const CornerIndex right_corner_id =
  118|  3.58M|            this->corner_table()->GetRightCorner(corner_id);
  119|  3.58M|        const CornerIndex left_corner_id =
  120|  3.58M|            this->corner_table()->GetLeftCorner(corner_id);
  121|  3.58M|        const FaceIndex right_face_id(
  122|  3.58M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 2.76M, False: 819k]
  ------------------
  123|  3.58M|                 ? kInvalidFaceIndex
  124|  3.58M|                 : FaceIndex(right_corner_id.value() / 3)));
  125|  3.58M|        const FaceIndex left_face_id(
  126|  3.58M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 2.78M, False: 796k]
  ------------------
  127|  3.58M|                 ? kInvalidFaceIndex
  128|  3.58M|                 : FaceIndex(left_corner_id.value() / 3)));
  129|  3.58M|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 3.50M, False: 81.0k]
  ------------------
  130|       |          // Right face has been already visited.
  131|  3.50M|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 2.78M, False: 717k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  2.78M|            corner_traversal_stack_.pop_back();
  134|  2.78M|            break;  // Break from the while (true) loop.
  135|  2.78M|          } else {
  136|       |            // Go to the left face.
  137|   717k|            corner_id = left_corner_id;
  138|   717k|            face_id = left_face_id;
  139|   717k|          }
  140|  3.50M|        } else {
  141|       |          // Right face was not visited.
  142|  81.0k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 56.2k, False: 24.7k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  56.2k|            corner_id = right_corner_id;
  145|  56.2k|            face_id = right_face_id;
  146|  56.2k|          } 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|  24.7k|            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|  24.7k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  24.7k|            break;
  159|  24.7k|          }
  160|  81.0k|        }
  161|  3.58M|      }
  162|  2.80M|    }
  163|  2.76M|    return true;
  164|  2.76M|  }
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  2.20k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  4.56k|  DepthFirstTraverser() {}

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

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

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

_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  4.56k|  virtual ~TraverserBase() = default;
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  34.6M|  inline const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  18.5M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  18.5M|    return is_vertex_visited_[vert_id.value()];
   65|  18.5M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  2.51M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  2.51M|    is_vertex_visited_[vert_id.value()] = true;
   68|  2.51M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  7.39M|  inline TraversalObserverT &traversal_observer() {
   75|  7.39M|    return traversal_observer_;
   76|  7.39M|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  14.0M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  14.0M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 127k, False: 13.8M]
  ------------------
   47|   127k|      return true;  // Invalid faces are always considered as visited.
   48|   127k|    }
   49|  13.8M|    return is_face_visited_[face_id.value()];
   50|  14.0M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  4.88M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  4.88M|    is_face_visited_[face_id.value()] = true;
   62|  4.88M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  4.62k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  4.62k|  virtual ~TraverserBase() = default;
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  2.31k|                    TraversalObserver traversal_observer) {
   37|  2.31k|    corner_table_ = corner_table;
   38|  2.31k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  2.31k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  2.31k|    traversal_observer_ = traversal_observer;
   41|  2.31k|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  1.85M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  1.85M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 1.85M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  1.85M|    return is_face_visited_[corner_id.value() / 3];
   58|  1.85M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  32.3M|  inline const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  4.33M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  4.33M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 4.33M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  4.33M|    return is_face_visited_[corner_id.value() / 3];
   58|  4.33M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  9.86M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  9.86M|    return is_vertex_visited_[vert_id.value()];
   65|  9.86M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  9.03M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  9.03M|    is_vertex_visited_[vert_id.value()] = true;
   68|  9.03M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  13.3M|  inline TraversalObserverT &traversal_observer() {
   75|  13.3M|    return traversal_observer_;
   76|  13.3M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  9.98M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  9.98M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 5.55M, False: 4.43M]
  ------------------
   47|  5.55M|      return true;  // Invalid faces are always considered as visited.
   48|  5.55M|    }
   49|  4.43M|    return is_face_visited_[face_id.value()];
   50|  9.98M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  4.33M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  4.33M|    is_face_visited_[face_id.value()] = true;
   62|  4.33M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  4.56k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  2.28k|                    TraversalObserver traversal_observer) {
   37|  2.28k|    corner_table_ = corner_table;
   38|  2.28k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  2.28k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  2.28k|    traversal_observer_ = traversal_observer;
   41|  2.28k|  }

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

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

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

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

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

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

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

_ZN5draco13DecoderBuffer28DecodeLeastSignificantBits32EjPj:
   57|  55.3M|  bool DecodeLeastSignificantBits32(uint32_t nbits, uint32_t *out_value) {
   58|  55.3M|    if (!bit_decoder_active()) {
  ------------------
  |  Branch (58:9): [True: 0, False: 55.3M]
  ------------------
   59|      0|      return false;
   60|      0|    }
   61|  55.3M|    return bit_decoder_.GetBits(nbits, out_value);
   62|  55.3M|  }
_ZN5draco13DecoderBuffer6DecodeEPvm:
   76|  1.06G|  bool Decode(void *out_data, size_t size_to_decode) {
   77|  1.06G|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (77:9): [True: 522, False: 1.06G]
  ------------------
   78|    522|      return false;  // Buffer overflow.
   79|    522|    }
   80|  1.06G|    memcpy(out_data, (data_ + pos_), size_to_decode);
   81|  1.06G|    pos_ += size_to_decode;
   82|  1.06G|    return true;
   83|  1.06G|  }
_ZN5draco13DecoderBuffer7AdvanceEl:
  105|  31.8k|  void Advance(int64_t bytes) { pos_ += bytes; }
_ZN5draco13DecoderBuffer21set_bitstream_versionEt:
  111|  12.9k|  void set_bitstream_version(uint16_t version) { bitstream_version_ = version; }
_ZNK5draco13DecoderBuffer9data_headEv:
  114|  49.6k|  const char *data_head() const { return data_ + pos_; }
_ZNK5draco13DecoderBuffer14remaining_sizeEv:
  115|   299k|  int64_t remaining_size() const { return data_size_ - pos_; }
_ZNK5draco13DecoderBuffer12decoded_sizeEv:
  116|  8.14k|  int64_t decoded_size() const { return pos_; }
_ZNK5draco13DecoderBuffer18bit_decoder_activeEv:
  117|  55.3M|  bool bit_decoder_active() const { return bit_mode_; }
_ZNK5draco13DecoderBuffer17bitstream_versionEv:
  120|  8.48M|  uint16_t bitstream_version() const { return bitstream_version_; }
_ZN5draco13DecoderBuffer10BitDecoder5resetEPKvm:
  130|  10.1k|    inline void reset(const void *b, size_t s) {
  131|  10.1k|      bit_offset_ = 0;
  132|  10.1k|      bit_buffer_ = static_cast<const uint8_t *>(b);
  133|  10.1k|      bit_buffer_end_ = bit_buffer_ + s;
  134|  10.1k|    }
_ZNK5draco13DecoderBuffer10BitDecoder11BitsDecodedEv:
  137|  8.55k|    inline uint64_t BitsDecoded() const {
  138|  8.55k|      return static_cast<uint64_t>(bit_offset_);
  139|  8.55k|    }
_ZN5draco13DecoderBuffer10BitDecoder7GetBitsEjPj:
  160|  55.3M|    inline bool GetBits(uint32_t nbits, uint32_t *x) {
  161|  55.3M|      if (nbits > 32) {
  ------------------
  |  Branch (161:11): [True: 14, False: 55.3M]
  ------------------
  162|     14|        return false;
  163|     14|      }
  164|  55.3M|      uint32_t value = 0;
  165|   125M|      for (uint32_t bit = 0; bit < nbits; ++bit) {
  ------------------
  |  Branch (165:30): [True: 70.0M, False: 55.3M]
  ------------------
  166|  70.0M|        value |= GetBit() << bit;
  167|  70.0M|      }
  168|  55.3M|      *x = value;
  169|  55.3M|      return true;
  170|  55.3M|    }
_ZN5draco13DecoderBuffer10BitDecoder6GetBitEv:
  175|  70.0M|    inline int GetBit() {
  176|  70.0M|      const size_t off = bit_offset_;
  177|  70.0M|      const size_t byte_offset = off >> 3;
  178|  70.0M|      const int bit_shift = static_cast<int>(off & 0x7);
  179|  70.0M|      if (bit_buffer_ + byte_offset < bit_buffer_end_) {
  ------------------
  |  Branch (179:11): [True: 62.6M, False: 7.38M]
  ------------------
  180|  62.6M|        const int bit = (bit_buffer_[byte_offset] >> bit_shift) & 1;
  181|  62.6M|        bit_offset_ = off + 1;
  182|  62.6M|        return bit;
  183|  62.6M|      }
  184|  7.38M|      return 0;
  185|  70.0M|    }
_ZN5draco13DecoderBuffer6DecodeIhEEbPT_:
   68|  17.4M|  bool Decode(T *out_val) {
   69|  17.4M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 3.78k, False: 17.4M]
  ------------------
   70|  3.78k|      return false;
   71|  3.78k|    }
   72|  17.4M|    pos_ += sizeof(T);
   73|  17.4M|    return true;
   74|  17.4M|  }
_ZN5draco13DecoderBuffer4PeekIhEEbPT_:
   87|  17.4M|  bool Peek(T *out_val) {
   88|  17.4M|    const size_t size_to_decode = sizeof(T);
   89|  17.4M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 3.78k, False: 17.4M]
  ------------------
   90|  3.78k|      return false;  // Buffer overflow.
   91|  3.78k|    }
   92|  17.4M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  17.4M|    return true;
   94|  17.4M|  }
_ZN5draco13DecoderBuffer6DecodeIiEEbPT_:
   68|  14.5k|  bool Decode(T *out_val) {
   69|  14.5k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 141, False: 14.4k]
  ------------------
   70|    141|      return false;
   71|    141|    }
   72|  14.4k|    pos_ += sizeof(T);
   73|  14.4k|    return true;
   74|  14.5k|  }
_ZN5draco13DecoderBuffer4PeekIiEEbPT_:
   87|  14.5k|  bool Peek(T *out_val) {
   88|  14.5k|    const size_t size_to_decode = sizeof(T);
   89|  14.5k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 141, False: 14.4k]
  ------------------
   90|    141|      return false;  // Buffer overflow.
   91|    141|    }
   92|  14.4k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  14.4k|    return true;
   94|  14.5k|  }
_ZN5draco13DecoderBuffer6DecodeIjEEbPT_:
   68|  1.10M|  bool Decode(T *out_val) {
   69|  1.10M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 189, False: 1.10M]
  ------------------
   70|    189|      return false;
   71|    189|    }
   72|  1.10M|    pos_ += sizeof(T);
   73|  1.10M|    return true;
   74|  1.10M|  }
_ZN5draco13DecoderBuffer4PeekIjEEbPT_:
   87|  1.10M|  bool Peek(T *out_val) {
   88|  1.10M|    const size_t size_to_decode = sizeof(T);
   89|  1.10M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 189, False: 1.10M]
  ------------------
   90|    189|      return false;  // Buffer overflow.
   91|    189|    }
   92|  1.10M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.10M|    return true;
   94|  1.10M|  }
_ZN5draco13DecoderBuffer6DecodeIaEEbPT_:
   68|  28.6k|  bool Decode(T *out_val) {
   69|  28.6k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 345, False: 28.2k]
  ------------------
   70|    345|      return false;
   71|    345|    }
   72|  28.2k|    pos_ += sizeof(T);
   73|  28.2k|    return true;
   74|  28.6k|  }
_ZN5draco13DecoderBuffer4PeekIaEEbPT_:
   87|  28.6k|  bool Peek(T *out_val) {
   88|  28.6k|    const size_t size_to_decode = sizeof(T);
   89|  28.6k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 345, False: 28.2k]
  ------------------
   90|    345|      return false;  // Buffer overflow.
   91|    345|    }
   92|  28.2k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  28.2k|    return true;
   94|  28.6k|  }
_ZN5draco13DecoderBuffer6DecodeINS_13HoleEventDataEEEbPT_:
   68|  1.47M|  bool Decode(T *out_val) {
   69|  1.47M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 152, False: 1.47M]
  ------------------
   70|    152|      return false;
   71|    152|    }
   72|  1.47M|    pos_ += sizeof(T);
   73|  1.47M|    return true;
   74|  1.47M|  }
_ZN5draco13DecoderBuffer4PeekINS_13HoleEventDataEEEbPT_:
   87|  1.47M|  bool Peek(T *out_val) {
   88|  1.47M|    const size_t size_to_decode = sizeof(T);
   89|  1.47M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 152, False: 1.47M]
  ------------------
   90|    152|      return false;  // Buffer overflow.
   91|    152|    }
   92|  1.47M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.47M|    return true;
   94|  1.47M|  }
_ZN5draco13DecoderBuffer6DecodeItEEbPT_:
   68|  1.06M|  bool Decode(T *out_val) {
   69|  1.06M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 23, False: 1.06M]
  ------------------
   70|     23|      return false;
   71|     23|    }
   72|  1.06M|    pos_ += sizeof(T);
   73|  1.06M|    return true;
   74|  1.06M|  }
_ZN5draco13DecoderBuffer4PeekItEEbPT_:
   87|  1.06M|  bool Peek(T *out_val) {
   88|  1.06M|    const size_t size_to_decode = sizeof(T);
   89|  1.06M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 23, False: 1.06M]
  ------------------
   90|     23|      return false;  // Buffer overflow.
   91|     23|    }
   92|  1.06M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.06M|    return true;
   94|  1.06M|  }
_ZN5draco13DecoderBuffer6DecodeImEEbPT_:
   68|  2.68k|  bool Decode(T *out_val) {
   69|  2.68k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 22, False: 2.66k]
  ------------------
   70|     22|      return false;
   71|     22|    }
   72|  2.66k|    pos_ += sizeof(T);
   73|  2.66k|    return true;
   74|  2.68k|  }
_ZN5draco13DecoderBuffer4PeekImEEbPT_:
   87|  2.68k|  bool Peek(T *out_val) {
   88|  2.68k|    const size_t size_to_decode = sizeof(T);
   89|  2.68k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 22, False: 2.66k]
  ------------------
   90|     22|      return false;  // Buffer overflow.
   91|     22|    }
   92|  2.66k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  2.66k|    return true;
   94|  2.68k|  }
_ZN5draco13DecoderBuffer6DecodeIfEEbPT_:
   68|    248|  bool Decode(T *out_val) {
   69|    248|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 26, False: 222]
  ------------------
   70|     26|      return false;
   71|     26|    }
   72|    222|    pos_ += sizeof(T);
   73|    222|    return true;
   74|    248|  }
_ZN5draco13DecoderBuffer4PeekIfEEbPT_:
   87|    248|  bool Peek(T *out_val) {
   88|    248|    const size_t size_to_decode = sizeof(T);
   89|    248|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 26, False: 222]
  ------------------
   90|     26|      return false;  // Buffer overflow.
   91|     26|    }
   92|    222|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|    222|    return true;
   94|    248|  }

_ZNK5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EE5valueEv:
   73|   108M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EE5valueEv:
   73|   116M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEgeERKj:
   98|  12.8M|  constexpr bool operator>=(const ValueTypeT &val) const {
   99|  12.8M|    return value_ >= val;
  100|  12.8M|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EE5valueEv:
   73|   345M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EE5valueEv:
   73|  4.48G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKj:
   90|  28.6M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEaSERKS2_:
  151|   106M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|   106M|    value_ = i.value_;
  153|   106M|    return *this;
  154|   106M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKS2_:
  151|   303M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|   303M|    value_ = i.value_;
  153|   303M|    return *this;
  154|   303M|  }
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEppEv:
  102|  28.6M|  inline ThisIndexType &operator++() {
  103|  28.6M|    ++value_;
  104|  28.6M|    return *this;
  105|  28.6M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEeqERKS2_:
   75|  3.26G|  constexpr bool operator==(const IndexType &i) const {
   76|  3.26G|    return value_ == i.value_;
   77|  3.26G|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EE5valueEv:
   73|  1.33G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKS2_:
   87|  15.6k|  constexpr bool operator<(const IndexType &i) const {
   88|  15.6k|    return value_ < i.value_;
   89|  15.6k|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEeqERKS2_:
   75|   180M|  constexpr bool operator==(const IndexType &i) const {
   76|   180M|    return value_ == i.value_;
   77|   180M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEmiERKj:
  131|   210M|  constexpr ThisIndexType operator-(const ValueTypeT &val) const {
  132|   210M|    return ThisIndexType(value_ - val);
  133|   210M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEplERKj:
  125|  1.08G|  constexpr ThisIndexType operator+(const ValueTypeT &val) const {
  126|  1.08G|    return ThisIndexType(value_ + val);
  127|  1.08G|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEeqERKS2_:
   75|  24.0M|  constexpr bool operator==(const IndexType &i) const {
   76|  24.0M|    return value_ == i.value_;
   77|  24.0M|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEneERKS2_:
   81|   371M|  constexpr bool operator!=(const IndexType &i) const {
   82|   371M|    return value_ != i.value_;
   83|   371M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEneERKS2_:
   81|   467M|  constexpr bool operator!=(const IndexType &i) const {
   82|   467M|    return value_ != i.value_;
   83|   467M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEppEv:
  102|   729M|  inline ThisIndexType &operator++() {
  103|   729M|    ++value_;
  104|   729M|    return *this;
  105|   729M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEaSERKS2_:
  151|   642M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|   642M|    value_ = i.value_;
  153|   642M|    return *this;
  154|   642M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEaSERKS2_:
  151|  1.55G|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  1.55G|    value_ = i.value_;
  153|  1.55G|    return *this;
  154|  1.55G|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEgeERKj:
   98|  47.3M|  constexpr bool operator>=(const ValueTypeT &val) const {
   99|  47.3M|    return value_ >= val;
  100|  47.3M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEltERKj:
   90|  10.9M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ej:
   71|  1.56G|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2ERKS2_:
   70|  31.3G|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2Ej:
   71|   270M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2ERKS2_:
   70|  24.4G|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ev:
   69|   355M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEplERKj:
  125|  27.5M|  constexpr ThisIndexType operator+(const ValueTypeT &val) const {
  126|  27.5M|    return ThisIndexType(value_ + val);
  127|  27.5M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2Ej:
   71|   231M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKS2_:
   87|  30.4M|  constexpr bool operator<(const IndexType &i) const {
   88|  30.4M|    return value_ < i.value_;
   89|  30.4M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2ERKS2_:
   70|   259M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ev:
   69|   305M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2ERKS2_:
   70|  76.7M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2Ej:
   71|  82.6M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2ERKS2_:
   70|   320M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEaSERKS2_:
  151|  6.33M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  6.33M|    value_ = i.value_;
  153|  6.33M|    return *this;
  154|  6.33M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEpLERKj:
  139|  10.9M|  inline ThisIndexType operator+=(const ValueTypeT &val) {
  140|  10.9M|    value_ += val;
  141|  10.9M|    return *this;
  142|  10.9M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKj:
  155|  39.6M|  inline ThisIndexType &operator=(const ValueTypeT &val) {
  156|  39.6M|    value_ = val;
  157|  39.6M|    return *this;
  158|  39.6M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ej:
   71|   265M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKj:
   90|  7.75M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEppEv:
  102|  7.75M|  inline ThisIndexType &operator++() {
  103|  7.75M|    ++value_;
  104|  7.75M|    return *this;
  105|  7.75M|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEltERKj:
   90|  25.6M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEppEv:
  102|  25.6M|  inline ThisIndexType &operator++() {
  103|  25.6M|    ++value_;
  104|  25.6M|    return *this;
  105|  25.6M|  }

_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   73|  43.7M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  43.7M|    return vector_[index.value()];
   75|  43.7M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE4sizeEv:
   59|  25.6M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE5clearEv:
   48|  14.0k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE6resizeEmRKS5_:
   51|  19.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|  73.0M|  inline reference operator[](const IndexTypeT &index) {
   71|  73.0M|    return vector_[index.value()];
   72|  73.0M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE9push_backERKS8_:
   62|   398k|  void push_back(const ValueTypeT &val) { vector_.push_back(val); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE4sizeEv:
   59|  25.6M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE6resizeEmRKS8_:
   51|  5.02k|  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|  12.8M|  inline reference operator[](const IndexTypeT &index) {
   71|  12.8M|    return vector_[index.value()];
   72|  12.8M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEixERKS3_:
   73|  27.3M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  27.3M|    return vector_[index.value()];
   75|  27.3M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE4sizeEv:
   59|   296M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE4sizeEv:
   59|  14.0M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   73|   428M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|   428M|    return vector_[index.value()];
   75|   428M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   73|  1.19G|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  1.19G|    return vector_[index.value()];
   75|  1.19G|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   70|   599M|  inline reference operator[](const IndexTypeT &index) {
   71|   599M|    return vector_[index.value()];
   72|   599M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   73|  85.1M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  85.1M|    return vector_[index.value()];
   75|  85.1M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   70|   504M|  inline reference operator[](const IndexTypeT &index) {
   71|   504M|    return vector_[index.value()];
   72|   504M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE9push_backERKS5_:
   62|   155M|  void push_back(const ValueTypeT &val) { vector_.push_back(val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   70|   342M|  inline reference operator[](const IndexTypeT &index) {
   71|   342M|    return vector_[index.value()];
   72|   342M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE6resizeEmRKi:
   51|  2.96k|  void resize(size_t size, const ValueTypeT &val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEixERKS3_:
   70|   301M|  inline reference operator[](const IndexTypeT &index) {
   71|   301M|    return vector_[index.value()];
   72|   301M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEC2Ev:
   39|  64.1k|  IndexTypeVector() {}
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4sizeEv:
   59|  3.02M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaEC2Ev:
   39|  60.1k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEC2Ev:
   39|  8.74k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EC2Ev:
   39|  8.74k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEC2Ev:
   39|  8.74k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_EC2Ev:
   39|  8.74k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE5clearEv:
   48|  17.0k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4swapERS4_:
   55|  17.0k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT> &arg) {
   56|  17.0k|    vector_.swap(arg.vector_);
   57|  17.0k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE5clearEv:
   48|  17.0k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE4swapERS4_:
   55|  17.0k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT> &arg) {
   56|  17.0k|    vector_.swap(arg.vector_);
   57|  17.0k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE6assignEmRKS5_:
   52|  8.74k|  void assign(size_t size, const ValueTypeT &val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_E6assignEmRKS3_:
   52|  8.74k|  void assign(size_t size, const ValueTypeT &val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE7reserveEm:
   49|  8.74k|  void reserve(size_t size) { vector_.reserve(size); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEC2Ev:
   39|  12.9k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEC2Ev:
   39|  50.6k|  IndexTypeVector() {}

_ZN5draco14DataTypeLengthENS_8DataTypeE:
   19|  85.5k|int32_t DataTypeLength(DataType dt) {
   20|  85.5k|  switch (dt) {
   21|  38.8k|    case DT_INT8:
  ------------------
  |  Branch (21:5): [True: 38.8k, False: 46.7k]
  ------------------
   22|  41.1k|    case DT_UINT8:
  ------------------
  |  Branch (22:5): [True: 2.37k, False: 83.1k]
  ------------------
   23|  41.1k|      return 1;
   24|  2.20k|    case DT_INT16:
  ------------------
  |  Branch (24:5): [True: 2.20k, False: 83.3k]
  ------------------
   25|  2.52k|    case DT_UINT16:
  ------------------
  |  Branch (25:5): [True: 315, False: 85.2k]
  ------------------
   26|  2.52k|      return 2;
   27|  34.4k|    case DT_INT32:
  ------------------
  |  Branch (27:5): [True: 34.4k, False: 51.1k]
  ------------------
   28|  35.3k|    case DT_UINT32:
  ------------------
  |  Branch (28:5): [True: 934, False: 84.6k]
  ------------------
   29|  35.3k|      return 4;
   30|    524|    case DT_INT64:
  ------------------
  |  Branch (30:5): [True: 524, False: 85.0k]
  ------------------
   31|  1.01k|    case DT_UINT64:
  ------------------
  |  Branch (31:5): [True: 493, False: 85.0k]
  ------------------
   32|  1.01k|      return 8;
   33|  4.77k|    case DT_FLOAT32:
  ------------------
  |  Branch (33:5): [True: 4.77k, False: 80.7k]
  ------------------
   34|  4.77k|      return 4;
   35|    226|    case DT_FLOAT64:
  ------------------
  |  Branch (35:5): [True: 226, False: 85.3k]
  ------------------
   36|    226|      return 8;
   37|    489|    case DT_BOOL:
  ------------------
  |  Branch (37:5): [True: 489, False: 85.0k]
  ------------------
   38|    489|      return 1;
   39|      0|    default:
  ------------------
  |  Branch (39:5): [True: 0, False: 85.5k]
  ------------------
   40|      0|      return -1;
   41|  85.5k|  }
   42|  85.5k|}

_ZN5draco7IntSqrtEm:
   31|  2.77k|inline uint64_t IntSqrt(uint64_t number) {
   32|  2.77k|  if (number == 0) {
  ------------------
  |  Branch (32:7): [True: 197, False: 2.57k]
  ------------------
   33|    197|    return 0;
   34|    197|  }
   35|       |  // First estimate good initial value of the square root as log2(number).
   36|  2.57k|  uint64_t act_number = number;
   37|  2.57k|  uint64_t square_root = 1;
   38|  47.9k|  while (act_number >= 2) {
  ------------------
  |  Branch (38:10): [True: 45.3k, False: 2.57k]
  ------------------
   39|       |    // Double the square root until |square_root * square_root > number|.
   40|  45.3k|    square_root *= 2;
   41|  45.3k|    act_number /= 4;
   42|  45.3k|  }
   43|       |  // Perform Newton's (or Babylonian) method to find the true floor(sqrt()).
   44|  6.56k|  do {
   45|       |    // New |square_root| estimate is computed as the average between
   46|       |    // |square_root| and |number / square_root|.
   47|  6.56k|    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|  6.56k|  } while (square_root * square_root > number);
  ------------------
  |  Branch (53:12): [True: 3.98k, False: 2.57k]
  ------------------
   54|  2.57k|  return square_root;
   55|  2.77k|}
_ZN5draco13AddAsUnsignedIiTnPNSt3__19enable_ifIXaasr3std11is_integralIT_EE5valuesr3std9is_signedIS3_EE5valueEvE4typeELPv0EEES3_S3_S3_:
   63|  68.6M|inline DataTypeT AddAsUnsigned(DataTypeT a, DataTypeT b) {
   64|  68.6M|  typedef typename std::make_unsigned<DataTypeT>::type DataTypeUT;
   65|  68.6M|  return static_cast<DataTypeT>(static_cast<DataTypeUT>(a) +
   66|  68.6M|                                static_cast<DataTypeUT>(b));
   67|  68.6M|}

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

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

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

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

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

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

_ZN5draco12DecodeVarintIjEEbPT_PNS_13DecoderBufferE:
   63|  1.43M|bool DecodeVarint(IntTypeT *out_val, DecoderBuffer *buffer) {
   64|  1.43M|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 1.43M, Folded]
  ------------------
   65|  1.43M|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 1.38k, False: 1.43M]
  ------------------
   66|  1.38k|      return false;
   67|  1.38k|    }
   68|  1.43M|  } else {
   69|       |    // IntTypeT is a signed value. Decode the symbol and convert to signed.
   70|      0|    typename std::make_unsigned<IntTypeT>::type symbol;
   71|      0|    if (!DecodeVarintUnsigned(1, &symbol, buffer)) {
  ------------------
  |  Branch (71:9): [True: 0, False: 0]
  ------------------
   72|      0|      return false;
   73|      0|    }
   74|      0|    *out_val = ConvertSymbolToSignedInt(symbol);
   75|      0|  }
   76|  1.43M|  return true;
   77|  1.43M|}
mesh_edgebreaker_decoder_impl.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  1.10M|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  1.10M|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  1.10M|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 126, False: 1.10M]
  ------------------
   33|    126|    return false;
   34|    126|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  1.10M|  uint8_t in;
   39|  1.10M|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 864, False: 1.10M]
  ------------------
   40|    864|    return false;
   41|    864|  }
   42|  1.10M|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 25.3k, False: 1.07M]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  25.3k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 728, False: 24.6k]
  ------------------
   45|    728|      return false;
   46|    728|    }
   47|       |    // Append decoded info from this byte.
   48|  24.6k|    *out_val <<= 7;
   49|  24.6k|    *out_val |= in & ((1 << 7) - 1);
   50|  1.07M|  } else {
   51|       |    // Last byte reached
   52|  1.07M|    *out_val = in;
   53|  1.07M|  }
   54|  1.10M|  return true;
   55|  1.10M|}
mesh_sequential_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  8.43k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  8.43k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  8.43k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 2, False: 8.42k]
  ------------------
   33|      2|    return false;
   34|      2|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  8.42k|  uint8_t in;
   39|  8.42k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 7, False: 8.42k]
  ------------------
   40|      7|    return false;
   41|      7|  }
   42|  8.42k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 790, False: 7.63k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    790|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 13, False: 777]
  ------------------
   45|     13|      return false;
   46|     13|    }
   47|       |    // Append decoded info from this byte.
   48|    777|    *out_val <<= 7;
   49|    777|    *out_val |= in & ((1 << 7) - 1);
   50|  7.63k|  } else {
   51|       |    // Last byte reached
   52|  7.63k|    *out_val = in;
   53|  7.63k|  }
   54|  8.40k|  return true;
   55|  8.42k|}
_ZN5draco12DecodeVarintImEEbPT_PNS_13DecoderBufferE:
   63|  8.71k|bool DecodeVarint(IntTypeT *out_val, DecoderBuffer *buffer) {
   64|  8.71k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 8.71k, Folded]
  ------------------
   65|  8.71k|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 130, False: 8.58k]
  ------------------
   66|    130|      return false;
   67|    130|    }
   68|  8.71k|  } 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|  8.58k|  return true;
   77|  8.71k|}
decoder_buffer.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  4.84k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  4.84k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  4.84k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 0, False: 4.84k]
  ------------------
   33|      0|    return false;
   34|      0|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  4.84k|  uint8_t in;
   39|  4.84k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 23, False: 4.81k]
  ------------------
   40|     23|    return false;
   41|     23|  }
   42|  4.81k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 146, False: 4.67k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    146|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 1, False: 145]
  ------------------
   45|      1|      return false;
   46|      1|    }
   47|       |    // Append decoded info from this byte.
   48|    145|    *out_val <<= 7;
   49|    145|    *out_val |= in & ((1 << 7) - 1);
   50|  4.67k|  } else {
   51|       |    // Last byte reached
   52|  4.67k|    *out_val = in;
   53|  4.67k|  }
   54|  4.81k|  return true;
   55|  4.81k|}
metadata_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   273k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|   273k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   273k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 19, False: 273k]
  ------------------
   33|     19|    return false;
   34|     19|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   273k|  uint8_t in;
   39|   273k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 73, False: 273k]
  ------------------
   40|     73|    return false;
   41|     73|  }
   42|   273k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.54k, False: 271k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.54k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 109, False: 1.43k]
  ------------------
   45|    109|      return false;
   46|    109|    }
   47|       |    // Append decoded info from this byte.
   48|  1.43k|    *out_val <<= 7;
   49|  1.43k|    *out_val |= in & ((1 << 7) - 1);
   50|   271k|  } else {
   51|       |    // Last byte reached
   52|   271k|    *out_val = in;
   53|   271k|  }
   54|   273k|  return true;
   55|   273k|}
sequential_integer_attribute_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  4.36k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  4.36k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  4.36k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 2, False: 4.36k]
  ------------------
   33|      2|    return false;
   34|      2|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  4.36k|  uint8_t in;
   39|  4.36k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 34, False: 4.33k]
  ------------------
   40|     34|    return false;
   41|     34|  }
   42|  4.33k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 784, False: 3.54k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    784|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 34, False: 750]
  ------------------
   45|     34|      return false;
   46|     34|    }
   47|       |    // Append decoded info from this byte.
   48|    750|    *out_val <<= 7;
   49|    750|    *out_val |= in & ((1 << 7) - 1);
   50|  3.54k|  } else {
   51|       |    // Last byte reached
   52|  3.54k|    *out_val = in;
   53|  3.54k|  }
   54|  4.29k|  return true;
   55|  4.33k|}
rans_bit_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  20.4k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  20.4k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  20.4k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 4, False: 20.4k]
  ------------------
   33|      4|    return false;
   34|      4|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  20.4k|  uint8_t in;
   39|  20.4k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 24, False: 20.4k]
  ------------------
   40|     24|    return false;
   41|     24|  }
   42|  20.4k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 270, False: 20.1k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    270|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 22, False: 248]
  ------------------
   45|     22|      return false;
   46|     22|    }
   47|       |    // Append decoded info from this byte.
   48|    248|    *out_val <<= 7;
   49|    248|    *out_val |= in & ((1 << 7) - 1);
   50|  20.1k|  } else {
   51|       |    // Last byte reached
   52|  20.1k|    *out_val = in;
   53|  20.1k|  }
   54|  20.4k|  return true;
   55|  20.4k|}
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: 124, False: 10.0k]
  ------------------
   33|    124|    return false;
   34|    124|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  10.0k|  uint8_t in;
   39|  10.0k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 72, False: 10.0k]
  ------------------
   40|     72|    return false;
   41|     72|  }
   42|  10.0k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 2.61k, False: 7.40k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  2.61k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 650, False: 1.96k]
  ------------------
   45|    650|      return false;
   46|    650|    }
   47|       |    // Append decoded info from this byte.
   48|  1.96k|    *out_val <<= 7;
   49|  1.96k|    *out_val |= in & ((1 << 7) - 1);
   50|  7.40k|  } else {
   51|       |    // Last byte reached
   52|  7.40k|    *out_val = in;
   53|  7.40k|  }
   54|  9.36k|  return true;
   55|  10.0k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  8.48k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  8.48k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  8.48k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 60, False: 8.42k]
  ------------------
   33|     60|    return false;
   34|     60|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  8.42k|  uint8_t in;
   39|  8.42k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 47, False: 8.37k]
  ------------------
   40|     47|    return false;
   41|     47|  }
   42|  8.37k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 4.46k, False: 3.91k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  4.46k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 701, False: 3.76k]
  ------------------
   45|    701|      return false;
   46|    701|    }
   47|       |    // Append decoded info from this byte.
   48|  3.76k|    *out_val <<= 7;
   49|  3.76k|    *out_val |= in & ((1 << 7) - 1);
   50|  3.91k|  } else {
   51|       |    // Last byte reached
   52|  3.91k|    *out_val = in;
   53|  3.91k|  }
   54|  7.67k|  return true;
   55|  8.37k|}
attributes_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  49.6k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  49.6k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  49.6k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 6, False: 49.6k]
  ------------------
   33|      6|    return false;
   34|      6|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  49.6k|  uint8_t in;
   39|  49.6k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 28, False: 49.6k]
  ------------------
   40|     28|    return false;
   41|     28|  }
   42|  49.6k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.57k, False: 48.0k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.57k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 35, False: 1.53k]
  ------------------
   45|     35|      return false;
   46|     35|    }
   47|       |    // Append decoded info from this byte.
   48|  1.53k|    *out_val <<= 7;
   49|  1.53k|    *out_val |= in & ((1 << 7) - 1);
   50|  48.0k|  } else {
   51|       |    // Last byte reached
   52|  48.0k|    *out_val = in;
   53|  48.0k|  }
   54|  49.5k|  return true;
   55|  49.6k|}

_ZNK5draco7VectorDIfLi3EEixEi:
  113|   351k|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIfLi3EEixEi:
  112|   460k|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIfLi3EEmiERKS1_:
  137|  38.4k|  Self operator-(const Self &o) const {
  138|  38.4k|    Self ret;
  139|   153k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 115k, False: 38.4k]
  ------------------
  140|   115k|      ret[i] = (*this)[i] - o[i];
  141|   115k|    }
  142|  38.4k|    return ret;
  143|  38.4k|  }
_ZN5draco7VectorDIfLi3EEC2Ev:
   40|  95.7k|  VectorD() {
   41|   383k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 287k, False: 95.7k]
  ------------------
   42|   287k|      (*this)[i] = Scalar(0);
   43|   287k|    }
   44|  95.7k|  }
_ZNK5draco7VectorDIlLi3EEixEi:
  113|   182M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIlLi3EEmiERKS1_:
  137|  15.1M|  Self operator-(const Self &o) const {
  138|  15.1M|    Self ret;
  139|  60.5M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 45.4M, False: 15.1M]
  ------------------
  140|  45.4M|      ret[i] = (*this)[i] - o[i];
  141|  45.4M|    }
  142|  15.1M|    return ret;
  143|  15.1M|  }
_ZN5draco12CrossProductIlEENS_7VectorDIT_Li3EEERKS3_S5_:
  318|  7.54M|                                 const VectorD<ScalarT, 3> &v) {
  319|       |  // Preventing accidental use with uint32_t and the like.
  320|  7.54M|  static_assert(std::is_signed<ScalarT>::value,
  321|  7.54M|                "ScalarT must be a signed type. ");
  322|  7.54M|  VectorD<ScalarT, 3> r;
  323|  7.54M|  r[0] = (u[1] * v[2]) - (u[2] * v[1]);
  324|  7.54M|  r[1] = (u[2] * v[0]) - (u[0] * v[2]);
  325|  7.54M|  r[2] = (u[0] * v[1]) - (u[1] * v[0]);
  326|  7.54M|  return r;
  327|  7.54M|}
_ZN5draco7VectorDIlLi3EE4dataEv:
  282|  7.54M|  Scalar *data() { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE4dataEv:
  283|  7.54M|  const Scalar *data() const { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE6AbsSumEv:
  237|  2.87M|  Scalar AbsSum() const {
  238|  2.87M|    Scalar result(0);
  239|  11.4M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (239:21): [True: 8.62M, False: 2.86M]
  ------------------
  240|  8.62M|      Scalar next_value = std::abs(v_[i]);
  241|  8.62M|      if (result > std::numeric_limits<Scalar>::max() - next_value) {
  ------------------
  |  Branch (241:11): [True: 13.0k, False: 8.61M]
  ------------------
  242|       |        // Return the max if adding would have caused an overflow.
  243|  13.0k|        return std::numeric_limits<Scalar>::max();
  244|  13.0k|      }
  245|  8.61M|      result += next_value;
  246|  8.61M|    }
  247|  2.86M|    return result;
  248|  2.87M|  }
_ZNK5draco7VectorDIlLi3EEdvERKl:
  182|   206k|  Self operator/(const Scalar &o) const {
  183|   206k|    Self ret;
  184|   827k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (184:21): [True: 620k, False: 206k]
  ------------------
  185|   620k|      ret[i] = (*this)[i] / o;
  186|   620k|    }
  187|   206k|    return ret;
  188|   206k|  }
_ZN5draco7VectorDIlLi3EEixEi:
  112|   226M|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEixEi:
  112|  11.5M|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EE4dataEv:
  282|  8.63M|  Scalar *data() { return &(v_[0]); }
_ZNK5draco7VectorDIiLi3EEngEv:
  120|  1.92M|  Self operator-() const {
  121|  1.92M|    Self ret;
  122|  7.71M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (122:21): [True: 5.78M, False: 1.92M]
  ------------------
  123|  5.78M|      ret[i] = -(*this)[i];
  124|  5.78M|    }
  125|  1.92M|    return ret;
  126|  1.92M|  }
_ZNK5draco7VectorDIiLi3EEixEi:
  113|  5.78M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEmiERKS1_:
  137|  1.27M|  Self operator-(const Self &o) const {
  138|  1.27M|    Self ret;
  139|  3.81M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 2.54M, False: 1.27M]
  ------------------
  140|  2.54M|      ret[i] = (*this)[i] - o[i];
  141|  2.54M|    }
  142|  1.27M|    return ret;
  143|  1.27M|  }
_ZN5draco7VectorDIjLi2EEixEi:
  112|  15.2M|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEixEi:
  113|  22.8M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIiLi2EEixEi:
  112|  53.9M|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEplERKS1_:
  129|  2.54M|  Self operator+(const Self &o) const {
  130|  2.54M|    Self ret;
  131|  7.63M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 5.08M, False: 2.54M]
  ------------------
  132|  5.08M|      ret[i] = (*this)[i] + o[i];
  133|  5.08M|    }
  134|  2.54M|    return ret;
  135|  2.54M|  }
_ZNK5draco7VectorDIiLi2EEixEi:
  113|  49.6M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIiLi2EEmiERKS1_:
  137|  1.53M|  Self operator-(const Self &o) const {
  138|  1.53M|    Self ret;
  139|  4.60M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 3.06M, False: 1.53M]
  ------------------
  140|  3.06M|      ret[i] = (*this)[i] - o[i];
  141|  3.06M|    }
  142|  1.53M|    return ret;
  143|  1.53M|  }
_ZNK5draco7VectorDIiLi2EEplERKS1_:
  129|  1.53M|  Self operator+(const Self &o) const {
  130|  1.53M|    Self ret;
  131|  4.60M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 3.06M, False: 1.53M]
  ------------------
  132|  3.06M|      ret[i] = (*this)[i] + o[i];
  133|  3.06M|    }
  134|  1.53M|    return ret;
  135|  1.53M|  }
_ZNK5draco7VectorDIfLi2EEeqERKS1_:
  206|   421k|  bool operator==(const Self &o) const {
  207|  1.23M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (207:21): [True: 827k, False: 402k]
  ------------------
  208|   827k|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (208:11): [True: 18.9k, False: 808k]
  ------------------
  209|  18.9k|        return false;
  210|  18.9k|      }
  211|   827k|    }
  212|   402k|    return true;
  213|   421k|  }
_ZNK5draco7VectorDIfLi2EEixEi:
  113|  4.90M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIfLi3EE11SquaredNormEv:
  234|  19.4k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIfLi3EE3DotERKS1_:
  250|  19.9k|  Scalar Dot(const Self &o) const {
  251|  19.9k|    Scalar ret(0);
  252|  79.7k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (252:21): [True: 59.8k, False: 19.9k]
  ------------------
  253|  59.8k|      ret += (*this)[i] * o[i];
  254|  59.8k|    }
  255|  19.9k|    return ret;
  256|  19.9k|  }
_ZNK5draco7VectorDIfLi3EEmlERKf:
  174|    497|  Self operator*(const Scalar &o) const {
  175|    497|    Self ret;
  176|  1.98k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 1.49k, False: 497]
  ------------------
  177|  1.49k|      ret[i] = (*this)[i] * o;
  178|  1.49k|    }
  179|    497|    return ret;
  180|    497|  }
_ZNK5draco7VectorDIfLi2EEmiERKS1_:
  137|  18.9k|  Self operator-(const Self &o) const {
  138|  18.9k|    Self ret;
  139|  56.8k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 37.9k, False: 18.9k]
  ------------------
  140|  37.9k|      ret[i] = (*this)[i] - o[i];
  141|  37.9k|    }
  142|  18.9k|    return ret;
  143|  18.9k|  }
_ZN5draco7VectorDIfLi2EEC2Ev:
   40|  37.9k|  VectorD() {
   41|   113k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 75.8k, False: 37.9k]
  ------------------
   42|  75.8k|      (*this)[i] = Scalar(0);
   43|  75.8k|    }
   44|  37.9k|  }
_ZN5draco7VectorDIfLi2EEC2ERKfS3_:
   52|   862k|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|   862k|    DRACO_DCHECK_EQ(dimension, 2);
   54|   862k|    v_[0] = c0;
   55|   862k|    v_[1] = c1;
   56|   862k|  }
_ZN5draco7VectorDIfLi2EEixEi:
  112|   151k|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIlLi2EEeqERKS1_:
  206|   376k|  bool operator==(const Self &o) const {
  207|  1.06M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (207:21): [True: 721k, False: 343k]
  ------------------
  208|   721k|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (208:11): [True: 33.3k, False: 687k]
  ------------------
  209|  33.3k|        return false;
  210|  33.3k|      }
  211|   721k|    }
  212|   343k|    return true;
  213|   376k|  }
_ZNK5draco7VectorDIlLi2EEixEi:
  113|  2.20M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIlLi3EEC2Ev:
   40|  43.8M|  VectorD() {
   41|   175M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 131M, False: 43.8M]
  ------------------
   42|   131M|      (*this)[i] = Scalar(0);
   43|   131M|    }
   44|  43.8M|  }
_ZNK5draco7VectorDIlLi3EE11SquaredNormEv:
  234|  36.0k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIlLi3EE3DotERKS1_:
  250|  39.0k|  Scalar Dot(const Self &o) const {
  251|  39.0k|    Scalar ret(0);
  252|   156k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (252:21): [True: 117k, False: 39.0k]
  ------------------
  253|   117k|      ret += (*this)[i] * o[i];
  254|   117k|    }
  255|  39.0k|    return ret;
  256|  39.0k|  }
_ZNK5draco7VectorDIlLi2EEmiERKS1_:
  137|  2.92k|  Self operator-(const Self &o) const {
  138|  2.92k|    Self ret;
  139|  8.77k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 5.85k, False: 2.92k]
  ------------------
  140|  5.85k|      ret[i] = (*this)[i] - o[i];
  141|  5.85k|    }
  142|  2.92k|    return ret;
  143|  2.92k|  }
_ZNK5draco7VectorDIlLi2EEmlERKl:
  174|  8.37k|  Self operator*(const Scalar &o) const {
  175|  8.37k|    Self ret;
  176|  25.1k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 16.7k, False: 8.37k]
  ------------------
  177|  16.7k|      ret[i] = (*this)[i] * o;
  178|  16.7k|    }
  179|  8.37k|    return ret;
  180|  8.37k|  }
_ZNK5draco7VectorDIlLi2EEplERKS1_:
  129|  2.79k|  Self operator+(const Self &o) const {
  130|  2.79k|    Self ret;
  131|  8.39k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 5.59k, False: 2.79k]
  ------------------
  132|  5.59k|      ret[i] = (*this)[i] + o[i];
  133|  5.59k|    }
  134|  2.79k|    return ret;
  135|  2.79k|  }
_ZN5dracomlIlLi2EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  292|  2.79k|    const ScalarT &o, const VectorD<ScalarT, dimension_t> &v) {
  293|  2.79k|  return v * o;
  294|  2.79k|}
_ZNK5draco7VectorDIlLi3EEplERKS1_:
  129|  2.77k|  Self operator+(const Self &o) const {
  130|  2.77k|    Self ret;
  131|  11.1k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 8.32k, False: 2.77k]
  ------------------
  132|  8.32k|      ret[i] = (*this)[i] + o[i];
  133|  8.32k|    }
  134|  2.77k|    return ret;
  135|  2.77k|  }
_ZN5dracomlIlLi3EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  292|  2.77k|    const ScalarT &o, const VectorD<ScalarT, dimension_t> &v) {
  293|  2.77k|  return v * o;
  294|  2.77k|}
_ZNK5draco7VectorDIlLi3EEmlERKl:
  174|  2.77k|  Self operator*(const Scalar &o) const {
  175|  2.77k|    Self ret;
  176|  11.1k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 8.32k, False: 2.77k]
  ------------------
  177|  8.32k|      ret[i] = (*this)[i] * o;
  178|  8.32k|    }
  179|  2.77k|    return ret;
  180|  2.77k|  }
_ZN5draco7VectorDIlLi2EEC2ERKlS3_:
   52|   755k|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|   755k|    DRACO_DCHECK_EQ(dimension, 2);
   54|   755k|    v_[0] = c0;
   55|   755k|    v_[1] = c1;
   56|   755k|  }
_ZN5draco7VectorDIlLi2EEC2Ev:
   40|  19.6k|  VectorD() {
   41|  58.9k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 39.2k, False: 19.6k]
  ------------------
   42|  39.2k|      (*this)[i] = Scalar(0);
   43|  39.2k|    }
   44|  19.6k|  }
_ZN5draco7VectorDImLi2EEC2IlLi2EEERKNS0_IT_XT0_EEE:
  102|  5.53k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  16.6k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 11.0k, False: 5.53k]
  ------------------
  104|  11.0k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 11.0k, False: 0]
  ------------------
  105|  11.0k|        v_[i] = Scalar(src_vector[i]);
  106|  11.0k|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  11.0k|    }
  110|  5.53k|  }
_ZNK5draco7VectorDImLi2EEplERKS1_:
  129|  1.01k|  Self operator+(const Self &o) const {
  130|  1.01k|    Self ret;
  131|  3.04k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 2.02k, False: 1.01k]
  ------------------
  132|  2.02k|      ret[i] = (*this)[i] + o[i];
  133|  2.02k|    }
  134|  1.01k|    return ret;
  135|  1.01k|  }
_ZN5draco7VectorDImLi2EEC2Ev:
   40|  2.76k|  VectorD() {
   41|  8.30k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 5.53k, False: 2.76k]
  ------------------
   42|  5.53k|      (*this)[i] = Scalar(0);
   43|  5.53k|    }
   44|  2.76k|  }
_ZNK5draco7VectorDImLi2EEixEi:
  113|  16.6k|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDImLi2EEixEi:
  112|  11.0k|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIlLi2EEC2ImLi2EEERKNS0_IT_XT0_EEE:
  102|  2.76k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  8.30k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 5.53k, False: 2.76k]
  ------------------
  104|  5.53k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 5.53k, False: 0]
  ------------------
  105|  5.53k|        v_[i] = Scalar(src_vector[i]);
  106|  5.53k|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  5.53k|    }
  110|  2.76k|  }
_ZNK5draco7VectorDIlLi2EEdvERKl:
  182|  2.76k|  Self operator/(const Scalar &o) const {
  183|  2.76k|    Self ret;
  184|  8.30k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (184:21): [True: 5.53k, False: 2.76k]
  ------------------
  185|  5.53k|      ret[i] = (*this)[i] / o;
  186|  5.53k|    }
  187|  2.76k|    return ret;
  188|  2.76k|  }
_ZNK5draco7VectorDImLi2EEmiERKS1_:
  137|  1.75k|  Self operator-(const Self &o) const {
  138|  1.75k|    Self ret;
  139|  5.26k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 3.51k, False: 1.75k]
  ------------------
  140|  3.51k|      ret[i] = (*this)[i] - o[i];
  141|  3.51k|    }
  142|  1.75k|    return ret;
  143|  1.75k|  }
_ZN5draco7VectorDIlLi2EEixEi:
  112|  78.5k|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEC2Ev:
   40|  1.92M|  VectorD() {
   41|  7.71M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 5.78M, False: 1.92M]
  ------------------
   42|  5.78M|      (*this)[i] = Scalar(0);
   43|  5.78M|    }
   44|  1.92M|  }
_ZN5draco7VectorDIiLi2EEC2ERKiS3_:
   52|  10.6M|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|  10.6M|    DRACO_DCHECK_EQ(dimension, 2);
   54|  10.6M|    v_[0] = c0;
   55|  10.6M|    v_[1] = c1;
   56|  10.6M|  }
_ZN5draco7VectorDIjLi2EEC2IiLi2EEERKNS0_IT_XT0_EEE:
  102|  7.63M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  22.8M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 15.2M, False: 7.63M]
  ------------------
  104|  15.2M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 15.2M, False: 0]
  ------------------
  105|  15.2M|        v_[i] = Scalar(src_vector[i]);
  106|  15.2M|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  15.2M|    }
  110|  7.63M|  }
_ZN5draco7VectorDIjLi2EEC2Ev:
   40|  3.81M|  VectorD() {
   41|  11.4M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 7.63M, False: 3.81M]
  ------------------
   42|  7.63M|      (*this)[i] = Scalar(0);
   43|  7.63M|    }
   44|  3.81M|  }
_ZN5draco7VectorDIiLi2EEC2IjLi2EEERKNS0_IT_XT0_EEE:
  102|  3.81M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  11.4M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 7.63M, False: 3.81M]
  ------------------
  104|  7.63M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 7.63M, False: 0]
  ------------------
  105|  7.63M|        v_[i] = Scalar(src_vector[i]);
  106|  7.63M|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  7.63M|    }
  110|  3.81M|  }
_ZN5draco7VectorDIiLi2EEC2ERKS1_:
   88|  6.55M|  VectorD(const Self &o) {
   89|  19.6M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (89:21): [True: 13.1M, False: 6.55M]
  ------------------
   90|  13.1M|      (*this)[i] = o[i];
   91|  13.1M|    }
   92|  6.55M|  }
_ZN5draco7VectorDIiLi2EEC2Ev:
   40|  3.06M|  VectorD() {
   41|  9.20M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 6.13M, False: 3.06M]
  ------------------
   42|  6.13M|      (*this)[i] = Scalar(0);
   43|  6.13M|    }
   44|  3.06M|  }

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

_ZNK5draco11CornerTable12num_verticesEv:
   73|   141M|  inline int num_vertices() const {
   74|   141M|    return static_cast<int>(vertex_corners_.size());
   75|   141M|  }
_ZNK5draco11CornerTable11num_cornersEv:
   76|  10.9M|  inline int num_corners() const {
   77|  10.9M|    return static_cast<int>(corner_to_vertex_map_.size());
   78|  10.9M|  }
_ZNK5draco11CornerTable9num_facesEv:
   79|  3.03M|  inline int num_faces() const {
   80|  3.03M|    return static_cast<int>(corner_to_vertex_map_.size() / 3);
   81|  3.03M|  }
_ZNK5draco11CornerTable8OppositeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   83|   428M|  inline CornerIndex Opposite(CornerIndex corner) const {
   84|   428M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (84:9): [True: 0, False: 428M]
  ------------------
   85|      0|      return corner;
   86|      0|    }
   87|   428M|    return opposite_corners_[corner];
   88|   428M|  }
_ZNK5draco11CornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   89|   746M|  inline CornerIndex Next(CornerIndex corner) const {
   90|   746M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (90:9): [True: 16.1M, False: 729M]
  ------------------
   91|  16.1M|      return corner;
   92|  16.1M|    }
   93|   729M|    return LocalIndex(++corner) ? corner : corner - 3;
  ------------------
  |  Branch (93:12): [True: 666M, False: 63.7M]
  ------------------
   94|   746M|  }
_ZNK5draco11CornerTable8PreviousENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   95|   601M|  inline CornerIndex Previous(CornerIndex corner) const {
   96|   601M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (96:9): [True: 5.34M, False: 596M]
  ------------------
   97|  5.34M|      return corner;
   98|  5.34M|    }
   99|   596M|    return LocalIndex(corner) ? corner - 1 : corner + 2;
  ------------------
  |  Branch (99:12): [True: 147M, False: 449M]
  ------------------
  100|   601M|  }
_ZNK5draco11CornerTable6VertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  1.19G|  inline VertexIndex Vertex(CornerIndex corner) const {
  102|  1.19G|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (102:9): [True: 0, False: 1.19G]
  ------------------
  103|      0|      return kInvalidVertexIndex;
  104|      0|    }
  105|  1.19G|    return ConfidentVertex(corner);
  106|  1.19G|  }
_ZNK5draco11CornerTable15ConfidentVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  1.19G|  inline VertexIndex ConfidentVertex(CornerIndex corner) const {
  108|  1.19G|    DRACO_DCHECK_GE(corner.value(), 0);
  109|  1.19G|    DRACO_DCHECK_LT(corner.value(), num_corners());
  110|  1.19G|    return corner_to_vertex_map_[corner];
  111|  1.19G|  }
_ZNK5draco11CornerTable4FaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  112|  40.8M|  inline FaceIndex Face(CornerIndex corner) const {
  113|  40.8M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (113:9): [True: 0, False: 40.8M]
  ------------------
  114|      0|      return kInvalidFaceIndex;
  115|      0|    }
  116|  40.8M|    return FaceIndex(corner.value() / 3);
  117|  40.8M|  }
_ZNK5draco11CornerTable10LocalIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  128|  1.32G|  inline int LocalIndex(CornerIndex corner) const { return corner.value() % 3; }
_ZNK5draco11CornerTable14LeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  150|  85.1M|  inline CornerIndex LeftMostCorner(VertexIndex v) const {
  151|  85.1M|    return vertex_corners_[v];
  152|  85.1M|  }
_ZNK5draco11CornerTable12IsOnBoundaryENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  185|   912k|  inline bool IsOnBoundary(VertexIndex vert) const {
  186|   912k|    const CornerIndex corner = LeftMostCorner(vert);
  187|   912k|    if (SwingLeft(corner) == kInvalidCornerIndex) {
  ------------------
  |  Branch (187:9): [True: 24.4k, False: 888k]
  ------------------
  188|  24.4k|      return true;
  189|  24.4k|    }
  190|   888k|    return false;
  191|   912k|  }
_ZNK5draco11CornerTable10SwingRightENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  200|  85.0M|  inline CornerIndex SwingRight(CornerIndex corner) const {
  201|  85.0M|    return Previous(Opposite(Previous(corner)));
  202|  85.0M|  }
_ZNK5draco11CornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  205|  19.0M|  inline CornerIndex SwingLeft(CornerIndex corner) const {
  206|  19.0M|    return Next(Opposite(Next(corner)));
  207|  19.0M|  }
_ZNK5draco11CornerTable13GetLeftCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  217|  3.99M|  inline CornerIndex GetLeftCorner(CornerIndex corner_id) const {
  218|  3.99M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (218:9): [True: 0, False: 3.99M]
  ------------------
  219|      0|      return kInvalidCornerIndex;
  220|      0|    }
  221|  3.99M|    return Opposite(Previous(corner_id));
  222|  3.99M|  }
_ZNK5draco11CornerTable14GetRightCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  223|  4.88M|  inline CornerIndex GetRightCorner(CornerIndex corner_id) const {
  224|  4.88M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (224:9): [True: 0, False: 4.88M]
  ------------------
  225|      0|      return kInvalidCornerIndex;
  226|      0|    }
  227|  4.88M|    return Opposite(Next(corner_id));
  228|  4.88M|  }
_ZN5draco11CornerTable17SetOppositeCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_:
  248|   504M|                                CornerIndex opp_corner_id) {
  249|   504M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  250|   504M|    opposite_corners_[corner_id] = opp_corner_id;
  251|   504M|  }
_ZN5draco11CornerTable17MapCornerToVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEE:
  265|   599M|  inline void MapCornerToVertex(CornerIndex corner_id, VertexIndex vert_id) {
  266|   599M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  267|   599M|    corner_to_vertex_map_[corner_id] = vert_id;
  268|   599M|  }
_ZN5draco11CornerTable12AddNewVertexEv:
  270|   155M|  VertexIndex AddNewVertex() {
  271|   155M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  272|       |    // Add a new invalid vertex.
  273|   155M|    vertex_corners_.push_back(kInvalidCornerIndex);
  274|   155M|    return VertexIndex(static_cast<uint32_t>(vertex_corners_.size() - 1));
  275|   155M|  }
_ZN5draco11CornerTable17SetLeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEE:
  292|   338M|  void SetLeftMostCorner(VertexIndex vert, CornerIndex corner) {
  293|   338M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  294|   338M|    if (vert != kInvalidVertexIndex) {
  ------------------
  |  Branch (294:9): [True: 338M, False: 0]
  ------------------
  295|   338M|      vertex_corners_[vert] = corner;
  296|   338M|    }
  297|   338M|  }
_ZN5draco11CornerTable18MakeVertexIsolatedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  328|  4.14M|  void MakeVertexIsolated(VertexIndex vert) {
  329|  4.14M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  330|  4.14M|    vertex_corners_[vert] = kInvalidCornerIndex;
  331|  4.14M|  }

_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  228|  13.6k|      : corner_table_(table),
  229|  13.6k|        start_corner_(table->LeftMostCorner(vert_id)),
  230|  13.6k|        corner_(start_corner_),
  231|  13.6k|        left_traversal_(true) {}
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE3EndEv:
  244|  5.64M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEppEv:
  267|  99.3k|  VertexCornersIterator &operator++() {
  268|  99.3k|    Next();
  269|  99.3k|    return *this;
  270|  99.3k|  }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEE4NextEv:
  247|  4.83M|  void Next() {
  248|  4.83M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 4.75M, False: 80.2k]
  ------------------
  249|  4.75M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  4.75M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 24.0k, False: 4.72M]
  ------------------
  251|       |        // Open boundary reached.
  252|  24.0k|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  24.0k|        left_traversal_ = false;
  254|  4.72M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 788k, False: 3.94M]
  ------------------
  255|       |        // End reached.
  256|   788k|        corner_ = kInvalidCornerIndex;
  257|   788k|      }
  258|  4.75M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  80.2k|      corner_ = corner_table_->SwingRight(corner_);
  262|  80.2k|    }
  263|  4.83M|  }
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE6CornerEv:
  241|  8.78M|  CornerIndex Corner() const { return corner_; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE3EndEv:
  244|  4.89M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE6CornerEv:
  241|  4.73M|  CornerIndex Corner() const { return corner_; }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE4NextEv:
  247|  2.81M|  void Next() {
  248|  2.81M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 2.78M, False: 28.5k]
  ------------------
  249|  2.78M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  2.78M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 1.94M, False: 845k]
  ------------------
  251|       |        // Open boundary reached.
  252|  1.94M|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  1.94M|        left_traversal_ = false;
  254|  1.94M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 138k, False: 707k]
  ------------------
  255|       |        // End reached.
  256|   138k|        corner_ = kInvalidCornerIndex;
  257|   138k|      }
  258|  2.78M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  28.5k|      corner_ = corner_table_->SwingRight(corner_);
  262|  28.5k|    }
  263|  2.81M|  }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|  2.07M|      : corner_table_(table),
  236|  2.07M|        start_corner_(corner_id),
  237|  2.07M|        corner_(start_corner_),
  238|  2.07M|        left_traversal_(true) {}
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|   798k|      : corner_table_(table),
  236|   798k|        start_corner_(corner_id),
  237|   798k|        corner_(start_corner_),
  238|   798k|        left_traversal_(true) {}

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

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

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

_ZNK5draco24MeshAttributeCornerTable26IsCornerOppositeToSeamEdgeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   45|  65.8M|  inline bool IsCornerOppositeToSeamEdge(CornerIndex corner) const {
   46|  65.8M|    return is_edge_on_seam_[corner.value()];
   47|  65.8M|  }
_ZNK5draco24MeshAttributeCornerTable8OppositeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   49|  30.7M|  inline CornerIndex Opposite(CornerIndex corner) const {
   50|  30.7M|    if (corner == kInvalidCornerIndex || IsCornerOppositeToSeamEdge(corner)) {
  ------------------
  |  Branch (50:9): [True: 0, False: 30.7M]
  |  Branch (50:42): [True: 23.5M, False: 7.14M]
  ------------------
   51|  23.5M|      return kInvalidCornerIndex;
   52|  23.5M|    }
   53|  7.14M|    return corner_table_->Opposite(corner);
   54|  30.7M|  }
_ZNK5draco24MeshAttributeCornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   56|  42.9M|  inline CornerIndex Next(CornerIndex corner) const {
   57|  42.9M|    return corner_table_->Next(corner);
   58|  42.9M|  }
_ZNK5draco24MeshAttributeCornerTable8PreviousENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   60|  23.8M|  inline CornerIndex Previous(CornerIndex corner) const {
   61|  23.8M|    return corner_table_->Previous(corner);
   62|  23.8M|  }
_ZNK5draco24MeshAttributeCornerTable14IsCornerOnSeamENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   65|  5.36M|  inline bool IsCornerOnSeam(CornerIndex corner) const {
   66|  5.36M|    return is_vertex_on_seam_[corner_table_->Vertex(corner).value()];
   67|  5.36M|  }
_ZNK5draco24MeshAttributeCornerTable13GetLeftCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.58M|  inline CornerIndex GetLeftCorner(CornerIndex corner) const {
   72|  3.58M|    return Opposite(Previous(corner));
   73|  3.58M|  }
_ZNK5draco24MeshAttributeCornerTable14GetRightCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   74|  4.33M|  inline CornerIndex GetRightCorner(CornerIndex corner) const {
   75|  4.33M|    return Opposite(Next(corner));
   76|  4.33M|  }
_ZNK5draco24MeshAttributeCornerTable10SwingRightENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   79|  4.67M|  inline CornerIndex SwingRight(CornerIndex corner) const {
   80|  4.67M|    return Previous(Opposite(Previous(corner)));
   81|  4.67M|  }
_ZNK5draco24MeshAttributeCornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   84|  13.8M|  inline CornerIndex SwingLeft(CornerIndex corner) const {
   85|  13.8M|    return Next(Opposite(Next(corner)));
   86|  13.8M|  }
_ZNK5draco24MeshAttributeCornerTable12num_verticesEv:
   88|  12.8k|  int num_vertices() const {
   89|  12.8k|    return static_cast<int>(vertex_to_attribute_entry_id_map_.size());
   90|  12.8k|  }
_ZNK5draco24MeshAttributeCornerTable9num_facesEv:
   91|  4.48k|  int num_faces() const { return static_cast<int>(corner_table_->num_faces()); }
_ZNK5draco24MeshAttributeCornerTable11num_cornersEv:
   92|  1.71k|  int num_corners() const { return corner_table_->num_corners(); }
_ZNK5draco24MeshAttributeCornerTable6VertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   94|   112M|  VertexIndex Vertex(CornerIndex corner) const {
   95|   112M|    DRACO_DCHECK_LT(corner.value(), corner_to_vertex_map_.size());
   96|   112M|    return ConfidentVertex(corner);
   97|   112M|  }
_ZNK5draco24MeshAttributeCornerTable15ConfidentVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   98|   112M|  VertexIndex ConfidentVertex(CornerIndex corner) const {
   99|   112M|    return corner_to_vertex_map_[corner.value()];
  100|   112M|  }
_ZNK5draco24MeshAttributeCornerTable14LeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  106|  3.53M|  inline CornerIndex LeftMostCorner(VertexIndex v) const {
  107|  3.53M|    return vertex_to_left_most_corner_map_[v.value()];
  108|  3.53M|  }
_ZNK5draco24MeshAttributeCornerTable12IsOnBoundaryENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  122|  3.53M|  inline bool IsOnBoundary(VertexIndex vert) const {
  123|  3.53M|    const CornerIndex corner = LeftMostCorner(vert);
  124|  3.53M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (124:9): [True: 0, False: 3.53M]
  ------------------
  125|      0|      return true;
  126|      0|    }
  127|  3.53M|    if (SwingLeft(corner) == kInvalidCornerIndex) {
  ------------------
  |  Branch (127:9): [True: 2.78M, False: 750k]
  ------------------
  128|  2.78M|      return true;
  129|  2.78M|    }
  130|   750k|    return false;
  131|  3.53M|  }

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

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

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

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

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

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

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

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

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

