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

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

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

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

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

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

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

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

_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|  12.1k|  inline uint8_t *GetAddress(AttributeValueIndex att_index) {
  127|  12.1k|    const int64_t byte_pos = GetBytePos(att_index);
  128|  12.1k|    return buffer_->data() + byte_pos;
  129|  12.1k|  }
_ZNK5draco17GeometryAttribute14IsAddressValidEPKh:
  130|  54.5M|  inline bool IsAddressValid(const uint8_t *address) const {
  131|  54.5M|    return ((buffer_->data() + buffer_->data_size()) > address);
  132|  54.5M|  }
_ZNK5draco17GeometryAttribute14attribute_typeEv:
  266|  61.5k|  Type attribute_type() const { return attribute_type_; }
_ZNK5draco17GeometryAttribute9data_typeEv:
  269|  25.9k|  DataType data_type() const { return data_type_; }
_ZNK5draco17GeometryAttribute14num_componentsEv:
  273|  48.8k|  uint8_t num_components() const { return num_components_; }
_ZNK5draco17GeometryAttribute11byte_strideEv:
  282|    772|  int64_t byte_stride() const { return byte_stride_; }
_ZNK5draco17GeometryAttribute9unique_idEv:
  287|  10.1k|  uint32_t unique_id() const { return unique_id_; }
_ZN5draco17GeometryAttribute13set_unique_idEj:
  288|  78.6k|  void set_unique_id(uint32_t id) { unique_id_ = id; }
_ZNK5draco17GeometryAttribute12ConvertValueIlEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEPT_:
  229|  18.1M|  bool ConvertValue(AttributeValueIndex att_index, OutT *out_value) const {
  230|  18.1M|    return ConvertValue<OutT>(att_index, num_components_, out_value);
  231|  18.1M|  }
_ZNK5draco17GeometryAttribute12ConvertValueIlEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEaPT_:
  179|  18.1M|                    OutT *out_val) const {
  180|  18.1M|    if (out_val == nullptr) {
  ------------------
  |  Branch (180:9): [True: 0, False: 18.1M]
  ------------------
  181|      0|      return false;
  182|      0|    }
  183|  18.1M|    switch (data_type_) {
  184|      0|      case DT_INT8:
  ------------------
  |  Branch (184:7): [True: 0, False: 18.1M]
  ------------------
  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.1M]
  ------------------
  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.1M]
  ------------------
  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.1M]
  ------------------
  194|      0|        return ConvertTypedValue<uint16_t, OutT>(att_id, out_num_components,
  195|      0|                                                 out_val);
  196|  18.1M|      case DT_INT32:
  ------------------
  |  Branch (196:7): [True: 18.1M, False: 0]
  ------------------
  197|  18.1M|        return ConvertTypedValue<int32_t, OutT>(att_id, out_num_components,
  198|  18.1M|                                                out_val);
  199|      0|      case DT_UINT32:
  ------------------
  |  Branch (199:7): [True: 0, False: 18.1M]
  ------------------
  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.1M]
  ------------------
  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.1M]
  ------------------
  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.1M]
  ------------------
  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.1M]
  ------------------
  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.1M]
  ------------------
  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.1M]
  ------------------
  218|       |        // Wrong attribute type.
  219|      0|        return false;
  220|  18.1M|    }
  221|  18.1M|  }
_ZNK5draco17GeometryAttribute17ConvertTypedValueIilEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEhPT0_:
  306|  18.1M|                         OutT *out_value) const {
  307|  18.1M|    const uint8_t *src_address = GetAddress(att_id);
  308|       |
  309|       |    // Convert all components available in both the original and output formats.
  310|  72.4M|    for (int i = 0; i < std::min(num_components_, out_num_components); ++i) {
  ------------------
  |  Branch (310:21): [True: 54.3M, False: 18.1M]
  ------------------
  311|  54.3M|      if (!IsAddressValid(src_address)) {
  ------------------
  |  Branch (311:11): [True: 0, False: 54.3M]
  ------------------
  312|      0|        return false;
  313|      0|      }
  314|  54.3M|      const T in_value = *reinterpret_cast<const T *>(src_address);
  315|  54.3M|      if (!ConvertComponentValue<T, OutT>(in_value, normalized_,
  ------------------
  |  Branch (315:11): [True: 0, False: 54.3M]
  ------------------
  316|  54.3M|                                          out_value + i)) {
  317|      0|        return false;
  318|      0|      }
  319|  54.3M|      src_address += sizeof(T);
  320|  54.3M|    }
  321|       |    // Fill empty data for unused output components if needed.
  322|  18.1M|    for (int i = num_components_; i < out_num_components; ++i) {
  ------------------
  |  Branch (322:35): [True: 0, False: 18.1M]
  ------------------
  323|      0|      out_value[i] = static_cast<OutT>(0);
  324|      0|    }
  325|  18.1M|    return true;
  326|  18.1M|  }
_ZN5draco17GeometryAttribute21ConvertComponentValueIilEEbRKT_bPT0_:
  364|  54.3M|                                    OutT *out_value) {
  365|       |    // Make sure the |in_value| can be represented as an integral type OutT.
  366|  54.3M|    if (std::is_integral<OutT>::value) {
  ------------------
  |  Branch (366:9): [True: 54.3M, 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.3M|      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.3M|        static constexpr OutT kOutMin =
  371|  54.3M|            std::is_signed<T>::value ? std::numeric_limits<OutT>::min() : 0;
  ------------------
  |  Branch (371:13): [True: 0, Folded]
  ------------------
  372|  54.3M|        if (in_value < kOutMin || in_value > std::numeric_limits<OutT>::max()) {
  ------------------
  |  Branch (372:13): [True: 0, False: 54.3M]
  |  Branch (372:35): [True: 0, False: 54.3M]
  ------------------
  373|      0|          return false;
  374|      0|        }
  375|  54.3M|      }
  376|       |
  377|       |      // Check conversion of floating point |in_value| to integral value OutT.
  378|  54.3M|      if (std::is_floating_point<T>::value) {
  ------------------
  |  Branch (378:11): [Folded, False: 54.3M]
  ------------------
  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.3M|    }
  406|       |
  407|  54.3M|    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.3M|    } else if (std::is_floating_point<T>::value &&
  ------------------
  |  Branch (413:16): [Folded, False: 54.3M]
  ------------------
  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.3M|    } else {
  433|  54.3M|      *out_value = static_cast<OutT>(in_value);
  434|  54.3M|    }
  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.3M|    return true;
  442|  54.3M|  }
_ZNK5draco17GeometryAttribute12ConvertValueIfEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEPT_:
  229|  57.3k|  bool ConvertValue(AttributeValueIndex att_index, OutT *out_value) const {
  230|  57.3k|    return ConvertValue<OutT>(att_index, num_components_, out_value);
  231|  57.3k|  }
_ZNK5draco17GeometryAttribute12ConvertValueIfEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEaPT_:
  179|  57.3k|                    OutT *out_val) const {
  180|  57.3k|    if (out_val == nullptr) {
  ------------------
  |  Branch (180:9): [True: 0, False: 57.3k]
  ------------------
  181|      0|      return false;
  182|      0|    }
  183|  57.3k|    switch (data_type_) {
  184|      0|      case DT_INT8:
  ------------------
  |  Branch (184:7): [True: 0, False: 57.3k]
  ------------------
  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: 57.3k]
  ------------------
  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: 57.3k]
  ------------------
  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: 57.3k]
  ------------------
  194|      0|        return ConvertTypedValue<uint16_t, OutT>(att_id, out_num_components,
  195|      0|                                                 out_val);
  196|  57.3k|      case DT_INT32:
  ------------------
  |  Branch (196:7): [True: 57.3k, False: 0]
  ------------------
  197|  57.3k|        return ConvertTypedValue<int32_t, OutT>(att_id, out_num_components,
  198|  57.3k|                                                out_val);
  199|      0|      case DT_UINT32:
  ------------------
  |  Branch (199:7): [True: 0, False: 57.3k]
  ------------------
  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: 57.3k]
  ------------------
  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: 57.3k]
  ------------------
  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: 57.3k]
  ------------------
  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: 57.3k]
  ------------------
  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: 57.3k]
  ------------------
  215|      0|        return ConvertTypedValue<bool, OutT>(att_id, out_num_components,
  216|      0|                                             out_val);
  217|      0|      default:
  ------------------
  |  Branch (217:7): [True: 0, False: 57.3k]
  ------------------
  218|       |        // Wrong attribute type.
  219|      0|        return false;
  220|  57.3k|    }
  221|  57.3k|  }
_ZNK5draco17GeometryAttribute17ConvertTypedValueIifEEbNS_9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEEhPT0_:
  306|  57.3k|                         OutT *out_value) const {
  307|  57.3k|    const uint8_t *src_address = GetAddress(att_id);
  308|       |
  309|       |    // Convert all components available in both the original and output formats.
  310|   229k|    for (int i = 0; i < std::min(num_components_, out_num_components); ++i) {
  ------------------
  |  Branch (310:21): [True: 172k, False: 57.3k]
  ------------------
  311|   172k|      if (!IsAddressValid(src_address)) {
  ------------------
  |  Branch (311:11): [True: 0, False: 172k]
  ------------------
  312|      0|        return false;
  313|      0|      }
  314|   172k|      const T in_value = *reinterpret_cast<const T *>(src_address);
  315|   172k|      if (!ConvertComponentValue<T, OutT>(in_value, normalized_,
  ------------------
  |  Branch (315:11): [True: 0, False: 172k]
  ------------------
  316|   172k|                                          out_value + i)) {
  317|      0|        return false;
  318|      0|      }
  319|   172k|      src_address += sizeof(T);
  320|   172k|    }
  321|       |    // Fill empty data for unused output components if needed.
  322|  57.3k|    for (int i = num_components_; i < out_num_components; ++i) {
  ------------------
  |  Branch (322:35): [True: 0, False: 57.3k]
  ------------------
  323|      0|      out_value[i] = static_cast<OutT>(0);
  324|      0|    }
  325|  57.3k|    return true;
  326|  57.3k|  }
_ZN5draco17GeometryAttribute21ConvertComponentValueIifEEbRKT_bPT0_:
  364|   172k|                                    OutT *out_value) {
  365|       |    // Make sure the |in_value| can be represented as an integral type OutT.
  366|   172k|    if (std::is_integral<OutT>::value) {
  ------------------
  |  Branch (366:9): [Folded, False: 172k]
  ------------------
  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|   172k|    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|   172k|        normalized) {
  ------------------
  |  Branch (408:9): [True: 0, False: 172k]
  ------------------
  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|   172k|    } else if (std::is_floating_point<T>::value &&
  ------------------
  |  Branch (413:16): [Folded, False: 172k]
  ------------------
  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|   172k|    } else {
  433|   172k|      *out_value = static_cast<OutT>(in_value);
  434|   172k|    }
  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|   172k|    return true;
  442|   172k|  }

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

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

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

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

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

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

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

_ZN5draco17OctahedronToolBoxC2Ev:
   53|  3.38k|      : quantization_bits_(-1),
   54|  3.38k|        max_quantized_value_(-1),
   55|  3.38k|        max_value_(-1),
   56|  3.38k|        dequantization_scale_(1.f),
   57|  3.38k|        center_value_(-1) {}
_ZN5draco17OctahedronToolBox19SetQuantizationBitsEi:
   59|  3.09k|  bool SetQuantizationBits(int32_t q) {
   60|  3.09k|    if (q < 2 || q > 30) {
  ------------------
  |  Branch (60:9): [True: 927, False: 2.16k]
  |  Branch (60:18): [True: 147, False: 2.02k]
  ------------------
   61|  1.07k|      return false;
   62|  1.07k|    }
   63|  2.02k|    quantization_bits_ = q;
   64|  2.02k|    max_quantized_value_ = (1u << quantization_bits_) - 1;
   65|  2.02k|    max_value_ = max_quantized_value_ - 1;
   66|  2.02k|    dequantization_scale_ = 2.f / max_value_;
   67|  2.02k|    center_value_ = max_value_ / 2;
   68|  2.02k|    return true;
   69|  3.09k|  }
_ZNK5draco17OctahedronToolBox28CanonicalizeOctahedralCoordsEiiPiS1_:
   76|  3.24M|                                           int32_t *out_t) const {
   77|  3.24M|    if ((s == 0 && t == 0) || (s == 0 && t == max_value_) ||
  ------------------
  |  Branch (77:10): [True: 2.65k, False: 3.24M]
  |  Branch (77:20): [True: 0, False: 2.65k]
  |  Branch (77:32): [True: 2.65k, False: 3.24M]
  |  Branch (77:42): [True: 0, False: 2.65k]
  ------------------
   78|  3.24M|        (s == max_value_ && t == 0)) {
  ------------------
  |  Branch (78:10): [True: 2.23M, False: 1.01M]
  |  Branch (78:29): [True: 4.87k, False: 2.22M]
  ------------------
   79|  4.87k|      s = max_value_;
   80|  4.87k|      t = max_value_;
   81|  3.24M|    } else if (s == 0 && t > center_value_) {
  ------------------
  |  Branch (81:16): [True: 2.65k, False: 3.23M]
  |  Branch (81:26): [True: 744, False: 1.91k]
  ------------------
   82|    744|      t = center_value_ - (t - center_value_);
   83|  3.24M|    } else if (s == max_value_ && t < center_value_) {
  ------------------
  |  Branch (83:16): [True: 2.22M, False: 1.01M]
  |  Branch (83:35): [True: 5.35k, False: 2.22M]
  ------------------
   84|  5.35k|      t = center_value_ + (center_value_ - t);
   85|  3.23M|    } else if (t == max_value_ && s < center_value_) {
  ------------------
  |  Branch (85:16): [True: 2.22M, False: 1.00M]
  |  Branch (85:35): [True: 238, False: 2.22M]
  ------------------
   86|    238|      s = center_value_ + (center_value_ - s);
   87|  3.23M|    } else if (t == 0 && s > center_value_) {
  ------------------
  |  Branch (87:16): [True: 4.93k, False: 3.23M]
  |  Branch (87:26): [True: 2.28k, False: 2.64k]
  ------------------
   88|  2.28k|      s = center_value_ - (s - center_value_);
   89|  2.28k|    }
   90|       |
   91|  3.24M|    *out_s = s;
   92|  3.24M|    *out_t = t;
   93|  3.24M|  }
_ZNK5draco17OctahedronToolBox40IntegerVectorToQuantizedOctahedralCoordsEPKiPiS3_:
   99|  3.24M|                                                       int32_t *out_t) const {
  100|  3.24M|    DRACO_DCHECK_EQ(
  101|  3.24M|        std::abs(int_vec[0]) + std::abs(int_vec[1]) + std::abs(int_vec[2]),
  102|  3.24M|        center_value_);
  103|  3.24M|    int32_t s, t;
  104|  3.24M|    if (int_vec[0] >= 0) {
  ------------------
  |  Branch (104:9): [True: 1.38M, False: 1.86M]
  ------------------
  105|       |      // Right hemisphere.
  106|  1.38M|      s = (int_vec[1] + center_value_);
  107|  1.38M|      t = (int_vec[2] + center_value_);
  108|  1.86M|    } else {
  109|       |      // Left hemisphere.
  110|  1.86M|      if (int_vec[1] < 0) {
  ------------------
  |  Branch (110:11): [True: 36.9k, False: 1.82M]
  ------------------
  111|  36.9k|        s = std::abs(int_vec[2]);
  112|  1.82M|      } else {
  113|  1.82M|        s = (max_value_ - std::abs(int_vec[2]));
  114|  1.82M|      }
  115|  1.86M|      if (int_vec[2] < 0) {
  ------------------
  |  Branch (115:11): [True: 41.4k, False: 1.82M]
  ------------------
  116|  41.4k|        t = std::abs(int_vec[1]);
  117|  1.82M|      } else {
  118|  1.82M|        t = (max_value_ - std::abs(int_vec[1]));
  119|  1.82M|      }
  120|  1.86M|    }
  121|  3.24M|    CanonicalizeOctahedralCoords(s, t, out_s, out_t);
  122|  3.24M|  }
_ZNK5draco17OctahedronToolBox37QuantizedOctahedralCoordsToUnitVectorEiiPf:
  198|   731k|                                                    float *out_vector) const {
  199|   731k|    OctahedralCoordsToUnitVector(in_s * dequantization_scale_ - 1.f,
  200|   731k|                                 in_t * dequantization_scale_ - 1.f,
  201|   731k|                                 out_vector);
  202|   731k|  }
_ZNK5draco17OctahedronToolBox11IsInDiamondERKiS2_:
  205|  2.93M|  inline bool IsInDiamond(const int32_t &s, const int32_t &t) const {
  206|       |    // Expect center already at origin.
  207|  2.93M|    DRACO_DCHECK_LE(s, center_value_);
  208|  2.93M|    DRACO_DCHECK_LE(t, center_value_);
  209|  2.93M|    DRACO_DCHECK_GE(s, -center_value_);
  210|  2.93M|    DRACO_DCHECK_GE(t, -center_value_);
  211|  2.93M|    const uint32_t st =
  212|  2.93M|        static_cast<uint32_t>(std::abs(s)) + static_cast<uint32_t>(std::abs(t));
  213|  2.93M|    return st <= center_value_;
  214|  2.93M|  }
_ZNK5draco17OctahedronToolBox13InvertDiamondEPiS1_:
  216|  4.00M|  void InvertDiamond(int32_t *s, int32_t *t) const {
  217|       |    // Expect center already at origin.
  218|  4.00M|    DRACO_DCHECK_LE(*s, center_value_);
  219|  4.00M|    DRACO_DCHECK_LE(*t, center_value_);
  220|  4.00M|    DRACO_DCHECK_GE(*s, -center_value_);
  221|  4.00M|    DRACO_DCHECK_GE(*t, -center_value_);
  222|  4.00M|    int32_t sign_s = 0;
  223|  4.00M|    int32_t sign_t = 0;
  224|  4.00M|    if (*s >= 0 && *t >= 0) {
  ------------------
  |  Branch (224:9): [True: 3.92M, False: 79.4k]
  |  Branch (224:20): [True: 3.87M, False: 48.7k]
  ------------------
  225|  3.87M|      sign_s = 1;
  226|  3.87M|      sign_t = 1;
  227|  3.87M|    } else if (*s <= 0 && *t <= 0) {
  ------------------
  |  Branch (227:16): [True: 81.8k, False: 46.3k]
  |  Branch (227:27): [True: 40.4k, False: 41.3k]
  ------------------
  228|  40.4k|      sign_s = -1;
  229|  40.4k|      sign_t = -1;
  230|  87.7k|    } else {
  231|  87.7k|      sign_s = (*s > 0) ? 1 : -1;
  ------------------
  |  Branch (231:16): [True: 46.3k, False: 41.3k]
  ------------------
  232|  87.7k|      sign_t = (*t > 0) ? 1 : -1;
  ------------------
  |  Branch (232:16): [True: 41.3k, False: 46.3k]
  ------------------
  233|  87.7k|    }
  234|       |
  235|       |    // Perform the addition and subtraction using unsigned integers to avoid
  236|       |    // signed integer overflows for bad data. Note that the result will be
  237|       |    // unchanged for non-overflowing cases.
  238|  4.00M|    const uint32_t corner_point_s = sign_s * center_value_;
  239|  4.00M|    const uint32_t corner_point_t = sign_t * center_value_;
  240|  4.00M|    uint32_t us = *s;
  241|  4.00M|    uint32_t ut = *t;
  242|  4.00M|    us = us + us - corner_point_s;
  243|  4.00M|    ut = ut + ut - corner_point_t;
  244|  4.00M|    if (sign_s * sign_t >= 0) {
  ------------------
  |  Branch (244:9): [True: 3.91M, False: 87.7k]
  ------------------
  245|  3.91M|      uint32_t temp = us;
  246|  3.91M|      us = -ut;
  247|  3.91M|      ut = -temp;
  248|  3.91M|    } else {
  249|  87.7k|      std::swap(us, ut);
  250|  87.7k|    }
  251|  4.00M|    us = us + corner_point_s;
  252|  4.00M|    ut = ut + corner_point_t;
  253|       |
  254|  4.00M|    *s = us;
  255|  4.00M|    *t = ut;
  256|  4.00M|    *s /= 2;
  257|  4.00M|    *t /= 2;
  258|  4.00M|  }
_ZNK5draco17OctahedronToolBox6ModMaxEi:
  272|  5.86M|  int32_t ModMax(int32_t x) const {
  273|  5.86M|    if (x > this->center_value()) {
  ------------------
  |  Branch (273:9): [True: 2.58k, False: 5.85M]
  ------------------
  274|  2.58k|      return x - this->max_quantized_value();
  275|  2.58k|    }
  276|  5.85M|    if (x < -this->center_value()) {
  ------------------
  |  Branch (276:9): [True: 1.64k, False: 5.85M]
  ------------------
  277|  1.64k|      return x + this->max_quantized_value();
  278|  1.64k|    }
  279|  5.85M|    return x;
  280|  5.85M|  }
_ZNK5draco17OctahedronToolBox17quantization_bitsEv:
  291|  1.83k|  int32_t quantization_bits() const { return quantization_bits_; }
_ZNK5draco17OctahedronToolBox19max_quantized_valueEv:
  292|  4.23k|  int32_t max_quantized_value() const { return max_quantized_value_; }
_ZNK5draco17OctahedronToolBox12center_valueEv:
  294|  17.5M|  int32_t center_value() const { return center_value_; }
_ZNK5draco17OctahedronToolBox28OctahedralCoordsToUnitVectorEffPf:
  298|   731k|                                           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|   731k|    float y = in_s_scaled;
  329|   731k|    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|   731k|    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|   731k|    float x_offset = -x;
  342|   731k|    x_offset = x_offset < 0 ? 0 : x_offset;
  ------------------
  |  Branch (342:16): [True: 79.0k, False: 652k]
  ------------------
  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|   731k|    y += y < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (347:10): [True: 209k, False: 521k]
  ------------------
  348|   731k|    z += z < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (348:10): [True: 209k, False: 521k]
  ------------------
  349|       |
  350|       |    // Normalize the computed vector.
  351|   731k|    const float norm_squared = x * x + y * y + z * z;
  352|   731k|    if (norm_squared < 1e-6) {
  ------------------
  |  Branch (352:9): [True: 0, False: 731k]
  ------------------
  353|      0|      out_vector[0] = 0;
  354|      0|      out_vector[1] = 0;
  355|      0|      out_vector[2] = 0;
  356|   731k|    } else {
  357|   731k|      const float d = 1.0f / std::sqrt(norm_squared);
  358|   731k|      out_vector[0] = x * d;
  359|   731k|      out_vector[1] = y * d;
  360|   731k|      out_vector[2] = z * d;
  361|   731k|    }
  362|   731k|  }
_ZNK5draco17OctahedronToolBox25CanonicalizeIntegerVectorIiEEvPT_:
  173|  3.24M|  void CanonicalizeIntegerVector(T *vec) const {
  174|  3.24M|    static_assert(std::is_integral<T>::value, "T must be an integral type.");
  175|  3.24M|    static_assert(std::is_signed<T>::value, "T must be a signed type.");
  176|  3.24M|    const int64_t abs_sum = static_cast<int64_t>(std::abs(vec[0])) +
  177|  3.24M|                            static_cast<int64_t>(std::abs(vec[1])) +
  178|  3.24M|                            static_cast<int64_t>(std::abs(vec[2]));
  179|       |
  180|  3.24M|    if (abs_sum == 0) {
  ------------------
  |  Branch (180:9): [True: 3.04M, False: 199k]
  ------------------
  181|  3.04M|      vec[0] = center_value_;  // vec[1] == v[2] == 0
  182|  3.04M|    } else {
  183|   199k|      vec[0] =
  184|   199k|          (static_cast<int64_t>(vec[0]) * static_cast<int64_t>(center_value_)) /
  185|   199k|          abs_sum;
  186|   199k|      vec[1] =
  187|   199k|          (static_cast<int64_t>(vec[1]) * static_cast<int64_t>(center_value_)) /
  188|   199k|          abs_sum;
  189|   199k|      if (vec[2] >= 0) {
  ------------------
  |  Branch (189:11): [True: 106k, False: 92.7k]
  ------------------
  190|   106k|        vec[2] = center_value_ - std::abs(vec[0]) - std::abs(vec[1]);
  191|   106k|      } else {
  192|  92.7k|        vec[2] = -(center_value_ - std::abs(vec[0]) - std::abs(vec[1]));
  193|  92.7k|      }
  194|   199k|    }
  195|  3.24M|  }

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

_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    519|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    519|            attribute, transform, mesh_data),
   52|    519|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  196|    510|                                                                *buffer) {
  197|    510|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  198|    510|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    510|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (198:7): [True: 28, False: 482]
  ------------------
  199|       |    // Decode prediction mode.
  200|     28|    uint8_t mode;
  201|     28|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (201:9): [True: 0, False: 28]
  ------------------
  202|      0|      return false;
  203|      0|    }
  204|       |
  205|     28|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (205:9): [True: 19, False: 9]
  ------------------
  206|       |      // Unsupported mode.
  207|     19|      return false;
  208|     19|    }
  209|     28|  }
  210|    491|#endif
  211|       |
  212|       |  // Encode selected edges using separate rans bit coder for each context.
  213|  2.09k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (213:19): [True: 1.74k, False: 350]
  ------------------
  214|  1.74k|    uint32_t num_flags;
  215|  1.74k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (215:9): [True: 17, False: 1.72k]
  ------------------
  216|     17|      return false;
  217|     17|    }
  218|  1.72k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (218:9): [True: 88, False: 1.63k]
  ------------------
  219|     88|      return false;
  220|     88|    }
  221|  1.63k|    if (num_flags > 0) {
  ------------------
  |  Branch (221:9): [True: 639, False: 999]
  ------------------
  222|    639|      is_crease_edge_[i].resize(num_flags);
  223|    639|      RAnsBitDecoder decoder;
  224|    639|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (224:11): [True: 36, False: 603]
  ------------------
  225|     36|        return false;
  226|     36|      }
  227|  1.15M|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (227:28): [True: 1.15M, False: 603]
  ------------------
  228|  1.15M|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  229|  1.15M|      }
  230|    603|      decoder.EndDecoding();
  231|    603|    }
  232|  1.63k|  }
  233|    350|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  234|    350|                                     MeshDataT>::DecodePredictionData(buffer);
  235|    491|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    300|                          const PointIndex * /* entry_to_point_id_map */) {
   87|    300|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    300|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  1.50k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 1.20k, False: 300]
  ------------------
   93|  1.20k|    pred_vals[i].resize(num_components, 0);
   94|  1.20k|  }
   95|    300|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    300|                                         out_data);
   97|       |
   98|    300|  const CornerTable *const table = this->mesh_data().corner_table();
   99|    300|  const std::vector<int32_t> *const vertex_to_data_map =
  100|    300|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    300|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    300|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    300|  const int corner_map_size =
  109|    300|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|    300|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (110:7): [True: 0, False: 300]
  ------------------
  111|      0|    return false;
  112|      0|  }
  113|   853k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (113:19): [True: 852k, False: 172]
  ------------------
  114|   852k|    const CornerIndex start_corner_id =
  115|   852k|        this->mesh_data().data_to_corner_map()->at(p);
  116|       |
  117|   852k|    CornerIndex corner_id(start_corner_id);
  118|   852k|    int num_parallelograms = 0;
  119|   852k|    bool first_pass = true;
  120|  1.89M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (120:12): [True: 1.06M, False: 826k]
  ------------------
  121|  1.06M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (121:11): [True: 84.2k, False: 980k]
  ------------------
  122|  1.06M|              p, corner_id, table, *vertex_to_data_map, out_data,
  123|  1.06M|              num_components, &(pred_vals[num_parallelograms][0]))) {
  124|       |        // Parallelogram prediction applied and stored in
  125|       |        // |pred_vals[num_parallelograms]|
  126|  84.2k|        ++num_parallelograms;
  127|       |        // Stop processing when we reach the maximum number of allowed
  128|       |        // parallelograms.
  129|  84.2k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (129:13): [True: 386, False: 83.8k]
  ------------------
  130|    386|          break;
  131|    386|        }
  132|  84.2k|      }
  133|       |
  134|       |      // Proceed to the next corner attached to the vertex. First swing left
  135|       |      // and if we reach a boundary, swing right from the start corner.
  136|  1.06M|      if (first_pass) {
  ------------------
  |  Branch (136:11): [True: 1.01M, False: 51.6k]
  ------------------
  137|  1.01M|        corner_id = table->SwingLeft(corner_id);
  138|  1.01M|      } else {
  139|  51.6k|        corner_id = table->SwingRight(corner_id);
  140|  51.6k|      }
  141|  1.06M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (141:11): [True: 26.1k, False: 1.03M]
  ------------------
  142|  26.1k|        break;
  143|  26.1k|      }
  144|  1.03M|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (144:11): [True: 857k, False: 180k]
  |  Branch (144:47): [True: 826k, False: 31.2k]
  ------------------
  145|   826k|        first_pass = false;
  146|   826k|        corner_id = table->SwingRight(start_corner_id);
  147|   826k|      }
  148|  1.03M|    }
  149|       |
  150|       |    // Check which of the available parallelograms are actually used and compute
  151|       |    // the final predicted value.
  152|   852k|    int num_used_parallelograms = 0;
  153|   852k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (153:9): [True: 58.5k, False: 794k]
  ------------------
  154|  11.0M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (154:23): [True: 10.9M, False: 58.5k]
  ------------------
  155|  10.9M|        multi_pred_vals[i] = 0;
  156|  10.9M|      }
  157|       |      // Check which parallelograms are actually used.
  158|   142k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (158:23): [True: 84.1k, False: 58.4k]
  ------------------
  159|  84.1k|        const int context = num_parallelograms - 1;
  160|  84.1k|        const int pos = is_crease_edge_pos[context]++;
  161|  84.1k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (161:13): [True: 128, False: 84.0k]
  ------------------
  162|    128|          return false;
  163|    128|        }
  164|  84.0k|        const bool is_crease = is_crease_edge_[context][pos];
  165|  84.0k|        if (!is_crease) {
  ------------------
  |  Branch (165:13): [True: 9.05k, False: 75.0k]
  ------------------
  166|  9.05k|          ++num_used_parallelograms;
  167|  1.39M|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (167:27): [True: 1.38M, False: 9.05k]
  ------------------
  168|  1.38M|            multi_pred_vals[j] =
  169|  1.38M|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  170|  1.38M|          }
  171|  9.05k|        }
  172|  84.0k|      }
  173|  58.5k|    }
  174|   852k|    const int dst_offset = p * num_components;
  175|   852k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (175:9): [True: 847k, False: 5.05k]
  ------------------
  176|       |      // No parallelogram was valid.
  177|       |      // We use the last decoded point as a reference.
  178|   847k|      const int src_offset = (p - 1) * num_components;
  179|   847k|      this->transform().ComputeOriginalValue(
  180|   847k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  181|   847k|    } else {
  182|       |      // Compute the correction from the predicted value.
  183|   801k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (183:23): [True: 796k, False: 5.05k]
  ------------------
  184|   796k|        multi_pred_vals[c] /= num_used_parallelograms;
  185|   796k|      }
  186|  5.05k|      this->transform().ComputeOriginalValue(
  187|  5.05k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  188|  5.05k|    }
  189|   852k|  }
  190|    172|  return true;
  191|    300|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    511|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    511|            attribute, transform, mesh_data),
   52|    511|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  196|    497|                                                                *buffer) {
  197|    497|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  198|    497|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    497|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (198:7): [True: 3, False: 494]
  ------------------
  199|       |    // Decode prediction mode.
  200|      3|    uint8_t mode;
  201|      3|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (201:9): [True: 1, False: 2]
  ------------------
  202|      1|      return false;
  203|      1|    }
  204|       |
  205|      2|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (205:9): [True: 1, False: 1]
  ------------------
  206|       |      // Unsupported mode.
  207|      1|      return false;
  208|      1|    }
  209|      2|  }
  210|    495|#endif
  211|       |
  212|       |  // Encode selected edges using separate rans bit coder for each context.
  213|  2.08k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (213:19): [True: 1.72k, False: 358]
  ------------------
  214|  1.72k|    uint32_t num_flags;
  215|  1.72k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (215:9): [True: 21, False: 1.70k]
  ------------------
  216|     21|      return false;
  217|     21|    }
  218|  1.70k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (218:9): [True: 89, False: 1.61k]
  ------------------
  219|     89|      return false;
  220|     89|    }
  221|  1.61k|    if (num_flags > 0) {
  ------------------
  |  Branch (221:9): [True: 628, False: 985]
  ------------------
  222|    628|      is_crease_edge_[i].resize(num_flags);
  223|    628|      RAnsBitDecoder decoder;
  224|    628|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (224:11): [True: 27, False: 601]
  ------------------
  225|     27|        return false;
  226|     27|      }
  227|  1.05M|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (227:28): [True: 1.05M, False: 601]
  ------------------
  228|  1.05M|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  229|  1.05M|      }
  230|    601|      decoder.EndDecoding();
  231|    601|    }
  232|  1.61k|  }
  233|    358|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  234|    358|                                     MeshDataT>::DecodePredictionData(buffer);
  235|    495|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    312|                          const PointIndex * /* entry_to_point_id_map */) {
   87|    312|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    312|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  1.56k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 1.24k, False: 312]
  ------------------
   93|  1.24k|    pred_vals[i].resize(num_components, 0);
   94|  1.24k|  }
   95|    312|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    312|                                         out_data);
   97|       |
   98|    312|  const CornerTable *const table = this->mesh_data().corner_table();
   99|    312|  const std::vector<int32_t> *const vertex_to_data_map =
  100|    312|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    312|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    312|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    312|  const int corner_map_size =
  109|    312|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|    312|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (110:7): [True: 0, False: 312]
  ------------------
  111|      0|    return false;
  112|      0|  }
  113|   194k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (113:19): [True: 194k, False: 165]
  ------------------
  114|   194k|    const CornerIndex start_corner_id =
  115|   194k|        this->mesh_data().data_to_corner_map()->at(p);
  116|       |
  117|   194k|    CornerIndex corner_id(start_corner_id);
  118|   194k|    int num_parallelograms = 0;
  119|   194k|    bool first_pass = true;
  120|  1.16M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (120:12): [True: 1.12M, False: 41.7k]
  ------------------
  121|  1.12M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (121:11): [True: 343k, False: 781k]
  ------------------
  122|  1.12M|              p, corner_id, table, *vertex_to_data_map, out_data,
  123|  1.12M|              num_components, &(pred_vals[num_parallelograms][0]))) {
  124|       |        // Parallelogram prediction applied and stored in
  125|       |        // |pred_vals[num_parallelograms]|
  126|   343k|        ++num_parallelograms;
  127|       |        // Stop processing when we reach the maximum number of allowed
  128|       |        // parallelograms.
  129|   343k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (129:13): [True: 403, False: 342k]
  ------------------
  130|    403|          break;
  131|    403|        }
  132|   343k|      }
  133|       |
  134|       |      // Proceed to the next corner attached to the vertex. First swing left
  135|       |      // and if we reach a boundary, swing right from the start corner.
  136|  1.12M|      if (first_pass) {
  ------------------
  |  Branch (136:11): [True: 1.04M, False: 84.7k]
  ------------------
  137|  1.04M|        corner_id = table->SwingLeft(corner_id);
  138|  1.04M|      } else {
  139|  84.7k|        corner_id = table->SwingRight(corner_id);
  140|  84.7k|      }
  141|  1.12M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (141:11): [True: 152k, False: 972k]
  ------------------
  142|   152k|        break;
  143|   152k|      }
  144|   972k|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (144:11): [True: 79.0k, False: 893k]
  |  Branch (144:47): [True: 41.7k, False: 37.3k]
  ------------------
  145|  41.7k|        first_pass = false;
  146|  41.7k|        corner_id = table->SwingRight(start_corner_id);
  147|  41.7k|      }
  148|   972k|    }
  149|       |
  150|       |    // Check which of the available parallelograms are actually used and compute
  151|       |    // the final predicted value.
  152|   194k|    int num_used_parallelograms = 0;
  153|   194k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (153:9): [True: 192k, False: 1.97k]
  ------------------
  154|  13.2M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (154:23): [True: 13.0M, False: 192k]
  ------------------
  155|  13.0M|        multi_pred_vals[i] = 0;
  156|  13.0M|      }
  157|       |      // Check which parallelograms are actually used.
  158|   535k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (158:23): [True: 343k, False: 192k]
  ------------------
  159|   343k|        const int context = num_parallelograms - 1;
  160|   343k|        const int pos = is_crease_edge_pos[context]++;
  161|   343k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (161:13): [True: 147, False: 343k]
  ------------------
  162|    147|          return false;
  163|    147|        }
  164|   343k|        const bool is_crease = is_crease_edge_[context][pos];
  165|   343k|        if (!is_crease) {
  ------------------
  |  Branch (165:13): [True: 27.9k, False: 315k]
  ------------------
  166|  27.9k|          ++num_used_parallelograms;
  167|  1.38M|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (167:27): [True: 1.35M, False: 27.9k]
  ------------------
  168|  1.35M|            multi_pred_vals[j] =
  169|  1.35M|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  170|  1.35M|          }
  171|  27.9k|        }
  172|   343k|      }
  173|   192k|    }
  174|   194k|    const int dst_offset = p * num_components;
  175|   194k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (175:9): [True: 179k, False: 14.4k]
  ------------------
  176|       |      // No parallelogram was valid.
  177|       |      // We use the last decoded point as a reference.
  178|   179k|      const int src_offset = (p - 1) * num_components;
  179|   179k|      this->transform().ComputeOriginalValue(
  180|   179k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  181|   179k|    } else {
  182|       |      // Compute the correction from the predicted value.
  183|   768k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (183:23): [True: 754k, False: 14.4k]
  ------------------
  184|   754k|        multi_pred_vals[c] /= num_used_parallelograms;
  185|   754k|      }
  186|  14.4k|      this->transform().ComputeOriginalValue(
  187|  14.4k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  188|  14.4k|    }
  189|   194k|  }
  190|    165|  return true;
  191|    312|}

_ZN5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE3SetEPKNS_4MeshEPKS1_PKNSt3__16vectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS8_9allocatorISC_EEEEPKNS9_IiNSD_IiEEEE:
   37|  3.40k|           const std::vector<int32_t> *vertex_to_data_map) {
   38|  3.40k|    mesh_ = mesh;
   39|  3.40k|    corner_table_ = table;
   40|  3.40k|    data_to_corner_map_ = data_to_corner_map;
   41|  3.40k|    vertex_to_data_map_ = vertex_to_data_map;
   42|  3.40k|  }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE12corner_tableEv:
   45|  17.8M|  const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE18vertex_to_data_mapEv:
   46|  12.2M|  const std::vector<int32_t> *vertex_to_data_map() const {
   47|  12.2M|    return vertex_to_data_map_;
   48|  12.2M|  }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE18data_to_corner_mapEv:
   49|  9.58M|  const std::vector<CornerIndex> *data_to_corner_map() const {
   50|  9.58M|    return data_to_corner_map_;
   51|  9.58M|  }
_ZN5draco24MeshPredictionSchemeDataINS_11CornerTableEE3SetEPKNS_4MeshEPKS1_PKNSt3__16vectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS8_9allocatorISC_EEEEPKNS9_IiNSD_IiEEEE:
   37|  3.20k|           const std::vector<int32_t> *vertex_to_data_map) {
   38|  3.20k|    mesh_ = mesh;
   39|  3.20k|    corner_table_ = table;
   40|  3.20k|    data_to_corner_map_ = data_to_corner_map;
   41|  3.20k|    vertex_to_data_map_ = vertex_to_data_map;
   42|  3.20k|  }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE12corner_tableEv:
   45|  10.8M|  const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE18vertex_to_data_mapEv:
   46|  9.51M|  const std::vector<int32_t> *vertex_to_data_map() const {
   47|  9.51M|    return vertex_to_data_map_;
   48|  9.51M|  }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE18data_to_corner_mapEv:
   49|  2.31M|  const std::vector<CornerIndex> *data_to_corner_map() const {
   50|  2.31M|    return data_to_corner_map_;
   51|  2.31M|  }
_ZN5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEC2Ev:
   30|  3.40k|      : mesh_(nullptr),
   31|  3.40k|        corner_table_(nullptr),
   32|  3.40k|        vertex_to_data_map_(nullptr),
   33|  3.40k|        data_to_corner_map_(nullptr) {}
_ZN5draco24MeshPredictionSchemeDataINS_11CornerTableEEC2Ev:
   30|  3.20k|      : mesh_(nullptr),
   31|  3.20k|        corner_table_(nullptr),
   32|  3.20k|        vertex_to_data_map_(nullptr),
   33|  3.20k|        data_to_corner_map_(nullptr) {}

_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|  1.13M|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   237k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|   886k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   168k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  2.94k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  2.94k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|  12.9M|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  2.79k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  2.79k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|  2.83M|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    215|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    215|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    199|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    199|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    229|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    229|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    198|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    198|        mesh_data_(mesh_data) {}

_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    421|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    215|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    215|    DRACO_DCHECK_EQ(i, 0);
   70|    215|    (void)i;
   71|    215|    return GeometryAttribute::POSITION;
   72|    215|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    210|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    210|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 210]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    210|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 4, False: 206]
  ------------------
   79|      4|      return false;  // Currently works only for 3 component positions.
   80|      4|    }
   81|    206|    predictor_.SetPositionAttribute(*att);
   82|    206|    return true;
   83|    210|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    206|                                                                *buffer) {
  146|       |  // Get data needed for transform
  147|    206|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 6, False: 200]
  ------------------
  148|      6|    return false;
  149|      6|  }
  150|       |
  151|    200|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    200|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    200|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 37, False: 163]
  ------------------
  153|     37|    uint8_t prediction_mode;
  154|     37|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 36]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     36|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 1, False: 35]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      1|      return false;
  160|      1|    }
  161|       |
  162|     35|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 35]
  ------------------
  163|     35|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     35|  }
  167|    198|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    198|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 3, False: 195]
  ------------------
  171|      3|    return false;
  172|      3|  }
  173|       |
  174|    195|  return true;
  175|    198|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    195|                                      const PointIndex *entry_to_point_id_map) {
  103|    195|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    195|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    195|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    195|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    195|  const int corner_map_size =
  111|    195|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    195|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 195]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    195|  VectorD<int32_t, 3> pred_normal_3d;
  117|    195|  int32_t pred_normal_oct[2];
  118|       |
  119|  1.13M|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 1.13M, False: 195]
  ------------------
  120|  1.13M|    const CornerIndex corner_id =
  121|  1.13M|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|  1.13M|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|  1.13M|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|  1.13M|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|  1.13M|                    octahedron_tool_box_.center_value());
  128|  1.13M|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 770k, False: 361k]
  ------------------
  129|   770k|      pred_normal_3d = -pred_normal_3d;
  130|   770k|    }
  131|  1.13M|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|  1.13M|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|  1.13M|    const int data_offset = data_id * 2;
  135|  1.13M|    this->transform().ComputeOriginalValue(
  136|  1.13M|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|  1.13M|  }
  138|    195|  flip_normal_bit_decoder_.EndDecoding();
  139|    195|  return true;
  140|    195|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    195|  void SetQuantizationBits(int q) {
   85|    195|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    195|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    395|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    199|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    199|    DRACO_DCHECK_EQ(i, 0);
   70|    199|    (void)i;
   71|    199|    return GeometryAttribute::POSITION;
   72|    199|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    197|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    197|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 197]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    197|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 196]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    196|    predictor_.SetPositionAttribute(*att);
   82|    196|    return true;
   83|    197|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    196|                                                                *buffer) {
  146|       |  // Get data needed for transform
  147|    196|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 7, False: 189]
  ------------------
  148|      7|    return false;
  149|      7|  }
  150|       |
  151|    189|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    189|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    189|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 57, False: 132]
  ------------------
  153|     57|    uint8_t prediction_mode;
  154|     57|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 56]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     56|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 4, False: 52]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      4|      return false;
  160|      4|    }
  161|       |
  162|     52|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 52]
  ------------------
  163|     52|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     52|  }
  167|    184|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    184|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 2, False: 182]
  ------------------
  171|      2|    return false;
  172|      2|  }
  173|       |
  174|    182|  return true;
  175|    184|}
_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|    182|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 182]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    182|  VectorD<int32_t, 3> pred_normal_3d;
  117|    182|  int32_t pred_normal_oct[2];
  118|       |
  119|   237k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 237k, False: 182]
  ------------------
  120|   237k|    const CornerIndex corner_id =
  121|   237k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   237k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   237k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   237k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   237k|                    octahedron_tool_box_.center_value());
  128|   237k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 195k, False: 41.9k]
  ------------------
  129|   195k|      pred_normal_3d = -pred_normal_3d;
  130|   195k|    }
  131|   237k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   237k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   237k|    const int data_offset = data_id * 2;
  135|   237k|    this->transform().ComputeOriginalValue(
  136|   237k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   237k|  }
  138|    182|  flip_normal_bit_decoder_.EndDecoding();
  139|    182|  return true;
  140|    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|    456|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    229|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    229|    DRACO_DCHECK_EQ(i, 0);
   70|    229|    (void)i;
   71|    229|    return GeometryAttribute::POSITION;
   72|    229|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    228|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    228|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 228]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    228|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 227]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    227|    predictor_.SetPositionAttribute(*att);
   82|    227|    return true;
   83|    228|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    227|                                                                *buffer) {
  146|       |  // Get data needed for transform
  147|    227|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 9, False: 218]
  ------------------
  148|      9|    return false;
  149|      9|  }
  150|       |
  151|    218|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    218|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    218|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 50, False: 168]
  ------------------
  153|     50|    uint8_t prediction_mode;
  154|     50|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 49]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     49|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 12, False: 37]
  ------------------
  158|       |      // Invalid prediction mode.
  159|     12|      return false;
  160|     12|    }
  161|       |
  162|     37|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 37]
  ------------------
  163|     37|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     37|  }
  167|    205|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    205|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 4, False: 201]
  ------------------
  171|      4|    return false;
  172|      4|  }
  173|       |
  174|    201|  return true;
  175|    205|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    201|                                      const PointIndex *entry_to_point_id_map) {
  103|    201|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    201|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    201|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    201|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    201|  const int corner_map_size =
  111|    201|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    201|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 201]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    201|  VectorD<int32_t, 3> pred_normal_3d;
  117|    201|  int32_t pred_normal_oct[2];
  118|       |
  119|   886k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 886k, False: 201]
  ------------------
  120|   886k|    const CornerIndex corner_id =
  121|   886k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   886k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   886k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   886k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   886k|                    octahedron_tool_box_.center_value());
  128|   886k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 485k, False: 400k]
  ------------------
  129|   485k|      pred_normal_3d = -pred_normal_3d;
  130|   485k|    }
  131|   886k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   886k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   886k|    const int data_offset = data_id * 2;
  135|   886k|    this->transform().ComputeOriginalValue(
  136|   886k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   886k|  }
  138|    201|  flip_normal_bit_decoder_.EndDecoding();
  139|    201|  return true;
  140|    201|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    201|  void SetQuantizationBits(int q) {
   85|    201|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    201|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    394|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    198|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    198|    DRACO_DCHECK_EQ(i, 0);
   70|    198|    (void)i;
   71|    198|    return GeometryAttribute::POSITION;
   72|    198|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    198|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    198|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 198]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    198|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 2, False: 196]
  ------------------
   79|      2|      return false;  // Currently works only for 3 component positions.
   80|      2|    }
   81|    196|    predictor_.SetPositionAttribute(*att);
   82|    196|    return true;
   83|    198|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    196|                                                                *buffer) {
  146|       |  // Get data needed for transform
  147|    196|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 6, False: 190]
  ------------------
  148|      6|    return false;
  149|      6|  }
  150|       |
  151|    190|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    190|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    190|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 45, False: 145]
  ------------------
  153|     45|    uint8_t prediction_mode;
  154|     45|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 44]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     44|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 2, False: 42]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      2|      return false;
  160|      2|    }
  161|       |
  162|     42|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 42]
  ------------------
  163|     42|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     42|  }
  167|    187|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    187|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 8, False: 179]
  ------------------
  171|      8|    return false;
  172|      8|  }
  173|       |
  174|    179|  return true;
  175|    187|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    179|                                      const PointIndex *entry_to_point_id_map) {
  103|    179|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    179|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    179|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    179|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    179|  const int corner_map_size =
  111|    179|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    179|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 179]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    179|  VectorD<int32_t, 3> pred_normal_3d;
  117|    179|  int32_t pred_normal_oct[2];
  118|       |
  119|   168k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 168k, False: 179]
  ------------------
  120|   168k|    const CornerIndex corner_id =
  121|   168k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   168k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   168k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   168k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   168k|                    octahedron_tool_box_.center_value());
  128|   168k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 140k, False: 28.0k]
  ------------------
  129|   140k|      pred_normal_3d = -pred_normal_3d;
  130|   140k|    }
  131|   168k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   168k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   168k|    const int data_offset = data_id * 2;
  135|   168k|    this->transform().ComputeOriginalValue(
  136|   168k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   168k|  }
  138|    179|  flip_normal_bit_decoder_.EndDecoding();
  139|    179|  return true;
  140|    179|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    179|  void SetQuantizationBits(int q) {
   85|    179|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    179|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    450|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    450|            attribute, transform, mesh_data),
   37|    450|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    895|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   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_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_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_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    444|                                                                *buffer) {
  146|       |  // Get data needed for transform
  147|    444|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 15, False: 429]
  ------------------
  148|     15|    return false;
  149|     15|  }
  150|       |
  151|    429|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    429|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    429|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 179, False: 250]
  ------------------
  153|    179|    uint8_t prediction_mode;
  154|    179|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 2, False: 177]
  ------------------
  155|      2|      return false;
  156|      2|    }
  157|    177|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 3, False: 174]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      3|      return false;
  160|      3|    }
  161|       |
  162|    174|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 174]
  ------------------
  163|    174|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|    174|  }
  167|    424|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    424|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 40, False: 384]
  ------------------
  171|     40|    return false;
  172|     40|  }
  173|       |
  174|    384|  return true;
  175|    424|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    384|                                      const PointIndex *entry_to_point_id_map) {
  103|    384|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    384|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    384|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    384|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    384|  const int corner_map_size =
  111|    384|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    384|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 384]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    384|  VectorD<int32_t, 3> pred_normal_3d;
  117|    384|  int32_t pred_normal_oct[2];
  118|       |
  119|   543k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 542k, False: 384]
  ------------------
  120|   542k|    const CornerIndex corner_id =
  121|   542k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   542k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   542k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   542k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   542k|                    octahedron_tool_box_.center_value());
  128|   542k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 178k, False: 363k]
  ------------------
  129|   178k|      pred_normal_3d = -pred_normal_3d;
  130|   178k|    }
  131|   542k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   542k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   542k|    const int data_offset = data_id * 2;
  135|   542k|    this->transform().ComputeOriginalValue(
  136|   542k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   542k|  }
  138|    384|  flip_normal_bit_decoder_.EndDecoding();
  139|    384|  return true;
  140|    384|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    384|  void SetQuantizationBits(int q) {
   85|    384|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    384|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    442|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    442|            attribute, transform, mesh_data),
   37|    442|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    878|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    442|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    442|    DRACO_DCHECK_EQ(i, 0);
   70|    442|    (void)i;
   71|    442|    return GeometryAttribute::POSITION;
   72|    442|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    440|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    440|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 440]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    440|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 4, False: 436]
  ------------------
   79|      4|      return false;  // Currently works only for 3 component positions.
   80|      4|    }
   81|    436|    predictor_.SetPositionAttribute(*att);
   82|    436|    return true;
   83|    440|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    432|                                                                *buffer) {
  146|       |  // Get data needed for transform
  147|    432|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 16, False: 416]
  ------------------
  148|     16|    return false;
  149|     16|  }
  150|       |
  151|    416|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    416|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    416|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 166, False: 250]
  ------------------
  153|    166|    uint8_t prediction_mode;
  154|    166|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 165]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|    165|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 5, False: 160]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      5|      return false;
  160|      5|    }
  161|       |
  162|    160|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 160]
  ------------------
  163|    160|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|    160|  }
  167|    410|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    410|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 34, False: 376]
  ------------------
  171|     34|    return false;
  172|     34|  }
  173|       |
  174|    376|  return true;
  175|    410|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    376|                                      const PointIndex *entry_to_point_id_map) {
  103|    376|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    376|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    376|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    376|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    376|  const int corner_map_size =
  111|    376|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    376|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 376]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    376|  VectorD<int32_t, 3> pred_normal_3d;
  117|    376|  int32_t pred_normal_oct[2];
  118|       |
  119|   280k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 280k, False: 376]
  ------------------
  120|   280k|    const CornerIndex corner_id =
  121|   280k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   280k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   280k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   280k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   280k|                    octahedron_tool_box_.center_value());
  128|   280k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 270k, False: 10.2k]
  ------------------
  129|   270k|      pred_normal_3d = -pred_normal_3d;
  130|   270k|    }
  131|   280k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   280k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   280k|    const int data_offset = data_id * 2;
  135|   280k|    this->transform().ComputeOriginalValue(
  136|   280k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   280k|  }
  138|    376|  flip_normal_bit_decoder_.EndDecoding();
  139|    376|  return true;
  140|    376|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    376|  void SetQuantizationBits(int q) {
   85|    376|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    376|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    215|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    215|            attribute, transform, mesh_data),
   37|    215|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    199|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    199|            attribute, transform, mesh_data),
   37|    199|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    229|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    229|            attribute, transform, mesh_data),
   37|    229|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    198|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    198|            attribute, transform, mesh_data),
   37|    198|        predictor_(mesh_data) {}

_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    250|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    250|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 34, False: 216]
  ------------------
  105|     34|      this->normal_prediction_mode_ = mode;
  106|     34|      return true;
  107|    216|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 216, False: 0]
  ------------------
  108|    216|      this->normal_prediction_mode_ = mode;
  109|    216|      return true;
  110|    216|    }
  111|      0|    return false;
  112|    250|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|  1.13M|                             DataTypeT *prediction) override {
   42|  1.13M|    DRACO_DCHECK(this->IsInitialized());
   43|  1.13M|    typedef typename MeshDataT::CornerTable CornerTable;
   44|  1.13M|    const CornerTable *const corner_table = this->mesh_data_.corner_table();
   45|       |    // Going to compute the predicted normal from the surrounding triangles
   46|       |    // according to the connectivity of the given corner table.
   47|  1.13M|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|  1.13M|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|  1.13M|    VectorD<int64_t, 3> normal;
   53|  1.13M|    CornerIndex c_next, c_prev;
   54|  2.34M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.21M, False: 1.13M]
  ------------------
   55|       |      // Getting corners.
   56|  1.21M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 198, False: 1.21M]
  ------------------
   57|    198|        c_next = corner_table->Next(corner_id);
   58|    198|        c_prev = corner_table->Previous(corner_id);
   59|  1.21M|      } else {
   60|  1.21M|        c_next = corner_table->Next(cit.Corner());
   61|  1.21M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.21M|      }
   63|  1.21M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.21M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.21M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.21M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.21M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.21M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.21M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.21M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.21M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.21M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.21M|      cit.Next();
   81|  1.21M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|  1.13M|    constexpr int64_t upper_bound = 1 << 29;
   85|  1.13M|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 132, False: 1.13M]
  ------------------
   86|    132|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    132|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 41, False: 91]
  ------------------
   88|     41|        const int64_t quotient = abs_sum / upper_bound;
   89|     41|        normal = normal / quotient;
   90|     41|      }
   91|  1.13M|    } else {
   92|  1.13M|      const int64_t abs_sum = normal.AbsSum();
   93|  1.13M|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 3.12k, False: 1.12M]
  ------------------
   94|  3.12k|        const int64_t quotient = abs_sum / upper_bound;
   95|  3.12k|        normal = normal / quotient;
   96|  3.12k|      }
   97|  1.13M|    }
   98|  1.13M|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|  1.13M|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|  1.13M|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|  1.13M|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|  1.13M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    251|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    251|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 51, False: 200]
  ------------------
  105|     51|      this->normal_prediction_mode_ = mode;
  106|     51|      return true;
  107|    200|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 200, False: 0]
  ------------------
  108|    200|      this->normal_prediction_mode_ = mode;
  109|    200|      return true;
  110|    200|    }
  111|      0|    return false;
  112|    251|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   237k|                             DataTypeT *prediction) override {
   42|   237k|    DRACO_DCHECK(this->IsInitialized());
   43|   237k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   237k|    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|   237k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   237k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   237k|    VectorD<int64_t, 3> normal;
   53|   237k|    CornerIndex c_next, c_prev;
   54|  1.65M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.41M, False: 237k]
  ------------------
   55|       |      // Getting corners.
   56|  1.41M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 300, False: 1.41M]
  ------------------
   57|    300|        c_next = corner_table->Next(corner_id);
   58|    300|        c_prev = corner_table->Previous(corner_id);
   59|  1.41M|      } else {
   60|  1.41M|        c_next = corner_table->Next(cit.Corner());
   61|  1.41M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.41M|      }
   63|  1.41M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.41M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.41M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.41M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.41M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.41M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.41M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.41M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.41M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.41M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.41M|      cit.Next();
   81|  1.41M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   237k|    constexpr int64_t upper_bound = 1 << 29;
   85|   237k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 200, False: 237k]
  ------------------
   86|    200|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    200|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 44, False: 156]
  ------------------
   88|     44|        const int64_t quotient = abs_sum / upper_bound;
   89|     44|        normal = normal / quotient;
   90|     44|      }
   91|   237k|    } else {
   92|   237k|      const int64_t abs_sum = normal.AbsSum();
   93|   237k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 94.3k, False: 142k]
  ------------------
   94|  94.3k|        const int64_t quotient = abs_sum / upper_bound;
   95|  94.3k|        normal = normal / quotient;
   96|  94.3k|      }
   97|   237k|    }
   98|   237k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   237k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   237k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   237k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   237k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    266|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    266|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 36, False: 230]
  ------------------
  105|     36|      this->normal_prediction_mode_ = mode;
  106|     36|      return true;
  107|    230|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 230, False: 0]
  ------------------
  108|    230|      this->normal_prediction_mode_ = mode;
  109|    230|      return true;
  110|    230|    }
  111|      0|    return false;
  112|    266|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   886k|                             DataTypeT *prediction) override {
   42|   886k|    DRACO_DCHECK(this->IsInitialized());
   43|   886k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   886k|    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|   886k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   886k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   886k|    VectorD<int64_t, 3> normal;
   53|   886k|    CornerIndex c_next, c_prev;
   54|  1.81M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 924k, False: 886k]
  ------------------
   55|       |      // Getting corners.
   56|   924k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 204, False: 924k]
  ------------------
   57|    204|        c_next = corner_table->Next(corner_id);
   58|    204|        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|   924k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   924k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   924k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   924k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   924k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   924k|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|   924k|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|   924k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   924k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   924k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   924k|      cit.Next();
   81|   924k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   886k|    constexpr int64_t upper_bound = 1 << 29;
   85|   886k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 136, False: 886k]
  ------------------
   86|    136|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    136|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 37, False: 99]
  ------------------
   88|     37|        const int64_t quotient = abs_sum / upper_bound;
   89|     37|        normal = normal / quotient;
   90|     37|      }
   91|   886k|    } else {
   92|   886k|      const int64_t abs_sum = normal.AbsSum();
   93|   886k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 2.75k, False: 883k]
  ------------------
   94|  2.75k|        const int64_t quotient = abs_sum / upper_bound;
   95|  2.75k|        normal = normal / quotient;
   96|  2.75k|      }
   97|   886k|    }
   98|   886k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   886k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   886k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   886k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   886k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    240|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    240|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 41, False: 199]
  ------------------
  105|     41|      this->normal_prediction_mode_ = mode;
  106|     41|      return true;
  107|    199|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 199, False: 0]
  ------------------
  108|    199|      this->normal_prediction_mode_ = mode;
  109|    199|      return true;
  110|    199|    }
  111|      0|    return false;
  112|    240|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   168k|                             DataTypeT *prediction) override {
   42|   168k|    DRACO_DCHECK(this->IsInitialized());
   43|   168k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   168k|    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|   168k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   168k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   168k|    VectorD<int64_t, 3> normal;
   53|   168k|    CornerIndex c_next, c_prev;
   54|  1.17M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.00M, False: 168k]
  ------------------
   55|       |      // Getting corners.
   56|  1.00M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 240, False: 1.00M]
  ------------------
   57|    240|        c_next = corner_table->Next(corner_id);
   58|    240|        c_prev = corner_table->Previous(corner_id);
   59|  1.00M|      } else {
   60|  1.00M|        c_next = corner_table->Next(cit.Corner());
   61|  1.00M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.00M|      }
   63|  1.00M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.00M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.00M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.00M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.00M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.00M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.00M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.00M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.00M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.00M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.00M|      cit.Next();
   81|  1.00M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   168k|    constexpr int64_t upper_bound = 1 << 29;
   85|   168k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 160, False: 168k]
  ------------------
   86|    160|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    160|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 49, False: 111]
  ------------------
   88|     49|        const int64_t quotient = abs_sum / upper_bound;
   89|     49|        normal = normal / quotient;
   90|     49|      }
   91|   168k|    } else {
   92|   168k|      const int64_t abs_sum = normal.AbsSum();
   93|   168k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 75.6k, False: 92.9k]
  ------------------
   94|  75.6k|        const int64_t quotient = abs_sum / upper_bound;
   95|  75.6k|        normal = normal / quotient;
   96|  75.6k|      }
   97|   168k|    }
   98|   168k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   168k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   168k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   168k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   168k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    450|      : Base(md) {
   35|    450|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    450|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    624|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    624|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 156, False: 468]
  ------------------
  105|    156|      this->normal_prediction_mode_ = mode;
  106|    156|      return true;
  107|    468|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 468, False: 0]
  ------------------
  108|    468|      this->normal_prediction_mode_ = mode;
  109|    468|      return true;
  110|    468|    }
  111|      0|    return false;
  112|    624|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   542k|                             DataTypeT *prediction) override {
   42|   542k|    DRACO_DCHECK(this->IsInitialized());
   43|   542k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   542k|    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|   542k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   542k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   542k|    VectorD<int64_t, 3> normal;
   53|   542k|    CornerIndex c_next, c_prev;
   54|  1.69M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.15M, False: 542k]
  ------------------
   55|       |      // Getting corners.
   56|  1.15M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 446k, False: 710k]
  ------------------
   57|   446k|        c_next = corner_table->Next(corner_id);
   58|   446k|        c_prev = corner_table->Previous(corner_id);
   59|   710k|      } else {
   60|   710k|        c_next = corner_table->Next(cit.Corner());
   61|   710k|        c_prev = corner_table->Previous(cit.Corner());
   62|   710k|      }
   63|  1.15M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.15M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.15M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.15M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.15M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.15M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.15M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.15M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.15M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.15M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.15M|      cit.Next();
   81|  1.15M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   542k|    constexpr int64_t upper_bound = 1 << 29;
   85|   542k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 75.4k, False: 467k]
  ------------------
   86|  75.4k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  75.4k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 225, False: 75.2k]
  ------------------
   88|    225|        const int64_t quotient = abs_sum / upper_bound;
   89|    225|        normal = normal / quotient;
   90|    225|      }
   91|   467k|    } else {
   92|   467k|      const int64_t abs_sum = normal.AbsSum();
   93|   467k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 2.47k, False: 464k]
  ------------------
   94|  2.47k|        const int64_t quotient = abs_sum / upper_bound;
   95|  2.47k|        normal = normal / quotient;
   96|  2.47k|      }
   97|   467k|    }
   98|   542k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   542k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   542k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   542k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   542k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    442|      : Base(md) {
   35|    442|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    442|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    602|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    602|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 145, False: 457]
  ------------------
  105|    145|      this->normal_prediction_mode_ = mode;
  106|    145|      return true;
  107|    457|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 457, False: 0]
  ------------------
  108|    457|      this->normal_prediction_mode_ = mode;
  109|    457|      return true;
  110|    457|    }
  111|      0|    return false;
  112|    602|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   280k|                             DataTypeT *prediction) override {
   42|   280k|    DRACO_DCHECK(this->IsInitialized());
   43|   280k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   280k|    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|   280k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   280k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   280k|    VectorD<int64_t, 3> normal;
   53|   280k|    CornerIndex c_next, c_prev;
   54|  1.92M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.64M, False: 280k]
  ------------------
   55|       |      // Getting corners.
   56|  1.64M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 706k, False: 939k]
  ------------------
   57|   706k|        c_next = corner_table->Next(corner_id);
   58|   706k|        c_prev = corner_table->Previous(corner_id);
   59|   939k|      } else {
   60|   939k|        c_next = corner_table->Next(cit.Corner());
   61|   939k|        c_prev = corner_table->Previous(cit.Corner());
   62|   939k|      }
   63|  1.64M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.64M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.64M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.64M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.64M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.64M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.64M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.64M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.64M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.64M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.64M|      cit.Next();
   81|  1.64M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   280k|    constexpr int64_t upper_bound = 1 << 29;
   85|   280k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 118k, False: 161k]
  ------------------
   86|   118k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|   118k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 313, False: 118k]
  ------------------
   88|    313|        const int64_t quotient = abs_sum / upper_bound;
   89|    313|        normal = normal / quotient;
   90|    313|      }
   91|   161k|    } else {
   92|   161k|      const int64_t abs_sum = normal.AbsSum();
   93|   161k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 3.89k, False: 157k]
  ------------------
   94|  3.89k|        const int64_t quotient = abs_sum / upper_bound;
   95|  3.89k|        normal = normal / quotient;
   96|  3.89k|      }
   97|   161k|    }
   98|   280k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   280k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   280k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   280k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   280k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    215|      : Base(md) {
   35|    215|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    215|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    199|      : Base(md) {
   35|    199|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    199|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    229|      : Base(md) {
   35|    229|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    229|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    198|      : Base(md) {
   35|    198|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    198|  };

_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.55M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.55M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.55M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.55M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.55M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.55M|    return GetPositionForDataId(data_id);
   77|  3.55M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  3.55M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.55M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.55M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.55M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.55M|    VectorD<int64_t, 3> pos;
   68|  3.55M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.55M|    return pos;
   70|  3.55M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    206|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    206|    pos_attribute_ = &position_attribute;
   43|    206|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    195|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    195|    entry_to_point_id_map_ = map;
   46|    195|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.06M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.06M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.06M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.06M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.06M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.06M|    return GetPositionForDataId(data_id);
   77|  3.06M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  3.06M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.06M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.06M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.06M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.06M|    VectorD<int64_t, 3> pos;
   68|  3.06M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.06M|    return pos;
   70|  3.06M|  }
_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.73M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.73M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.73M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.73M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.73M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.73M|    return GetPositionForDataId(data_id);
   77|  2.73M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  2.73M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.73M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.73M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.73M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.73M|    VectorD<int64_t, 3> pos;
   68|  2.73M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.73M|    return pos;
   70|  2.73M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    227|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    227|    pos_attribute_ = &position_attribute;
   43|    227|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    201|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    201|    entry_to_point_id_map_ = map;
   46|    201|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.17M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.17M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.17M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.17M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.17M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.17M|    return GetPositionForDataId(data_id);
   77|  2.17M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  2.17M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.17M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.17M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.17M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.17M|    VectorD<int64_t, 3> pos;
   68|  2.17M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.17M|    return pos;
   70|  2.17M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    196|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    196|    pos_attribute_ = &position_attribute;
   43|    196|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    179|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    179|    entry_to_point_id_map_ = map;
   46|    179|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    450|      : pos_attribute_(nullptr),
   36|    450|        entry_to_point_id_map_(nullptr),
   37|    450|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    450|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.85M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.85M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.85M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.85M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.85M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.85M|    return GetPositionForDataId(data_id);
   77|  2.85M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  2.85M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.85M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.85M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.85M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.85M|    VectorD<int64_t, 3> pos;
   68|  2.85M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.85M|    return pos;
   70|  2.85M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    445|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    445|    pos_attribute_ = &position_attribute;
   43|    445|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    384|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    384|    entry_to_point_id_map_ = map;
   46|    384|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    442|      : pos_attribute_(nullptr),
   36|    442|        entry_to_point_id_map_(nullptr),
   37|    442|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    442|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.57M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.57M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.57M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.57M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.57M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.57M|    return GetPositionForDataId(data_id);
   77|  3.57M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  3.57M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.57M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.57M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.57M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.57M|    VectorD<int64_t, 3> pos;
   68|  3.57M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.57M|    return pos;
   70|  3.57M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    436|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    436|    pos_attribute_ = &position_attribute;
   43|    436|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    376|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    376|    entry_to_point_id_map_ = map;
   46|    376|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    215|      : pos_attribute_(nullptr),
   36|    215|        entry_to_point_id_map_(nullptr),
   37|    215|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    215|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    199|      : pos_attribute_(nullptr),
   36|    199|        entry_to_point_id_map_(nullptr),
   37|    199|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    199|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    229|      : pos_attribute_(nullptr),
   36|    229|        entry_to_point_id_map_(nullptr),
   37|    229|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    229|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    198|      : pos_attribute_(nullptr),
   36|    198|        entry_to_point_id_map_(nullptr),
   37|    198|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    198|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}

_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    413|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    413|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    391|                          const PointIndex * /* entry_to_point_id_map */) {
   64|    391|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    391|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    391|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    391|      new DataTypeT[num_components]());
   70|       |
   71|    391|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    391|  const CornerTable *const table = this->mesh_data().corner_table();
   74|    391|  const std::vector<int32_t> *const vertex_to_data_map =
   75|    391|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    391|  const int corner_map_size =
   78|    391|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|    391|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (79:7): [True: 0, False: 391]
  ------------------
   80|      0|    return false;
   81|      0|  }
   82|  2.76M|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (82:19): [True: 2.75M, False: 391]
  ------------------
   83|  2.75M|    const CornerIndex start_corner_id =
   84|  2.75M|        this->mesh_data().data_to_corner_map()->at(p);
   85|       |
   86|  2.75M|    CornerIndex corner_id(start_corner_id);
   87|  2.75M|    int num_parallelograms = 0;
   88|  72.5M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (88:21): [True: 69.7M, False: 2.75M]
  ------------------
   89|  69.7M|      pred_vals[i] = static_cast<DataTypeT>(0);
   90|  69.7M|    }
   91|  6.19M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (91:12): [True: 3.43M, False: 2.75M]
  ------------------
   92|  3.43M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (92:11): [True: 275k, False: 3.15M]
  ------------------
   93|  3.43M|              p, corner_id, table, *vertex_to_data_map, out_data,
   94|  3.43M|              num_components, parallelogram_pred_vals.get())) {
   95|  13.6M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (95:25): [True: 13.3M, False: 275k]
  ------------------
   96|  13.3M|          pred_vals[c] =
   97|  13.3M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   98|  13.3M|        }
   99|   275k|        ++num_parallelograms;
  100|   275k|      }
  101|       |
  102|       |      // Proceed to the next corner attached to the vertex.
  103|  3.43M|      corner_id = table->SwingRight(corner_id);
  104|  3.43M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (104:11): [True: 130k, False: 3.30M]
  ------------------
  105|   130k|        corner_id = kInvalidCornerIndex;
  106|   130k|      }
  107|  3.43M|    }
  108|       |
  109|  2.75M|    const int dst_offset = p * num_components;
  110|  2.75M|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (110:9): [True: 2.61M, False: 147k]
  ------------------
  111|       |      // No parallelogram was valid.
  112|       |      // We use the last decoded point as a reference.
  113|  2.61M|      const int src_offset = (p - 1) * num_components;
  114|  2.61M|      this->transform().ComputeOriginalValue(
  115|  2.61M|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  116|  2.61M|    } else {
  117|       |      // Compute the correction from the predicted value.
  118|  7.05M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (118:23): [True: 6.90M, False: 147k]
  ------------------
  119|  6.90M|        pred_vals[c] /= num_parallelograms;
  120|  6.90M|      }
  121|   147k|      this->transform().ComputeOriginalValue(
  122|   147k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  123|   147k|    }
  124|  2.75M|  }
  125|    391|  return true;
  126|    391|}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    616|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    616|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    576|                          const PointIndex * /* entry_to_point_id_map */) {
   64|    576|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    576|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    576|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    576|      new DataTypeT[num_components]());
   70|       |
   71|    576|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    576|  const CornerTable *const table = this->mesh_data().corner_table();
   74|    576|  const std::vector<int32_t> *const vertex_to_data_map =
   75|    576|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    576|  const int corner_map_size =
   78|    576|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|    576|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (79:7): [True: 0, False: 576]
  ------------------
   80|      0|    return false;
   81|      0|  }
   82|   785k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (82:19): [True: 785k, False: 576]
  ------------------
   83|   785k|    const CornerIndex start_corner_id =
   84|   785k|        this->mesh_data().data_to_corner_map()->at(p);
   85|       |
   86|   785k|    CornerIndex corner_id(start_corner_id);
   87|   785k|    int num_parallelograms = 0;
   88|  25.4M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (88:21): [True: 24.6M, False: 785k]
  ------------------
   89|  24.6M|      pred_vals[i] = static_cast<DataTypeT>(0);
   90|  24.6M|    }
   91|  5.40M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (91:12): [True: 4.62M, False: 785k]
  ------------------
   92|  4.62M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (92:11): [True: 1.51M, False: 3.10M]
  ------------------
   93|  4.62M|              p, corner_id, table, *vertex_to_data_map, out_data,
   94|  4.62M|              num_components, parallelogram_pred_vals.get())) {
   95|  49.2M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (95:25): [True: 47.7M, False: 1.51M]
  ------------------
   96|  47.7M|          pred_vals[c] =
   97|  47.7M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   98|  47.7M|        }
   99|  1.51M|        ++num_parallelograms;
  100|  1.51M|      }
  101|       |
  102|       |      // Proceed to the next corner attached to the vertex.
  103|  4.62M|      corner_id = table->SwingRight(corner_id);
  104|  4.62M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (104:11): [True: 764k, False: 3.85M]
  ------------------
  105|   764k|        corner_id = kInvalidCornerIndex;
  106|   764k|      }
  107|  4.62M|    }
  108|       |
  109|   785k|    const int dst_offset = p * num_components;
  110|   785k|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (110:9): [True: 3.25k, False: 781k]
  ------------------
  111|       |      // No parallelogram was valid.
  112|       |      // We use the last decoded point as a reference.
  113|  3.25k|      const int src_offset = (p - 1) * num_components;
  114|  3.25k|      this->transform().ComputeOriginalValue(
  115|  3.25k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  116|   781k|    } else {
  117|       |      // Compute the correction from the predicted value.
  118|  25.2M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (118:23): [True: 24.5M, False: 781k]
  ------------------
  119|  24.5M|        pred_vals[c] /= num_parallelograms;
  120|  24.5M|      }
  121|   781k|      this->transform().ComputeOriginalValue(
  122|   781k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  123|   781k|    }
  124|   785k|  }
  125|    576|  return true;
  126|    576|}

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

_ZN5draco30ComputeParallelogramPredictionINS_24MeshAttributeCornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  6.36M|    int num_components, DataTypeT *out_prediction) {
   49|  6.36M|  const CornerIndex oci = table->Opposite(ci);
   50|  6.36M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 4.97M, False: 1.39M]
  ------------------
   51|  4.97M|    return false;
   52|  4.97M|  }
   53|  1.39M|  int vert_opp, vert_next, vert_prev;
   54|  1.39M|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  1.39M|                                        &vert_opp, &vert_next, &vert_prev);
   56|  1.39M|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 862k, False: 531k]
  |  Branch (56:35): [True: 721k, False: 141k]
  ------------------
   57|   721k|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 700k, False: 21.3k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|   700k|    const int v_opp_off = vert_opp * num_components;
   60|   700k|    const int v_next_off = vert_next * num_components;
   61|   700k|    const int v_prev_off = vert_prev * num_components;
   62|  38.8M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 38.1M, False: 700k]
  ------------------
   63|  38.1M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  38.1M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  38.1M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  38.1M|      const int64_t result =
   67|  38.1M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  38.1M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  38.1M|    }
   71|   700k|    return true;
   72|   700k|  }
   73|   693k|  return false;  // Not all data is available for prediction
   74|  1.39M|}
_ZN5draco23GetParallelogramEntriesINS_24MeshAttributeCornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  1.39M|    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.39M|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  1.39M|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  1.39M|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  1.39M|}
_ZN5draco30ComputeParallelogramPredictionINS_11CornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  6.04M|    int num_components, DataTypeT *out_prediction) {
   49|  6.04M|  const CornerIndex oci = table->Opposite(ci);
   50|  6.04M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 60.3k, False: 5.98M]
  ------------------
   51|  60.3k|    return false;
   52|  60.3k|  }
   53|  5.98M|  int vert_opp, vert_next, vert_prev;
   54|  5.98M|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  5.98M|                                        &vert_opp, &vert_next, &vert_prev);
   56|  5.98M|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 3.10M, False: 2.87M]
  |  Branch (56:35): [True: 2.44M, False: 658k]
  ------------------
   57|  2.44M|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 2.15M, False: 295k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|  2.15M|    const int v_opp_off = vert_opp * num_components;
   60|  2.15M|    const int v_next_off = vert_next * num_components;
   61|  2.15M|    const int v_prev_off = vert_prev * num_components;
   62|  89.2M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 87.0M, False: 2.15M]
  ------------------
   63|  87.0M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  87.0M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  87.0M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  87.0M|      const int64_t result =
   67|  87.0M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  87.0M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  87.0M|    }
   71|  2.15M|    return true;
   72|  2.15M|  }
   73|  3.83M|  return false;  // Not all data is available for prediction
   74|  5.98M|}
_ZN5draco23GetParallelogramEntriesINS_11CornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  5.98M|    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.98M|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  5.98M|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  5.98M|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  5.98M|}

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

_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   36|    296|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   37|    296|            attribute, transform, mesh_data),
   38|    296|        predictor_(mesh_data) {}
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   60|    588|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   62|    296|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   63|    296|    DRACO_DCHECK_EQ(i, 0);
   64|    296|    (void)i;
   65|    296|    return GeometryAttribute::POSITION;
   66|    296|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   68|    294|  bool SetParentAttribute(const PointAttribute *att) override {
   69|    294|    if (!att || att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (69:9): [True: 0, False: 294]
  |  Branch (69:17): [True: 0, False: 294]
  ------------------
   70|      0|      return false;  // Invalid attribute type.
   71|      0|    }
   72|    294|    if (att->num_components() != 3) {
  ------------------
  |  Branch (72:9): [True: 2, False: 292]
  ------------------
   73|      2|      return false;  // Currently works only for 3 component positions.
   74|      2|    }
   75|    292|    predictor_.SetPositionAttribute(*att);
   76|    292|    return true;
   77|    294|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  118|    289|                                                                *buffer) {
  119|       |  // Decode the delta coded orientations.
  120|    289|  int32_t num_orientations = 0;
  121|    289|  if (!buffer->Decode(&num_orientations) || num_orientations < 0) {
  ------------------
  |  Branch (121:7): [True: 2, False: 287]
  |  Branch (121:45): [True: 11, False: 276]
  ------------------
  122|     13|    return false;
  123|     13|  }
  124|    276|  predictor_.ResizeOrientations(num_orientations);
  125|    276|  bool last_orientation = true;
  126|    276|  RAnsBitDecoder decoder;
  127|    276|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (127:7): [True: 15, False: 261]
  ------------------
  128|     15|    return false;
  129|     15|  }
  130|  3.23G|  for (int i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (130:19): [True: 3.23G, False: 261]
  ------------------
  131|  3.23G|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (131:9): [True: 751M, False: 2.47G]
  ------------------
  132|   751M|      last_orientation = !last_orientation;
  133|   751M|    }
  134|  3.23G|    predictor_.set_orientation(i, last_orientation);
  135|  3.23G|  }
  136|    261|  decoder.EndDecoding();
  137|    261|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  138|    261|                                     MeshDataT>::DecodePredictionData(buffer);
  139|    276|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   90|    246|                                      const PointIndex *entry_to_point_id_map) {
   91|    246|  if (num_components != MeshPredictionSchemeTexCoordsPortablePredictor<
  ------------------
  |  Branch (91:7): [True: 5, False: 241]
  ------------------
   92|    246|                            DataTypeT, MeshDataT>::kNumComponents) {
   93|      5|    return false;
   94|      5|  }
   95|    241|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
   96|    241|  this->transform().Init(num_components);
   97|       |
   98|    241|  const int corner_map_size =
   99|    241|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  100|   634k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (100:19): [True: 633k, False: 127]
  ------------------
  101|   633k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  102|   633k|    if (!predictor_.template ComputePredictedValue<false>(corner_id, out_data,
  ------------------
  |  Branch (102:9): [True: 114, False: 633k]
  ------------------
  103|   633k|                                                          p)) {
  104|    114|      return false;
  105|    114|    }
  106|       |
  107|   633k|    const int dst_offset = p * num_components;
  108|   633k|    this->transform().ComputeOriginalValue(predictor_.predicted_value(),
  109|   633k|                                           in_corr + dst_offset,
  110|   633k|                                           out_data + dst_offset);
  111|   633k|  }
  112|    127|  return true;
  113|    241|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   36|    253|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   37|    253|            attribute, transform, mesh_data),
   38|    253|        predictor_(mesh_data) {}
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   60|    505|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   62|    253|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   63|    253|    DRACO_DCHECK_EQ(i, 0);
   64|    253|    (void)i;
   65|    253|    return GeometryAttribute::POSITION;
   66|    253|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   68|    253|  bool SetParentAttribute(const PointAttribute *att) override {
   69|    253|    if (!att || att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (69:9): [True: 0, False: 253]
  |  Branch (69:17): [True: 0, False: 253]
  ------------------
   70|      0|      return false;  // Invalid attribute type.
   71|      0|    }
   72|    253|    if (att->num_components() != 3) {
  ------------------
  |  Branch (72:9): [True: 1, False: 252]
  ------------------
   73|      1|      return false;  // Currently works only for 3 component positions.
   74|      1|    }
   75|    252|    predictor_.SetPositionAttribute(*att);
   76|    252|    return true;
   77|    253|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  118|    250|                                                                *buffer) {
  119|       |  // Decode the delta coded orientations.
  120|    250|  int32_t num_orientations = 0;
  121|    250|  if (!buffer->Decode(&num_orientations) || num_orientations < 0) {
  ------------------
  |  Branch (121:7): [True: 1, False: 249]
  |  Branch (121:45): [True: 11, False: 238]
  ------------------
  122|     12|    return false;
  123|     12|  }
  124|    238|  predictor_.ResizeOrientations(num_orientations);
  125|    238|  bool last_orientation = true;
  126|    238|  RAnsBitDecoder decoder;
  127|    238|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (127:7): [True: 12, False: 226]
  ------------------
  128|     12|    return false;
  129|     12|  }
  130|  9.62G|  for (int i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (130:19): [True: 9.62G, False: 226]
  ------------------
  131|  9.62G|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (131:9): [True: 1.25G, False: 8.37G]
  ------------------
  132|  1.25G|      last_orientation = !last_orientation;
  133|  1.25G|    }
  134|  9.62G|    predictor_.set_orientation(i, last_orientation);
  135|  9.62G|  }
  136|    226|  decoder.EndDecoding();
  137|    226|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  138|    226|                                     MeshDataT>::DecodePredictionData(buffer);
  139|    238|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   90|    201|                                      const PointIndex *entry_to_point_id_map) {
   91|    201|  if (num_components != MeshPredictionSchemeTexCoordsPortablePredictor<
  ------------------
  |  Branch (91:7): [True: 3, False: 198]
  ------------------
   92|    201|                            DataTypeT, MeshDataT>::kNumComponents) {
   93|      3|    return false;
   94|      3|  }
   95|    198|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
   96|    198|  this->transform().Init(num_components);
   97|       |
   98|    198|  const int corner_map_size =
   99|    198|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  100|   193k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (100:19): [True: 193k, False: 128]
  ------------------
  101|   193k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  102|   193k|    if (!predictor_.template ComputePredictedValue<false>(corner_id, out_data,
  ------------------
  |  Branch (102:9): [True: 70, False: 193k]
  ------------------
  103|   193k|                                                          p)) {
  104|     70|      return false;
  105|     70|    }
  106|       |
  107|   193k|    const int dst_offset = p * num_components;
  108|   193k|    this->transform().ComputeOriginalValue(predictor_.predicted_value(),
  109|   193k|                                           in_corr + dst_offset,
  110|   193k|                                           out_data + dst_offset);
  111|   193k|  }
  112|    128|  return true;
  113|    198|}

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

_ZNK5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|    195|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    589|  bool AreCorrectionsPositive() override {
   71|    589|    return transform_.AreCorrectionsPositive();
   72|    589|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    187|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|    187|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 21, False: 166]
  ------------------
   50|     21|      return false;
   51|     21|    }
   52|    166|    return true;
   53|    187|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE9transformEv:
   81|  1.46M|  inline Transform &transform() { return transform_; }
_ZNK5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|    160|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    575|  bool AreCorrectionsPositive() override {
   71|    575|    return transform_.AreCorrectionsPositive();
   72|    575|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    152|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|    152|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 21, False: 131]
  ------------------
   50|     21|      return false;
   51|     21|    }
   52|    131|    return true;
   53|    152|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE9transformEv:
   81|  1.46M|  inline Transform &transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   46|  6.16k|      : attribute_(attribute), transform_(transform) {}
_ZNK5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22GetNumParentAttributesEv:
   58|  4.21k|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22AreCorrectionsPositiveEv:
   70|  5.91k|  bool AreCorrectionsPositive() override {
   71|  5.91k|    return transform_.AreCorrectionsPositive();
   72|  5.91k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|  4.58k|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|  4.58k|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 293, False: 4.29k]
  ------------------
   50|    293|      return false;
   51|    293|    }
   52|  4.29k|    return true;
   53|  4.58k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE9transformEv:
   81|  12.2M|  inline Transform &transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    609|      : attribute_(attribute), transform_(transform) {}
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    587|      : attribute_(attribute), transform_(transform) {}

_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    609|                                 const PointCloudDecoder *decoder) {
  188|    609|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    609|      method, att_id, decoder, TransformT());
  190|    609|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    609|                                 const TransformT &transform) {
  156|    609|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 609]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    609|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|    609|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 609, 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|    609|    const MeshDecoder *const mesh_decoder =
  167|    609|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|    609|    auto ret = CreateMeshPredictionScheme<
  170|    609|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    609|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    609|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    609|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 414, False: 195]
  ------------------
  174|    414|      return ret;
  175|    414|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    609|  }
  178|       |  // Create delta decoder.
  179|    195|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    195|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    609|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    222|      uint16_t bitstream_version) {
  143|    222|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    222|        method, attribute, transform, mesh_data, bitstream_version);
  145|    222|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    222|        uint16_t bitstream_version) {
  127|    222|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 215, False: 7]
  ------------------
  128|    215|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    215|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    215|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    215|                                                  mesh_data));
  132|    215|      }
  133|      7|      return nullptr;
  134|    222|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    208|      uint16_t bitstream_version) {
  143|    208|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    208|        method, attribute, transform, mesh_data, bitstream_version);
  145|    208|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    208|        uint16_t bitstream_version) {
  127|    208|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 199, False: 9]
  ------------------
  128|    199|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    199|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    199|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    199|                                                  mesh_data));
  132|    199|      }
  133|      9|      return nullptr;
  134|    208|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    587|                                 const PointCloudDecoder *decoder) {
  188|    587|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    587|      method, att_id, decoder, TransformT());
  190|    587|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    587|                                 const TransformT &transform) {
  156|    587|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 587]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    587|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|    587|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 587, 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|    587|    const MeshDecoder *const mesh_decoder =
  167|    587|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|    587|    auto ret = CreateMeshPredictionScheme<
  170|    587|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    587|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    587|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    587|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 427, False: 160]
  ------------------
  174|    427|      return ret;
  175|    427|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    587|  }
  178|       |  // Create delta decoder.
  179|    160|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    160|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    587|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    233|      uint16_t bitstream_version) {
  143|    233|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    233|        method, attribute, transform, mesh_data, bitstream_version);
  145|    233|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    233|        uint16_t bitstream_version) {
  111|    233|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 229, False: 4]
  ------------------
  112|    229|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    229|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    229|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    229|                                                  mesh_data));
  116|    229|      }
  117|      4|      return nullptr;
  118|    233|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    204|      uint16_t bitstream_version) {
  143|    204|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    204|        method, attribute, transform, mesh_data, bitstream_version);
  145|    204|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    204|        uint16_t bitstream_version) {
  111|    204|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 198, False: 6]
  ------------------
  112|    198|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    198|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    198|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    198|                                                  mesh_data));
  116|    198|      }
  117|      6|      return nullptr;
  118|    204|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|  6.16k|                                 const PointCloudDecoder *decoder) {
  188|  6.16k|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|  6.16k|      method, att_id, decoder, TransformT());
  190|  6.16k|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|  6.16k|                                 const TransformT &transform) {
  156|  6.16k|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 6.16k]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|  6.16k|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|  6.16k|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 6.16k, False: 0]
  ------------------
  161|       |    // Cast the decoder to mesh decoder. This is not necessarily safe if there
  162|       |    // is some other decoder decides to use TRIANGULAR_MESH as the return type,
  163|       |    // but unfortunately there is not nice work around for this without using
  164|       |    // RTTI (double dispatch and similar concepts will not work because of the
  165|       |    // template nature of the prediction schemes).
  166|  6.16k|    const MeshDecoder *const mesh_decoder =
  167|  6.16k|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|  6.16k|    auto ret = CreateMeshPredictionScheme<
  170|  6.16k|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|  6.16k|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|  6.16k|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|  6.16k|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 5.74k, False: 422]
  ------------------
  174|  5.74k|      return ret;
  175|  5.74k|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|  6.16k|  }
  178|       |  // Create delta decoder.
  179|    422|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    422|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|  6.16k|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  2.94k|      uint16_t bitstream_version) {
  143|  2.94k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  2.94k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  2.94k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  2.94k|        uint16_t bitstream_version) {
   53|  2.94k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 997, False: 1.94k]
  ------------------
   54|    997|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    997|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    997|                                                         MeshDataT>(
   57|    997|                attribute, transform, mesh_data));
   58|    997|      }
   59|  1.94k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  1.94k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 413, False: 1.53k]
  ------------------
   61|    413|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    413|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    413|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    413|                                                  mesh_data));
   65|    413|      }
   66|  1.53k|#endif
   67|  1.53k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 519, False: 1.01k]
  ------------------
   68|    519|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    519|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    519|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    519|                                                  mesh_data));
   72|    519|      }
   73|  1.01k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|  1.01k|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 271, False: 746]
  ------------------
   75|    271|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    271|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    271|                                                     MeshDataT>(
   78|    271|                attribute, transform, mesh_data, bitstream_version));
   79|    271|      }
   80|    746|#endif
   81|    746|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 296, False: 450]
  ------------------
   82|    296|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    296|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    296|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    296|                                                  mesh_data));
   86|    296|      }
   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.94k|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  2.79k|      uint16_t bitstream_version) {
  143|  2.79k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  2.79k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  2.79k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  2.79k|        uint16_t bitstream_version) {
   53|  2.79k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 734, False: 2.06k]
  ------------------
   54|    734|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    734|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    734|                                                         MeshDataT>(
   57|    734|                attribute, transform, mesh_data));
   58|    734|      }
   59|  2.06k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  2.06k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 616, False: 1.44k]
  ------------------
   61|    616|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    616|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    616|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    616|                                                  mesh_data));
   65|    616|      }
   66|  1.44k|#endif
   67|  1.44k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 511, False: 933]
  ------------------
   68|    511|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    511|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    511|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    511|                                                  mesh_data));
   72|    511|      }
   73|    933|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|    933|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 238, False: 695]
  ------------------
   75|    238|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    238|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    238|                                                     MeshDataT>(
   78|    238|                attribute, transform, mesh_data, bitstream_version));
   79|    238|      }
   80|    695|#endif
   81|    695|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 253, False: 442]
  ------------------
   82|    253|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    253|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    253|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    253|                                                  mesh_data));
   86|    253|      }
   87|    442|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    442|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 442, False: 0]
  ------------------
   89|    442|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    442|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    442|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    442|                                                  mesh_data));
   93|    442|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  2.79k|    }

_ZN5draco28PredictionSchemeDeltaDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    166|    const PointIndex *) {
   50|    166|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    166|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    166|  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|  96.8k|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 96.6k, False: 166]
  ------------------
   57|  96.6k|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|  96.6k|                                           in_corr + i, out_data + i);
   59|  96.6k|  }
   60|    166|  return true;
   61|    166|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    131|    const PointIndex *) {
   50|    131|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    131|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    131|  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|   409k|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 409k, False: 131]
  ------------------
   57|   409k|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|   409k|                                           in_corr + i, out_data + i);
   59|   409k|  }
   60|    131|  return true;
   61|    131|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    422|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    358|    const PointIndex *) {
   50|    358|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    358|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    358|  this->transform().ComputeOriginalValue(zero_vals.get(), in_corr, out_data);
   54|       |
   55|       |  // Decode data from the front using D(i) = D(i) + D(i - 1).
   56|  2.80M|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 2.80M, False: 358]
  ------------------
   57|  2.80M|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|  2.80M|                                           in_corr + i, out_data + i);
   59|  2.80M|  }
   60|    358|  return true;
   61|    358|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    195|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    160|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}

_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    609|    uint16_t bitstream_version) {
   38|    609|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|    609|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 609, False: 0]
  ------------------
   40|    609|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 110, False: 499]
  ------------------
   41|    499|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 49, False: 450]
  ------------------
   42|    450|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 5, False: 445]
  ------------------
   43|    445|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 1, False: 444]
  ------------------
   44|    444|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 414, False: 30]
  ------------------
   45|    590|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 11, False: 19]
  ------------------
   46|    590|    const CornerTable *const ct = source->GetCornerTable();
   47|    590|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|    590|        source->GetAttributeEncodingData(att_id);
   49|    590|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 160, False: 430]
  |  Branch (49:26): [True: 0, False: 430]
  ------------------
   50|       |      // No connectivity data found.
   51|    160|      return nullptr;
   52|    160|    }
   53|       |    // Connectivity data exists.
   54|    430|    const MeshAttributeCornerTable *const att_ct =
   55|    430|        source->GetAttributeCornerTable(att_id);
   56|    430|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 222, False: 208]
  ------------------
   57|    222|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    222|      MeshData md;
   59|    222|      md.Set(source->mesh(), att_ct,
   60|    222|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    222|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    222|      MeshPredictionSchemeFactoryT factory;
   63|    222|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    222|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 215, False: 7]
  ------------------
   65|    215|        return ret;
   66|    215|      }
   67|    222|    } else {
   68|    208|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    208|      MeshData md;
   70|    208|      md.Set(source->mesh(), ct,
   71|    208|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    208|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    208|      MeshPredictionSchemeFactoryT factory;
   74|    208|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    208|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 199, False: 9]
  ------------------
   76|    199|        return ret;
   77|    199|      }
   78|    208|    }
   79|    430|  }
   80|     35|  return nullptr;
   81|    609|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    587|    uint16_t bitstream_version) {
   38|    587|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|    587|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 587, False: 0]
  ------------------
   40|    587|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 59, False: 528]
  ------------------
   41|    528|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 36, False: 492]
  ------------------
   42|    492|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 7, False: 485]
  ------------------
   43|    485|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 24, False: 461]
  ------------------
   44|    461|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 428, False: 33]
  ------------------
   45|    576|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 22, False: 11]
  ------------------
   46|    576|    const CornerTable *const ct = source->GetCornerTable();
   47|    576|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|    576|        source->GetAttributeEncodingData(att_id);
   49|    576|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 139, False: 437]
  |  Branch (49:26): [True: 0, False: 437]
  ------------------
   50|       |      // No connectivity data found.
   51|    139|      return nullptr;
   52|    139|    }
   53|       |    // Connectivity data exists.
   54|    437|    const MeshAttributeCornerTable *const att_ct =
   55|    437|        source->GetAttributeCornerTable(att_id);
   56|    437|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 233, False: 204]
  ------------------
   57|    233|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    233|      MeshData md;
   59|    233|      md.Set(source->mesh(), att_ct,
   60|    233|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    233|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    233|      MeshPredictionSchemeFactoryT factory;
   63|    233|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    233|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 229, False: 4]
  ------------------
   65|    229|        return ret;
   66|    229|      }
   67|    233|    } else {
   68|    204|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    204|      MeshData md;
   70|    204|      md.Set(source->mesh(), ct,
   71|    204|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    204|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    204|      MeshPredictionSchemeFactoryT factory;
   74|    204|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    204|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 198, False: 6]
  ------------------
   76|    198|        return ret;
   77|    198|      }
   78|    204|    }
   79|    437|  }
   80|     21|  return nullptr;
   81|    587|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|  6.16k|    uint16_t bitstream_version) {
   38|  6.16k|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|  6.16k|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 6.16k, False: 0]
  ------------------
   40|  6.16k|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 1.78k, False: 4.37k]
  ------------------
   41|  4.37k|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 1.09k, False: 3.28k]
  ------------------
   42|  3.28k|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 1.05k, False: 2.23k]
  ------------------
   43|  2.23k|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 551, False: 1.68k]
  ------------------
   44|  1.68k|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 901, False: 779]
  ------------------
   45|  5.90k|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 521, False: 258]
  ------------------
   46|  5.90k|    const CornerTable *const ct = source->GetCornerTable();
   47|  5.90k|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|  5.90k|        source->GetAttributeEncodingData(att_id);
   49|  5.90k|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 164, False: 5.74k]
  |  Branch (49:26): [True: 0, False: 5.74k]
  ------------------
   50|       |      // No connectivity data found.
   51|    164|      return nullptr;
   52|    164|    }
   53|       |    // Connectivity data exists.
   54|  5.74k|    const MeshAttributeCornerTable *const att_ct =
   55|  5.74k|        source->GetAttributeCornerTable(att_id);
   56|  5.74k|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 2.94k, False: 2.79k]
  ------------------
   57|  2.94k|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|  2.94k|      MeshData md;
   59|  2.94k|      md.Set(source->mesh(), att_ct,
   60|  2.94k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|  2.94k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|  2.94k|      MeshPredictionSchemeFactoryT factory;
   63|  2.94k|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|  2.94k|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 2.94k, False: 0]
  ------------------
   65|  2.94k|        return ret;
   66|  2.94k|      }
   67|  2.94k|    } else {
   68|  2.79k|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|  2.79k|      MeshData md;
   70|  2.79k|      md.Set(source->mesh(), ct,
   71|  2.79k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|  2.79k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|  2.79k|      MeshPredictionSchemeFactoryT factory;
   74|  2.79k|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|  2.79k|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 2.79k, False: 0]
  ------------------
   76|  2.79k|        return ret;
   77|  2.79k|      }
   78|  2.79k|    }
   79|  5.74k|  }
   80|    258|  return nullptr;
   81|  6.16k|}

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

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

_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE14IsInBottomLeftERKNS_7VectorDIiLi2EEE:
   92|  1.46M|  bool IsInBottomLeft(const Point2 &p) const {
   93|  1.46M|    if (p[0] == 0 && p[1] == 0) {
  ------------------
  |  Branch (93:9): [True: 1.38M, False: 75.3k]
  |  Branch (93:22): [True: 1.38M, False: 8.63k]
  ------------------
   94|  1.38M|      return true;
   95|  1.38M|    }
   96|  83.9k|    return (p[0] < 0 && p[1] <= 0);
  ------------------
  |  Branch (96:13): [True: 37.5k, False: 46.4k]
  |  Branch (96:25): [True: 18.7k, False: 18.8k]
  ------------------
   97|  1.46M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE16GetRotationCountENS_7VectorDIiLi2EEE:
   50|  1.46M|  int32_t GetRotationCount(Point2 pred) const {
   51|  1.46M|    const DataType sign_x = pred[0];
   52|  1.46M|    const DataType sign_y = pred[1];
   53|       |
   54|  1.46M|    int32_t rotation_count = 0;
   55|  1.46M|    if (sign_x == 0) {
  ------------------
  |  Branch (55:9): [True: 1.38M, False: 75.3k]
  ------------------
   56|  1.38M|      if (sign_y == 0) {
  ------------------
  |  Branch (56:11): [True: 1.38M, False: 8.63k]
  ------------------
   57|  1.38M|        rotation_count = 0;
   58|  1.38M|      } else if (sign_y > 0) {
  ------------------
  |  Branch (58:18): [True: 4.33k, False: 4.29k]
  ------------------
   59|  4.33k|        rotation_count = 3;
   60|  4.33k|      } else {
   61|  4.29k|        rotation_count = 1;
   62|  4.29k|      }
   63|  1.38M|    } else if (sign_x > 0) {
  ------------------
  |  Branch (63:16): [True: 37.8k, False: 37.5k]
  ------------------
   64|  37.8k|      if (sign_y >= 0) {
  ------------------
  |  Branch (64:11): [True: 17.7k, False: 20.0k]
  ------------------
   65|  17.7k|        rotation_count = 2;
   66|  20.0k|      } else {
   67|  20.0k|        rotation_count = 1;
   68|  20.0k|      }
   69|  37.8k|    } else {
   70|  37.5k|      if (sign_y <= 0) {
  ------------------
  |  Branch (70:11): [True: 18.7k, False: 18.8k]
  ------------------
   71|  18.7k|        rotation_count = 0;
   72|  18.8k|      } else {
   73|  18.8k|        rotation_count = 3;
   74|  18.8k|      }
   75|  37.5k|    }
   76|  1.46M|    return rotation_count;
   77|  1.46M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE11RotatePointENS_7VectorDIiLi2EEEi:
   79|   130k|  Point2 RotatePoint(Point2 p, int32_t rotation_count) const {
   80|   130k|    switch (rotation_count) {
   81|  47.5k|      case 1:
  ------------------
  |  Branch (81:7): [True: 47.5k, False: 83.0k]
  ------------------
   82|  47.5k|        return Point2(p[1], -p[0]);
   83|  35.5k|      case 2:
  ------------------
  |  Branch (83:7): [True: 35.5k, False: 95.0k]
  ------------------
   84|  35.5k|        return Point2(-p[0], -p[1]);
   85|  47.5k|      case 3:
  ------------------
  |  Branch (85:7): [True: 47.5k, False: 83.0k]
  ------------------
   86|  47.5k|        return Point2(-p[1], p[0]);
   87|      0|      default:
  ------------------
  |  Branch (87:7): [True: 0, False: 130k]
  ------------------
   88|      0|        return p;
   89|   130k|    }
   90|   130k|  }
_ZN5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiEC2Ev:
   40|    587|  PredictionSchemeNormalOctahedronCanonicalizedTransformBase() : Base() {}

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

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

_ZN5draco37PredictionSchemeWrapDecodingTransformIiiE19DecodeTransformDataEPNS_13DecoderBufferE:
   66|  5.46k|  bool DecodeTransformData(DecoderBuffer *buffer) {
   67|  5.46k|    DataTypeT min_value, max_value;
   68|  5.46k|    if (!buffer->Decode(&min_value)) {
  ------------------
  |  Branch (68:9): [True: 75, False: 5.38k]
  ------------------
   69|     75|      return false;
   70|     75|    }
   71|  5.38k|    if (!buffer->Decode(&max_value)) {
  ------------------
  |  Branch (71:9): [True: 54, False: 5.33k]
  ------------------
   72|     54|      return false;
   73|     54|    }
   74|  5.33k|    if (min_value > max_value) {
  ------------------
  |  Branch (74:9): [True: 181, False: 5.15k]
  ------------------
   75|    181|      return false;
   76|    181|    }
   77|  5.15k|    this->set_min_value(min_value);
   78|  5.15k|    this->set_max_value(max_value);
   79|  5.15k|    if (!this->InitCorrectionBounds()) {
  ------------------
  |  Branch (79:9): [True: 14, False: 5.13k]
  ------------------
   80|     14|      return false;
   81|     14|    }
   82|  5.13k|    return true;
   83|  5.15k|  }
_ZNK5draco37PredictionSchemeWrapDecodingTransformIiiE20ComputeOriginalValueEPKiS3_Pi:
   38|  12.2M|                                   DataTypeT *out_original_vals) const {
   39|       |    // For now we assume both |DataTypeT| and |CorrTypeT| are equal.
   40|  12.2M|    static_assert(std::is_same<DataTypeT, CorrTypeT>::value,
   41|  12.2M|                  "Predictions and corrections must have the same type.");
   42|       |
   43|       |    // The only valid implementation right now is for int32_t.
   44|  12.2M|    static_assert(std::is_same<DataTypeT, int32_t>::value,
   45|  12.2M|                  "Only int32_t is supported for predicted values.");
   46|       |
   47|  12.2M|    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|  12.2M|    const uint32_t *const uint_predicted_vals =
   52|  12.2M|        reinterpret_cast<const uint32_t *>(predicted_vals);
   53|  12.2M|    const uint32_t *const uint_corr_vals =
   54|  12.2M|        reinterpret_cast<const uint32_t *>(corr_vals);
   55|   224M|    for (int i = 0; i < this->num_components(); ++i) {
  ------------------
  |  Branch (55:21): [True: 212M, False: 12.2M]
  ------------------
   56|   212M|      out_original_vals[i] =
   57|   212M|          static_cast<DataTypeT>(uint_predicted_vals[i] + uint_corr_vals[i]);
   58|   212M|      if (out_original_vals[i] > this->max_value()) {
  ------------------
  |  Branch (58:11): [True: 56.4k, False: 212M]
  ------------------
   59|  56.4k|        out_original_vals[i] -= this->max_dif();
   60|   212M|      } else if (out_original_vals[i] < this->min_value()) {
  ------------------
  |  Branch (60:18): [True: 1.58M, False: 210M]
  ------------------
   61|  1.58M|        out_original_vals[i] += this->max_dif();
   62|  1.58M|      }
   63|   212M|    }
   64|  12.2M|  }
_ZN5draco37PredictionSchemeWrapDecodingTransformIiiEC2Ev:
   32|  6.16k|  PredictionSchemeWrapDecodingTransform() {}

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

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

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

_ZN5draco37SequentialAttributeDecodersControllerC2ENSt3__110unique_ptrINS_15PointsSequencerENS1_14default_deleteIS3_EEEE:
   26|  28.8k|    : sequencer_(std::move(sequencer)) {}
_ZN5draco37SequentialAttributeDecodersController27DecodeAttributesDecoderDataEPNS_13DecoderBufferE:
   29|  8.06k|    DecoderBuffer *buffer) {
   30|  8.06k|  if (!AttributesDecoder::DecodeAttributesDecoderData(buffer)) {
  ------------------
  |  Branch (30:7): [True: 212, False: 7.85k]
  ------------------
   31|    212|    return false;
   32|    212|  }
   33|       |  // Decode unique ids of all sequential encoders and create them.
   34|  7.85k|  const int32_t num_attributes = GetNumAttributes();
   35|  7.85k|  sequential_decoders_.resize(num_attributes);
   36|  28.6k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (36:19): [True: 20.8k, False: 7.82k]
  ------------------
   37|  20.8k|    uint8_t decoder_type;
   38|  20.8k|    if (!buffer->Decode(&decoder_type)) {
  ------------------
  |  Branch (38:9): [True: 12, False: 20.7k]
  ------------------
   39|     12|      return false;
   40|     12|    }
   41|       |    // Create the decoder from the id.
   42|  20.7k|    sequential_decoders_[i] = CreateSequentialDecoder(decoder_type);
   43|  20.7k|    if (!sequential_decoders_[i]) {
  ------------------
  |  Branch (43:9): [True: 11, False: 20.7k]
  ------------------
   44|     11|      return false;
   45|     11|    }
   46|  20.7k|    if (!sequential_decoders_[i]->Init(GetDecoder(), GetAttributeId(i))) {
  ------------------
  |  Branch (46:9): [True: 3, False: 20.7k]
  ------------------
   47|      3|      return false;
   48|      3|    }
   49|  20.7k|  }
   50|  7.82k|  return true;
   51|  7.85k|}
_ZN5draco37SequentialAttributeDecodersController16DecodeAttributesEPNS_13DecoderBufferE:
   54|  5.52k|    DecoderBuffer *buffer) {
   55|  5.52k|  if (!sequencer_ || !sequencer_->GenerateSequence(&point_ids_)) {
  ------------------
  |  Branch (55:7): [True: 0, False: 5.52k]
  |  Branch (55:22): [True: 10, False: 5.51k]
  ------------------
   56|     10|    return false;
   57|     10|  }
   58|       |  // Initialize point to attribute value mapping for all decoded attributes.
   59|  5.51k|  const int32_t num_attributes = GetNumAttributes();
   60|  22.4k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (60:19): [True: 16.9k, False: 5.51k]
  ------------------
   61|  16.9k|    PointAttribute *const pa =
   62|  16.9k|        GetDecoder()->point_cloud()->attribute(GetAttributeId(i));
   63|  16.9k|    if (!sequencer_->UpdatePointToAttributeIndexMapping(pa)) {
  ------------------
  |  Branch (63:9): [True: 2, False: 16.9k]
  ------------------
   64|      2|      return false;
   65|      2|    }
   66|  16.9k|  }
   67|  5.51k|  return AttributesDecoder::DecodeAttributes(buffer);
   68|  5.51k|}
_ZN5draco37SequentialAttributeDecodersController24DecodePortableAttributesEPNS_13DecoderBufferE:
   71|  5.51k|    DecoderBuffer *in_buffer) {
   72|  5.51k|  const int32_t num_attributes = GetNumAttributes();
   73|  14.3k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (73:19): [True: 11.5k, False: 2.77k]
  ------------------
   74|  11.5k|    if (!sequential_decoders_[i]->DecodePortableAttribute(point_ids_,
  ------------------
  |  Branch (74:9): [True: 2.73k, False: 8.85k]
  ------------------
   75|  11.5k|                                                          in_buffer)) {
   76|  2.73k|      return false;
   77|  2.73k|    }
   78|  11.5k|  }
   79|  2.77k|  return true;
   80|  5.51k|}
_ZN5draco37SequentialAttributeDecodersController36DecodeDataNeededByPortableTransformsEPNS_13DecoderBufferE:
   83|  2.77k|    DecodeDataNeededByPortableTransforms(DecoderBuffer *in_buffer) {
   84|  2.77k|  const int32_t num_attributes = GetNumAttributes();
   85|  6.84k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (85:19): [True: 4.93k, False: 1.90k]
  ------------------
   86|  4.93k|    if (!sequential_decoders_[i]->DecodeDataNeededByPortableTransform(
  ------------------
  |  Branch (86:9): [True: 874, False: 4.06k]
  ------------------
   87|  4.93k|            point_ids_, in_buffer)) {
   88|    874|      return false;
   89|    874|    }
   90|  4.93k|  }
   91|  1.90k|  return true;
   92|  2.77k|}
_ZN5draco37SequentialAttributeDecodersController35TransformAttributesToOriginalFormatEv:
   95|  1.90k|    TransformAttributesToOriginalFormat() {
   96|  1.90k|  const int32_t num_attributes = GetNumAttributes();
   97|  4.86k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (97:19): [True: 3.34k, False: 1.51k]
  ------------------
   98|       |    // Check whether the attribute transform should be skipped.
   99|  3.34k|    if (GetDecoder()->options()) {
  ------------------
  |  Branch (99:9): [True: 3.34k, False: 0]
  ------------------
  100|  3.34k|      const PointAttribute *const attribute =
  101|  3.34k|          sequential_decoders_[i]->attribute();
  102|  3.34k|      const PointAttribute *const portable_attribute =
  103|  3.34k|          sequential_decoders_[i]->GetPortableAttribute();
  104|  3.34k|      if (portable_attribute &&
  ------------------
  |  Branch (104:11): [True: 2.95k, False: 388]
  |  Branch (104:11): [True: 761, False: 2.58k]
  ------------------
  105|  2.95k|          GetDecoder()->options()->GetAttributeBool(
  ------------------
  |  Branch (105:11): [True: 761, False: 2.19k]
  ------------------
  106|  2.95k|              attribute->attribute_type(), "skip_attribute_transform", false)) {
  107|       |        // Attribute transform should not be performed. In this case, we replace
  108|       |        // the output geometry attribute with the portable attribute.
  109|       |        // TODO(ostava): We can potentially avoid this copy by introducing a new
  110|       |        // mechanism that would allow to use the final attributes as portable
  111|       |        // attributes for predictors that may need them.
  112|    761|        sequential_decoders_[i]->attribute()->CopyFrom(*portable_attribute);
  113|    761|        continue;
  114|    761|      }
  115|  3.34k|    }
  116|  2.58k|    if (!sequential_decoders_[i]->TransformAttributeToOriginalFormat(
  ------------------
  |  Branch (116:9): [True: 384, False: 2.19k]
  ------------------
  117|  2.58k|            point_ids_)) {
  118|    384|      return false;
  119|    384|    }
  120|  2.58k|  }
  121|  1.51k|  return true;
  122|  1.90k|}
_ZN5draco37SequentialAttributeDecodersController23CreateSequentialDecoderEh:
  126|  20.7k|    uint8_t decoder_type) {
  127|  20.7k|  switch (decoder_type) {
  128|  2.27k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_GENERIC:
  ------------------
  |  Branch (128:5): [True: 2.27k, False: 18.5k]
  ------------------
  129|  2.27k|      return std::unique_ptr<SequentialAttributeDecoder>(
  130|  2.27k|          new SequentialAttributeDecoder());
  131|  16.4k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_INTEGER:
  ------------------
  |  Branch (131:5): [True: 16.4k, False: 4.35k]
  ------------------
  132|  16.4k|      return std::unique_ptr<SequentialAttributeDecoder>(
  133|  16.4k|          new SequentialIntegerAttributeDecoder());
  134|    647|    case SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION:
  ------------------
  |  Branch (134:5): [True: 647, False: 20.1k]
  ------------------
  135|    647|      return std::unique_ptr<SequentialAttributeDecoder>(
  136|    647|          new SequentialQuantizationAttributeDecoder());
  137|      0|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
  138|  1.42k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS:
  ------------------
  |  Branch (138:5): [True: 1.42k, False: 19.3k]
  ------------------
  139|  1.42k|      return std::unique_ptr<SequentialNormalAttributeDecoder>(
  140|  1.42k|          new SequentialNormalAttributeDecoder());
  141|      0|#endif
  142|     11|    default:
  ------------------
  |  Branch (142:5): [True: 11, False: 20.7k]
  ------------------
  143|     11|      break;
  144|  20.7k|  }
  145|       |  // Unknown or unsupported decoder type.
  146|     11|  return nullptr;
  147|  20.7k|}

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

_ZN5draco33SequentialIntegerAttributeDecoderC2Ev:
   23|  18.5k|SequentialIntegerAttributeDecoder::SequentialIntegerAttributeDecoder() {}
_ZN5draco33SequentialIntegerAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   26|  18.5k|                                             int attribute_id) {
   27|  18.5k|  if (!SequentialAttributeDecoder::Init(decoder, attribute_id)) {
  ------------------
  |  Branch (27:7): [True: 0, False: 18.5k]
  ------------------
   28|      0|    return false;
   29|      0|  }
   30|  18.5k|  return true;
   31|  18.5k|}
_ZN5draco33SequentialIntegerAttributeDecoder34TransformAttributeToOriginalFormatERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEE:
   34|  2.19k|    const std::vector<PointIndex> &point_ids) {
   35|  2.19k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   36|  2.19k|  if (decoder() &&
  ------------------
  |  Branch (36:7): [True: 2.19k, False: 0]
  ------------------
   37|  2.19k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.19k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (37:7): [True: 3, False: 2.19k]
  ------------------
   38|      3|    return true;  // Don't revert the transform here for older files.
   39|      3|  }
   40|  2.19k|#endif
   41|  2.19k|  return StoreValues(static_cast<uint32_t>(point_ids.size()));
   42|  2.19k|}
_ZN5draco33SequentialIntegerAttributeDecoder12DecodeValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   45|  10.8k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   46|       |  // Decode prediction scheme.
   47|  10.8k|  int8_t prediction_scheme_method;
   48|  10.8k|  if (!in_buffer->Decode(&prediction_scheme_method)) {
  ------------------
  |  Branch (48:7): [True: 217, False: 10.5k]
  ------------------
   49|    217|    return false;
   50|    217|  }
   51|       |  // Check that decoded prediction scheme method type is valid.
   52|  10.5k|  if (prediction_scheme_method < PREDICTION_NONE ||
  ------------------
  |  Branch (52:7): [True: 69, False: 10.5k]
  ------------------
   53|  10.5k|      prediction_scheme_method >= NUM_PREDICTION_SCHEMES) {
  ------------------
  |  Branch (53:7): [True: 193, False: 10.3k]
  ------------------
   54|    262|    return false;
   55|    262|  }
   56|  10.3k|  if (prediction_scheme_method != PREDICTION_NONE) {
  ------------------
  |  Branch (56:7): [True: 9.96k, False: 375]
  ------------------
   57|  9.96k|    int8_t prediction_transform_type;
   58|  9.96k|    if (!in_buffer->Decode(&prediction_transform_type)) {
  ------------------
  |  Branch (58:9): [True: 66, False: 9.89k]
  ------------------
   59|     66|      return false;
   60|     66|    }
   61|       |    // Check that decoded prediction scheme transform type is valid.
   62|  9.89k|    if (prediction_transform_type < PREDICTION_TRANSFORM_NONE ||
  ------------------
  |  Branch (62:9): [True: 22, False: 9.87k]
  ------------------
   63|  9.87k|        prediction_transform_type >= NUM_PREDICTION_SCHEME_TRANSFORM_TYPES) {
  ------------------
  |  Branch (63:9): [True: 90, False: 9.78k]
  ------------------
   64|    112|      return false;
   65|    112|    }
   66|  9.78k|    prediction_scheme_ = CreateIntPredictionScheme(
   67|  9.78k|        static_cast<PredictionSchemeMethod>(prediction_scheme_method),
   68|  9.78k|        static_cast<PredictionSchemeTransformType>(prediction_transform_type));
   69|  9.78k|  }
   70|       |
   71|  10.1k|  if (prediction_scheme_) {
  ------------------
  |  Branch (71:7): [True: 7.35k, False: 2.80k]
  ------------------
   72|  7.35k|    if (!InitPredictionScheme(prediction_scheme_.get())) {
  ------------------
  |  Branch (72:9): [True: 40, False: 7.31k]
  ------------------
   73|     40|      return false;
   74|     40|    }
   75|  7.35k|  }
   76|       |
   77|  10.1k|  if (!DecodeIntegerValues(point_ids, in_buffer)) {
  ------------------
  |  Branch (77:7): [True: 1.92k, False: 8.19k]
  ------------------
   78|  1.92k|    return false;
   79|  1.92k|  }
   80|       |
   81|  8.19k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   82|  8.19k|  const int32_t num_values = static_cast<uint32_t>(point_ids.size());
   83|  8.19k|  if (decoder() &&
  ------------------
  |  Branch (83:7): [True: 8.19k, False: 0]
  ------------------
   84|  8.19k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  8.19k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (84:7): [True: 39, False: 8.15k]
  ------------------
   85|       |    // For older files, revert the transform right after we decode the data.
   86|     39|    if (!StoreValues(num_values)) {
  ------------------
  |  Branch (86:9): [True: 2, False: 37]
  ------------------
   87|      2|      return false;
   88|      2|    }
   89|     39|  }
   90|  8.19k|#endif
   91|  8.19k|  return true;
   92|  8.19k|}
_ZN5draco33SequentialIntegerAttributeDecoder25CreateIntPredictionSchemeENS_22PredictionSchemeMethodENS_29PredictionSchemeTransformTypeE:
   97|  8.54k|    PredictionSchemeTransformType transform_type) {
   98|  8.54k|  if (transform_type != PREDICTION_TRANSFORM_WRAP) {
  ------------------
  |  Branch (98:7): [True: 2.37k, False: 6.16k]
  ------------------
   99|  2.37k|    return nullptr;  // For now we support only wrap transform.
  100|  2.37k|  }
  101|  6.16k|  return CreatePredictionSchemeForDecoder<
  102|  6.16k|      int32_t, PredictionSchemeWrapDecodingTransform<int32_t>>(
  103|  6.16k|      method, attribute_id(), decoder());
  104|  8.54k|}
_ZN5draco33SequentialIntegerAttributeDecoder19DecodeIntegerValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
  107|  10.1k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
  108|  10.1k|  const int num_components = GetNumValueComponents();
  109|  10.1k|  if (num_components <= 0) {
  ------------------
  |  Branch (109:7): [True: 0, False: 10.1k]
  ------------------
  110|      0|    return false;
  111|      0|  }
  112|  10.1k|  const size_t num_entries = point_ids.size();
  113|  10.1k|  const size_t num_values = num_entries * num_components;
  114|  10.1k|  PreparePortableAttribute(static_cast<int>(num_entries), num_components);
  115|  10.1k|  int32_t *const portable_attribute_data = GetPortableAttributeData();
  116|  10.1k|  if (portable_attribute_data == nullptr) {
  ------------------
  |  Branch (116:7): [True: 16, False: 10.0k]
  ------------------
  117|     16|    return false;
  118|     16|  }
  119|  10.0k|  uint8_t compressed;
  120|  10.0k|  if (!in_buffer->Decode(&compressed)) {
  ------------------
  |  Branch (120:7): [True: 37, False: 10.0k]
  ------------------
  121|     37|    return false;
  122|     37|  }
  123|  10.0k|  if (compressed > 0) {
  ------------------
  |  Branch (123:7): [True: 675, False: 9.37k]
  ------------------
  124|       |    // Decode compressed values.
  125|    675|    if (!DecodeSymbols(static_cast<uint32_t>(num_values), num_components,
  ------------------
  |  Branch (125:9): [True: 272, False: 403]
  ------------------
  126|    675|                       in_buffer,
  127|    675|                       reinterpret_cast<uint32_t *>(portable_attribute_data))) {
  128|    272|      return false;
  129|    272|    }
  130|  9.37k|  } else {
  131|       |    // Decode the integer data directly.
  132|       |    // Get the number of bytes for a given entry.
  133|  9.37k|    uint8_t num_bytes;
  134|  9.37k|    if (!in_buffer->Decode(&num_bytes)) {
  ------------------
  |  Branch (134:9): [True: 16, False: 9.36k]
  ------------------
  135|     16|      return false;
  136|     16|    }
  137|  9.36k|    if (num_bytes == DataTypeLength(DT_INT32)) {
  ------------------
  |  Branch (137:9): [True: 589, False: 8.77k]
  ------------------
  138|    589|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (138:11): [True: 0, False: 589]
  ------------------
  139|    589|          sizeof(int32_t) * num_values) {
  140|      0|        return false;
  141|      0|      }
  142|    589|      if (!in_buffer->Decode(portable_attribute_data,
  ------------------
  |  Branch (142:11): [True: 11, False: 578]
  ------------------
  143|    589|                             sizeof(int32_t) * num_values)) {
  144|     11|        return false;
  145|     11|      }
  146|  8.77k|    } else {
  147|  8.77k|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (147:11): [True: 34, False: 8.73k]
  ------------------
  148|  8.77k|          num_bytes * num_values) {
  149|     34|        return false;
  150|     34|      }
  151|  8.73k|      if (in_buffer->remaining_size() <
  ------------------
  |  Branch (151:11): [True: 18, False: 8.71k]
  ------------------
  152|  8.73k|          static_cast<int64_t>(num_bytes) * static_cast<int64_t>(num_values)) {
  153|     18|        return false;
  154|     18|      }
  155|  1.00G|      for (size_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (155:26): [True: 1.00G, False: 8.71k]
  ------------------
  156|  1.00G|        if (!in_buffer->Decode(portable_attribute_data + i, num_bytes)) {
  ------------------
  |  Branch (156:13): [True: 0, False: 1.00G]
  ------------------
  157|      0|          return false;
  158|      0|        }
  159|  1.00G|      }
  160|  8.71k|    }
  161|  9.36k|  }
  162|       |
  163|  9.70k|  if (num_values > 0 && (prediction_scheme_ == nullptr ||
  ------------------
  |  Branch (163:7): [True: 9.70k, False: 0]
  |  Branch (163:26): [True: 2.61k, False: 7.08k]
  ------------------
  164|  8.53k|                         !prediction_scheme_->AreCorrectionsPositive())) {
  ------------------
  |  Branch (164:26): [True: 5.91k, False: 1.16k]
  ------------------
  165|       |    // Convert the values back to the original signed format.
  166|  8.53k|    ConvertSymbolsToSignedInts(
  167|  8.53k|        reinterpret_cast<const uint32_t *>(portable_attribute_data),
  168|  8.53k|        static_cast<int>(num_values), portable_attribute_data);
  169|  8.53k|  }
  170|       |
  171|       |  // If the data was encoded with a prediction scheme, we must revert it.
  172|  9.70k|  if (prediction_scheme_) {
  ------------------
  |  Branch (172:7): [True: 7.08k, False: 2.61k]
  ------------------
  173|  7.08k|    if (!prediction_scheme_->DecodePredictionData(in_buffer)) {
  ------------------
  |  Branch (173:9): [True: 975, False: 6.10k]
  ------------------
  174|    975|      return false;
  175|    975|    }
  176|       |
  177|  6.10k|    if (num_values > 0) {
  ------------------
  |  Branch (177:9): [True: 6.10k, False: 0]
  ------------------
  178|  6.10k|      if (!prediction_scheme_->ComputeOriginalValues(
  ------------------
  |  Branch (178:11): [True: 531, False: 5.57k]
  ------------------
  179|  6.10k|              portable_attribute_data, portable_attribute_data,
  180|  6.10k|              static_cast<int>(num_values), num_components, point_ids.data())) {
  181|    531|        return false;
  182|    531|      }
  183|  6.10k|    }
  184|  6.10k|  }
  185|  8.19k|  return true;
  186|  9.70k|}
_ZN5draco33SequentialIntegerAttributeDecoder11StoreValuesEj:
  188|  1.68k|bool SequentialIntegerAttributeDecoder::StoreValues(uint32_t num_values) {
  189|  1.68k|  switch (attribute()->data_type()) {
  190|    205|    case DT_UINT8:
  ------------------
  |  Branch (190:5): [True: 205, False: 1.48k]
  ------------------
  191|    205|      StoreTypedValues<uint8_t>(num_values);
  192|    205|      break;
  193|    775|    case DT_INT8:
  ------------------
  |  Branch (193:5): [True: 775, False: 914]
  ------------------
  194|    775|      StoreTypedValues<int8_t>(num_values);
  195|    775|      break;
  196|    101|    case DT_UINT16:
  ------------------
  |  Branch (196:5): [True: 101, False: 1.58k]
  ------------------
  197|    101|      StoreTypedValues<uint16_t>(num_values);
  198|    101|      break;
  199|    183|    case DT_INT16:
  ------------------
  |  Branch (199:5): [True: 183, False: 1.50k]
  ------------------
  200|    183|      StoreTypedValues<int16_t>(num_values);
  201|    183|      break;
  202|    180|    case DT_UINT32:
  ------------------
  |  Branch (202:5): [True: 180, False: 1.50k]
  ------------------
  203|    180|      StoreTypedValues<uint32_t>(num_values);
  204|    180|      break;
  205|    147|    case DT_INT32:
  ------------------
  |  Branch (205:5): [True: 147, False: 1.54k]
  ------------------
  206|    147|      StoreTypedValues<int32_t>(num_values);
  207|    147|      break;
  208|     98|    default:
  ------------------
  |  Branch (208:5): [True: 98, False: 1.59k]
  ------------------
  209|     98|      return false;
  210|  1.68k|  }
  211|  1.59k|  return true;
  212|  1.68k|}
_ZN5draco33SequentialIntegerAttributeDecoder24PreparePortableAttributeEii:
  236|  10.1k|    int num_entries, int num_components) {
  237|  10.1k|  GeometryAttribute ga;
  238|  10.1k|  ga.Init(attribute()->attribute_type(), nullptr, num_components, DT_INT32,
  239|  10.1k|          false, num_components * DataTypeLength(DT_INT32), 0);
  240|  10.1k|  std::unique_ptr<PointAttribute> port_att(new PointAttribute(ga));
  241|  10.1k|  port_att->SetIdentityMapping();
  242|  10.1k|  port_att->Reset(num_entries);
  243|  10.1k|  port_att->set_unique_id(attribute()->unique_id());
  244|  10.1k|  SetPortableAttribute(std::move(port_att));
  245|  10.1k|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIhEEvj:
  215|    205|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    205|  const int num_components = attribute()->num_components();
  217|    205|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    205|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    205|      new AttributeTypeT[num_components]);
  220|    205|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    205|  int val_id = 0;
  222|    205|  int out_byte_pos = 0;
  223|  1.60M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 1.60M, False: 205]
  ------------------
  224|  44.2M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 42.6M, False: 1.60M]
  ------------------
  225|  42.6M|      const AttributeTypeT value =
  226|  42.6M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|  42.6M|      att_val[c] = value;
  228|  42.6M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|  1.60M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|  1.60M|    out_byte_pos += entry_size;
  232|  1.60M|  }
  233|    205|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIaEEvj:
  215|    775|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    775|  const int num_components = attribute()->num_components();
  217|    775|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    775|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    775|      new AttributeTypeT[num_components]);
  220|    775|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    775|  int val_id = 0;
  222|    775|  int out_byte_pos = 0;
  223|  10.5M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 10.5M, False: 775]
  ------------------
  224|   453M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 442M, False: 10.5M]
  ------------------
  225|   442M|      const AttributeTypeT value =
  226|   442M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|   442M|      att_val[c] = value;
  228|   442M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|  10.5M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|  10.5M|    out_byte_pos += entry_size;
  232|  10.5M|  }
  233|    775|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesItEEvj:
  215|    101|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    101|  const int num_components = attribute()->num_components();
  217|    101|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    101|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    101|      new AttributeTypeT[num_components]);
  220|    101|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    101|  int val_id = 0;
  222|    101|  int out_byte_pos = 0;
  223|   112k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 112k, False: 101]
  ------------------
  224|  9.07M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 8.96M, False: 112k]
  ------------------
  225|  8.96M|      const AttributeTypeT value =
  226|  8.96M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|  8.96M|      att_val[c] = value;
  228|  8.96M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|   112k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|   112k|    out_byte_pos += entry_size;
  232|   112k|  }
  233|    101|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIsEEvj:
  215|    183|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    183|  const int num_components = attribute()->num_components();
  217|    183|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    183|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    183|      new AttributeTypeT[num_components]);
  220|    183|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    183|  int val_id = 0;
  222|    183|  int out_byte_pos = 0;
  223|   496k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 496k, False: 183]
  ------------------
  224|  16.2M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 15.7M, False: 496k]
  ------------------
  225|  15.7M|      const AttributeTypeT value =
  226|  15.7M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|  15.7M|      att_val[c] = value;
  228|  15.7M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|   496k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|   496k|    out_byte_pos += entry_size;
  232|   496k|  }
  233|    183|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIjEEvj:
  215|    180|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    180|  const int num_components = attribute()->num_components();
  217|    180|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    180|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    180|      new AttributeTypeT[num_components]);
  220|    180|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    180|  int val_id = 0;
  222|    180|  int out_byte_pos = 0;
  223|  1.19M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 1.19M, False: 180]
  ------------------
  224|   190M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 188M, False: 1.19M]
  ------------------
  225|   188M|      const AttributeTypeT value =
  226|   188M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|   188M|      att_val[c] = value;
  228|   188M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|  1.19M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|  1.19M|    out_byte_pos += entry_size;
  232|  1.19M|  }
  233|    180|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIiEEvj:
  215|    147|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    147|  const int num_components = attribute()->num_components();
  217|    147|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    147|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    147|      new AttributeTypeT[num_components]);
  220|    147|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    147|  int val_id = 0;
  222|    147|  int out_byte_pos = 0;
  223|  1.17M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 1.17M, False: 147]
  ------------------
  224|  53.7M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 52.5M, False: 1.17M]
  ------------------
  225|  52.5M|      const AttributeTypeT value =
  226|  52.5M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|  52.5M|      att_val[c] = value;
  228|  52.5M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|  1.17M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|  1.17M|    out_byte_pos += entry_size;
  232|  1.17M|  }
  233|    147|}

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

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

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

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

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

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

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

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

_ZN5draco10AnsDecoderC2Ev:
   56|  35.9k|  AnsDecoder() : buf(nullptr), buf_offset(0), state(0) {}
rans_bit_decoder.cc:_ZN5dracoL13ans_read_initEPNS_10AnsDecoderEPKhi:
  300|  23.1k|                                const uint8_t *const buf, int offset) {
  301|  23.1k|  unsigned x;
  302|  23.1k|  if (offset < 1) {
  ------------------
  |  Branch (302:7): [True: 30, False: 23.1k]
  ------------------
  303|     30|    return 1;
  304|     30|  }
  305|  23.1k|  ans->buf = buf;
  306|  23.1k|  x = buf[offset - 1] >> 6;
  307|  23.1k|  if (x == 0) {
  ------------------
  |  Branch (307:7): [True: 20.3k, False: 2.76k]
  ------------------
  308|  20.3k|    ans->buf_offset = offset - 1;
  309|  20.3k|    ans->state = buf[offset - 1] & 0x3F;
  310|  20.3k|  } else if (x == 1) {
  ------------------
  |  Branch (310:14): [True: 2.49k, False: 272]
  ------------------
  311|  2.49k|    if (offset < 2) {
  ------------------
  |  Branch (311:9): [True: 3, False: 2.49k]
  ------------------
  312|      3|      return 1;
  313|      3|    }
  314|  2.49k|    ans->buf_offset = offset - 2;
  315|  2.49k|    ans->state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  316|  2.49k|  } else if (x == 2) {
  ------------------
  |  Branch (316:14): [True: 256, False: 16]
  ------------------
  317|    256|    if (offset < 3) {
  ------------------
  |  Branch (317:9): [True: 0, False: 256]
  ------------------
  318|      0|      return 1;
  319|      0|    }
  320|    256|    ans->buf_offset = offset - 3;
  321|    256|    ans->state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  322|    256|  } else {
  323|     16|    return 1;
  324|     16|  }
  325|  23.0k|  ans->state += DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  23.0k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  326|  23.0k|  if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   64|  23.0k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
                if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  23.0k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (326:7): [True: 2, False: 23.0k]
  ------------------
  327|      2|    return 1;
  328|      2|  }
  329|  23.0k|  return 0;
  330|  23.0k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|  2.49k|static uint32_t mem_get_le16(const void *vmem) {
   68|  2.49k|  uint32_t val;
   69|  2.49k|  const uint8_t *mem = (const uint8_t *)vmem;
   70|       |
   71|  2.49k|  val = mem[1] << 8;
   72|  2.49k|  val |= mem[0];
   73|  2.49k|  return val;
   74|  2.49k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    256|static uint32_t mem_get_le24(const void *vmem) {
   77|    256|  uint32_t val;
   78|    256|  const uint8_t *mem = (const uint8_t *)vmem;
   79|       |
   80|    256|  val = mem[2] << 16;
   81|    256|  val |= mem[1] << 8;
   82|    256|  val |= mem[0];
   83|    256|  return val;
   84|    256|}
rans_bit_decoder.cc:_ZN5dracoL14rabs_desc_readEPNS_10AnsDecoderEh:
  166|  12.9G|static inline int rabs_desc_read(struct AnsDecoder *ans, AnsP8 p0) {
  167|  12.9G|  int val;
  168|       |#if DRACO_ANS_IMPL1
  169|       |  unsigned l_s;
  170|       |#else
  171|  12.9G|  unsigned quot, rem, x, xn;
  172|  12.9G|#endif
  173|  12.9G|  const AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
  ------------------
  |  |   63|  12.9G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  174|  12.9G|  if (ans->state < DRACO_ANS_L_BASE && ans->buf_offset > 0) {
  ------------------
  |  |   64|  25.9G|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  |  Branch (174:7): [True: 10.9G, False: 2.04G]
  |  Branch (174:40): [True: 158k, False: 10.9G]
  ------------------
  175|   158k|    ans->state = ans->state * DRACO_ANS_IO_BASE + ans->buf[--ans->buf_offset];
  ------------------
  |  |   65|   158k|#define DRACO_ANS_IO_BASE 256
  ------------------
  176|   158k|  }
  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.9G|  x = ans->state;
  184|  12.9G|  quot = x / DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|  12.9G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  185|  12.9G|  rem = x % DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|  12.9G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  186|  12.9G|  xn = quot * p;
  187|  12.9G|  val = rem < p;
  188|  12.9G|  if (UNPREDICTABLE(val)) {
  ------------------
  |  |  165|  25.9G|#define UNPREDICTABLE(x) x
  |  |  ------------------
  |  |  |  Branch (165:26): [True: 10.9G, False: 2.01G]
  |  |  ------------------
  ------------------
  189|  10.9G|    ans->state = xn + rem;
  190|  10.9G|  } else {
  191|       |    // ans->state = quot * p0 + rem - p;
  192|  2.01G|    ans->state = x - xn - p;
  193|  2.01G|  }
  194|  12.9G|#endif
  195|  12.9G|  return val;
  196|  12.9G|}
rans_bit_decoder.cc:_ZN5dracoL12ans_read_endEPNS_10AnsDecoderE:
  332|  50.8k|static inline int ans_read_end(struct AnsDecoder *const ans) {
  333|  50.8k|  return ans->state == DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  50.8k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  334|  50.8k|}
_ZN5draco11RAnsDecoderILi12EEC2Ev:
  416|  4.31k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi12EE24rans_build_look_up_tableEPKjj:
  484|  2.42k|                                       uint32_t num_symbols) {
  485|  2.42k|    lut_table_.resize(rans_precision);
  486|  2.42k|    probability_table_.resize(num_symbols);
  487|  2.42k|    uint32_t cum_prob = 0;
  488|  2.42k|    uint32_t act_prob = 0;
  489|  27.1k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 24.8k, False: 2.25k]
  ------------------
  490|  24.8k|      probability_table_[i].prob = token_probs[i];
  491|  24.8k|      probability_table_[i].cum_prob = cum_prob;
  492|  24.8k|      cum_prob += token_probs[i];
  493|  24.8k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 178, False: 24.6k]
  ------------------
  494|    178|        return false;
  495|    178|      }
  496|  8.36M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 8.34M, False: 24.6k]
  ------------------
  497|  8.34M|        lut_table_[j] = i;
  498|  8.34M|      }
  499|  24.6k|      act_prob = cum_prob;
  500|  24.6k|    }
  501|  2.25k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 267, False: 1.98k]
  ------------------
  502|    267|      return false;
  503|    267|    }
  504|  1.98k|    return true;
  505|  2.25k|  }
_ZN5draco11RAnsDecoderILi12EE9read_initEPKhi:
  421|  1.91k|  inline int read_init(const uint8_t *const buf, int offset) {
  422|  1.91k|    unsigned x;
  423|  1.91k|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 160, False: 1.75k]
  ------------------
  424|    160|      return 1;
  425|    160|    }
  426|  1.75k|    ans_.buf = buf;
  427|  1.75k|    x = buf[offset - 1] >> 6;
  428|  1.75k|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 1.02k, False: 722]
  ------------------
  429|  1.02k|      ans_.buf_offset = offset - 1;
  430|  1.02k|      ans_.state = buf[offset - 1] & 0x3F;
  431|  1.02k|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 294, False: 428]
  ------------------
  432|    294|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 76, False: 218]
  ------------------
  433|     76|        return 1;
  434|     76|      }
  435|    218|      ans_.buf_offset = offset - 2;
  436|    218|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    428|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 273, False: 155]
  ------------------
  438|    273|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 65, False: 208]
  ------------------
  439|     65|        return 1;
  440|     65|      }
  441|    208|      ans_.buf_offset = offset - 3;
  442|    208|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    208|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 155, False: 0]
  ------------------
  444|    155|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 67, False: 88]
  ------------------
  445|     67|        return 1;
  446|     67|      }
  447|     88|      ans_.buf_offset = offset - 4;
  448|     88|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     88|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|  1.54k|    ans_.state += l_rans_base;
  453|  1.54k|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  1.54k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 88, False: 1.45k]
  ------------------
  454|     88|      return 1;
  455|     88|    }
  456|  1.45k|    return 0;
  457|  1.54k|  }
symbol_decoding.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|    371|static uint32_t mem_get_le16(const void *vmem) {
   68|    371|  uint32_t val;
   69|    371|  const uint8_t *mem = (const uint8_t *)vmem;
   70|       |
   71|    371|  val = mem[1] << 8;
   72|    371|  val |= mem[0];
   73|    371|  return val;
   74|    371|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    334|static uint32_t mem_get_le24(const void *vmem) {
   77|    334|  uint32_t val;
   78|    334|  const uint8_t *mem = (const uint8_t *)vmem;
   79|       |
   80|    334|  val = mem[2] << 16;
   81|    334|  val |= mem[1] << 8;
   82|    334|  val |= mem[0];
   83|    334|  return val;
   84|    334|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le32EPKv:
   86|    301|static inline uint32_t mem_get_le32(const void *vmem) {
   87|    301|  uint32_t val;
   88|    301|  const uint8_t *mem = (const uint8_t *)vmem;
   89|       |
   90|    301|  val = mem[3] << 24;
   91|    301|  val |= mem[2] << 16;
   92|    301|  val |= mem[1] << 8;
   93|    301|  val |= mem[0];
   94|    301|  return val;
   95|    301|}
_ZN5draco11RAnsDecoderILi12EE9rans_readEv:
  465|  98.3M|  inline int rans_read() {
  466|  98.3M|    unsigned rem;
  467|  98.3M|    unsigned quo;
  468|  98.3M|    struct rans_dec_sym sym;
  469|  98.3M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 86.2M, False: 12.1M]
  |  Branch (469:40): [True: 19.1k, False: 86.2M]
  ------------------
  470|  19.1k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  19.1k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  19.1k|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|  98.3M|    quo = ans_.state / rans_precision;
  475|  98.3M|    rem = ans_.state % rans_precision;
  476|  98.3M|    fetch_sym(&sym, rem);
  477|  98.3M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|  98.3M|    return sym.val;
  479|  98.3M|  }
_ZN5draco11RAnsDecoderILi12EE9fetch_symEPNS_12rans_dec_symEj:
  508|  98.3M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  509|  98.3M|    uint32_t symbol = lut_table_[rem];
  510|  98.3M|    out->val = symbol;
  511|  98.3M|    out->prob = probability_table_[symbol].prob;
  512|  98.3M|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|  98.3M|  }
_ZN5draco11RAnsDecoderILi12EE8read_endEv:
  459|  1.38k|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi13EEC2Ev:
  416|    499|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi13EE24rans_build_look_up_tableEPKjj:
  484|    362|                                       uint32_t num_symbols) {
  485|    362|    lut_table_.resize(rans_precision);
  486|    362|    probability_table_.resize(num_symbols);
  487|    362|    uint32_t cum_prob = 0;
  488|    362|    uint32_t act_prob = 0;
  489|  8.14k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 7.80k, False: 339]
  ------------------
  490|  7.80k|      probability_table_[i].prob = token_probs[i];
  491|  7.80k|      probability_table_[i].cum_prob = cum_prob;
  492|  7.80k|      cum_prob += token_probs[i];
  493|  7.80k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 23, False: 7.77k]
  ------------------
  494|     23|        return false;
  495|     23|      }
  496|  2.57M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 2.56M, False: 7.77k]
  ------------------
  497|  2.56M|        lut_table_[j] = i;
  498|  2.56M|      }
  499|  7.77k|      act_prob = cum_prob;
  500|  7.77k|    }
  501|    339|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 34, False: 305]
  ------------------
  502|     34|      return false;
  503|     34|    }
  504|    305|    return true;
  505|    339|  }
_ZN5draco11RAnsDecoderILi13EE9read_initEPKhi:
  421|    275|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    275|    unsigned x;
  423|    275|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 9, False: 266]
  ------------------
  424|      9|      return 1;
  425|      9|    }
  426|    266|    ans_.buf = buf;
  427|    266|    x = buf[offset - 1] >> 6;
  428|    266|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 158, False: 108]
  ------------------
  429|    158|      ans_.buf_offset = offset - 1;
  430|    158|      ans_.state = buf[offset - 1] & 0x3F;
  431|    158|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 53, False: 55]
  ------------------
  432|     53|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 18, False: 35]
  ------------------
  433|     18|        return 1;
  434|     18|      }
  435|     35|      ans_.buf_offset = offset - 2;
  436|     35|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     55|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 42, False: 13]
  ------------------
  438|     42|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 9, False: 33]
  ------------------
  439|      9|        return 1;
  440|      9|      }
  441|     33|      ans_.buf_offset = offset - 3;
  442|     33|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     33|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 13, False: 0]
  ------------------
  444|     13|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 11, False: 2]
  ------------------
  445|     11|        return 1;
  446|     11|      }
  447|      2|      ans_.buf_offset = offset - 4;
  448|      2|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|      2|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|    228|    ans_.state += l_rans_base;
  453|    228|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    228|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 1, False: 227]
  ------------------
  454|      1|      return 1;
  455|      1|    }
  456|    227|    return 0;
  457|    228|  }
_ZN5draco11RAnsDecoderILi13EE9rans_readEv:
  465|  18.4M|  inline int rans_read() {
  466|  18.4M|    unsigned rem;
  467|  18.4M|    unsigned quo;
  468|  18.4M|    struct rans_dec_sym sym;
  469|  18.4M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 18.3M, False: 14.1k]
  |  Branch (469:40): [True: 3.00k, False: 18.3M]
  ------------------
  470|  3.00k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  3.00k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  3.00k|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|  18.4M|    quo = ans_.state / rans_precision;
  475|  18.4M|    rem = ans_.state % rans_precision;
  476|  18.4M|    fetch_sym(&sym, rem);
  477|  18.4M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|  18.4M|    return sym.val;
  479|  18.4M|  }
_ZN5draco11RAnsDecoderILi13EE9fetch_symEPNS_12rans_dec_symEj:
  508|  18.4M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  509|  18.4M|    uint32_t symbol = lut_table_[rem];
  510|  18.4M|    out->val = symbol;
  511|  18.4M|    out->prob = probability_table_[symbol].prob;
  512|  18.4M|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|  18.4M|  }
_ZN5draco11RAnsDecoderILi13EE8read_endEv:
  459|    227|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi15EEC2Ev:
  416|    432|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi15EE24rans_build_look_up_tableEPKjj:
  484|    299|                                       uint32_t num_symbols) {
  485|    299|    lut_table_.resize(rans_precision);
  486|    299|    probability_table_.resize(num_symbols);
  487|    299|    uint32_t cum_prob = 0;
  488|    299|    uint32_t act_prob = 0;
  489|  8.64k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 8.37k, False: 271]
  ------------------
  490|  8.37k|      probability_table_[i].prob = token_probs[i];
  491|  8.37k|      probability_table_[i].cum_prob = cum_prob;
  492|  8.37k|      cum_prob += token_probs[i];
  493|  8.37k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 28, False: 8.34k]
  ------------------
  494|     28|        return false;
  495|     28|      }
  496|  8.14M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 8.13M, False: 8.34k]
  ------------------
  497|  8.13M|        lut_table_[j] = i;
  498|  8.13M|      }
  499|  8.34k|      act_prob = cum_prob;
  500|  8.34k|    }
  501|    271|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 42, False: 229]
  ------------------
  502|     42|      return false;
  503|     42|    }
  504|    229|    return true;
  505|    271|  }
_ZN5draco11RAnsDecoderILi15EE9read_initEPKhi:
  421|    116|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    116|    unsigned x;
  423|    116|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 15, False: 101]
  ------------------
  424|     15|      return 1;
  425|     15|    }
  426|    101|    ans_.buf = buf;
  427|    101|    x = buf[offset - 1] >> 6;
  428|    101|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 33, False: 68]
  ------------------
  429|     33|      ans_.buf_offset = offset - 1;
  430|     33|      ans_.state = buf[offset - 1] & 0x3F;
  431|     68|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 24, False: 44]
  ------------------
  432|     24|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 13, False: 11]
  ------------------
  433|     13|        return 1;
  434|     13|      }
  435|     11|      ans_.buf_offset = offset - 2;
  436|     11|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     44|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 22, False: 22]
  ------------------
  438|     22|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 9, False: 13]
  ------------------
  439|      9|        return 1;
  440|      9|      }
  441|     13|      ans_.buf_offset = offset - 3;
  442|     13|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     22|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 22, False: 0]
  ------------------
  444|     22|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 9, False: 13]
  ------------------
  445|      9|        return 1;
  446|      9|      }
  447|     13|      ans_.buf_offset = offset - 4;
  448|     13|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     13|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     70|    ans_.state += l_rans_base;
  453|     70|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     70|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 12, False: 58]
  ------------------
  454|     12|      return 1;
  455|     12|    }
  456|     58|    return 0;
  457|     70|  }
_ZN5draco11RAnsDecoderILi15EE9rans_readEv:
  465|   409k|  inline int rans_read() {
  466|   409k|    unsigned rem;
  467|   409k|    unsigned quo;
  468|   409k|    struct rans_dec_sym sym;
  469|   409k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 130k, False: 279k]
  |  Branch (469:40): [True: 240, False: 129k]
  ------------------
  470|    240|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    240|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|    240|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|   409k|    quo = ans_.state / rans_precision;
  475|   409k|    rem = ans_.state % rans_precision;
  476|   409k|    fetch_sym(&sym, rem);
  477|   409k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   409k|    return sym.val;
  479|   409k|  }
_ZN5draco11RAnsDecoderILi15EE9fetch_symEPNS_12rans_dec_symEj:
  508|   409k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  509|   409k|    uint32_t symbol = lut_table_[rem];
  510|   409k|    out->val = symbol;
  511|   409k|    out->prob = probability_table_[symbol].prob;
  512|   409k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   409k|  }
_ZN5draco11RAnsDecoderILi15EE8read_endEv:
  459|     58|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi16EEC2Ev:
  416|    367|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi16EE24rans_build_look_up_tableEPKjj:
  484|    231|                                       uint32_t num_symbols) {
  485|    231|    lut_table_.resize(rans_precision);
  486|    231|    probability_table_.resize(num_symbols);
  487|    231|    uint32_t cum_prob = 0;
  488|    231|    uint32_t act_prob = 0;
  489|  2.34k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 2.14k, False: 208]
  ------------------
  490|  2.14k|      probability_table_[i].prob = token_probs[i];
  491|  2.14k|      probability_table_[i].cum_prob = cum_prob;
  492|  2.14k|      cum_prob += token_probs[i];
  493|  2.14k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 23, False: 2.11k]
  ------------------
  494|     23|        return false;
  495|     23|      }
  496|  12.2M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 12.2M, False: 2.11k]
  ------------------
  497|  12.2M|        lut_table_[j] = i;
  498|  12.2M|      }
  499|  2.11k|      act_prob = cum_prob;
  500|  2.11k|    }
  501|    208|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 35, False: 173]
  ------------------
  502|     35|      return false;
  503|     35|    }
  504|    173|    return true;
  505|    208|  }
_ZN5draco11RAnsDecoderILi16EE9read_initEPKhi:
  421|     92|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     92|    unsigned x;
  423|     92|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 5, False: 87]
  ------------------
  424|      5|      return 1;
  425|      5|    }
  426|     87|    ans_.buf = buf;
  427|     87|    x = buf[offset - 1] >> 6;
  428|     87|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 44, False: 43]
  ------------------
  429|     44|      ans_.buf_offset = offset - 1;
  430|     44|      ans_.state = buf[offset - 1] & 0x3F;
  431|     44|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 19, False: 24]
  ------------------
  432|     19|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 7, False: 12]
  ------------------
  433|      7|        return 1;
  434|      7|      }
  435|     12|      ans_.buf_offset = offset - 2;
  436|     12|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     24|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 13, False: 11]
  ------------------
  438|     13|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 3, False: 10]
  ------------------
  439|      3|        return 1;
  440|      3|      }
  441|     10|      ans_.buf_offset = offset - 3;
  442|     10|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     11|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 11, False: 0]
  ------------------
  444|     11|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 0, False: 11]
  ------------------
  445|      0|        return 1;
  446|      0|      }
  447|     11|      ans_.buf_offset = offset - 4;
  448|     11|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     11|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     77|    ans_.state += l_rans_base;
  453|     77|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     77|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 9, False: 68]
  ------------------
  454|      9|      return 1;
  455|      9|    }
  456|     68|    return 0;
  457|     77|  }
_ZN5draco11RAnsDecoderILi16EE9rans_readEv:
  465|   494k|  inline int rans_read() {
  466|   494k|    unsigned rem;
  467|   494k|    unsigned quo;
  468|   494k|    struct rans_dec_sym sym;
  469|   495k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 159k, False: 335k]
  |  Branch (469:40): [True: 1.14k, False: 158k]
  ------------------
  470|  1.14k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  1.14k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  1.14k|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|   494k|    quo = ans_.state / rans_precision;
  475|   494k|    rem = ans_.state % rans_precision;
  476|   494k|    fetch_sym(&sym, rem);
  477|   494k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   494k|    return sym.val;
  479|   494k|  }
_ZN5draco11RAnsDecoderILi16EE9fetch_symEPNS_12rans_dec_symEj:
  508|   494k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  509|   494k|    uint32_t symbol = lut_table_[rem];
  510|   494k|    out->val = symbol;
  511|   494k|    out->prob = probability_table_[symbol].prob;
  512|   494k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   494k|  }
_ZN5draco11RAnsDecoderILi16EE8read_endEv:
  459|     68|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi18EEC2Ev:
  416|    368|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi18EE24rans_build_look_up_tableEPKjj:
  484|    222|                                       uint32_t num_symbols) {
  485|    222|    lut_table_.resize(rans_precision);
  486|    222|    probability_table_.resize(num_symbols);
  487|    222|    uint32_t cum_prob = 0;
  488|    222|    uint32_t act_prob = 0;
  489|  3.66k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 3.47k, False: 188]
  ------------------
  490|  3.47k|      probability_table_[i].prob = token_probs[i];
  491|  3.47k|      probability_table_[i].cum_prob = cum_prob;
  492|  3.47k|      cum_prob += token_probs[i];
  493|  3.47k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 34, False: 3.44k]
  ------------------
  494|     34|        return false;
  495|     34|      }
  496|  46.2M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 46.2M, False: 3.44k]
  ------------------
  497|  46.2M|        lut_table_[j] = i;
  498|  46.2M|      }
  499|  3.44k|      act_prob = cum_prob;
  500|  3.44k|    }
  501|    188|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 30, False: 158]
  ------------------
  502|     30|      return false;
  503|     30|    }
  504|    158|    return true;
  505|    188|  }
_ZN5draco11RAnsDecoderILi18EE9read_initEPKhi:
  421|     90|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     90|    unsigned x;
  423|     90|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 5, False: 85]
  ------------------
  424|      5|      return 1;
  425|      5|    }
  426|     85|    ans_.buf = buf;
  427|     85|    x = buf[offset - 1] >> 6;
  428|     85|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 23, False: 62]
  ------------------
  429|     23|      ans_.buf_offset = offset - 1;
  430|     23|      ans_.state = buf[offset - 1] & 0x3F;
  431|     62|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 24, False: 38]
  ------------------
  432|     24|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 9, False: 15]
  ------------------
  433|      9|        return 1;
  434|      9|      }
  435|     15|      ans_.buf_offset = offset - 2;
  436|     15|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     38|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 14, False: 24]
  ------------------
  438|     14|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 10, False: 4]
  ------------------
  439|     10|        return 1;
  440|     10|      }
  441|      4|      ans_.buf_offset = offset - 3;
  442|      4|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     24|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 24, False: 0]
  ------------------
  444|     24|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 10, False: 14]
  ------------------
  445|     10|        return 1;
  446|     10|      }
  447|     14|      ans_.buf_offset = offset - 4;
  448|     14|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     14|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     56|    ans_.state += l_rans_base;
  453|     56|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     56|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 11, False: 45]
  ------------------
  454|     11|      return 1;
  455|     11|    }
  456|     45|    return 0;
  457|     56|  }
_ZN5draco11RAnsDecoderILi18EE9rans_readEv:
  465|  49.8k|  inline int rans_read() {
  466|  49.8k|    unsigned rem;
  467|  49.8k|    unsigned quo;
  468|  49.8k|    struct rans_dec_sym sym;
  469|  50.4k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 44.1k, False: 6.28k]
  |  Branch (469:40): [True: 590, False: 43.5k]
  ------------------
  470|    590|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    590|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|    590|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|  49.8k|    quo = ans_.state / rans_precision;
  475|  49.8k|    rem = ans_.state % rans_precision;
  476|  49.8k|    fetch_sym(&sym, rem);
  477|  49.8k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|  49.8k|    return sym.val;
  479|  49.8k|  }
_ZN5draco11RAnsDecoderILi18EE9fetch_symEPNS_12rans_dec_symEj:
  508|  49.8k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  509|  49.8k|    uint32_t symbol = lut_table_[rem];
  510|  49.8k|    out->val = symbol;
  511|  49.8k|    out->prob = probability_table_[symbol].prob;
  512|  49.8k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|  49.8k|  }
_ZN5draco11RAnsDecoderILi18EE8read_endEv:
  459|     45|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi19EEC2Ev:
  416|    433|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi19EE24rans_build_look_up_tableEPKjj:
  484|    290|                                       uint32_t num_symbols) {
  485|    290|    lut_table_.resize(rans_precision);
  486|    290|    probability_table_.resize(num_symbols);
  487|    290|    uint32_t cum_prob = 0;
  488|    290|    uint32_t act_prob = 0;
  489|  5.84k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 5.57k, False: 268]
  ------------------
  490|  5.57k|      probability_table_[i].prob = token_probs[i];
  491|  5.57k|      probability_table_[i].cum_prob = cum_prob;
  492|  5.57k|      cum_prob += token_probs[i];
  493|  5.57k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 22, False: 5.55k]
  ------------------
  494|     22|        return false;
  495|     22|      }
  496|   123M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 123M, False: 5.55k]
  ------------------
  497|   123M|        lut_table_[j] = i;
  498|   123M|      }
  499|  5.55k|      act_prob = cum_prob;
  500|  5.55k|    }
  501|    268|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 55, False: 213]
  ------------------
  502|     55|      return false;
  503|     55|    }
  504|    213|    return true;
  505|    268|  }
_ZN5draco11RAnsDecoderILi19EE9read_initEPKhi:
  421|    129|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    129|    unsigned x;
  423|    129|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 5, False: 124]
  ------------------
  424|      5|      return 1;
  425|      5|    }
  426|    124|    ans_.buf = buf;
  427|    124|    x = buf[offset - 1] >> 6;
  428|    124|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 37, False: 87]
  ------------------
  429|     37|      ans_.buf_offset = offset - 1;
  430|     37|      ans_.state = buf[offset - 1] & 0x3F;
  431|     87|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 25, False: 62]
  ------------------
  432|     25|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 6, False: 19]
  ------------------
  433|      6|        return 1;
  434|      6|      }
  435|     19|      ans_.buf_offset = offset - 2;
  436|     19|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     62|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 16, False: 46]
  ------------------
  438|     16|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 7, False: 9]
  ------------------
  439|      7|        return 1;
  440|      7|      }
  441|      9|      ans_.buf_offset = offset - 3;
  442|      9|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     46|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 46, False: 0]
  ------------------
  444|     46|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 2, False: 44]
  ------------------
  445|      2|        return 1;
  446|      2|      }
  447|     44|      ans_.buf_offset = offset - 4;
  448|     44|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     44|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|    109|    ans_.state += l_rans_base;
  453|    109|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    109|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 18, False: 91]
  ------------------
  454|     18|      return 1;
  455|     18|    }
  456|     91|    return 0;
  457|    109|  }
_ZN5draco11RAnsDecoderILi19EE9rans_readEv:
  465|   132k|  inline int rans_read() {
  466|   132k|    unsigned rem;
  467|   132k|    unsigned quo;
  468|   132k|    struct rans_dec_sym sym;
  469|   133k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 117k, False: 15.9k]
  |  Branch (469:40): [True: 1.06k, False: 116k]
  ------------------
  470|  1.06k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  1.06k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  1.06k|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|   132k|    quo = ans_.state / rans_precision;
  475|   132k|    rem = ans_.state % rans_precision;
  476|   132k|    fetch_sym(&sym, rem);
  477|   132k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   132k|    return sym.val;
  479|   132k|  }
_ZN5draco11RAnsDecoderILi19EE9fetch_symEPNS_12rans_dec_symEj:
  508|   132k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  509|   132k|    uint32_t symbol = lut_table_[rem];
  510|   132k|    out->val = symbol;
  511|   132k|    out->prob = probability_table_[symbol].prob;
  512|   132k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   132k|  }
_ZN5draco11RAnsDecoderILi19EE8read_endEv:
  459|     91|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi20EEC2Ev:
  416|  2.02k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi20EE24rans_build_look_up_tableEPKjj:
  484|  1.21k|                                       uint32_t num_symbols) {
  485|  1.21k|    lut_table_.resize(rans_precision);
  486|  1.21k|    probability_table_.resize(num_symbols);
  487|  1.21k|    uint32_t cum_prob = 0;
  488|  1.21k|    uint32_t act_prob = 0;
  489|  39.2k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 38.0k, False: 1.17k]
  ------------------
  490|  38.0k|      probability_table_[i].prob = token_probs[i];
  491|  38.0k|      probability_table_[i].cum_prob = cum_prob;
  492|  38.0k|      cum_prob += token_probs[i];
  493|  38.0k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 46, False: 38.0k]
  ------------------
  494|     46|        return false;
  495|     46|      }
  496|  1.12G|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 1.12G, False: 38.0k]
  ------------------
  497|  1.12G|        lut_table_[j] = i;
  498|  1.12G|      }
  499|  38.0k|      act_prob = cum_prob;
  500|  38.0k|    }
  501|  1.17k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 147, False: 1.02k]
  ------------------
  502|    147|      return false;
  503|    147|    }
  504|  1.02k|    return true;
  505|  1.17k|  }
_ZN5draco11RAnsDecoderILi20EE9read_initEPKhi:
  421|    535|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    535|    unsigned x;
  423|    535|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 58, False: 477]
  ------------------
  424|     58|      return 1;
  425|     58|    }
  426|    477|    ans_.buf = buf;
  427|    477|    x = buf[offset - 1] >> 6;
  428|    477|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 140, False: 337]
  ------------------
  429|    140|      ans_.buf_offset = offset - 1;
  430|    140|      ans_.state = buf[offset - 1] & 0x3F;
  431|    337|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 94, False: 243]
  ------------------
  432|     94|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 33, False: 61]
  ------------------
  433|     33|        return 1;
  434|     33|      }
  435|     61|      ans_.buf_offset = offset - 2;
  436|     61|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    243|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 88, False: 155]
  ------------------
  438|     88|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 31, False: 57]
  ------------------
  439|     31|        return 1;
  440|     31|      }
  441|     57|      ans_.buf_offset = offset - 3;
  442|     57|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    155|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 155, False: 0]
  ------------------
  444|    155|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 26, False: 129]
  ------------------
  445|     26|        return 1;
  446|     26|      }
  447|    129|      ans_.buf_offset = offset - 4;
  448|    129|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|    129|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|    387|    ans_.state += l_rans_base;
  453|    387|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    387|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 32, False: 355]
  ------------------
  454|     32|      return 1;
  455|     32|    }
  456|    355|    return 0;
  457|    387|  }
_ZN5draco11RAnsDecoderILi20EE9rans_readEv:
  465|   916k|  inline int rans_read() {
  466|   916k|    unsigned rem;
  467|   916k|    unsigned quo;
  468|   916k|    struct rans_dec_sym sym;
  469|   920k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 739k, False: 181k]
  |  Branch (469:40): [True: 4.81k, False: 734k]
  ------------------
  470|  4.81k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  4.81k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  4.81k|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|   916k|    quo = ans_.state / rans_precision;
  475|   916k|    rem = ans_.state % rans_precision;
  476|   916k|    fetch_sym(&sym, rem);
  477|   916k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   916k|    return sym.val;
  479|   916k|  }
_ZN5draco11RAnsDecoderILi20EE9fetch_symEPNS_12rans_dec_symEj:
  508|   916k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  509|   916k|    uint32_t symbol = lut_table_[rem];
  510|   916k|    out->val = symbol;
  511|   916k|    out->prob = probability_table_[symbol].prob;
  512|   916k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   916k|  }
_ZN5draco11RAnsDecoderILi20EE8read_endEv:
  459|    355|  inline int read_end() { return ans_.state == l_rans_base; }

_ZN5draco17RAnsSymbolDecoderILi5EEC2Ev:
   33|  1.40k|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi5EE6CreateEPNS_13DecoderBufferE:
   59|  1.40k|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|  1.40k|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 1.40k]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|  1.40k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|  1.40k|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.40k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 160, False: 1.24k]
  ------------------
   67|    160|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 11, False: 149]
  ------------------
   68|     11|      return false;
   69|     11|    }
   70|       |
   71|    160|  } else
   72|  1.24k|#endif
   73|  1.24k|  {
   74|  1.24k|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 41, False: 1.20k]
  ------------------
   75|     41|      return false;
   76|     41|    }
   77|  1.24k|  }
   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.35k|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 122, False: 1.23k]
  ------------------
   83|    122|    return false;
   84|    122|  }
   85|  1.23k|  probability_table_.resize(num_symbols_);
   86|  1.23k|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 341, False: 892]
  ------------------
   87|    341|    return true;
   88|    341|  }
   89|       |  // Decode the table.
   90|   754k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 753k, False: 600]
  ------------------
   91|   753k|    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|   753k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 86, False: 753k]
  ------------------
   95|     86|      return false;
   96|     86|    }
   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|   753k|    const int token = prob_data & 3;
  102|   753k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 182k, False: 571k]
  ------------------
  103|   182k|      const uint32_t offset = prob_data >> 2;
  104|   182k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 165, False: 182k]
  ------------------
  105|    165|        return false;
  106|    165|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  6.29M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 6.11M, False: 182k]
  ------------------
  109|  6.11M|        probability_table_[i + j] = 0;
  110|  6.11M|      }
  111|   182k|      i += offset;
  112|   571k|    } else {
  113|   571k|      const int extra_bytes = token;
  114|   571k|      uint32_t prob = prob_data >> 2;
  115|  1.06M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 498k, False: 571k]
  ------------------
  116|   498k|        uint8_t eb;
  117|   498k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 41, False: 498k]
  ------------------
  118|     41|          return false;
  119|     41|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   498k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   498k|      }
  124|   571k|      probability_table_[i] = prob;
  125|   571k|    }
  126|   753k|  }
  127|    600|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 155, False: 445]
  ------------------
  128|    155|    return false;
  129|    155|  }
  130|    445|  return true;
  131|    600|}
_ZN5draco17RAnsSymbolDecoderILi5EE13StartDecodingEPNS_13DecoderBufferE:
  135|    742|    DecoderBuffer *buffer) {
  136|    742|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    742|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    742|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    742|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 50, False: 692]
  ------------------
  140|     50|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 7, False: 43]
  ------------------
  141|      7|      return false;
  142|      7|    }
  143|       |
  144|     50|  } else
  145|    692|#endif
  146|    692|  {
  147|    692|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 14, False: 678]
  ------------------
  148|     14|      return false;
  149|     14|    }
  150|    692|  }
  151|    721|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 108, False: 613]
  ------------------
  152|    108|    return false;
  153|    108|  }
  154|    613|  const uint8_t *const data_head =
  155|    613|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    613|  buffer->Advance(bytes_encoded);
  158|    613|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 138, False: 475]
  ------------------
  159|    138|    return false;
  160|    138|  }
  161|    475|  return true;
  162|    613|}
_ZNK5draco17RAnsSymbolDecoderILi5EE11num_symbolsEv:
   38|    528|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi5EE12DecodeSymbolEv:
   43|  12.2M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi5EE11EndDecodingEv:
  165|    409|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    409|  ans_.read_end();
  167|    409|}
_ZN5draco17RAnsSymbolDecoderILi1EEC2Ev:
   33|    619|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi1EE6CreateEPNS_13DecoderBufferE:
   59|    619|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    619|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 619]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    619|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    619|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    619|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 65, False: 554]
  ------------------
   67|     65|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 6, False: 59]
  ------------------
   68|      6|      return false;
   69|      6|    }
   70|       |
   71|     65|  } else
   72|    554|#endif
   73|    554|  {
   74|    554|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 19, False: 535]
  ------------------
   75|     19|      return false;
   76|     19|    }
   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: 63, False: 531]
  ------------------
   83|     63|    return false;
   84|     63|  }
   85|    531|  probability_table_.resize(num_symbols_);
   86|    531|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 48, False: 483]
  ------------------
   87|     48|    return true;
   88|     48|  }
   89|       |  // Decode the table.
   90|   857k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 857k, False: 341]
  ------------------
   91|   857k|    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|   857k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 57, False: 856k]
  ------------------
   95|     57|      return false;
   96|     57|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   856k|    const int token = prob_data & 3;
  102|   856k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 567k, False: 289k]
  ------------------
  103|   567k|      const uint32_t offset = prob_data >> 2;
  104|   567k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 59, False: 567k]
  ------------------
  105|     59|        return false;
  106|     59|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  28.0M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 27.5M, False: 567k]
  ------------------
  109|  27.5M|        probability_table_[i + j] = 0;
  110|  27.5M|      }
  111|   567k|      i += offset;
  112|   567k|    } else {
  113|   289k|      const int extra_bytes = token;
  114|   289k|      uint32_t prob = prob_data >> 2;
  115|   498k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 209k, False: 289k]
  ------------------
  116|   209k|        uint8_t eb;
  117|   209k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 26, False: 209k]
  ------------------
  118|     26|          return false;
  119|     26|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   209k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   209k|      }
  124|   289k|      probability_table_[i] = prob;
  125|   289k|    }
  126|   856k|  }
  127|    341|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 133, False: 208]
  ------------------
  128|    133|    return false;
  129|    133|  }
  130|    208|  return true;
  131|    341|}
_ZNK5draco17RAnsSymbolDecoderILi1EE11num_symbolsEv:
   38|    256|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi1EE13StartDecodingEPNS_13DecoderBufferE:
  135|    208|    DecoderBuffer *buffer) {
  136|    208|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    208|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    208|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    208|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 2, False: 206]
  ------------------
  140|      2|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 2]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      2|  } else
  145|    206|#endif
  146|    206|  {
  147|    206|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 10, False: 196]
  ------------------
  148|     10|      return false;
  149|     10|    }
  150|    206|  }
  151|    198|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 16, False: 182]
  ------------------
  152|     16|    return false;
  153|     16|  }
  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: 48, False: 134]
  ------------------
  159|     48|    return false;
  160|     48|  }
  161|    134|  return true;
  162|    182|}
_ZN5draco17RAnsSymbolDecoderILi1EE12DecodeSymbolEv:
   43|  30.1M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi1EE11EndDecodingEv:
  165|    134|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    134|  ans_.read_end();
  167|    134|}
_ZN5draco17RAnsSymbolDecoderILi2EEC2Ev:
   33|    439|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi2EE6CreateEPNS_13DecoderBufferE:
   59|    439|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    439|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 439]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    439|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    439|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    439|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 21, False: 418]
  ------------------
   67|     21|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 21]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     21|  } else
   72|    418|#endif
   73|    418|  {
   74|    418|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 19, False: 399]
  ------------------
   75|     19|      return false;
   76|     19|    }
   77|    418|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    420|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 26, False: 394]
  ------------------
   83|     26|    return false;
   84|     26|  }
   85|    394|  probability_table_.resize(num_symbols_);
   86|    394|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 383]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|  58.0k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 57.8k, False: 282]
  ------------------
   91|  57.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|  57.8k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 40, False: 57.7k]
  ------------------
   95|     40|      return false;
   96|     40|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  57.7k|    const int token = prob_data & 3;
  102|  57.7k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 26.9k, False: 30.7k]
  ------------------
  103|  26.9k|      const uint32_t offset = prob_data >> 2;
  104|  26.9k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 27, False: 26.9k]
  ------------------
  105|     27|        return false;
  106|     27|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   776k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 749k, False: 26.9k]
  ------------------
  109|   749k|        probability_table_[i + j] = 0;
  110|   749k|      }
  111|  26.9k|      i += offset;
  112|  30.7k|    } else {
  113|  30.7k|      const int extra_bytes = token;
  114|  30.7k|      uint32_t prob = prob_data >> 2;
  115|  54.4k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 23.7k, False: 30.7k]
  ------------------
  116|  23.7k|        uint8_t eb;
  117|  23.7k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 34, False: 23.6k]
  ------------------
  118|     34|          return false;
  119|     34|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  23.6k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  23.6k|      }
  124|  30.7k|      probability_table_[i] = prob;
  125|  30.7k|    }
  126|  57.7k|  }
  127|    282|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 30, False: 252]
  ------------------
  128|     30|    return false;
  129|     30|  }
  130|    252|  return true;
  131|    282|}
_ZNK5draco17RAnsSymbolDecoderILi2EE11num_symbolsEv:
   38|    263|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi2EE13StartDecodingEPNS_13DecoderBufferE:
  135|    252|    DecoderBuffer *buffer) {
  136|    252|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    252|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    252|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    252|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 6, False: 246]
  ------------------
  140|      6|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 6]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      6|  } else
  145|    246|#endif
  146|    246|  {
  147|    246|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 3, False: 243]
  ------------------
  148|      3|      return false;
  149|      3|    }
  150|    246|  }
  151|    249|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 27, False: 222]
  ------------------
  152|     27|    return false;
  153|     27|  }
  154|    222|  const uint8_t *const data_head =
  155|    222|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    222|  buffer->Advance(bytes_encoded);
  158|    222|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 37, False: 185]
  ------------------
  159|     37|    return false;
  160|     37|  }
  161|    185|  return true;
  162|    222|}
_ZN5draco17RAnsSymbolDecoderILi2EE12DecodeSymbolEv:
   43|  1.11M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi2EE11EndDecodingEv:
  165|    185|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    185|  ans_.read_end();
  167|    185|}
_ZN5draco17RAnsSymbolDecoderILi3EEC2Ev:
   33|    386|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi3EE6CreateEPNS_13DecoderBufferE:
   59|    386|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    386|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 386]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    386|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    386|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    386|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 25, False: 361]
  ------------------
   67|     25|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 24]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     25|  } else
   72|    361|#endif
   73|    361|  {
   74|    361|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 6, False: 355]
  ------------------
   75|      6|      return false;
   76|      6|    }
   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|    379|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 17, False: 362]
  ------------------
   83|     17|    return false;
   84|     17|  }
   85|    362|  probability_table_.resize(num_symbols_);
   86|    362|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 351]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|  7.07k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 6.81k, False: 261]
  ------------------
   91|  6.81k|    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|  6.81k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 41, False: 6.77k]
  ------------------
   95|     41|      return false;
   96|     41|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  6.77k|    const int token = prob_data & 3;
  102|  6.77k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 3.09k, False: 3.68k]
  ------------------
  103|  3.09k|      const uint32_t offset = prob_data >> 2;
  104|  3.09k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 29, False: 3.06k]
  ------------------
  105|     29|        return false;
  106|     29|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   104k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 101k, False: 3.06k]
  ------------------
  109|   101k|        probability_table_[i + j] = 0;
  110|   101k|      }
  111|  3.06k|      i += offset;
  112|  3.68k|    } else {
  113|  3.68k|      const int extra_bytes = token;
  114|  3.68k|      uint32_t prob = prob_data >> 2;
  115|  5.95k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 2.29k, False: 3.66k]
  ------------------
  116|  2.29k|        uint8_t eb;
  117|  2.29k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 20, False: 2.27k]
  ------------------
  118|     20|          return false;
  119|     20|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  2.27k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  2.27k|      }
  124|  3.66k|      probability_table_[i] = prob;
  125|  3.66k|    }
  126|  6.77k|  }
  127|    261|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 28, False: 233]
  ------------------
  128|     28|    return false;
  129|     28|  }
  130|    233|  return true;
  131|    261|}
_ZNK5draco17RAnsSymbolDecoderILi3EE11num_symbolsEv:
   38|    244|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi3EE13StartDecodingEPNS_13DecoderBufferE:
  135|    233|    DecoderBuffer *buffer) {
  136|    233|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    233|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    233|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    233|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 13, False: 220]
  ------------------
  140|     13|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 13]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     13|  } else
  145|    220|#endif
  146|    220|  {
  147|    220|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 12, False: 208]
  ------------------
  148|     12|      return false;
  149|     12|    }
  150|    220|  }
  151|    221|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 27, False: 194]
  ------------------
  152|     27|    return false;
  153|     27|  }
  154|    194|  const uint8_t *const data_head =
  155|    194|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    194|  buffer->Advance(bytes_encoded);
  158|    194|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 57, False: 137]
  ------------------
  159|     57|    return false;
  160|     57|  }
  161|    137|  return true;
  162|    194|}
_ZN5draco17RAnsSymbolDecoderILi3EE12DecodeSymbolEv:
   43|  2.16M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi3EE11EndDecodingEv:
  165|    137|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    137|  ans_.read_end();
  167|    137|}
_ZN5draco17RAnsSymbolDecoderILi4EEC2Ev:
   33|    343|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi4EE6CreateEPNS_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: 18, False: 325]
  ------------------
   67|     18|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 18]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     18|  } else
   72|    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|    335|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 23, False: 312]
  ------------------
   83|     23|    return false;
   84|     23|  }
   85|    312|  probability_table_.resize(num_symbols_);
   86|    312|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 13, False: 299]
  ------------------
   87|     13|    return true;
   88|     13|  }
   89|       |  // Decode the table.
   90|   609k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 609k, False: 204]
  ------------------
   91|   609k|    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|   609k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 49, False: 609k]
  ------------------
   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|   609k|    const int token = prob_data & 3;
  102|   609k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 586k, False: 22.4k]
  ------------------
  103|   586k|      const uint32_t offset = prob_data >> 2;
  104|   586k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 29, False: 586k]
  ------------------
  105|     29|        return false;
  106|     29|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  34.0M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 33.5M, False: 586k]
  ------------------
  109|  33.5M|        probability_table_[i + j] = 0;
  110|  33.5M|      }
  111|   586k|      i += offset;
  112|   586k|    } else {
  113|  22.4k|      const int extra_bytes = token;
  114|  22.4k|      uint32_t prob = prob_data >> 2;
  115|  40.4k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 17.9k, False: 22.4k]
  ------------------
  116|  17.9k|        uint8_t eb;
  117|  17.9k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 17, False: 17.9k]
  ------------------
  118|     17|          return false;
  119|     17|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  17.9k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  17.9k|      }
  124|  22.4k|      probability_table_[i] = prob;
  125|  22.4k|    }
  126|   609k|  }
  127|    204|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 30, False: 174]
  ------------------
  128|     30|    return false;
  129|     30|  }
  130|    174|  return true;
  131|    204|}
_ZNK5draco17RAnsSymbolDecoderILi4EE11num_symbolsEv:
   38|    187|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi4EE13StartDecodingEPNS_13DecoderBufferE:
  135|    174|    DecoderBuffer *buffer) {
  136|    174|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    174|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    174|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    174|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 1, False: 173]
  ------------------
  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|    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|    165|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 14, False: 151]
  ------------------
  152|     14|    return false;
  153|     14|  }
  154|    151|  const uint8_t *const data_head =
  155|    151|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    151|  buffer->Advance(bytes_encoded);
  158|    151|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 43, False: 108]
  ------------------
  159|     43|    return false;
  160|     43|  }
  161|    108|  return true;
  162|    151|}
_ZN5draco17RAnsSymbolDecoderILi4EE12DecodeSymbolEv:
   43|  7.40M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi4EE11EndDecodingEv:
  165|    108|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    108|  ans_.read_end();
  167|    108|}
_ZN5draco17RAnsSymbolDecoderILi6EEC2Ev:
   33|    359|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi6EE6CreateEPNS_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: 27, False: 332]
  ------------------
   67|     27|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 27]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     27|  } else
   72|    332|#endif
   73|    332|  {
   74|    332|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 7, False: 325]
  ------------------
   75|      7|      return false;
   76|      7|    }
   77|    332|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    352|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 22, False: 330]
  ------------------
   83|     22|    return false;
   84|     22|  }
   85|    330|  probability_table_.resize(num_symbols_);
   86|    330|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 10, False: 320]
  ------------------
   87|     10|    return true;
   88|     10|  }
   89|       |  // Decode the table.
   90|  37.0k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 36.7k, False: 245]
  ------------------
   91|  36.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|  36.7k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 26, False: 36.7k]
  ------------------
   95|     26|      return false;
   96|     26|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  36.7k|    const int token = prob_data & 3;
  102|  36.7k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 27.7k, False: 9.03k]
  ------------------
  103|  27.7k|      const uint32_t offset = prob_data >> 2;
  104|  27.7k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 31, False: 27.7k]
  ------------------
  105|     31|        return false;
  106|     31|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  1.13M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 1.10M, False: 27.7k]
  ------------------
  109|  1.10M|        probability_table_[i + j] = 0;
  110|  1.10M|      }
  111|  27.7k|      i += offset;
  112|  27.7k|    } else {
  113|  9.03k|      const int extra_bytes = token;
  114|  9.03k|      uint32_t prob = prob_data >> 2;
  115|  15.4k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 6.47k, False: 9.01k]
  ------------------
  116|  6.47k|        uint8_t eb;
  117|  6.47k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 18, False: 6.45k]
  ------------------
  118|     18|          return false;
  119|     18|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  6.45k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  6.45k|      }
  124|  9.01k|      probability_table_[i] = prob;
  125|  9.01k|    }
  126|  36.7k|  }
  127|    245|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 14, False: 231]
  ------------------
  128|     14|    return false;
  129|     14|  }
  130|    231|  return true;
  131|    245|}
_ZNK5draco17RAnsSymbolDecoderILi6EE11num_symbolsEv:
   38|    241|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi6EE13StartDecodingEPNS_13DecoderBufferE:
  135|    231|    DecoderBuffer *buffer) {
  136|    231|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    231|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    231|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    231|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 13, False: 218]
  ------------------
  140|     13|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 12]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     13|  } else
  145|    218|#endif
  146|    218|  {
  147|    218|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 4, False: 214]
  ------------------
  148|      4|      return false;
  149|      4|    }
  150|    218|  }
  151|    226|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 29, False: 197]
  ------------------
  152|     29|    return false;
  153|     29|  }
  154|    197|  const uint8_t *const data_head =
  155|    197|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    197|  buffer->Advance(bytes_encoded);
  158|    197|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 48, False: 149]
  ------------------
  159|     48|    return false;
  160|     48|  }
  161|    149|  return true;
  162|    197|}
_ZN5draco17RAnsSymbolDecoderILi6EE12DecodeSymbolEv:
   43|  9.76M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi6EE11EndDecodingEv:
  165|    149|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    149|  ans_.read_end();
  167|    149|}
_ZN5draco17RAnsSymbolDecoderILi7EEC2Ev:
   33|    374|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi7EE6CreateEPNS_13DecoderBufferE:
   59|    374|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    374|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 374]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    374|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    374|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    374|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 38, False: 336]
  ------------------
   67|     38|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 38]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     38|  } else
   72|    336|#endif
   73|    336|  {
   74|    336|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 6, False: 330]
  ------------------
   75|      6|      return false;
   76|      6|    }
   77|    336|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    368|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 12, False: 356]
  ------------------
   83|     12|    return false;
   84|     12|  }
   85|    356|  probability_table_.resize(num_symbols_);
   86|    356|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 10, False: 346]
  ------------------
   87|     10|    return true;
   88|     10|  }
   89|       |  // Decode the table.
   90|   510k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 510k, False: 252]
  ------------------
   91|   510k|    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|   510k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 47, False: 510k]
  ------------------
   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|   510k|    const int token = prob_data & 3;
  102|   510k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 130k, False: 379k]
  ------------------
  103|   130k|      const uint32_t offset = prob_data >> 2;
  104|   130k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 27, False: 130k]
  ------------------
  105|     27|        return false;
  106|     27|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  5.95M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 5.82M, False: 130k]
  ------------------
  109|  5.82M|        probability_table_[i + j] = 0;
  110|  5.82M|      }
  111|   130k|      i += offset;
  112|   379k|    } else {
  113|   379k|      const int extra_bytes = token;
  114|   379k|      uint32_t prob = prob_data >> 2;
  115|   619k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 239k, False: 379k]
  ------------------
  116|   239k|        uint8_t eb;
  117|   239k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 20, False: 239k]
  ------------------
  118|     20|          return false;
  119|     20|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   239k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   239k|      }
  124|   379k|      probability_table_[i] = prob;
  125|   379k|    }
  126|   510k|  }
  127|    252|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 27, False: 225]
  ------------------
  128|     27|    return false;
  129|     27|  }
  130|    225|  return true;
  131|    252|}
_ZNK5draco17RAnsSymbolDecoderILi7EE11num_symbolsEv:
   38|    235|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi7EE13StartDecodingEPNS_13DecoderBufferE:
  135|    225|    DecoderBuffer *buffer) {
  136|    225|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    225|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    225|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    225|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 29, False: 196]
  ------------------
  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|    196|#endif
  146|    196|  {
  147|    196|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 10, False: 186]
  ------------------
  148|     10|      return false;
  149|     10|    }
  150|    196|  }
  151|    213|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 42, False: 171]
  ------------------
  152|     42|    return false;
  153|     42|  }
  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: 39, False: 132]
  ------------------
  159|     39|    return false;
  160|     39|  }
  161|    132|  return true;
  162|    171|}
_ZN5draco17RAnsSymbolDecoderILi7EE12DecodeSymbolEv:
   43|  17.0M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi7EE11EndDecodingEv:
  165|    132|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    132|  ans_.read_end();
  167|    132|}
_ZN5draco17RAnsSymbolDecoderILi8EEC2Ev:
   33|    386|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi8EE6CreateEPNS_13DecoderBufferE:
   59|    386|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    386|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 386]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    386|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    386|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    386|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 55, False: 331]
  ------------------
   67|     55|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 53]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     55|  } else
   72|    331|#endif
   73|    331|  {
   74|    331|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 13, False: 318]
  ------------------
   75|     13|      return false;
   76|     13|    }
   77|    331|  }
   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|    371|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 26, False: 345]
  ------------------
   83|     26|    return false;
   84|     26|  }
   85|    345|  probability_table_.resize(num_symbols_);
   86|    345|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 10, False: 335]
  ------------------
   87|     10|    return true;
   88|     10|  }
   89|       |  // Decode the table.
   90|   560k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 560k, False: 244]
  ------------------
   91|   560k|    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|   560k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 55, False: 560k]
  ------------------
   95|     55|      return false;
   96|     55|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   560k|    const int token = prob_data & 3;
  102|   560k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 142k, False: 417k]
  ------------------
  103|   142k|      const uint32_t offset = prob_data >> 2;
  104|   142k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 21, False: 142k]
  ------------------
  105|     21|        return false;
  106|     21|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  7.45M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 7.30M, False: 142k]
  ------------------
  109|  7.30M|        probability_table_[i + j] = 0;
  110|  7.30M|      }
  111|   142k|      i += offset;
  112|   417k|    } else {
  113|   417k|      const int extra_bytes = token;
  114|   417k|      uint32_t prob = prob_data >> 2;
  115|   496k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 78.2k, False: 417k]
  ------------------
  116|  78.2k|        uint8_t eb;
  117|  78.2k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 15, False: 78.2k]
  ------------------
  118|     15|          return false;
  119|     15|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  78.2k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  78.2k|      }
  124|   417k|      probability_table_[i] = prob;
  125|   417k|    }
  126|   560k|  }
  127|    244|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 28, False: 216]
  ------------------
  128|     28|    return false;
  129|     28|  }
  130|    216|  return true;
  131|    244|}
_ZNK5draco17RAnsSymbolDecoderILi8EE11num_symbolsEv:
   38|    226|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi8EE13StartDecodingEPNS_13DecoderBufferE:
  135|    216|    DecoderBuffer *buffer) {
  136|    216|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    216|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    216|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    216|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 19, False: 197]
  ------------------
  140|     19|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 19]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     19|  } else
  145|    197|#endif
  146|    197|  {
  147|    197|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 2, False: 195]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|    197|  }
  151|    214|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 34, False: 180]
  ------------------
  152|     34|    return false;
  153|     34|  }
  154|    180|  const uint8_t *const data_head =
  155|    180|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    180|  buffer->Advance(bytes_encoded);
  158|    180|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 46, False: 134]
  ------------------
  159|     46|    return false;
  160|     46|  }
  161|    134|  return true;
  162|    180|}
_ZN5draco17RAnsSymbolDecoderILi8EE12DecodeSymbolEv:
   43|  18.4M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi8EE11EndDecodingEv:
  165|    134|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    134|  ans_.read_end();
  167|    134|}
_ZN5draco17RAnsSymbolDecoderILi9EEC2Ev:
   33|    499|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi9EE6CreateEPNS_13DecoderBufferE:
   59|    499|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    499|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 499]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    499|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    499|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    499|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 24, False: 475]
  ------------------
   67|     24|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 24]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     24|  } else
   72|    475|#endif
   73|    475|  {
   74|    475|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 10, False: 465]
  ------------------
   75|     10|      return false;
   76|     10|    }
   77|    475|  }
   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|    489|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 19, False: 470]
  ------------------
   83|     19|    return false;
   84|     19|  }
   85|    470|  probability_table_.resize(num_symbols_);
   86|    470|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 12, False: 458]
  ------------------
   87|     12|    return true;
   88|     12|  }
   89|       |  // Decode the table.
   90|   228k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 228k, False: 362]
  ------------------
   91|   228k|    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|   228k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 42, False: 228k]
  ------------------
   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|   228k|    const int token = prob_data & 3;
  102|   228k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 33.4k, False: 194k]
  ------------------
  103|  33.4k|      const uint32_t offset = prob_data >> 2;
  104|  33.4k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 25, False: 33.4k]
  ------------------
  105|     25|        return false;
  106|     25|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   854k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 821k, False: 33.4k]
  ------------------
  109|   821k|        probability_table_[i + j] = 0;
  110|   821k|      }
  111|  33.4k|      i += offset;
  112|   194k|    } else {
  113|   194k|      const int extra_bytes = token;
  114|   194k|      uint32_t prob = prob_data >> 2;
  115|   376k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 181k, False: 194k]
  ------------------
  116|   181k|        uint8_t eb;
  117|   181k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 29, False: 181k]
  ------------------
  118|     29|          return false;
  119|     29|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   181k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   181k|      }
  124|   194k|      probability_table_[i] = prob;
  125|   194k|    }
  126|   228k|  }
  127|    362|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 57, False: 305]
  ------------------
  128|     57|    return false;
  129|     57|  }
  130|    305|  return true;
  131|    362|}
_ZNK5draco17RAnsSymbolDecoderILi9EE11num_symbolsEv:
   38|    317|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi9EE13StartDecodingEPNS_13DecoderBufferE:
  135|    305|    DecoderBuffer *buffer) {
  136|    305|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    305|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    305|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    305|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 5, False: 300]
  ------------------
  140|      5|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 5]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      5|  } else
  145|    300|#endif
  146|    300|  {
  147|    300|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 3, False: 297]
  ------------------
  148|      3|      return false;
  149|      3|    }
  150|    300|  }
  151|    302|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 27, False: 275]
  ------------------
  152|     27|    return false;
  153|     27|  }
  154|    275|  const uint8_t *const data_head =
  155|    275|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    275|  buffer->Advance(bytes_encoded);
  158|    275|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 48, False: 227]
  ------------------
  159|     48|    return false;
  160|     48|  }
  161|    227|  return true;
  162|    275|}
_ZN5draco17RAnsSymbolDecoderILi9EE12DecodeSymbolEv:
   43|  18.4M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi9EE11EndDecodingEv:
  165|    227|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    227|  ans_.read_end();
  167|    227|}
_ZN5draco17RAnsSymbolDecoderILi10EEC2Ev:
   33|    432|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi10EE6CreateEPNS_13DecoderBufferE:
   59|    432|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    432|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 432]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    432|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    432|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    432|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 50, False: 382]
  ------------------
   67|     50|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 50]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     50|  } else
   72|    382|#endif
   73|    382|  {
   74|    382|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 12, False: 370]
  ------------------
   75|     12|      return false;
   76|     12|    }
   77|    382|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    420|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 14, False: 406]
  ------------------
   83|     14|    return false;
   84|     14|  }
   85|    406|  probability_table_.resize(num_symbols_);
   86|    406|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 395]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|   118k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 118k, False: 299]
  ------------------
   91|   118k|    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|   118k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 56, False: 117k]
  ------------------
   95|     56|      return false;
   96|     56|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   117k|    const int token = prob_data & 3;
  102|   117k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 7.34k, False: 110k]
  ------------------
  103|  7.34k|      const uint32_t offset = prob_data >> 2;
  104|  7.34k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 24, False: 7.32k]
  ------------------
  105|     24|        return false;
  106|     24|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   230k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 223k, False: 7.32k]
  ------------------
  109|   223k|        probability_table_[i + j] = 0;
  110|   223k|      }
  111|  7.32k|      i += offset;
  112|   110k|    } else {
  113|   110k|      const int extra_bytes = token;
  114|   110k|      uint32_t prob = prob_data >> 2;
  115|   219k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 108k, False: 110k]
  ------------------
  116|   108k|        uint8_t eb;
  117|   108k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 16, False: 108k]
  ------------------
  118|     16|          return false;
  119|     16|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   108k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   108k|      }
  124|   110k|      probability_table_[i] = prob;
  125|   110k|    }
  126|   117k|  }
  127|    299|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 70, False: 229]
  ------------------
  128|     70|    return false;
  129|     70|  }
  130|    229|  return true;
  131|    299|}
_ZNK5draco17RAnsSymbolDecoderILi10EE11num_symbolsEv:
   38|    240|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi10EE13StartDecodingEPNS_13DecoderBufferE:
  135|    229|    DecoderBuffer *buffer) {
  136|    229|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    229|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    229|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    229|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 37, False: 192]
  ------------------
  140|     37|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 36]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     37|  } else
  145|    192|#endif
  146|    192|  {
  147|    192|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 7, False: 185]
  ------------------
  148|      7|      return false;
  149|      7|    }
  150|    192|  }
  151|    221|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 105, False: 116]
  ------------------
  152|    105|    return false;
  153|    105|  }
  154|    116|  const uint8_t *const data_head =
  155|    116|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    116|  buffer->Advance(bytes_encoded);
  158|    116|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 58, False: 58]
  ------------------
  159|     58|    return false;
  160|     58|  }
  161|     58|  return true;
  162|    116|}
_ZN5draco17RAnsSymbolDecoderILi10EE12DecodeSymbolEv:
   43|   409k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi10EE11EndDecodingEv:
  165|     58|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     58|  ans_.read_end();
  167|     58|}
_ZN5draco17RAnsSymbolDecoderILi11EEC2Ev:
   33|    367|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi11EE6CreateEPNS_13DecoderBufferE:
   59|    367|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    367|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 367]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    367|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    367|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    367|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 14, False: 353]
  ------------------
   67|     14|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 14]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     14|  } else
   72|    353|#endif
   73|    353|  {
   74|    353|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 13, False: 340]
  ------------------
   75|     13|      return false;
   76|     13|    }
   77|    353|  }
   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|    354|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 30, False: 324]
  ------------------
   83|     30|    return false;
   84|     30|  }
   85|    324|  probability_table_.resize(num_symbols_);
   86|    324|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 10, False: 314]
  ------------------
   87|     10|    return true;
   88|     10|  }
   89|       |  // Decode the table.
   90|  51.8k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 51.6k, False: 231]
  ------------------
   91|  51.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|  51.6k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 39, False: 51.5k]
  ------------------
   95|     39|      return false;
   96|     39|    }
   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|  51.5k|    const int token = prob_data & 3;
  102|  51.5k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 14.1k, False: 37.4k]
  ------------------
  103|  14.1k|      const uint32_t offset = prob_data >> 2;
  104|  14.1k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 27, False: 14.1k]
  ------------------
  105|     27|        return false;
  106|     27|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   497k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 483k, False: 14.1k]
  ------------------
  109|   483k|        probability_table_[i + j] = 0;
  110|   483k|      }
  111|  14.1k|      i += offset;
  112|  37.4k|    } else {
  113|  37.4k|      const int extra_bytes = token;
  114|  37.4k|      uint32_t prob = prob_data >> 2;
  115|  70.3k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 32.9k, False: 37.3k]
  ------------------
  116|  32.9k|        uint8_t eb;
  117|  32.9k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 17, False: 32.9k]
  ------------------
  118|     17|          return false;
  119|     17|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  32.9k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  32.9k|      }
  124|  37.3k|      probability_table_[i] = prob;
  125|  37.3k|    }
  126|  51.5k|  }
  127|    231|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 58, False: 173]
  ------------------
  128|     58|    return false;
  129|     58|  }
  130|    173|  return true;
  131|    231|}
_ZNK5draco17RAnsSymbolDecoderILi11EE11num_symbolsEv:
   38|    183|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi11EE13StartDecodingEPNS_13DecoderBufferE:
  135|    173|    DecoderBuffer *buffer) {
  136|    173|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    173|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    173|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    173|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 173]
  ------------------
  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|    173|#endif
  146|    173|  {
  147|    173|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 19, False: 154]
  ------------------
  148|     19|      return false;
  149|     19|    }
  150|    173|  }
  151|    154|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 62, False: 92]
  ------------------
  152|     62|    return false;
  153|     62|  }
  154|     92|  const uint8_t *const data_head =
  155|     92|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     92|  buffer->Advance(bytes_encoded);
  158|     92|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 24, False: 68]
  ------------------
  159|     24|    return false;
  160|     24|  }
  161|     68|  return true;
  162|     92|}
_ZN5draco17RAnsSymbolDecoderILi11EE12DecodeSymbolEv:
   43|   494k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi11EE11EndDecodingEv:
  165|     68|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     68|  ans_.read_end();
  167|     68|}
_ZN5draco17RAnsSymbolDecoderILi12EEC2Ev:
   33|    368|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi12EE6CreateEPNS_13DecoderBufferE:
   59|    368|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    368|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 368]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    368|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    368|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    368|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 52, False: 316]
  ------------------
   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|    316|#endif
   73|    316|  {
   74|    316|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 9, False: 307]
  ------------------
   75|      9|      return false;
   76|      9|    }
   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|    359|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 12, False: 347]
  ------------------
   83|     12|    return false;
   84|     12|  }
   85|    347|  probability_table_.resize(num_symbols_);
   86|    347|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 2, False: 345]
  ------------------
   87|      2|    return true;
   88|      2|  }
   89|       |  // Decode the table.
   90|   338k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 337k, False: 222]
  ------------------
   91|   337k|    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|   337k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 60, False: 337k]
  ------------------
   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|   337k|    const int token = prob_data & 3;
  102|   337k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 190k, False: 147k]
  ------------------
  103|   190k|      const uint32_t offset = prob_data >> 2;
  104|   190k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 39, False: 190k]
  ------------------
  105|     39|        return false;
  106|     39|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  7.74M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 7.55M, False: 190k]
  ------------------
  109|  7.55M|        probability_table_[i + j] = 0;
  110|  7.55M|      }
  111|   190k|      i += offset;
  112|   190k|    } else {
  113|   147k|      const int extra_bytes = token;
  114|   147k|      uint32_t prob = prob_data >> 2;
  115|   263k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 116k, False: 147k]
  ------------------
  116|   116k|        uint8_t eb;
  117|   116k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 24, False: 115k]
  ------------------
  118|     24|          return false;
  119|     24|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   115k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   115k|      }
  124|   147k|      probability_table_[i] = prob;
  125|   147k|    }
  126|   337k|  }
  127|    222|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 64, False: 158]
  ------------------
  128|     64|    return false;
  129|     64|  }
  130|    158|  return true;
  131|    222|}
_ZNK5draco17RAnsSymbolDecoderILi12EE11num_symbolsEv:
   38|    160|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi12EE13StartDecodingEPNS_13DecoderBufferE:
  135|    158|    DecoderBuffer *buffer) {
  136|    158|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    158|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    158|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    158|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 16, False: 142]
  ------------------
  140|     16|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 14]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     16|  } else
  145|    142|#endif
  146|    142|  {
  147|    142|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 2, False: 140]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|    142|  }
  151|    154|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 64, False: 90]
  ------------------
  152|     64|    return false;
  153|     64|  }
  154|     90|  const uint8_t *const data_head =
  155|     90|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     90|  buffer->Advance(bytes_encoded);
  158|     90|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 45, False: 45]
  ------------------
  159|     45|    return false;
  160|     45|  }
  161|     45|  return true;
  162|     90|}
_ZN5draco17RAnsSymbolDecoderILi12EE12DecodeSymbolEv:
   43|  49.8k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi12EE11EndDecodingEv:
  165|     45|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     45|  ans_.read_end();
  167|     45|}
_ZN5draco17RAnsSymbolDecoderILi13EEC2Ev:
   33|    433|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi13EE6CreateEPNS_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: 20, False: 413]
  ------------------
   67|     20|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 20]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     20|  } else
   72|    413|#endif
   73|    413|  {
   74|    413|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 9, False: 404]
  ------------------
   75|      9|      return false;
   76|      9|    }
   77|    413|  }
   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|    424|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 22, False: 402]
  ------------------
   83|     22|    return false;
   84|     22|  }
   85|    402|  probability_table_.resize(num_symbols_);
   86|    402|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 10, False: 392]
  ------------------
   87|     10|    return true;
   88|     10|  }
   89|       |  // Decode the table.
   90|  1.14M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.14M, False: 290]
  ------------------
   91|  1.14M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  1.14M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 57, False: 1.14M]
  ------------------
   95|     57|      return false;
   96|     57|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  1.14M|    const int token = prob_data & 3;
  102|  1.14M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 779k, False: 365k]
  ------------------
  103|   779k|      const uint32_t offset = prob_data >> 2;
  104|   779k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 36, False: 779k]
  ------------------
  105|     36|        return false;
  106|     36|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  42.8M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 42.1M, False: 779k]
  ------------------
  109|  42.1M|        probability_table_[i + j] = 0;
  110|  42.1M|      }
  111|   779k|      i += offset;
  112|   779k|    } else {
  113|   365k|      const int extra_bytes = token;
  114|   365k|      uint32_t prob = prob_data >> 2;
  115|   388k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 23.7k, False: 365k]
  ------------------
  116|  23.7k|        uint8_t eb;
  117|  23.7k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 9, False: 23.7k]
  ------------------
  118|      9|          return false;
  119|      9|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  23.7k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  23.7k|      }
  124|   365k|      probability_table_[i] = prob;
  125|   365k|    }
  126|  1.14M|  }
  127|    290|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 77, False: 213]
  ------------------
  128|     77|    return false;
  129|     77|  }
  130|    213|  return true;
  131|    290|}
_ZNK5draco17RAnsSymbolDecoderILi13EE11num_symbolsEv:
   38|    223|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi13EE13StartDecodingEPNS_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: 0, False: 213]
  ------------------
  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|    213|#endif
  146|    213|  {
  147|    213|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 2, False: 211]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|    213|  }
  151|    211|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 82, False: 129]
  ------------------
  152|     82|    return false;
  153|     82|  }
  154|    129|  const uint8_t *const data_head =
  155|    129|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    129|  buffer->Advance(bytes_encoded);
  158|    129|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 38, False: 91]
  ------------------
  159|     38|    return false;
  160|     38|  }
  161|     91|  return true;
  162|    129|}
_ZN5draco17RAnsSymbolDecoderILi13EE12DecodeSymbolEv:
   43|   132k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi13EE11EndDecodingEv:
  165|     91|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     91|  ans_.read_end();
  167|     91|}
_ZN5draco17RAnsSymbolDecoderILi14EEC2Ev:
   33|    431|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi14EE6CreateEPNS_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: 59, False: 372]
  ------------------
   67|     59|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 58]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     59|  } else
   72|    372|#endif
   73|    372|  {
   74|    372|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 7, False: 365]
  ------------------
   75|      7|      return false;
   76|      7|    }
   77|    372|  }
   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|    423|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 14, False: 409]
  ------------------
   83|     14|    return false;
   84|     14|  }
   85|    409|  probability_table_.resize(num_symbols_);
   86|    409|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 398]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|   615k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 615k, False: 262]
  ------------------
   91|   615k|    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|   615k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 60, False: 615k]
  ------------------
   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|   615k|    const int token = prob_data & 3;
  102|   615k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 427k, False: 187k]
  ------------------
  103|   427k|      const uint32_t offset = prob_data >> 2;
  104|   427k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 37, False: 427k]
  ------------------
  105|     37|        return false;
  106|     37|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  18.7M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 18.3M, False: 427k]
  ------------------
  109|  18.3M|        probability_table_[i + j] = 0;
  110|  18.3M|      }
  111|   427k|      i += offset;
  112|   427k|    } else {
  113|   187k|      const int extra_bytes = token;
  114|   187k|      uint32_t prob = prob_data >> 2;
  115|   321k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 134k, False: 187k]
  ------------------
  116|   134k|        uint8_t eb;
  117|   134k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 39, False: 134k]
  ------------------
  118|     39|          return false;
  119|     39|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   134k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   134k|      }
  124|   187k|      probability_table_[i] = prob;
  125|   187k|    }
  126|   615k|  }
  127|    262|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 51, False: 211]
  ------------------
  128|     51|    return false;
  129|     51|  }
  130|    211|  return true;
  131|    262|}
_ZNK5draco17RAnsSymbolDecoderILi14EE11num_symbolsEv:
   38|    222|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi14EE13StartDecodingEPNS_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: 26, False: 185]
  ------------------
  140|     26|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 25]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     26|  } else
  145|    185|#endif
  146|    185|  {
  147|    185|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 19, False: 166]
  ------------------
  148|     19|      return false;
  149|     19|    }
  150|    185|  }
  151|    191|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 71, False: 120]
  ------------------
  152|     71|    return false;
  153|     71|  }
  154|    120|  const uint8_t *const data_head =
  155|    120|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    120|  buffer->Advance(bytes_encoded);
  158|    120|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 42, False: 78]
  ------------------
  159|     42|    return false;
  160|     42|  }
  161|     78|  return true;
  162|    120|}
_ZN5draco17RAnsSymbolDecoderILi14EE12DecodeSymbolEv:
   43|   126k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi14EE11EndDecodingEv:
  165|     78|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     78|  ans_.read_end();
  167|     78|}
_ZN5draco17RAnsSymbolDecoderILi15EEC2Ev:
   33|    462|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi15EE6CreateEPNS_13DecoderBufferE:
   59|    462|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    462|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 462]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    462|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    462|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    462|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 93, False: 369]
  ------------------
   67|     93|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 4, False: 89]
  ------------------
   68|      4|      return false;
   69|      4|    }
   70|       |
   71|     93|  } else
   72|    369|#endif
   73|    369|  {
   74|    369|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 4, False: 365]
  ------------------
   75|      4|      return false;
   76|      4|    }
   77|    369|  }
   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|    454|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 27, False: 427]
  ------------------
   83|     27|    return false;
   84|     27|  }
   85|    427|  probability_table_.resize(num_symbols_);
   86|    427|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 15, False: 412]
  ------------------
   87|     15|    return true;
   88|     15|  }
   89|       |  // Decode the table.
   90|  3.09M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 3.09M, False: 298]
  ------------------
   91|  3.09M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  3.09M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 62, False: 3.09M]
  ------------------
   95|     62|      return false;
   96|     62|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  3.09M|    const int token = prob_data & 3;
  102|  3.09M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 2.80M, False: 295k]
  ------------------
  103|  2.80M|      const uint32_t offset = prob_data >> 2;
  104|  2.80M|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 29, False: 2.80M]
  ------------------
  105|     29|        return false;
  106|     29|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   158M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 155M, False: 2.80M]
  ------------------
  109|   155M|        probability_table_[i + j] = 0;
  110|   155M|      }
  111|  2.80M|      i += offset;
  112|  2.80M|    } else {
  113|   295k|      const int extra_bytes = token;
  114|   295k|      uint32_t prob = prob_data >> 2;
  115|   520k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 225k, False: 295k]
  ------------------
  116|   225k|        uint8_t eb;
  117|   225k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 23, False: 225k]
  ------------------
  118|     23|          return false;
  119|     23|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   225k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   225k|      }
  124|   295k|      probability_table_[i] = prob;
  125|   295k|    }
  126|  3.09M|  }
  127|    298|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 33, False: 265]
  ------------------
  128|     33|    return false;
  129|     33|  }
  130|    265|  return true;
  131|    298|}
_ZNK5draco17RAnsSymbolDecoderILi15EE11num_symbolsEv:
   38|    280|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi15EE13StartDecodingEPNS_13DecoderBufferE:
  135|    265|    DecoderBuffer *buffer) {
  136|    265|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    265|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    265|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    265|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 56, False: 209]
  ------------------
  140|     56|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 54]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     56|  } else
  145|    209|#endif
  146|    209|  {
  147|    209|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 7, False: 202]
  ------------------
  148|      7|      return false;
  149|      7|    }
  150|    209|  }
  151|    256|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 125, False: 131]
  ------------------
  152|    125|    return false;
  153|    125|  }
  154|    131|  const uint8_t *const data_head =
  155|    131|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    131|  buffer->Advance(bytes_encoded);
  158|    131|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 44, False: 87]
  ------------------
  159|     44|    return false;
  160|     44|  }
  161|     87|  return true;
  162|    131|}
_ZN5draco17RAnsSymbolDecoderILi15EE12DecodeSymbolEv:
   43|   383k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi15EE11EndDecodingEv:
  165|     87|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     87|  ans_.read_end();
  167|     87|}
_ZN5draco17RAnsSymbolDecoderILi16EEC2Ev:
   33|    363|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi16EE6CreateEPNS_13DecoderBufferE:
   59|    363|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    363|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 363]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    363|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    363|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    363|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 35, False: 328]
  ------------------
   67|     35|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 34]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     35|  } else
   72|    328|#endif
   73|    328|  {
   74|    328|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 12, False: 316]
  ------------------
   75|     12|      return false;
   76|     12|    }
   77|    328|  }
   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|    350|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 12, False: 338]
  ------------------
   83|     12|    return false;
   84|     12|  }
   85|    338|  probability_table_.resize(num_symbols_);
   86|    338|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 24, False: 314]
  ------------------
   87|     24|    return true;
   88|     24|  }
   89|       |  // Decode the table.
   90|   525k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 524k, False: 203]
  ------------------
   91|   524k|    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|   524k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 58, False: 524k]
  ------------------
   95|     58|      return false;
   96|     58|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   524k|    const int token = prob_data & 3;
  102|   524k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 79.2k, False: 445k]
  ------------------
  103|  79.2k|      const uint32_t offset = prob_data >> 2;
  104|  79.2k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 36, False: 79.2k]
  ------------------
  105|     36|        return false;
  106|     36|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  2.68M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 2.60M, False: 79.2k]
  ------------------
  109|  2.60M|        probability_table_[i + j] = 0;
  110|  2.60M|      }
  111|  79.2k|      i += offset;
  112|   445k|    } else {
  113|   445k|      const int extra_bytes = token;
  114|   445k|      uint32_t prob = prob_data >> 2;
  115|   829k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 383k, False: 445k]
  ------------------
  116|   383k|        uint8_t eb;
  117|   383k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 17, False: 383k]
  ------------------
  118|     17|          return false;
  119|     17|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   383k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   383k|      }
  124|   445k|      probability_table_[i] = prob;
  125|   445k|    }
  126|   524k|  }
  127|    203|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 27, False: 176]
  ------------------
  128|     27|    return false;
  129|     27|  }
  130|    176|  return true;
  131|    203|}
_ZNK5draco17RAnsSymbolDecoderILi16EE11num_symbolsEv:
   38|    200|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi16EE13StartDecodingEPNS_13DecoderBufferE:
  135|    176|    DecoderBuffer *buffer) {
  136|    176|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    176|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    176|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    176|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 12, False: 164]
  ------------------
  140|     12|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 11]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     12|  } else
  145|    164|#endif
  146|    164|  {
  147|    164|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 164]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    164|  }
  151|    175|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 77, False: 98]
  ------------------
  152|     77|    return false;
  153|     77|  }
  154|     98|  const uint8_t *const data_head =
  155|     98|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     98|  buffer->Advance(bytes_encoded);
  158|     98|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 39, False: 59]
  ------------------
  159|     39|    return false;
  160|     39|  }
  161|     59|  return true;
  162|     98|}
_ZN5draco17RAnsSymbolDecoderILi16EE12DecodeSymbolEv:
   43|   113k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi16EE11EndDecodingEv:
  165|     59|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     59|  ans_.read_end();
  167|     59|}
_ZN5draco17RAnsSymbolDecoderILi17EEC2Ev:
   33|    378|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi17EE6CreateEPNS_13DecoderBufferE:
   59|    378|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    378|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 378]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    378|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    378|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    378|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 56, False: 322]
  ------------------
   67|     56|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 4, False: 52]
  ------------------
   68|      4|      return false;
   69|      4|    }
   70|       |
   71|     56|  } else
   72|    322|#endif
   73|    322|  {
   74|    322|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 314]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    322|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    366|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 13, False: 353]
  ------------------
   83|     13|    return false;
   84|     13|  }
   85|    353|  probability_table_.resize(num_symbols_);
   86|    353|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 10, False: 343]
  ------------------
   87|     10|    return true;
   88|     10|  }
   89|       |  // Decode the table.
   90|  55.4k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 55.2k, False: 234]
  ------------------
   91|  55.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|  55.2k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 53, False: 55.1k]
  ------------------
   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|  55.1k|    const int token = prob_data & 3;
  102|  55.1k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 10.5k, False: 44.6k]
  ------------------
  103|  10.5k|      const uint32_t offset = prob_data >> 2;
  104|  10.5k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 36, False: 10.5k]
  ------------------
  105|     36|        return false;
  106|     36|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   426k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 415k, False: 10.5k]
  ------------------
  109|   415k|        probability_table_[i + j] = 0;
  110|   415k|      }
  111|  10.5k|      i += offset;
  112|  44.6k|    } else {
  113|  44.6k|      const int extra_bytes = token;
  114|  44.6k|      uint32_t prob = prob_data >> 2;
  115|  80.9k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 36.3k, False: 44.5k]
  ------------------
  116|  36.3k|        uint8_t eb;
  117|  36.3k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 20, False: 36.3k]
  ------------------
  118|     20|          return false;
  119|     20|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  36.3k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  36.3k|      }
  124|  44.5k|      probability_table_[i] = prob;
  125|  44.5k|    }
  126|  55.1k|  }
  127|    234|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 37, False: 197]
  ------------------
  128|     37|    return false;
  129|     37|  }
  130|    197|  return true;
  131|    234|}
_ZNK5draco17RAnsSymbolDecoderILi17EE11num_symbolsEv:
   38|    207|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi17EE13StartDecodingEPNS_13DecoderBufferE:
  135|    197|    DecoderBuffer *buffer) {
  136|    197|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    197|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    197|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    197|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 28, False: 169]
  ------------------
  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|    169|#endif
  146|    169|  {
  147|    169|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 1, False: 168]
  ------------------
  148|      1|      return false;
  149|      1|    }
  150|    169|  }
  151|    195|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 98, False: 97]
  ------------------
  152|     98|    return false;
  153|     98|  }
  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: 28, False: 69]
  ------------------
  159|     28|    return false;
  160|     28|  }
  161|     69|  return true;
  162|     97|}
_ZN5draco17RAnsSymbolDecoderILi17EE12DecodeSymbolEv:
   43|   217k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi17EE11EndDecodingEv:
  165|     69|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     69|  ans_.read_end();
  167|     69|}
_ZN5draco17RAnsSymbolDecoderILi18EEC2Ev:
   33|    387|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi18EE6CreateEPNS_13DecoderBufferE:
   59|    387|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    387|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 387]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    387|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    387|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    387|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 122, False: 265]
  ------------------
   67|    122|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 121]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|    122|  } else
   72|    265|#endif
   73|    265|  {
   74|    265|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 257]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    265|  }
   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|    378|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 39, False: 339]
  ------------------
   83|     39|    return false;
   84|     39|  }
   85|    339|  probability_table_.resize(num_symbols_);
   86|    339|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 328]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|   115k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 115k, False: 221]
  ------------------
   91|   115k|    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|   115k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 52, False: 115k]
  ------------------
   95|     52|      return false;
   96|     52|    }
   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|   115k|    const int token = prob_data & 3;
  102|   115k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 28.9k, False: 86.1k]
  ------------------
  103|  28.9k|      const uint32_t offset = prob_data >> 2;
  104|  28.9k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 23, False: 28.9k]
  ------------------
  105|     23|        return false;
  106|     23|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  1.29M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 1.26M, False: 28.9k]
  ------------------
  109|  1.26M|        probability_table_[i + j] = 0;
  110|  1.26M|      }
  111|  28.9k|      i += offset;
  112|  86.1k|    } else {
  113|  86.1k|      const int extra_bytes = token;
  114|  86.1k|      uint32_t prob = prob_data >> 2;
  115|   166k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 80.8k, False: 86.1k]
  ------------------
  116|  80.8k|        uint8_t eb;
  117|  80.8k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 32, False: 80.7k]
  ------------------
  118|     32|          return false;
  119|     32|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  80.7k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  80.7k|      }
  124|  86.1k|      probability_table_[i] = prob;
  125|  86.1k|    }
  126|   115k|  }
  127|    221|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 45, False: 176]
  ------------------
  128|     45|    return false;
  129|     45|  }
  130|    176|  return true;
  131|    221|}
_ZNK5draco17RAnsSymbolDecoderILi18EE11num_symbolsEv:
   38|    187|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi18EE13StartDecodingEPNS_13DecoderBufferE:
  135|    176|    DecoderBuffer *buffer) {
  136|    176|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    176|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    176|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    176|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 49, False: 127]
  ------------------
  140|     49|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 47]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     49|  } else
  145|    127|#endif
  146|    127|  {
  147|    127|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 127]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    127|  }
  151|    174|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 85, False: 89]
  ------------------
  152|     85|    return false;
  153|     85|  }
  154|     89|  const uint8_t *const data_head =
  155|     89|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     89|  buffer->Advance(bytes_encoded);
  158|     89|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 27, False: 62]
  ------------------
  159|     27|    return false;
  160|     27|  }
  161|     62|  return true;
  162|     89|}
_ZN5draco17RAnsSymbolDecoderILi18EE12DecodeSymbolEv:
   43|  74.0k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi18EE11EndDecodingEv:
  165|     62|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     62|  ans_.read_end();
  167|     62|}

_ZN5draco13DecodeSymbolsEjiPNS_13DecoderBufferEPj:
   33|  12.3k|                   DecoderBuffer *src_buffer, uint32_t *out_values) {
   34|  12.3k|  if (num_values == 0) {
  ------------------
  |  Branch (34:7): [True: 74, False: 12.2k]
  ------------------
   35|     74|    return true;
   36|     74|  }
   37|       |  // Decode which scheme to use.
   38|  12.2k|  uint8_t scheme;
   39|  12.2k|  if (!src_buffer->Decode(&scheme)) {
  ------------------
  |  Branch (39:7): [True: 185, False: 12.1k]
  ------------------
   40|    185|    return false;
   41|    185|  }
   42|  12.1k|  if (scheme == SYMBOL_CODING_TAGGED) {
  ------------------
  |  Branch (42:7): [True: 1.24k, False: 10.8k]
  ------------------
   43|  1.24k|    return DecodeTaggedSymbols<RAnsSymbolDecoder>(num_values, num_components,
   44|  1.24k|                                                  src_buffer, out_values);
   45|  10.8k|  } else if (scheme == SYMBOL_CODING_RAW) {
  ------------------
  |  Branch (45:14): [True: 7.72k, False: 3.13k]
  ------------------
   46|  7.72k|    return DecodeRawSymbols<RAnsSymbolDecoder>(num_values, src_buffer,
   47|  7.72k|                                               out_values);
   48|  7.72k|  }
   49|  3.13k|  return false;
   50|  12.1k|}
_ZN5draco19DecodeTaggedSymbolsINS_17RAnsSymbolDecoderEEEbjiPNS_13DecoderBufferEPj:
   54|  1.24k|                         DecoderBuffer *src_buffer, uint32_t *out_values) {
   55|       |  // Decode the encoded data.
   56|  1.24k|  SymbolDecoderT<5> tag_decoder;
   57|  1.24k|  if (!tag_decoder.Create(src_buffer)) {
  ------------------
  |  Branch (57:7): [True: 564, False: 683]
  ------------------
   58|    564|    return false;
   59|    564|  }
   60|       |
   61|    683|  if (!tag_decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (61:7): [True: 258, False: 425]
  ------------------
   62|    258|    return false;
   63|    258|  }
   64|       |
   65|    425|  if (num_values > 0 && tag_decoder.num_symbols() == 0) {
  ------------------
  |  Branch (65:7): [True: 425, False: 0]
  |  Branch (65:25): [True: 51, False: 374]
  ------------------
   66|     51|    return false;  // Wrong number of symbols.
   67|     51|  }
   68|       |
   69|       |  // src_buffer now points behind the encoded tag data (to the place where the
   70|       |  // values are encoded).
   71|    374|  src_buffer->StartBitDecoding(false, nullptr);
   72|    374|  int value_id = 0;
   73|  3.86M|  for (uint32_t i = 0; i < num_values; i += num_components) {
  ------------------
  |  Branch (73:24): [True: 3.86M, False: 359]
  ------------------
   74|       |    // Decode the tag.
   75|  3.86M|    const uint32_t bit_length = tag_decoder.DecodeSymbol();
   76|       |    // Decode the actual value.
   77|  7.76M|    for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (77:21): [True: 3.89M, False: 3.86M]
  ------------------
   78|  3.89M|      uint32_t val;
   79|  3.89M|      if (!src_buffer->DecodeLeastSignificantBits32(bit_length, &val)) {
  ------------------
  |  Branch (79:11): [True: 15, False: 3.89M]
  ------------------
   80|     15|        return false;
   81|     15|      }
   82|  3.89M|      out_values[value_id++] = val;
   83|  3.89M|    }
   84|  3.86M|  }
   85|    359|  tag_decoder.EndDecoding();
   86|    359|  src_buffer->EndBitDecoding();
   87|    359|  return true;
   88|    374|}
_ZN5draco16DecodeRawSymbolsINS_17RAnsSymbolDecoderEEEbjPNS_13DecoderBufferEPj:
  116|  7.72k|                      uint32_t *out_values) {
  117|  7.72k|  uint8_t max_bit_length;
  118|  7.72k|  if (!src_buffer->Decode(&max_bit_length)) {
  ------------------
  |  Branch (118:7): [True: 64, False: 7.66k]
  ------------------
  119|     64|    return false;
  120|     64|  }
  121|  7.66k|  switch (max_bit_length) {
  122|    619|    case 1:
  ------------------
  |  Branch (122:5): [True: 619, False: 7.04k]
  ------------------
  123|    619|      return DecodeRawSymbolsInternal<SymbolDecoderT<1>>(num_values, src_buffer,
  124|    619|                                                         out_values);
  125|    439|    case 2:
  ------------------
  |  Branch (125:5): [True: 439, False: 7.22k]
  ------------------
  126|    439|      return DecodeRawSymbolsInternal<SymbolDecoderT<2>>(num_values, src_buffer,
  127|    439|                                                         out_values);
  128|    386|    case 3:
  ------------------
  |  Branch (128:5): [True: 386, False: 7.27k]
  ------------------
  129|    386|      return DecodeRawSymbolsInternal<SymbolDecoderT<3>>(num_values, src_buffer,
  130|    386|                                                         out_values);
  131|    343|    case 4:
  ------------------
  |  Branch (131:5): [True: 343, False: 7.31k]
  ------------------
  132|    343|      return DecodeRawSymbolsInternal<SymbolDecoderT<4>>(num_values, src_buffer,
  133|    343|                                                         out_values);
  134|    160|    case 5:
  ------------------
  |  Branch (134:5): [True: 160, False: 7.50k]
  ------------------
  135|    160|      return DecodeRawSymbolsInternal<SymbolDecoderT<5>>(num_values, src_buffer,
  136|    160|                                                         out_values);
  137|    359|    case 6:
  ------------------
  |  Branch (137:5): [True: 359, False: 7.30k]
  ------------------
  138|    359|      return DecodeRawSymbolsInternal<SymbolDecoderT<6>>(num_values, src_buffer,
  139|    359|                                                         out_values);
  140|    374|    case 7:
  ------------------
  |  Branch (140:5): [True: 374, False: 7.28k]
  ------------------
  141|    374|      return DecodeRawSymbolsInternal<SymbolDecoderT<7>>(num_values, src_buffer,
  142|    374|                                                         out_values);
  143|    386|    case 8:
  ------------------
  |  Branch (143:5): [True: 386, False: 7.27k]
  ------------------
  144|    386|      return DecodeRawSymbolsInternal<SymbolDecoderT<8>>(num_values, src_buffer,
  145|    386|                                                         out_values);
  146|    499|    case 9:
  ------------------
  |  Branch (146:5): [True: 499, False: 7.16k]
  ------------------
  147|    499|      return DecodeRawSymbolsInternal<SymbolDecoderT<9>>(num_values, src_buffer,
  148|    499|                                                         out_values);
  149|    432|    case 10:
  ------------------
  |  Branch (149:5): [True: 432, False: 7.22k]
  ------------------
  150|    432|      return DecodeRawSymbolsInternal<SymbolDecoderT<10>>(
  151|    432|          num_values, src_buffer, out_values);
  152|    367|    case 11:
  ------------------
  |  Branch (152:5): [True: 367, False: 7.29k]
  ------------------
  153|    367|      return DecodeRawSymbolsInternal<SymbolDecoderT<11>>(
  154|    367|          num_values, src_buffer, out_values);
  155|    368|    case 12:
  ------------------
  |  Branch (155:5): [True: 368, False: 7.29k]
  ------------------
  156|    368|      return DecodeRawSymbolsInternal<SymbolDecoderT<12>>(
  157|    368|          num_values, src_buffer, out_values);
  158|    433|    case 13:
  ------------------
  |  Branch (158:5): [True: 433, False: 7.22k]
  ------------------
  159|    433|      return DecodeRawSymbolsInternal<SymbolDecoderT<13>>(
  160|    433|          num_values, src_buffer, out_values);
  161|    431|    case 14:
  ------------------
  |  Branch (161:5): [True: 431, False: 7.22k]
  ------------------
  162|    431|      return DecodeRawSymbolsInternal<SymbolDecoderT<14>>(
  163|    431|          num_values, src_buffer, out_values);
  164|    462|    case 15:
  ------------------
  |  Branch (164:5): [True: 462, False: 7.19k]
  ------------------
  165|    462|      return DecodeRawSymbolsInternal<SymbolDecoderT<15>>(
  166|    462|          num_values, src_buffer, out_values);
  167|    363|    case 16:
  ------------------
  |  Branch (167:5): [True: 363, False: 7.29k]
  ------------------
  168|    363|      return DecodeRawSymbolsInternal<SymbolDecoderT<16>>(
  169|    363|          num_values, src_buffer, out_values);
  170|    378|    case 17:
  ------------------
  |  Branch (170:5): [True: 378, False: 7.28k]
  ------------------
  171|    378|      return DecodeRawSymbolsInternal<SymbolDecoderT<17>>(
  172|    378|          num_values, src_buffer, out_values);
  173|    387|    case 18:
  ------------------
  |  Branch (173:5): [True: 387, False: 7.27k]
  ------------------
  174|    387|      return DecodeRawSymbolsInternal<SymbolDecoderT<18>>(
  175|    387|          num_values, src_buffer, out_values);
  176|    474|    default:
  ------------------
  |  Branch (176:5): [True: 474, False: 7.18k]
  ------------------
  177|    474|      return false;
  178|  7.66k|  }
  179|  7.66k|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi1EEEEEbjPNS_13DecoderBufferEPj:
   92|    619|                              uint32_t *out_values) {
   93|    619|  SymbolDecoderT decoder;
   94|    619|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 363, False: 256]
  ------------------
   95|    363|    return false;
   96|    363|  }
   97|       |
   98|    256|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 256, False: 0]
  |  Branch (98:25): [True: 48, False: 208]
  ------------------
   99|     48|    return false;  // Wrong number of symbols.
  100|     48|  }
  101|       |
  102|    208|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 74, False: 134]
  ------------------
  103|     74|    return false;
  104|     74|  }
  105|  30.1M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 30.1M, False: 134]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  30.1M|    const uint32_t value = decoder.DecodeSymbol();
  108|  30.1M|    out_values[i] = value;
  109|  30.1M|  }
  110|    134|  decoder.EndDecoding();
  111|    134|  return true;
  112|    208|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi2EEEEEbjPNS_13DecoderBufferEPj:
   92|    439|                              uint32_t *out_values) {
   93|    439|  SymbolDecoderT decoder;
   94|    439|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 176, False: 263]
  ------------------
   95|    176|    return false;
   96|    176|  }
   97|       |
   98|    263|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 263, False: 0]
  |  Branch (98:25): [True: 11, False: 252]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    252|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 67, False: 185]
  ------------------
  103|     67|    return false;
  104|     67|  }
  105|  1.11M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 1.11M, False: 185]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  1.11M|    const uint32_t value = decoder.DecodeSymbol();
  108|  1.11M|    out_values[i] = value;
  109|  1.11M|  }
  110|    185|  decoder.EndDecoding();
  111|    185|  return true;
  112|    252|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi3EEEEEbjPNS_13DecoderBufferEPj:
   92|    386|                              uint32_t *out_values) {
   93|    386|  SymbolDecoderT decoder;
   94|    386|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 142, False: 244]
  ------------------
   95|    142|    return false;
   96|    142|  }
   97|       |
   98|    244|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 244, False: 0]
  |  Branch (98:25): [True: 11, False: 233]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    233|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 96, False: 137]
  ------------------
  103|     96|    return false;
  104|     96|  }
  105|  2.16M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 2.16M, False: 137]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  2.16M|    const uint32_t value = decoder.DecodeSymbol();
  108|  2.16M|    out_values[i] = value;
  109|  2.16M|  }
  110|    137|  decoder.EndDecoding();
  111|    137|  return true;
  112|    233|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi4EEEEEbjPNS_13DecoderBufferEPj:
   92|    343|                              uint32_t *out_values) {
   93|    343|  SymbolDecoderT decoder;
   94|    343|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 156, False: 187]
  ------------------
   95|    156|    return false;
   96|    156|  }
   97|       |
   98|    187|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 187, False: 0]
  |  Branch (98:25): [True: 13, False: 174]
  ------------------
   99|     13|    return false;  // Wrong number of symbols.
  100|     13|  }
  101|       |
  102|    174|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 66, False: 108]
  ------------------
  103|     66|    return false;
  104|     66|  }
  105|  7.40M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 7.40M, False: 108]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  7.40M|    const uint32_t value = decoder.DecodeSymbol();
  108|  7.40M|    out_values[i] = value;
  109|  7.40M|  }
  110|    108|  decoder.EndDecoding();
  111|    108|  return true;
  112|    174|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi5EEEEEbjPNS_13DecoderBufferEPj:
   92|    160|                              uint32_t *out_values) {
   93|    160|  SymbolDecoderT decoder;
   94|    160|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 57, False: 103]
  ------------------
   95|     57|    return false;
   96|     57|  }
   97|       |
   98|    103|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 103, False: 0]
  |  Branch (98:25): [True: 44, False: 59]
  ------------------
   99|     44|    return false;  // Wrong number of symbols.
  100|     44|  }
  101|       |
  102|     59|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 9, False: 50]
  ------------------
  103|      9|    return false;
  104|      9|  }
  105|  8.34M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 8.34M, False: 50]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  8.34M|    const uint32_t value = decoder.DecodeSymbol();
  108|  8.34M|    out_values[i] = value;
  109|  8.34M|  }
  110|     50|  decoder.EndDecoding();
  111|     50|  return true;
  112|     59|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi6EEEEEbjPNS_13DecoderBufferEPj:
   92|    359|                              uint32_t *out_values) {
   93|    359|  SymbolDecoderT decoder;
   94|    359|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 118, False: 241]
  ------------------
   95|    118|    return false;
   96|    118|  }
   97|       |
   98|    241|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 241, False: 0]
  |  Branch (98:25): [True: 10, False: 231]
  ------------------
   99|     10|    return false;  // Wrong number of symbols.
  100|     10|  }
  101|       |
  102|    231|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 82, False: 149]
  ------------------
  103|     82|    return false;
  104|     82|  }
  105|  9.76M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 9.76M, False: 149]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  9.76M|    const uint32_t value = decoder.DecodeSymbol();
  108|  9.76M|    out_values[i] = value;
  109|  9.76M|  }
  110|    149|  decoder.EndDecoding();
  111|    149|  return true;
  112|    231|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi7EEEEEbjPNS_13DecoderBufferEPj:
   92|    374|                              uint32_t *out_values) {
   93|    374|  SymbolDecoderT decoder;
   94|    374|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 139, False: 235]
  ------------------
   95|    139|    return false;
   96|    139|  }
   97|       |
   98|    235|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 235, False: 0]
  |  Branch (98:25): [True: 10, False: 225]
  ------------------
   99|     10|    return false;  // Wrong number of symbols.
  100|     10|  }
  101|       |
  102|    225|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 93, False: 132]
  ------------------
  103|     93|    return false;
  104|     93|  }
  105|  17.0M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 17.0M, False: 132]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  17.0M|    const uint32_t value = decoder.DecodeSymbol();
  108|  17.0M|    out_values[i] = value;
  109|  17.0M|  }
  110|    132|  decoder.EndDecoding();
  111|    132|  return true;
  112|    225|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi8EEEEEbjPNS_13DecoderBufferEPj:
   92|    386|                              uint32_t *out_values) {
   93|    386|  SymbolDecoderT decoder;
   94|    386|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 160, False: 226]
  ------------------
   95|    160|    return false;
   96|    160|  }
   97|       |
   98|    226|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 226, False: 0]
  |  Branch (98:25): [True: 10, False: 216]
  ------------------
   99|     10|    return false;  // Wrong number of symbols.
  100|     10|  }
  101|       |
  102|    216|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 82, False: 134]
  ------------------
  103|     82|    return false;
  104|     82|  }
  105|  18.4M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 18.4M, False: 134]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  18.4M|    const uint32_t value = decoder.DecodeSymbol();
  108|  18.4M|    out_values[i] = value;
  109|  18.4M|  }
  110|    134|  decoder.EndDecoding();
  111|    134|  return true;
  112|    216|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi9EEEEEbjPNS_13DecoderBufferEPj:
   92|    499|                              uint32_t *out_values) {
   93|    499|  SymbolDecoderT decoder;
   94|    499|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 182, False: 317]
  ------------------
   95|    182|    return false;
   96|    182|  }
   97|       |
   98|    317|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 317, False: 0]
  |  Branch (98:25): [True: 12, False: 305]
  ------------------
   99|     12|    return false;  // Wrong number of symbols.
  100|     12|  }
  101|       |
  102|    305|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 78, False: 227]
  ------------------
  103|     78|    return false;
  104|     78|  }
  105|  18.4M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 18.4M, False: 227]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  18.4M|    const uint32_t value = decoder.DecodeSymbol();
  108|  18.4M|    out_values[i] = value;
  109|  18.4M|  }
  110|    227|  decoder.EndDecoding();
  111|    227|  return true;
  112|    305|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi10EEEEEbjPNS_13DecoderBufferEPj:
   92|    432|                              uint32_t *out_values) {
   93|    432|  SymbolDecoderT decoder;
   94|    432|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 192, False: 240]
  ------------------
   95|    192|    return false;
   96|    192|  }
   97|       |
   98|    240|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 240, False: 0]
  |  Branch (98:25): [True: 11, False: 229]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    229|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 171, False: 58]
  ------------------
  103|    171|    return false;
  104|    171|  }
  105|   409k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 409k, False: 58]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   409k|    const uint32_t value = decoder.DecodeSymbol();
  108|   409k|    out_values[i] = value;
  109|   409k|  }
  110|     58|  decoder.EndDecoding();
  111|     58|  return true;
  112|    229|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi11EEEEEbjPNS_13DecoderBufferEPj:
   92|    367|                              uint32_t *out_values) {
   93|    367|  SymbolDecoderT decoder;
   94|    367|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 184, False: 183]
  ------------------
   95|    184|    return false;
   96|    184|  }
   97|       |
   98|    183|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 183, False: 0]
  |  Branch (98:25): [True: 10, False: 173]
  ------------------
   99|     10|    return false;  // Wrong number of symbols.
  100|     10|  }
  101|       |
  102|    173|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 105, False: 68]
  ------------------
  103|    105|    return false;
  104|    105|  }
  105|   494k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 494k, False: 68]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   494k|    const uint32_t value = decoder.DecodeSymbol();
  108|   494k|    out_values[i] = value;
  109|   494k|  }
  110|     68|  decoder.EndDecoding();
  111|     68|  return true;
  112|    173|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi12EEEEEbjPNS_13DecoderBufferEPj:
   92|    368|                              uint32_t *out_values) {
   93|    368|  SymbolDecoderT decoder;
   94|    368|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 208, False: 160]
  ------------------
   95|    208|    return false;
   96|    208|  }
   97|       |
   98|    160|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 160, False: 0]
  |  Branch (98:25): [True: 2, False: 158]
  ------------------
   99|      2|    return false;  // Wrong number of symbols.
  100|      2|  }
  101|       |
  102|    158|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 113, False: 45]
  ------------------
  103|    113|    return false;
  104|    113|  }
  105|  49.9k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 49.8k, False: 45]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  49.8k|    const uint32_t value = decoder.DecodeSymbol();
  108|  49.8k|    out_values[i] = value;
  109|  49.8k|  }
  110|     45|  decoder.EndDecoding();
  111|     45|  return true;
  112|    158|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi13EEEEEbjPNS_13DecoderBufferEPj:
   92|    433|                              uint32_t *out_values) {
   93|    433|  SymbolDecoderT decoder;
   94|    433|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 210, False: 223]
  ------------------
   95|    210|    return false;
   96|    210|  }
   97|       |
   98|    223|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 223, False: 0]
  |  Branch (98:25): [True: 10, False: 213]
  ------------------
   99|     10|    return false;  // Wrong number of symbols.
  100|     10|  }
  101|       |
  102|    213|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 122, False: 91]
  ------------------
  103|    122|    return false;
  104|    122|  }
  105|   132k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 132k, False: 91]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   132k|    const uint32_t value = decoder.DecodeSymbol();
  108|   132k|    out_values[i] = value;
  109|   132k|  }
  110|     91|  decoder.EndDecoding();
  111|     91|  return true;
  112|    213|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi14EEEEEbjPNS_13DecoderBufferEPj:
   92|    431|                              uint32_t *out_values) {
   93|    431|  SymbolDecoderT decoder;
   94|    431|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 209, False: 222]
  ------------------
   95|    209|    return false;
   96|    209|  }
   97|       |
   98|    222|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 222, False: 0]
  |  Branch (98:25): [True: 11, False: 211]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    211|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 133, False: 78]
  ------------------
  103|    133|    return false;
  104|    133|  }
  105|   126k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 126k, False: 78]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   126k|    const uint32_t value = decoder.DecodeSymbol();
  108|   126k|    out_values[i] = value;
  109|   126k|  }
  110|     78|  decoder.EndDecoding();
  111|     78|  return true;
  112|    211|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi15EEEEEbjPNS_13DecoderBufferEPj:
   92|    462|                              uint32_t *out_values) {
   93|    462|  SymbolDecoderT decoder;
   94|    462|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 182, False: 280]
  ------------------
   95|    182|    return false;
   96|    182|  }
   97|       |
   98|    280|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 280, False: 0]
  |  Branch (98:25): [True: 15, False: 265]
  ------------------
   99|     15|    return false;  // Wrong number of symbols.
  100|     15|  }
  101|       |
  102|    265|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 178, False: 87]
  ------------------
  103|    178|    return false;
  104|    178|  }
  105|   384k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 383k, False: 87]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   383k|    const uint32_t value = decoder.DecodeSymbol();
  108|   383k|    out_values[i] = value;
  109|   383k|  }
  110|     87|  decoder.EndDecoding();
  111|     87|  return true;
  112|    265|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi16EEEEEbjPNS_13DecoderBufferEPj:
   92|    363|                              uint32_t *out_values) {
   93|    363|  SymbolDecoderT decoder;
   94|    363|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 163, False: 200]
  ------------------
   95|    163|    return false;
   96|    163|  }
   97|       |
   98|    200|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 200, False: 0]
  |  Branch (98:25): [True: 24, False: 176]
  ------------------
   99|     24|    return false;  // Wrong number of symbols.
  100|     24|  }
  101|       |
  102|    176|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 117, False: 59]
  ------------------
  103|    117|    return false;
  104|    117|  }
  105|   114k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 113k, False: 59]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   113k|    const uint32_t value = decoder.DecodeSymbol();
  108|   113k|    out_values[i] = value;
  109|   113k|  }
  110|     59|  decoder.EndDecoding();
  111|     59|  return true;
  112|    176|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi17EEEEEbjPNS_13DecoderBufferEPj:
   92|    378|                              uint32_t *out_values) {
   93|    378|  SymbolDecoderT decoder;
   94|    378|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 171, False: 207]
  ------------------
   95|    171|    return false;
   96|    171|  }
   97|       |
   98|    207|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 207, False: 0]
  |  Branch (98:25): [True: 10, False: 197]
  ------------------
   99|     10|    return false;  // Wrong number of symbols.
  100|     10|  }
  101|       |
  102|    197|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 128, False: 69]
  ------------------
  103|    128|    return false;
  104|    128|  }
  105|   218k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 217k, False: 69]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   217k|    const uint32_t value = decoder.DecodeSymbol();
  108|   217k|    out_values[i] = value;
  109|   217k|  }
  110|     69|  decoder.EndDecoding();
  111|     69|  return true;
  112|    197|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi18EEEEEbjPNS_13DecoderBufferEPj:
   92|    387|                              uint32_t *out_values) {
   93|    387|  SymbolDecoderT decoder;
   94|    387|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 200, False: 187]
  ------------------
   95|    200|    return false;
   96|    200|  }
   97|       |
   98|    187|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 187, False: 0]
  |  Branch (98:25): [True: 11, False: 176]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    176|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 114, False: 62]
  ------------------
  103|    114|    return false;
  104|    114|  }
  105|  74.1k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 74.0k, False: 62]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  74.0k|    const uint32_t value = decoder.DecodeSymbol();
  108|  74.0k|    out_values[i] = value;
  109|  74.0k|  }
  110|     62|  decoder.EndDecoding();
  111|     62|  return true;
  112|    176|}

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

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

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

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

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

_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE10GetDecoderEv:
   65|  11.5k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE14GetCornerTableEv:
   66|  4.17k|  const CornerTable *GetCornerTable() const override {
   67|  4.17k|    return corner_table_.get();
   68|  4.17k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  16.5M|                       int *out_encoder_split_symbol_id) {
   87|  16.5M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 1.69M, False: 14.9M]
  ------------------
   88|  1.69M|      return false;
   89|  1.69M|    }
   90|  14.9M|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 26, False: 14.9M]
  ------------------
   91|  14.9M|        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|     26|      *out_encoder_split_symbol_id = -1;
   98|     26|      return true;
   99|     26|    }
  100|  14.9M|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 14.8M, False: 2.36k]
  ------------------
  101|  14.8M|      return false;
  102|  14.8M|    }
  103|  2.36k|    *out_face_edge =
  104|  2.36k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  2.36k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  2.36k|    topology_split_data_.pop_back();
  108|  2.36k|    return true;
  109|  14.9M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  55.4M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  55.4M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  55.4M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  55.4M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE13AttributeDataC2Ev:
  210|  14.2k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE10GetDecoderEv:
   65|  6.46k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE14GetCornerTableEv:
   66|  4.34k|  const CornerTable *GetCornerTable() const override {
   67|  4.34k|    return corner_table_.get();
   68|  4.34k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  44.7M|                       int *out_encoder_split_symbol_id) {
   87|  44.7M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 43.9M, False: 774k]
  ------------------
   88|  43.9M|      return false;
   89|  43.9M|    }
   90|   774k|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 55, False: 774k]
  ------------------
   91|   774k|        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|     55|      *out_encoder_split_symbol_id = -1;
   98|     55|      return true;
   99|     55|    }
  100|   774k|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 772k, False: 2.58k]
  ------------------
  101|   772k|      return false;
  102|   772k|    }
  103|  2.58k|    *out_face_edge =
  104|  2.58k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  2.58k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  2.58k|    topology_split_data_.pop_back();
  108|  2.58k|    return true;
  109|   774k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|   130M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|   130M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|   130M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|   130M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE13AttributeDataC2Ev:
  210|  18.2k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE10GetDecoderEv:
   65|  15.0k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE14GetCornerTableEv:
   66|  2.98k|  const CornerTable *GetCornerTable() const override {
   67|  2.98k|    return corner_table_.get();
   68|  2.98k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  58.5M|                       int *out_encoder_split_symbol_id) {
   87|  58.5M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 57.1M, False: 1.37M]
  ------------------
   88|  57.1M|      return false;
   89|  57.1M|    }
   90|  1.37M|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 71, False: 1.37M]
  ------------------
   91|  1.37M|        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|     71|      *out_encoder_split_symbol_id = -1;
   98|     71|      return true;
   99|     71|    }
  100|  1.37M|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 1.37M, False: 1.82k]
  ------------------
  101|  1.37M|      return false;
  102|  1.37M|    }
  103|  1.82k|    *out_face_edge =
  104|  1.82k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  1.82k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  1.82k|    topology_split_data_.pop_back();
  108|  1.82k|    return true;
  109|  1.37M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  67.5M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  67.5M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  67.5M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  67.5M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE13AttributeDataC2Ev:
  210|  9.04k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}

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

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

_ZN5draco31MeshEdgebreakerTraversalDecoderC2Ev:
   33|  9.57k|      : attribute_connectivity_decoders_(nullptr),
   34|  9.57k|        num_attribute_data_(0),
   35|  9.57k|        decoder_impl_(nullptr) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder4InitEPNS_35MeshEdgebreakerDecoderImplInterfaceE:
   36|  8.76k|  void Init(MeshEdgebreakerDecoderImplInterface *decoder) {
   37|  8.76k|    decoder_impl_ = decoder;
   38|  8.76k|    buffer_.Init(decoder->GetDecoder()->buffer()->data_head(),
   39|  8.76k|                 decoder->GetDecoder()->buffer()->remaining_size(),
   40|  8.76k|                 decoder->GetDecoder()->buffer()->bitstream_version());
   41|  8.76k|  }
_ZNK5draco31MeshEdgebreakerTraversalDecoder16BitstreamVersionEv:
   44|  6.85k|  uint16_t BitstreamVersion() const {
   45|  6.85k|    return decoder_impl_->GetDecoder()->bitstream_version();
   46|  6.85k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder21SetNumEncodedVerticesEi:
   50|  3.86k|  void SetNumEncodedVertices(int /* num_vertices */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19SetNumAttributeDataEi:
   54|  8.76k|  void SetNumAttributeData(int num_data) { num_attribute_data_ = num_data; }
_ZN5draco31MeshEdgebreakerTraversalDecoder5StartEPNS_13DecoderBufferE:
   59|  6.01k|  bool Start(DecoderBuffer *out_buffer) {
   60|       |    // Decode symbols from the main buffer decoder and face configurations from
   61|       |    // the start_face_buffer decoder.
   62|  6.01k|    if (!DecodeTraversalSymbols()) {
  ------------------
  |  Branch (62:9): [True: 76, False: 5.94k]
  ------------------
   63|     76|      return false;
   64|     76|    }
   65|       |
   66|  5.94k|    if (!DecodeStartFaces()) {
  ------------------
  |  Branch (66:9): [True: 109, False: 5.83k]
  ------------------
   67|    109|      return false;
   68|    109|    }
   69|       |
   70|  5.83k|    if (!DecodeAttributeSeams()) {
  ------------------
  |  Branch (70:9): [True: 17, False: 5.81k]
  ------------------
   71|     17|      return false;
   72|     17|    }
   73|  5.81k|    *out_buffer = buffer_;
   74|  5.81k|    return true;
   75|  5.83k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder28DecodeStartFaceConfigurationEv:
   78|  7.36M|  inline bool DecodeStartFaceConfiguration() {
   79|  7.36M|    uint32_t face_configuration;
   80|  7.36M|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   81|  7.36M|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  7.36M|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (81:9): [True: 1.62k, False: 7.36M]
  ------------------
   82|  1.62k|      start_face_buffer_.DecodeLeastSignificantBits32(1, &face_configuration);
   83|       |
   84|  1.62k|    } else
   85|  7.36M|#endif
   86|  7.36M|    {
   87|  7.36M|      face_configuration = start_face_decoder_.DecodeNextBit();
   88|  7.36M|    }
   89|  7.36M|    return face_configuration;
   90|  7.36M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder12DecodeSymbolEv:
   93|  38.7M|  inline uint32_t DecodeSymbol() {
   94|  38.7M|    uint32_t symbol;
   95|  38.7M|    symbol_buffer_.DecodeLeastSignificantBits32(1, &symbol);
   96|  38.7M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (96:9): [True: 17.0M, False: 21.6M]
  ------------------
   97|  17.0M|      return symbol;
   98|  17.0M|    }
   99|       |    // Else decode two additional bits.
  100|  21.6M|    uint32_t symbol_suffix;
  101|  21.6M|    symbol_buffer_.DecodeLeastSignificantBits32(2, &symbol_suffix);
  102|  21.6M|    symbol |= (symbol_suffix << 1);
  103|  21.6M|    return symbol;
  104|  38.7M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder22NewActiveCornerReachedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  38.4M|  inline void NewActiveCornerReached(CornerIndex /* corner */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder13MergeVerticesENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_:
  111|  4.95M|  inline void MergeVertices(VertexIndex /* dest */, VertexIndex /* source */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19DecodeAttributeSeamEi:
  117|  21.9M|  inline bool DecodeAttributeSeam(int attribute) {
  118|  21.9M|    return attribute_connectivity_decoders_[attribute].DecodeNextBit();
  119|  21.9M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder4DoneEv:
  122|  5.57k|  void Done() {
  123|  5.57k|    if (symbol_buffer_.bit_decoder_active()) {
  ------------------
  |  Branch (123:9): [True: 5.22k, False: 352]
  ------------------
  124|  5.22k|      symbol_buffer_.EndBitDecoding();
  125|  5.22k|    }
  126|  5.57k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  127|  5.57k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  5.57k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (127:9): [True: 612, False: 4.96k]
  ------------------
  128|    612|      start_face_buffer_.EndBitDecoding();
  129|       |
  130|    612|    } else
  131|  4.96k|#endif
  132|  4.96k|    {
  133|  4.96k|      start_face_decoder_.EndDecoding();
  134|  4.96k|    }
  135|  5.57k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder6bufferEv:
  138|  2.54k|  DecoderBuffer *buffer() { return &buffer_; }
_ZN5draco31MeshEdgebreakerTraversalDecoder22DecodeTraversalSymbolsEv:
  140|  6.44k|  bool DecodeTraversalSymbols() {
  141|  6.44k|    uint64_t traversal_size;
  142|  6.44k|    symbol_buffer_ = buffer_;
  143|  6.44k|    if (!symbol_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (143:9): [True: 22, False: 6.42k]
  ------------------
  144|     22|      return false;
  145|     22|    }
  146|  6.42k|    buffer_ = symbol_buffer_;
  147|  6.42k|    if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (147:9): [True: 121, False: 6.30k]
  ------------------
  148|    121|      return false;
  149|    121|    }
  150|  6.30k|    buffer_.Advance(traversal_size);
  151|  6.30k|    return true;
  152|  6.42k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder16DecodeStartFacesEv:
  154|  8.61k|  bool DecodeStartFaces() {
  155|       |    // Create a decoder that is set to the end of the encoded traversal data.
  156|  8.61k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  157|  8.61k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  8.61k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (157:9): [True: 1.13k, False: 7.48k]
  ------------------
  158|  1.13k|      start_face_buffer_ = buffer_;
  159|  1.13k|      uint64_t traversal_size;
  160|  1.13k|      if (!start_face_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (160:11): [True: 4, False: 1.13k]
  ------------------
  161|      4|        return false;
  162|      4|      }
  163|  1.13k|      buffer_ = start_face_buffer_;
  164|  1.13k|      if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (164:11): [True: 196, False: 937]
  ------------------
  165|    196|        return false;
  166|    196|      }
  167|    937|      buffer_.Advance(traversal_size);
  168|    937|      return true;
  169|  1.13k|    }
  170|  7.48k|#endif
  171|  7.48k|    return start_face_decoder_.StartDecoding(&buffer_);
  172|  8.61k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder20DecodeAttributeSeamsEv:
  174|  8.39k|  bool DecodeAttributeSeams() {
  175|       |    // Prepare attribute decoding.
  176|  8.39k|    if (num_attribute_data_ > 0) {
  ------------------
  |  Branch (176:9): [True: 5.68k, False: 2.71k]
  ------------------
  177|  5.68k|      attribute_connectivity_decoders_ = std::unique_ptr<BinaryDecoder[]>(
  178|  5.68k|          new BinaryDecoder[num_attribute_data_]);
  179|  15.7k|      for (int i = 0; i < num_attribute_data_; ++i) {
  ------------------
  |  Branch (179:23): [True: 10.0k, False: 5.64k]
  ------------------
  180|  10.0k|        if (!attribute_connectivity_decoders_[i].StartDecoding(&buffer_)) {
  ------------------
  |  Branch (180:13): [True: 39, False: 10.0k]
  ------------------
  181|     39|          return false;
  182|     39|        }
  183|  10.0k|      }
  184|  5.68k|    }
  185|  8.36k|    return true;
  186|  8.39k|  }

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

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

_ZN5draco21MeshSequentialDecoderC2Ev:
   27|  3.53k|MeshSequentialDecoder::MeshSequentialDecoder() {}
_ZN5draco21MeshSequentialDecoder18DecodeConnectivityEv:
   29|  3.11k|bool MeshSequentialDecoder::DecodeConnectivity() {
   30|  3.11k|  uint32_t num_faces;
   31|  3.11k|  uint32_t num_points;
   32|  3.11k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   33|  3.11k|  if (bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.11k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (33:7): [True: 413, False: 2.70k]
  ------------------
   34|    413|    if (!buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (34:9): [True: 1, False: 412]
  ------------------
   35|      1|      return false;
   36|      1|    }
   37|    412|    if (!buffer()->Decode(&num_points)) {
  ------------------
  |  Branch (37:9): [True: 0, False: 412]
  ------------------
   38|      0|      return false;
   39|      0|    }
   40|       |
   41|    412|  } else
   42|  2.70k|#endif
   43|  2.70k|  {
   44|  2.70k|    if (!DecodeVarint(&num_faces, buffer())) {
  ------------------
  |  Branch (44:9): [True: 0, False: 2.70k]
  ------------------
   45|      0|      return false;
   46|      0|    }
   47|  2.70k|    if (!DecodeVarint(&num_points, buffer())) {
  ------------------
  |  Branch (47:9): [True: 0, False: 2.70k]
  ------------------
   48|      0|      return false;
   49|      0|    }
   50|  2.70k|  }
   51|       |
   52|       |  // Check that num_faces and num_points are valid values.
   53|  3.11k|  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.11k|  if (faces_64 > 0xffffffff / 3) {
  ------------------
  |  Branch (55:7): [True: 2, False: 3.11k]
  ------------------
   56|      2|    return false;
   57|      2|  }
   58|  3.11k|  if (faces_64 > buffer()->remaining_size() / 3) {
  ------------------
  |  Branch (58:7): [True: 8, False: 3.10k]
  ------------------
   59|       |    // The number of faces is unreasonably high, because face indices do not
   60|       |    // fit in the remaining size of the buffer.
   61|      8|    return false;
   62|      8|  }
   63|  3.10k|  uint8_t connectivity_method;
   64|  3.10k|  if (!buffer()->Decode(&connectivity_method)) {
  ------------------
  |  Branch (64:7): [True: 0, False: 3.10k]
  ------------------
   65|      0|    return false;
   66|      0|  }
   67|  3.10k|  if (connectivity_method == 0) {
  ------------------
  |  Branch (67:7): [True: 2.29k, False: 811]
  ------------------
   68|  2.29k|    if (!DecodeAndDecompressIndices(num_faces, num_points)) {
  ------------------
  |  Branch (68:9): [True: 2.16k, False: 132]
  ------------------
   69|  2.16k|      return false;
   70|  2.16k|    }
   71|  2.29k|  } else {
   72|    811|    if (num_points < 256) {
  ------------------
  |  Branch (72:9): [True: 603, False: 208]
  ------------------
   73|       |      // Decode indices as uint8_t.
   74|  1.63k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (74:28): [True: 1.04k, False: 584]
  ------------------
   75|  1.04k|        Mesh::Face face;
   76|  4.15k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (76:25): [True: 3.12k, False: 1.03k]
  ------------------
   77|  3.12k|          uint8_t val;
   78|  3.12k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (78:15): [True: 4, False: 3.12k]
  ------------------
   79|      4|            return false;
   80|      4|          }
   81|  3.12k|          if (val >= num_points) {
  ------------------
  |  Branch (81:15): [True: 15, False: 3.11k]
  ------------------
   82|     15|            return false;
   83|     15|          }
   84|  3.11k|          face[j] = val;
   85|  3.11k|        }
   86|  1.03k|        mesh()->AddFace(face);
   87|  1.03k|      }
   88|    603|    } else if (num_points < (1 << 16)) {
  ------------------
  |  Branch (88:16): [True: 63, False: 145]
  ------------------
   89|       |      // Decode indices as uint16_t.
   90|    685|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:28): [True: 659, False: 26]
  ------------------
   91|    659|        Mesh::Face face;
   92|  2.55k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (92:25): [True: 1.93k, False: 622]
  ------------------
   93|  1.93k|          uint16_t val;
   94|  1.93k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (94:15): [True: 14, False: 1.91k]
  ------------------
   95|     14|            return false;
   96|     14|          }
   97|  1.91k|          if (val >= num_points) {
  ------------------
  |  Branch (97:15): [True: 23, False: 1.89k]
  ------------------
   98|     23|            return false;
   99|     23|          }
  100|  1.89k|          face[j] = val;
  101|  1.89k|        }
  102|    622|        mesh()->AddFace(face);
  103|    622|      }
  104|    145|    } else if (num_points < (1 << 21) &&
  ------------------
  |  Branch (104:16): [True: 51, False: 94]
  ------------------
  105|     51|               bitstream_version() >= DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|     51|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (105:16): [True: 50, False: 1]
  ------------------
  106|       |      // Decode indices as uint32_t.
  107|    695|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (107:28): [True: 684, False: 11]
  ------------------
  108|    684|        Mesh::Face face;
  109|  2.65k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (109:25): [True: 2.00k, False: 645]
  ------------------
  110|  2.00k|          uint32_t val;
  111|  2.00k|          if (!DecodeVarint(&val, buffer())) {
  ------------------
  |  Branch (111:15): [True: 12, False: 1.99k]
  ------------------
  112|     12|            return false;
  113|     12|          }
  114|  1.99k|          if (val >= num_points) {
  ------------------
  |  Branch (114:15): [True: 27, False: 1.96k]
  ------------------
  115|     27|            return false;
  116|     27|          }
  117|  1.96k|          face[j] = val;
  118|  1.96k|        }
  119|    645|        mesh()->AddFace(face);
  120|    645|      }
  121|     95|    } else {
  122|       |      // Decode faces as uint32_t (default).
  123|  1.13k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (123:28): [True: 1.09k, False: 43]
  ------------------
  124|  1.09k|        Mesh::Face face;
  125|  4.26k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (125:25): [True: 3.22k, False: 1.04k]
  ------------------
  126|  3.22k|          uint32_t val;
  127|  3.22k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (127:15): [True: 22, False: 3.19k]
  ------------------
  128|     22|            return false;
  129|     22|          }
  130|  3.19k|          if (val >= num_points) {
  ------------------
  |  Branch (130:15): [True: 30, False: 3.16k]
  ------------------
  131|     30|            return false;
  132|     30|          }
  133|  3.16k|          face[j] = val;
  134|  3.16k|        }
  135|  1.04k|        mesh()->AddFace(face);
  136|  1.04k|      }
  137|     95|    }
  138|    811|  }
  139|    796|  point_cloud()->set_num_points(num_points);
  140|    796|  return true;
  141|  3.10k|}
_ZN5draco21MeshSequentialDecoder23CreateAttributesDecoderEi:
  143|  23.6k|bool MeshSequentialDecoder::CreateAttributesDecoder(int32_t att_decoder_id) {
  144|       |  // Always create the basic attribute decoder.
  145|  23.6k|  return SetAttributesDecoder(
  146|  23.6k|      att_decoder_id,
  147|  23.6k|      std::unique_ptr<AttributesDecoder>(
  148|  23.6k|          new SequentialAttributeDecodersController(
  149|  23.6k|              std::unique_ptr<PointsSequencer>(
  150|  23.6k|                  new LinearSequencer(point_cloud()->num_points())))));
  151|  23.6k|}
_ZN5draco21MeshSequentialDecoder26DecodeAndDecompressIndicesEjj:
  154|  2.29k|                                                       uint32_t num_points) {
  155|       |  // Get decoded indices differences that were encoded with an entropy code.
  156|  2.29k|  std::vector<uint32_t> indices_buffer(num_faces * 3);
  157|  2.29k|  if (!DecodeSymbols(num_faces * 3, 1, buffer(), indices_buffer.data())) {
  ------------------
  |  Branch (157:7): [True: 1.94k, False: 346]
  ------------------
  158|  1.94k|    return false;
  159|  1.94k|  }
  160|       |  // Reconstruct the indices from the differences.
  161|       |  // See MeshSequentialEncoder::CompressAndEncodeIndices() for more details.
  162|    346|  int32_t last_index_value = 0;  // This will always be >= 0.
  163|    346|  int vertex_index = 0;
  164|  3.34k|  for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (164:24): [True: 3.21k, False: 132]
  ------------------
  165|  3.21k|    Mesh::Face face;
  166|  12.3k|    for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (166:21): [True: 9.37k, False: 3.00k]
  ------------------
  167|  9.37k|      const uint32_t encoded_val = indices_buffer[vertex_index++];
  168|  9.37k|      int32_t index_diff = (encoded_val >> 1);
  169|  9.37k|      if (encoded_val & 1) {
  ------------------
  |  Branch (169:11): [True: 848, False: 8.52k]
  ------------------
  170|    848|        if (index_diff > last_index_value) {
  ------------------
  |  Branch (170:13): [True: 41, False: 807]
  ------------------
  171|       |          // Subtracting index_diff would result in a negative index.
  172|     41|          return false;
  173|     41|        }
  174|    807|        index_diff = -index_diff;
  175|  8.52k|      } else {
  176|  8.52k|        if (index_diff >
  ------------------
  |  Branch (176:13): [True: 0, False: 8.52k]
  ------------------
  177|  8.52k|            (std::numeric_limits<int32_t>::max() - last_index_value)) {
  178|       |          // Adding index_diff to last_index_value would overflow.
  179|      0|          return false;
  180|      0|        }
  181|  8.52k|      }
  182|  9.33k|      const int32_t index_value = index_diff + last_index_value;
  183|  9.33k|      if (index_value < 0 ||
  ------------------
  |  Branch (183:11): [True: 0, False: 9.33k]
  ------------------
  184|  9.33k|          static_cast<uint32_t>(index_value) >= num_points) {
  ------------------
  |  Branch (184:11): [True: 173, False: 9.16k]
  ------------------
  185|    173|        return false;
  186|    173|      }
  187|  9.16k|      face[j] = index_value;
  188|  9.16k|      last_index_value = index_value;
  189|  9.16k|    }
  190|  3.00k|    mesh()->AddFace(face);
  191|  3.00k|  }
  192|    132|  return true;
  193|    346|}

_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  1.81k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  1.61M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  1.61M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 1.56M, False: 54.3k]
  ------------------
   61|  1.56M|      return true;  // Already traversed.
   62|  1.56M|    }
   63|       |
   64|  54.3k|    corner_traversal_stack_.clear();
   65|  54.3k|    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|  54.3k|    const VertexIndex next_vert =
   69|  54.3k|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  54.3k|    const VertexIndex prev_vert =
   71|  54.3k|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  54.3k|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 54.3k]
  |  Branch (72:45): [True: 0, False: 54.3k]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  54.3k|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 53.4k, False: 919]
  ------------------
   76|  53.4k|      this->MarkVertexVisited(next_vert);
   77|  53.4k|      this->traversal_observer().OnNewVertexVisited(
   78|  53.4k|          next_vert, this->corner_table()->Next(corner_id));
   79|  53.4k|    }
   80|  54.3k|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 4.33k, False: 50.0k]
  ------------------
   81|  4.33k|      this->MarkVertexVisited(prev_vert);
   82|  4.33k|      this->traversal_observer().OnNewVertexVisited(
   83|  4.33k|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  4.33k|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|   119k|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 65.1k, False: 54.3k]
  ------------------
   88|       |      // Currently processed corner.
   89|  65.1k|      corner_id = corner_traversal_stack_.back();
   90|  65.1k|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  65.1k|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 65.1k]
  |  Branch (92:47): [True: 724, False: 64.3k]
  ------------------
   93|       |        // This face has been already traversed.
   94|    724|        corner_traversal_stack_.pop_back();
   95|    724|        continue;
   96|    724|      }
   97|  1.61M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 1.61M, Folded]
  ------------------
   98|  1.61M|        this->MarkFaceVisited(face_id);
   99|  1.61M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  1.61M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  1.61M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 1.61M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  1.61M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 793k, False: 824k]
  ------------------
  105|   793k|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|   793k|          this->MarkVertexVisited(vert_id);
  107|   793k|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|   793k|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 772k, False: 21.2k]
  ------------------
  109|   772k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   772k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   772k|            continue;
  112|   772k|          }
  113|   793k|        }
  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|   846k|        const CornerIndex right_corner_id =
  118|   846k|            this->corner_table()->GetRightCorner(corner_id);
  119|   846k|        const CornerIndex left_corner_id =
  120|   846k|            this->corner_table()->GetLeftCorner(corner_id);
  121|   846k|        const FaceIndex right_face_id(
  122|   846k|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 16.2k, False: 829k]
  ------------------
  123|   846k|                 ? kInvalidFaceIndex
  124|   846k|                 : FaceIndex(right_corner_id.value() / 3)));
  125|   846k|        const FaceIndex left_face_id(
  126|   846k|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 57.9k, False: 788k]
  ------------------
  127|   846k|                 ? kInvalidFaceIndex
  128|   846k|                 : FaceIndex(left_corner_id.value() / 3)));
  129|   846k|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 802k, False: 43.4k]
  ------------------
  130|       |          // Right face has been already visited.
  131|   802k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 59.0k, False: 743k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  59.0k|            corner_traversal_stack_.pop_back();
  134|  59.0k|            break;  // Break from the while (true) loop.
  135|   743k|          } else {
  136|       |            // Go to the left face.
  137|   743k|            corner_id = left_corner_id;
  138|   743k|            face_id = left_face_id;
  139|   743k|          }
  140|   802k|        } else {
  141|       |          // Right face was not visited.
  142|  43.4k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 38.0k, False: 5.38k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  38.0k|            corner_id = right_corner_id;
  145|  38.0k|            face_id = right_face_id;
  146|  38.0k|          } else {
  147|       |            // Both neighboring faces are unvisited, we need to visit both of
  148|       |            // them.
  149|       |
  150|       |            // Split the traversal.
  151|       |            // First make the top of the current corner stack point to the left
  152|       |            // face (this one will be processed second).
  153|  5.38k|            corner_traversal_stack_.back() = left_corner_id;
  154|       |            // Add a new corner to the top of the stack (right face needs to
  155|       |            // be traversed first).
  156|  5.38k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  5.38k|            break;
  159|  5.38k|          }
  160|  43.4k|        }
  161|   846k|      }
  162|  64.3k|    }
  163|  54.3k|    return true;
  164|  54.3k|  }
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  1.81k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  3.87k|  DepthFirstTraverser() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  2.46k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  5.23M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  5.23M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 1.56M, False: 3.67M]
  ------------------
   61|  1.56M|      return true;  // Already traversed.
   62|  1.56M|    }
   63|       |
   64|  3.67M|    corner_traversal_stack_.clear();
   65|  3.67M|    corner_traversal_stack_.push_back(corner_id);
   66|       |    // For the first face, check the remaining corners as they may not be
   67|       |    // processed yet.
   68|  3.67M|    const VertexIndex next_vert =
   69|  3.67M|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  3.67M|    const VertexIndex prev_vert =
   71|  3.67M|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  3.67M|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 3.67M]
  |  Branch (72:45): [True: 0, False: 3.67M]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  3.67M|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 3.67M, False: 1.38k]
  ------------------
   76|  3.67M|      this->MarkVertexVisited(next_vert);
   77|  3.67M|      this->traversal_observer().OnNewVertexVisited(
   78|  3.67M|          next_vert, this->corner_table()->Next(corner_id));
   79|  3.67M|    }
   80|  3.67M|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 3.62M, False: 55.5k]
  ------------------
   81|  3.62M|      this->MarkVertexVisited(prev_vert);
   82|  3.62M|      this->traversal_observer().OnNewVertexVisited(
   83|  3.62M|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  3.62M|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|  7.42M|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 3.74M, False: 3.67M]
  ------------------
   88|       |      // Currently processed corner.
   89|  3.74M|      corner_id = corner_traversal_stack_.back();
   90|  3.74M|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  3.74M|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 3.74M]
  |  Branch (92:47): [True: 6.52k, False: 3.74M]
  ------------------
   93|       |        // This face has been already traversed.
   94|  6.52k|        corner_traversal_stack_.pop_back();
   95|  6.52k|        continue;
   96|  6.52k|      }
   97|  5.23M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 5.23M, Folded]
  ------------------
   98|  5.23M|        this->MarkFaceVisited(face_id);
   99|  5.23M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  5.23M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  5.23M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 5.23M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  5.23M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 4.42M, False: 808k]
  ------------------
  105|  4.42M|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|  4.42M|          this->MarkVertexVisited(vert_id);
  107|  4.42M|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|  4.42M|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 737k, False: 3.69M]
  ------------------
  109|   737k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   737k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   737k|            continue;
  112|   737k|          }
  113|  4.42M|        }
  114|       |        // The current vertex has been already visited or it was on a boundary.
  115|       |        // We need to determine whether we can visit any of it's neighboring
  116|       |        // faces.
  117|  4.50M|        const CornerIndex right_corner_id =
  118|  4.50M|            this->corner_table()->GetRightCorner(corner_id);
  119|  4.50M|        const CornerIndex left_corner_id =
  120|  4.50M|            this->corner_table()->GetLeftCorner(corner_id);
  121|  4.50M|        const FaceIndex right_face_id(
  122|  4.50M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 3.66M, False: 837k]
  ------------------
  123|  4.50M|                 ? kInvalidFaceIndex
  124|  4.50M|                 : FaceIndex(right_corner_id.value() / 3)));
  125|  4.50M|        const FaceIndex left_face_id(
  126|  4.50M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 3.70M, False: 794k]
  ------------------
  127|  4.50M|                 ? kInvalidFaceIndex
  128|  4.50M|                 : FaceIndex(left_corner_id.value() / 3)));
  129|  4.50M|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 4.40M, False: 95.4k]
  ------------------
  130|       |          // Right face has been already visited.
  131|  4.40M|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 3.70M, False: 698k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  3.70M|            corner_traversal_stack_.pop_back();
  134|  3.70M|            break;  // Break from the while (true) loop.
  135|  3.70M|          } else {
  136|       |            // Go to the left face.
  137|   698k|            corner_id = left_corner_id;
  138|   698k|            face_id = left_face_id;
  139|   698k|          }
  140|  4.40M|        } else {
  141|       |          // Right face was not visited.
  142|  95.4k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 60.0k, False: 35.4k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  60.0k|            corner_id = right_corner_id;
  145|  60.0k|            face_id = right_face_id;
  146|  60.0k|          } 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|  35.4k|            corner_traversal_stack_.back() = left_corner_id;
  154|       |            // Add a new corner to the top of the stack (right face needs to
  155|       |            // be traversed first).
  156|  35.4k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  35.4k|            break;
  159|  35.4k|          }
  160|  95.4k|        }
  161|  4.50M|      }
  162|  3.74M|    }
  163|  3.67M|    return true;
  164|  3.67M|  }
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  2.46k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  5.13k|  DepthFirstTraverser() {}

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

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

_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|    604|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  2.30k|  bool UpdatePointToAttributeIndexMapping(PointAttribute *attribute) override {
   49|  2.30k|    const auto *corner_table = traverser_.corner_table();
   50|  2.30k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  2.30k|    const size_t num_faces = mesh_->num_faces();
   52|  2.30k|    const size_t num_points = mesh_->num_points();
   53|  5.27M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 5.27M, False: 2.30k]
  ------------------
   54|  5.27M|      const auto &face = mesh_->face(f);
   55|  21.0M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 15.8M, False: 5.27M]
  ------------------
   56|  15.8M|        const PointIndex point_id = face[p];
   57|  15.8M|        const VertexIndex vert_id =
   58|  15.8M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  15.8M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 15.8M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  15.8M|        const AttributeValueIndex att_entry_id(
   63|  15.8M|            encoding_data_
   64|  15.8M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  15.8M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 15.8M]
  |  Branch (65:13): [True: 0, False: 15.8M]
  |  Branch (65:39): [True: 0, False: 15.8M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|  15.8M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  15.8M|      }
   71|  5.27M|    }
   72|  2.30k|    return true;
   73|  2.30k|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|    558|  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|    558|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|    558|    traverser_.OnTraversalStart();
   82|    558|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 558]
  ------------------
   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|    558|    } else {
   89|    558|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  3.16M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 3.15M, False: 558]
  ------------------
   91|  3.15M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 3.15M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  3.15M|      }
   95|    558|    }
   96|    558|    traverser_.OnTraversalEnd();
   97|    558|    return true;
   98|    558|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  3.15M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  3.15M|    return traverser_.TraverseFromCorner(corner_id);
  103|  3.15M|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|    604|  void SetTraverser(const TraverserT &t) { traverser_ = t; }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|  1.93k|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  5.83k|  bool UpdatePointToAttributeIndexMapping(PointAttribute *attribute) override {
   49|  5.83k|    const auto *corner_table = traverser_.corner_table();
   50|  5.83k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  5.83k|    const size_t num_faces = mesh_->num_faces();
   52|  5.83k|    const size_t num_points = mesh_->num_points();
   53|  2.90M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 2.89M, False: 5.83k]
  ------------------
   54|  2.89M|      const auto &face = mesh_->face(f);
   55|  11.5M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 8.69M, False: 2.89M]
  ------------------
   56|  8.69M|        const PointIndex point_id = face[p];
   57|  8.69M|        const VertexIndex vert_id =
   58|  8.69M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  8.69M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 8.69M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  8.69M|        const AttributeValueIndex att_entry_id(
   63|  8.69M|            encoding_data_
   64|  8.69M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  8.69M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 8.69M]
  |  Branch (65:13): [True: 0, False: 8.69M]
  |  Branch (65:39): [True: 0, False: 8.69M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|  8.69M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  8.69M|      }
   71|  2.89M|    }
   72|  5.83k|    return true;
   73|  5.83k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|  1.81k|  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.81k|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|  1.81k|    traverser_.OnTraversalStart();
   82|  1.81k|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 1.81k]
  ------------------
   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.81k|    } else {
   89|  1.81k|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  1.62M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 1.61M, False: 1.81k]
  ------------------
   91|  1.61M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 1.61M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  1.61M|      }
   95|  1.81k|    }
   96|  1.81k|    traverser_.OnTraversalEnd();
   97|  1.81k|    return true;
   98|  1.81k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  1.61M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  1.61M|    return traverser_.TraverseFromCorner(corner_id);
  103|  1.61M|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|  1.93k|  void SetTraverser(const TraverserT &t) { traverser_ = t; }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|  2.56k|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  7.92k|  bool UpdatePointToAttributeIndexMapping(PointAttribute *attribute) override {
   49|  7.92k|    const auto *corner_table = traverser_.corner_table();
   50|  7.92k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  7.92k|    const size_t num_faces = mesh_->num_faces();
   52|  7.92k|    const size_t num_points = mesh_->num_points();
   53|  9.19M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 9.18M, False: 7.91k]
  ------------------
   54|  9.18M|      const auto &face = mesh_->face(f);
   55|  36.7M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 27.5M, False: 9.18M]
  ------------------
   56|  27.5M|        const PointIndex point_id = face[p];
   57|  27.5M|        const VertexIndex vert_id =
   58|  27.5M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  27.5M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 27.5M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  27.5M|        const AttributeValueIndex att_entry_id(
   63|  27.5M|            encoding_data_
   64|  27.5M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  27.5M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 27.5M]
  |  Branch (65:13): [True: 2, False: 27.5M]
  |  Branch (65:39): [True: 2, False: 27.5M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      2|          return false;
   68|      2|        }
   69|  27.5M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  27.5M|      }
   71|  9.18M|    }
   72|  7.91k|    return true;
   73|  7.92k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|  2.46k|  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.46k|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|  2.46k|    traverser_.OnTraversalStart();
   82|  2.46k|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 2.46k]
  ------------------
   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.46k|    } else {
   89|  2.46k|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  5.24M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 5.23M, False: 2.46k]
  ------------------
   91|  5.23M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 5.23M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  5.23M|      }
   95|  2.46k|    }
   96|  2.46k|    traverser_.OnTraversalEnd();
   97|  2.46k|    return true;
   98|  2.46k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  5.23M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  5.23M|    return traverser_.TraverseFromCorner(corner_id);
  103|  5.23M|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|  2.56k|  void SetTraverser(const TraverserT &t) { traverser_ = t; }

_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  5.13k|  virtual ~TraverserBase() = default;
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  35.1M|  inline const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  19.0M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  19.0M|    return is_vertex_visited_[vert_id.value()];
   65|  19.0M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  2.46M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  2.46M|    is_vertex_visited_[vert_id.value()] = true;
   68|  2.46M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  7.23M|  inline TraversalObserverT &traversal_observer() {
   75|  7.23M|    return traversal_observer_;
   76|  7.23M|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  14.2M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  14.2M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 127k, False: 14.1M]
  ------------------
   47|   127k|      return true;  // Invalid faces are always considered as visited.
   48|   127k|    }
   49|  14.1M|    return is_face_visited_[face_id.value()];
   50|  14.2M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  4.77M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  4.77M|    is_face_visited_[face_id.value()] = true;
   62|  4.77M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  5.08k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  5.08k|  virtual ~TraverserBase() = default;
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  2.54k|                    TraversalObserver traversal_observer) {
   37|  2.54k|    corner_table_ = corner_table;
   38|  2.54k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  2.54k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  2.54k|    traversal_observer_ = traversal_observer;
   41|  2.54k|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  1.61M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  1.61M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 1.61M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  1.61M|    return is_face_visited_[corner_id.value() / 3];
   58|  1.61M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  41.4M|  inline const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  5.23M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  5.23M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 5.23M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  5.23M|    return is_face_visited_[corner_id.value() / 3];
   58|  5.23M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  12.5M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  12.5M|    return is_vertex_visited_[vert_id.value()];
   65|  12.5M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  11.7M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  11.7M|    is_vertex_visited_[vert_id.value()] = true;
   68|  11.7M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  16.9M|  inline TraversalObserverT &traversal_observer() {
   75|  16.9M|    return traversal_observer_;
   76|  16.9M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  12.7M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  12.7M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 7.36M, False: 5.38M]
  ------------------
   47|  7.36M|      return true;  // Invalid faces are always considered as visited.
   48|  7.36M|    }
   49|  5.38M|    return is_face_visited_[face_id.value()];
   50|  12.7M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  5.23M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  5.23M|    is_face_visited_[face_id.value()] = true;
   62|  5.23M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  5.13k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  2.56k|                    TraversalObserver traversal_observer) {
   37|  2.56k|    corner_table_ = corner_table;
   38|  2.56k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  2.56k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  2.56k|    traversal_observer_ = traversal_observer;
   41|  2.56k|  }

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

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

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

_ZN5draco18MostSignificantBitEj:
   58|  1.12k|inline int MostSignificantBit(uint32_t n) {
   59|  1.12k|#if defined(__GNUC__)
   60|  1.12k|  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.12k|}
_ZN5draco24ConvertSymbolToSignedIntIjEENSt3__111make_signedIT_E4typeES3_:
  112|  1.02G|    IntTypeT val) {
  113|  1.02G|  static_assert(std::is_integral<IntTypeT>::value, "IntTypeT is not integral.");
  114|  1.02G|  typedef typename std::make_signed<IntTypeT>::type SignedType;
  115|  1.02G|  const bool is_positive = !static_cast<bool>(val & 1);
  116|  1.02G|  val >>= 1;
  117|  1.02G|  if (is_positive) {
  ------------------
  |  Branch (117:7): [True: 1.00G, False: 18.9M]
  ------------------
  118|  1.00G|    return static_cast<SignedType>(val);
  119|  1.00G|  }
  120|  18.9M|  SignedType ret = static_cast<SignedType>(val);
  121|  18.9M|  ret = -ret - 1;
  122|  18.9M|  return ret;
  123|  1.02G|}

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

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

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

_ZN5draco13DecoderBuffer28DecodeLeastSignificantBits32EjPj:
   57|  64.3M|  bool DecodeLeastSignificantBits32(uint32_t nbits, uint32_t *out_value) {
   58|  64.3M|    if (!bit_decoder_active()) {
  ------------------
  |  Branch (58:9): [True: 0, False: 64.3M]
  ------------------
   59|      0|      return false;
   60|      0|    }
   61|  64.3M|    return bit_decoder_.GetBits(nbits, out_value);
   62|  64.3M|  }
_ZN5draco13DecoderBuffer6DecodeEPvm:
   76|  1.00G|  bool Decode(void *out_data, size_t size_to_decode) {
   77|  1.00G|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (77:9): [True: 548, False: 1.00G]
  ------------------
   78|    548|      return false;  // Buffer overflow.
   79|    548|    }
   80|  1.00G|    memcpy(out_data, (data_ + pos_), size_to_decode);
   81|  1.00G|    pos_ += size_to_decode;
   82|  1.00G|    return true;
   83|  1.00G|  }
_ZN5draco13DecoderBuffer7AdvanceEl:
  105|  34.0k|  void Advance(int64_t bytes) { pos_ += bytes; }
_ZN5draco13DecoderBuffer21set_bitstream_versionEt:
  111|  13.4k|  void set_bitstream_version(uint16_t version) { bitstream_version_ = version; }
_ZNK5draco13DecoderBuffer9data_headEv:
  114|  53.4k|  const char *data_head() const { return data_ + pos_; }
_ZNK5draco13DecoderBuffer14remaining_sizeEv:
  115|   322k|  int64_t remaining_size() const { return data_size_ - pos_; }
_ZNK5draco13DecoderBuffer12decoded_sizeEv:
  116|  8.76k|  int64_t decoded_size() const { return pos_; }
_ZNK5draco13DecoderBuffer18bit_decoder_activeEv:
  117|  64.3M|  bool bit_decoder_active() const { return bit_mode_; }
_ZNK5draco13DecoderBuffer17bitstream_versionEv:
  120|  7.44M|  uint16_t bitstream_version() const { return bitstream_version_; }
_ZN5draco13DecoderBuffer10BitDecoder5resetEPKvm:
  130|  11.1k|    inline void reset(const void *b, size_t s) {
  131|  11.1k|      bit_offset_ = 0;
  132|  11.1k|      bit_buffer_ = static_cast<const uint8_t *>(b);
  133|  11.1k|      bit_buffer_end_ = bit_buffer_ + s;
  134|  11.1k|    }
_ZNK5draco13DecoderBuffer10BitDecoder11BitsDecodedEv:
  137|  9.41k|    inline uint64_t BitsDecoded() const {
  138|  9.41k|      return static_cast<uint64_t>(bit_offset_);
  139|  9.41k|    }
_ZN5draco13DecoderBuffer10BitDecoder7GetBitsEjPj:
  160|  64.3M|    inline bool GetBits(uint32_t nbits, uint32_t *x) {
  161|  64.3M|      if (nbits > 32) {
  ------------------
  |  Branch (161:11): [True: 15, False: 64.3M]
  ------------------
  162|     15|        return false;
  163|     15|      }
  164|  64.3M|      uint32_t value = 0;
  165|   147M|      for (uint32_t bit = 0; bit < nbits; ++bit) {
  ------------------
  |  Branch (165:30): [True: 82.9M, False: 64.3M]
  ------------------
  166|  82.9M|        value |= GetBit() << bit;
  167|  82.9M|      }
  168|  64.3M|      *x = value;
  169|  64.3M|      return true;
  170|  64.3M|    }
_ZN5draco13DecoderBuffer10BitDecoder6GetBitEv:
  175|  82.9M|    inline int GetBit() {
  176|  82.9M|      const size_t off = bit_offset_;
  177|  82.9M|      const size_t byte_offset = off >> 3;
  178|  82.9M|      const int bit_shift = static_cast<int>(off & 0x7);
  179|  82.9M|      if (bit_buffer_ + byte_offset < bit_buffer_end_) {
  ------------------
  |  Branch (179:11): [True: 77.6M, False: 5.26M]
  ------------------
  180|  77.6M|        const int bit = (bit_buffer_[byte_offset] >> bit_shift) & 1;
  181|  77.6M|        bit_offset_ = off + 1;
  182|  77.6M|        return bit;
  183|  77.6M|      }
  184|  5.26M|      return 0;
  185|  82.9M|    }
_ZN5draco13DecoderBuffer6DecodeIhEEbPT_:
   68|  13.7M|  bool Decode(T *out_val) {
   69|  13.7M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 4.05k, False: 13.7M]
  ------------------
   70|  4.05k|      return false;
   71|  4.05k|    }
   72|  13.7M|    pos_ += sizeof(T);
   73|  13.7M|    return true;
   74|  13.7M|  }
_ZN5draco13DecoderBuffer4PeekIhEEbPT_:
   87|  13.7M|  bool Peek(T *out_val) {
   88|  13.7M|    const size_t size_to_decode = sizeof(T);
   89|  13.7M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 4.05k, False: 13.7M]
  ------------------
   90|  4.05k|      return false;  // Buffer overflow.
   91|  4.05k|    }
   92|  13.7M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  13.7M|    return true;
   94|  13.7M|  }
_ZN5draco13DecoderBuffer6DecodeIiEEbPT_:
   68|  15.3k|  bool Decode(T *out_val) {
   69|  15.3k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 150, False: 15.1k]
  ------------------
   70|    150|      return false;
   71|    150|    }
   72|  15.1k|    pos_ += sizeof(T);
   73|  15.1k|    return true;
   74|  15.3k|  }
_ZN5draco13DecoderBuffer4PeekIiEEbPT_:
   87|  15.3k|  bool Peek(T *out_val) {
   88|  15.3k|    const size_t size_to_decode = sizeof(T);
   89|  15.3k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 150, False: 15.1k]
  ------------------
   90|    150|      return false;  // Buffer overflow.
   91|    150|    }
   92|  15.1k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  15.1k|    return true;
   94|  15.3k|  }
_ZN5draco13DecoderBuffer6DecodeIjEEbPT_:
   68|   941k|  bool Decode(T *out_val) {
   69|   941k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 224, False: 941k]
  ------------------
   70|    224|      return false;
   71|    224|    }
   72|   941k|    pos_ += sizeof(T);
   73|   941k|    return true;
   74|   941k|  }
_ZN5draco13DecoderBuffer4PeekIjEEbPT_:
   87|   941k|  bool Peek(T *out_val) {
   88|   941k|    const size_t size_to_decode = sizeof(T);
   89|   941k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 224, False: 941k]
  ------------------
   90|    224|      return false;  // Buffer overflow.
   91|    224|    }
   92|   941k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|   941k|    return true;
   94|   941k|  }
_ZN5draco13DecoderBuffer6DecodeIaEEbPT_:
   68|  26.5k|  bool Decode(T *out_val) {
   69|  26.5k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 361, False: 26.2k]
  ------------------
   70|    361|      return false;
   71|    361|    }
   72|  26.2k|    pos_ += sizeof(T);
   73|  26.2k|    return true;
   74|  26.5k|  }
_ZN5draco13DecoderBuffer4PeekIaEEbPT_:
   87|  26.5k|  bool Peek(T *out_val) {
   88|  26.5k|    const size_t size_to_decode = sizeof(T);
   89|  26.5k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 361, False: 26.2k]
  ------------------
   90|    361|      return false;  // Buffer overflow.
   91|    361|    }
   92|  26.2k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  26.2k|    return true;
   94|  26.5k|  }
_ZN5draco13DecoderBuffer6DecodeINS_13HoleEventDataEEEbPT_:
   68|  1.91M|  bool Decode(T *out_val) {
   69|  1.91M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 180, False: 1.91M]
  ------------------
   70|    180|      return false;
   71|    180|    }
   72|  1.91M|    pos_ += sizeof(T);
   73|  1.91M|    return true;
   74|  1.91M|  }
_ZN5draco13DecoderBuffer4PeekINS_13HoleEventDataEEEbPT_:
   87|  1.91M|  bool Peek(T *out_val) {
   88|  1.91M|    const size_t size_to_decode = sizeof(T);
   89|  1.91M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 180, False: 1.91M]
  ------------------
   90|    180|      return false;  // Buffer overflow.
   91|    180|    }
   92|  1.91M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.91M|    return true;
   94|  1.91M|  }
_ZN5draco13DecoderBuffer6DecodeItEEbPT_:
   68|  30.0k|  bool Decode(T *out_val) {
   69|  30.0k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 18, False: 30.0k]
  ------------------
   70|     18|      return false;
   71|     18|    }
   72|  30.0k|    pos_ += sizeof(T);
   73|  30.0k|    return true;
   74|  30.0k|  }
_ZN5draco13DecoderBuffer4PeekItEEbPT_:
   87|  30.0k|  bool Peek(T *out_val) {
   88|  30.0k|    const size_t size_to_decode = sizeof(T);
   89|  30.0k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 18, False: 30.0k]
  ------------------
   90|     18|      return false;  // Buffer overflow.
   91|     18|    }
   92|  30.0k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  30.0k|    return true;
   94|  30.0k|  }
_ZN5draco13DecoderBuffer6DecodeImEEbPT_:
   68|  2.73k|  bool Decode(T *out_val) {
   69|  2.73k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 24, False: 2.70k]
  ------------------
   70|     24|      return false;
   71|     24|    }
   72|  2.70k|    pos_ += sizeof(T);
   73|  2.70k|    return true;
   74|  2.73k|  }
_ZN5draco13DecoderBuffer4PeekImEEbPT_:
   87|  2.73k|  bool Peek(T *out_val) {
   88|  2.73k|    const size_t size_to_decode = sizeof(T);
   89|  2.73k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 24, False: 2.70k]
  ------------------
   90|     24|      return false;  // Buffer overflow.
   91|     24|    }
   92|  2.70k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  2.70k|    return true;
   94|  2.73k|  }
_ZN5draco13DecoderBuffer6DecodeIfEEbPT_:
   68|    224|  bool Decode(T *out_val) {
   69|    224|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 38, False: 186]
  ------------------
   70|     38|      return false;
   71|     38|    }
   72|    186|    pos_ += sizeof(T);
   73|    186|    return true;
   74|    224|  }
_ZN5draco13DecoderBuffer4PeekIfEEbPT_:
   87|    224|  bool Peek(T *out_val) {
   88|    224|    const size_t size_to_decode = sizeof(T);
   89|    224|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 38, False: 186]
  ------------------
   90|     38|      return false;  // Buffer overflow.
   91|     38|    }
   92|    186|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|    186|    return true;
   94|    224|  }

_ZNK5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EE5valueEv:
   73|   113M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EE5valueEv:
   73|   124M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEgeERKj:
   98|  13.9M|  constexpr bool operator>=(const ValueTypeT &val) const {
   99|  13.9M|    return value_ >= val;
  100|  13.9M|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EE5valueEv:
   73|   356M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EE5valueEv:
   73|  4.47G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKj:
   90|  31.2M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEaSERKS2_:
  151|   113M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|   113M|    value_ = i.value_;
  153|   113M|    return *this;
  154|   113M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKS2_:
  151|  55.3M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  55.3M|    value_ = i.value_;
  153|  55.3M|    return *this;
  154|  55.3M|  }
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEppEv:
  102|  31.2M|  inline ThisIndexType &operator++() {
  103|  31.2M|    ++value_;
  104|  31.2M|    return *this;
  105|  31.2M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEeqERKS2_:
   75|  3.25G|  constexpr bool operator==(const IndexType &i) const {
   76|  3.25G|    return value_ == i.value_;
   77|  3.25G|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EE5valueEv:
   73|  1.30G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKS2_:
   87|  13.0k|  constexpr bool operator<(const IndexType &i) const {
   88|  13.0k|    return value_ < i.value_;
   89|  13.0k|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEeqERKS2_:
   75|   194M|  constexpr bool operator==(const IndexType &i) const {
   76|   194M|    return value_ == i.value_;
   77|   194M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEmiERKj:
  131|   215M|  constexpr ThisIndexType operator-(const ValueTypeT &val) const {
  132|   215M|    return ThisIndexType(value_ - val);
  133|   215M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEplERKj:
  125|  1.07G|  constexpr ThisIndexType operator+(const ValueTypeT &val) const {
  126|  1.07G|    return ThisIndexType(value_ + val);
  127|  1.07G|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEeqERKS2_:
   75|  27.0M|  constexpr bool operator==(const IndexType &i) const {
   76|  27.0M|    return value_ == i.value_;
   77|  27.0M|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEneERKS2_:
   81|   362M|  constexpr bool operator!=(const IndexType &i) const {
   82|   362M|    return value_ != i.value_;
   83|   362M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEneERKS2_:
   81|   478M|  constexpr bool operator!=(const IndexType &i) const {
   82|   478M|    return value_ != i.value_;
   83|   478M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEppEv:
  102|   727M|  inline ThisIndexType &operator++() {
  103|   727M|    ++value_;
  104|   727M|    return *this;
  105|   727M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEaSERKS2_:
  151|   630M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|   630M|    value_ = i.value_;
  153|   630M|    return *this;
  154|   630M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEaSERKS2_:
  151|  1.53G|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  1.53G|    value_ = i.value_;
  153|  1.53G|    return *this;
  154|  1.53G|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEgeERKj:
   98|  52.0M|  constexpr bool operator>=(const ValueTypeT &val) const {
   99|  52.0M|    return value_ >= val;
  100|  52.0M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEltERKj:
   90|  11.7M|  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|  35.5G|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2Ej:
   71|   273M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2ERKS2_:
   70|  28.7G|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ev:
   69|   336M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEplERKj:
  125|  25.2M|  constexpr ThisIndexType operator+(const ValueTypeT &val) const {
  126|  25.2M|    return ThisIndexType(value_ + val);
  127|  25.2M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2Ej:
   71|   219M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKS2_:
   87|  32.4M|  constexpr bool operator<(const IndexType &i) const {
   88|  32.4M|    return value_ < i.value_;
   89|  32.4M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2ERKS2_:
   70|   278M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ev:
   69|  55.4M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2ERKS2_:
   70|  85.7M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2Ej:
   71|  87.3M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2ERKS2_:
   70|   329M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEaSERKS2_:
  151|  6.21M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  6.21M|    value_ = i.value_;
  153|  6.21M|    return *this;
  154|  6.21M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEpLERKj:
  139|  11.7M|  inline ThisIndexType operator+=(const ValueTypeT &val) {
  140|  11.7M|    value_ += val;
  141|  11.7M|    return *this;
  142|  11.7M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKj:
  155|  41.7M|  inline ThisIndexType &operator=(const ValueTypeT &val) {
  156|  41.7M|    value_ = val;
  157|  41.7M|    return *this;
  158|  41.7M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ej:
   71|  13.6M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKj:
   90|  7.77M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEppEv:
  102|  7.76M|  inline ThisIndexType &operator++() {
  103|  7.76M|    ++value_;
  104|  7.76M|    return *this;
  105|  7.76M|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEltERKj:
   90|  26.9M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEppEv:
  102|  26.9M|  inline ThisIndexType &operator++() {
  103|  26.9M|    ++value_;
  104|  26.9M|    return *this;
  105|  26.9M|  }

_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   73|  45.1M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  45.1M|    return vector_[index.value()];
   75|  45.1M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE4sizeEv:
   59|  26.9M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE5clearEv:
   48|  10.9k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE6resizeEmRKS5_:
   51|  21.3k|  void resize(size_t size, const ValueTypeT &val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   70|  79.0M|  inline reference operator[](const IndexTypeT &index) {
   71|  79.0M|    return vector_[index.value()];
   72|  79.0M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE9push_backERKS8_:
   62|  6.34k|  void push_back(const ValueTypeT &val) { vector_.push_back(val); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE4sizeEv:
   59|  27.8M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE6resizeEmRKS8_:
   51|  5.57k|  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|  13.9M|  inline reference operator[](const IndexTypeT &index) {
   71|  13.9M|    return vector_[index.value()];
   72|  13.9M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEixERKS3_:
   73|  31.5M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  31.5M|    return vector_[index.value()];
   75|  31.5M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE4sizeEv:
   59|   279M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE4sizeEv:
   59|  14.4M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   73|   433M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|   433M|    return vector_[index.value()];
   75|   433M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   73|  1.15G|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  1.15G|    return vector_[index.value()];
   75|  1.15G|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   70|   587M|  inline reference operator[](const IndexTypeT &index) {
   71|   587M|    return vector_[index.value()];
   72|   587M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   73|  89.2M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  89.2M|    return vector_[index.value()];
   75|  89.2M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   70|   507M|  inline reference operator[](const IndexTypeT &index) {
   71|   507M|    return vector_[index.value()];
   72|   507M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE9push_backERKS5_:
   62|   145M|  void push_back(const ValueTypeT &val) { vector_.push_back(val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   70|   331M|  inline reference operator[](const IndexTypeT &index) {
   71|   331M|    return vector_[index.value()];
   72|   331M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE6resizeEmRKi:
   51|  3.08k|  void resize(size_t size, const ValueTypeT &val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEixERKS3_:
   70|   250M|  inline reference operator[](const IndexTypeT &index) {
   71|   250M|    return vector_[index.value()];
   72|   250M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEC2Ev:
   39|  73.5k|  IndexTypeVector() {}
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4sizeEv:
   59|  3.15M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaEC2Ev:
   39|  69.3k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEC2Ev:
   39|  9.43k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EC2Ev:
   39|  9.43k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEC2Ev:
   39|  9.43k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_EC2Ev:
   39|  9.43k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE5clearEv:
   48|  18.3k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4swapERS4_:
   55|  18.3k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT> &arg) {
   56|  18.3k|    vector_.swap(arg.vector_);
   57|  18.3k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE5clearEv:
   48|  18.3k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE4swapERS4_:
   55|  18.3k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT> &arg) {
   56|  18.3k|    vector_.swap(arg.vector_);
   57|  18.3k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE6assignEmRKS5_:
   52|  9.43k|  void assign(size_t size, const ValueTypeT &val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_E6assignEmRKS3_:
   52|  9.43k|  void assign(size_t size, const ValueTypeT &val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE7reserveEm:
   49|  9.43k|  void reserve(size_t size) { vector_.reserve(size); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEC2Ev:
   39|  13.4k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEC2Ev:
   39|  32.9k|  IndexTypeVector() {}

_ZN5draco14DataTypeLengthENS_8DataTypeE:
   19|  64.0k|int32_t DataTypeLength(DataType dt) {
   20|  64.0k|  switch (dt) {
   21|  19.8k|    case DT_INT8:
  ------------------
  |  Branch (21:5): [True: 19.8k, False: 44.1k]
  ------------------
   22|  22.8k|    case DT_UINT8:
  ------------------
  |  Branch (22:5): [True: 2.97k, False: 61.0k]
  ------------------
   23|  22.8k|      return 1;
   24|  2.96k|    case DT_INT16:
  ------------------
  |  Branch (24:5): [True: 2.96k, False: 61.0k]
  ------------------
   25|  3.32k|    case DT_UINT16:
  ------------------
  |  Branch (25:5): [True: 353, False: 63.6k]
  ------------------
   26|  3.32k|      return 2;
   27|  30.3k|    case DT_INT32:
  ------------------
  |  Branch (27:5): [True: 30.3k, False: 33.6k]
  ------------------
   28|  31.5k|    case DT_UINT32:
  ------------------
  |  Branch (28:5): [True: 1.16k, False: 62.8k]
  ------------------
   29|  31.5k|      return 4;
   30|    588|    case DT_INT64:
  ------------------
  |  Branch (30:5): [True: 588, False: 63.4k]
  ------------------
   31|  1.01k|    case DT_UINT64:
  ------------------
  |  Branch (31:5): [True: 424, False: 63.5k]
  ------------------
   32|  1.01k|      return 8;
   33|  4.51k|    case DT_FLOAT32:
  ------------------
  |  Branch (33:5): [True: 4.51k, False: 59.4k]
  ------------------
   34|  4.51k|      return 4;
   35|    207|    case DT_FLOAT64:
  ------------------
  |  Branch (35:5): [True: 207, False: 63.7k]
  ------------------
   36|    207|      return 8;
   37|    554|    case DT_BOOL:
  ------------------
  |  Branch (37:5): [True: 554, False: 63.4k]
  ------------------
   38|    554|      return 1;
   39|      0|    default:
  ------------------
  |  Branch (39:5): [True: 0, False: 64.0k]
  ------------------
   40|      0|      return -1;
   41|  64.0k|  }
   42|  64.0k|}

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

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

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

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

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

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

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

_ZN5draco12DecodeVarintIjEEbPT_PNS_13DecoderBufferE:
   63|   598k|bool DecodeVarint(IntTypeT *out_val, DecoderBuffer *buffer) {
   64|   598k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 598k, Folded]
  ------------------
   65|   598k|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 1.52k, False: 596k]
  ------------------
   66|  1.52k|      return false;
   67|  1.52k|    }
   68|   598k|  } 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|   596k|  return true;
   77|   598k|}
mesh_edgebreaker_decoder_impl.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   238k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|   238k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   238k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 125, False: 238k]
  ------------------
   33|    125|    return false;
   34|    125|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   238k|  uint8_t in;
   39|   238k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 959, False: 237k]
  ------------------
   40|    959|    return false;
   41|    959|  }
   42|   237k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 17.6k, False: 219k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  17.6k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 726, False: 16.9k]
  ------------------
   45|    726|      return false;
   46|    726|    }
   47|       |    // Append decoded info from this byte.
   48|  16.9k|    *out_val <<= 7;
   49|  16.9k|    *out_val |= in & ((1 << 7) - 1);
   50|   219k|  } else {
   51|       |    // Last byte reached
   52|   219k|    *out_val = in;
   53|   219k|  }
   54|   236k|  return true;
   55|   237k|}
mesh_sequential_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  8.05k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  8.05k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  8.05k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 0, False: 8.05k]
  ------------------
   33|      0|    return false;
   34|      0|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  8.05k|  uint8_t in;
   39|  8.05k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 12, False: 8.04k]
  ------------------
   40|     12|    return false;
   41|     12|  }
   42|  8.04k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 643, False: 7.40k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    643|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 4, False: 639]
  ------------------
   45|      4|      return false;
   46|      4|    }
   47|       |    // Append decoded info from this byte.
   48|    639|    *out_val <<= 7;
   49|    639|    *out_val |= in & ((1 << 7) - 1);
   50|  7.40k|  } else {
   51|       |    // Last byte reached
   52|  7.40k|    *out_val = in;
   53|  7.40k|  }
   54|  8.04k|  return true;
   55|  8.04k|}
_ZN5draco12DecodeVarintImEEbPT_PNS_13DecoderBufferE:
   63|  9.23k|bool DecodeVarint(IntTypeT *out_val, DecoderBuffer *buffer) {
   64|  9.23k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 9.23k, Folded]
  ------------------
   65|  9.23k|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 146, False: 9.09k]
  ------------------
   66|    146|      return false;
   67|    146|    }
   68|  9.23k|  } else {
   69|       |    // IntTypeT is a signed value. Decode the symbol and convert to signed.
   70|      0|    typename std::make_unsigned<IntTypeT>::type symbol;
   71|      0|    if (!DecodeVarintUnsigned(1, &symbol, buffer)) {
  ------------------
  |  Branch (71:9): [True: 0, False: 0]
  ------------------
   72|      0|      return false;
   73|      0|    }
   74|      0|    *out_val = ConvertSymbolToSignedInt(symbol);
   75|      0|  }
   76|  9.09k|  return true;
   77|  9.23k|}
decoder_buffer.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  5.36k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  5.36k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  5.36k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 0, False: 5.36k]
  ------------------
   33|      0|    return false;
   34|      0|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  5.36k|  uint8_t in;
   39|  5.36k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 22, False: 5.34k]
  ------------------
   40|     22|    return false;
   41|     22|  }
   42|  5.34k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 151, False: 5.19k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    151|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 1, False: 150]
  ------------------
   45|      1|      return false;
   46|      1|    }
   47|       |    // Append decoded info from this byte.
   48|    150|    *out_val <<= 7;
   49|    150|    *out_val |= in & ((1 << 7) - 1);
   50|  5.19k|  } else {
   51|       |    // Last byte reached
   52|  5.19k|    *out_val = in;
   53|  5.19k|  }
   54|  5.34k|  return true;
   55|  5.34k|}
metadata_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   309k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|   309k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   309k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 15, False: 309k]
  ------------------
   33|     15|    return false;
   34|     15|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   309k|  uint8_t in;
   39|   309k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 102, False: 309k]
  ------------------
   40|    102|    return false;
   41|    102|  }
   42|   309k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.70k, False: 307k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.70k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 94, False: 1.60k]
  ------------------
   45|     94|      return false;
   46|     94|    }
   47|       |    // Append decoded info from this byte.
   48|  1.60k|    *out_val <<= 7;
   49|  1.60k|    *out_val |= in & ((1 << 7) - 1);
   50|   307k|  } else {
   51|       |    // Last byte reached
   52|   307k|    *out_val = in;
   53|   307k|  }
   54|   309k|  return true;
   55|   309k|}
sequential_integer_attribute_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  4.83k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  4.83k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  4.83k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 3, False: 4.83k]
  ------------------
   33|      3|    return false;
   34|      3|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  4.83k|  uint8_t in;
   39|  4.83k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 38, False: 4.79k]
  ------------------
   40|     38|    return false;
   41|     38|  }
   42|  4.79k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 966, False: 3.82k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    966|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 49, False: 917]
  ------------------
   45|     49|      return false;
   46|     49|    }
   47|       |    // Append decoded info from this byte.
   48|    917|    *out_val <<= 7;
   49|    917|    *out_val |= in & ((1 << 7) - 1);
   50|  3.82k|  } else {
   51|       |    // Last byte reached
   52|  3.82k|    *out_val = in;
   53|  3.82k|  }
   54|  4.74k|  return true;
   55|  4.79k|}
rans_bit_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  21.9k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  21.9k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  21.9k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 4, False: 21.9k]
  ------------------
   33|      4|    return false;
   34|      4|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  21.9k|  uint8_t in;
   39|  21.9k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 28, False: 21.9k]
  ------------------
   40|     28|    return false;
   41|     28|  }
   42|  21.9k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 246, False: 21.6k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    246|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 22, False: 224]
  ------------------
   45|     22|      return false;
   46|     22|    }
   47|       |    // Append decoded info from this byte.
   48|    224|    *out_val <<= 7;
   49|    224|    *out_val |= in & ((1 << 7) - 1);
   50|  21.6k|  } else {
   51|       |    // Last byte reached
   52|  21.6k|    *out_val = in;
   53|  21.6k|  }
   54|  21.8k|  return true;
   55|  21.9k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  9.96k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  9.96k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  9.96k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 115, False: 9.84k]
  ------------------
   33|    115|    return false;
   34|    115|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  9.84k|  uint8_t in;
   39|  9.84k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 96, False: 9.75k]
  ------------------
   40|     96|    return false;
   41|     96|  }
   42|  9.75k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 2.46k, False: 7.28k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  2.46k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 618, False: 1.84k]
  ------------------
   45|    618|      return false;
   46|    618|    }
   47|       |    // Append decoded info from this byte.
   48|  1.84k|    *out_val <<= 7;
   49|  1.84k|    *out_val |= in & ((1 << 7) - 1);
   50|  7.28k|  } else {
   51|       |    // Last byte reached
   52|  7.28k|    *out_val = in;
   53|  7.28k|  }
   54|  9.13k|  return true;
   55|  9.75k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  8.17k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  8.17k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  8.17k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 81, False: 8.09k]
  ------------------
   33|     81|    return false;
   34|     81|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  8.09k|  uint8_t in;
   39|  8.09k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 43, False: 8.05k]
  ------------------
   40|     43|    return false;
   41|     43|  }
   42|  8.05k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 4.15k, False: 3.89k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  4.15k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 891, False: 3.26k]
  ------------------
   45|    891|      return false;
   46|    891|    }
   47|       |    // Append decoded info from this byte.
   48|  3.26k|    *out_val <<= 7;
   49|  3.26k|    *out_val |= in & ((1 << 7) - 1);
   50|  3.89k|  } else {
   51|       |    // Last byte reached
   52|  3.89k|    *out_val = in;
   53|  3.89k|  }
   54|  7.16k|  return true;
   55|  8.05k|}
attributes_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  30.9k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  30.9k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  30.9k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 7, False: 30.9k]
  ------------------
   33|      7|    return false;
   34|      7|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  30.9k|  uint8_t in;
   39|  30.9k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 24, False: 30.9k]
  ------------------
   40|     24|    return false;
   41|     24|  }
   42|  30.9k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.32k, False: 29.6k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.32k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 45, False: 1.27k]
  ------------------
   45|     45|      return false;
   46|     45|    }
   47|       |    // Append decoded info from this byte.
   48|  1.27k|    *out_val <<= 7;
   49|  1.27k|    *out_val |= in & ((1 << 7) - 1);
   50|  29.6k|  } else {
   51|       |    // Last byte reached
   52|  29.6k|    *out_val = in;
   53|  29.6k|  }
   54|  30.9k|  return true;
   55|  30.9k|}

_ZNK5draco7VectorDIfLi3EEixEi:
  113|   356k|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIfLi3EEixEi:
  112|   466k|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIfLi3EEmiERKS1_:
  137|  38.8k|  Self operator-(const Self &o) const {
  138|  38.8k|    Self ret;
  139|   155k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 116k, False: 38.8k]
  ------------------
  140|   116k|      ret[i] = (*this)[i] - o[i];
  141|   116k|    }
  142|  38.8k|    return ret;
  143|  38.8k|  }
_ZN5draco7VectorDIfLi3EEC2Ev:
   40|  96.8k|  VectorD() {
   41|   387k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 290k, False: 96.8k]
  ------------------
   42|   290k|      (*this)[i] = Scalar(0);
   43|   290k|    }
   44|  96.8k|  }
_ZNK5draco7VectorDIlLi3EEixEi:
  113|   177M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIlLi3EEmiERKS1_:
  137|  14.7M|  Self operator-(const Self &o) const {
  138|  14.7M|    Self ret;
  139|  59.0M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 44.3M, False: 14.7M]
  ------------------
  140|  44.3M|      ret[i] = (*this)[i] - o[i];
  141|  44.3M|    }
  142|  14.7M|    return ret;
  143|  14.7M|  }
_ZN5draco12CrossProductIlEENS_7VectorDIT_Li3EEERKS3_S5_:
  318|  7.35M|                                 const VectorD<ScalarT, 3> &v) {
  319|       |  // Preventing accidental use with uint32_t and the like.
  320|  7.35M|  static_assert(std::is_signed<ScalarT>::value,
  321|  7.35M|                "ScalarT must be a signed type. ");
  322|  7.35M|  VectorD<ScalarT, 3> r;
  323|  7.35M|  r[0] = (u[1] * v[2]) - (u[2] * v[1]);
  324|  7.35M|  r[1] = (u[2] * v[0]) - (u[0] * v[2]);
  325|  7.35M|  r[2] = (u[0] * v[1]) - (u[1] * v[0]);
  326|  7.35M|  return r;
  327|  7.35M|}
_ZN5draco7VectorDIlLi3EE4dataEv:
  282|  7.35M|  Scalar *data() { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE4dataEv:
  283|  7.35M|  const Scalar *data() const { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE6AbsSumEv:
  237|  3.24M|  Scalar AbsSum() const {
  238|  3.24M|    Scalar result(0);
  239|  12.9M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (239:21): [True: 9.73M, False: 3.23M]
  ------------------
  240|  9.73M|      Scalar next_value = std::abs(v_[i]);
  241|  9.73M|      if (result > std::numeric_limits<Scalar>::max() - next_value) {
  ------------------
  |  Branch (241:11): [True: 11.2k, False: 9.72M]
  ------------------
  242|       |        // Return the max if adding would have caused an overflow.
  243|  11.2k|        return std::numeric_limits<Scalar>::max();
  244|  11.2k|      }
  245|  9.72M|      result += next_value;
  246|  9.72M|    }
  247|  3.23M|    return result;
  248|  3.24M|  }
_ZNK5draco7VectorDIlLi3EEdvERKl:
  182|   185k|  Self operator/(const Scalar &o) const {
  183|   185k|    Self ret;
  184|   742k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (184:21): [True: 557k, False: 185k]
  ------------------
  185|   557k|      ret[i] = (*this)[i] / o;
  186|   557k|    }
  187|   185k|    return ret;
  188|   185k|  }
_ZN5draco7VectorDIlLi3EEixEi:
  112|   225M|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEixEi:
  112|  12.2M|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EE4dataEv:
  282|  9.74M|  Scalar *data() { return &(v_[0]); }
_ZNK5draco7VectorDIiLi3EEngEv:
  120|  2.04M|  Self operator-() const {
  121|  2.04M|    Self ret;
  122|  8.16M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (122:21): [True: 6.12M, False: 2.04M]
  ------------------
  123|  6.12M|      ret[i] = -(*this)[i];
  124|  6.12M|    }
  125|  2.04M|    return ret;
  126|  2.04M|  }
_ZNK5draco7VectorDIiLi3EEixEi:
  113|  6.12M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEmiERKS1_:
  137|  1.46M|  Self operator-(const Self &o) const {
  138|  1.46M|    Self ret;
  139|  4.39M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 2.93M, False: 1.46M]
  ------------------
  140|  2.93M|      ret[i] = (*this)[i] - o[i];
  141|  2.93M|    }
  142|  1.46M|    return ret;
  143|  1.46M|  }
_ZN5draco7VectorDIjLi2EEixEi:
  112|  17.5M|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEixEi:
  113|  26.3M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIiLi2EEixEi:
  112|  52.4M|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEplERKS1_:
  129|  2.93M|  Self operator+(const Self &o) const {
  130|  2.93M|    Self ret;
  131|  8.79M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 5.86M, False: 2.93M]
  ------------------
  132|  5.86M|      ret[i] = (*this)[i] + o[i];
  133|  5.86M|    }
  134|  2.93M|    return ret;
  135|  2.93M|  }
_ZNK5draco7VectorDIiLi2EEixEi:
  113|  50.1M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIiLi2EEmiERKS1_:
  137|  1.46M|  Self operator-(const Self &o) const {
  138|  1.46M|    Self ret;
  139|  4.39M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 2.92M, False: 1.46M]
  ------------------
  140|  2.92M|      ret[i] = (*this)[i] - o[i];
  141|  2.92M|    }
  142|  1.46M|    return ret;
  143|  1.46M|  }
_ZNK5draco7VectorDIiLi2EEplERKS1_:
  129|  1.46M|  Self operator+(const Self &o) const {
  130|  1.46M|    Self ret;
  131|  4.39M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 2.92M, False: 1.46M]
  ------------------
  132|  2.92M|      ret[i] = (*this)[i] + o[i];
  133|  2.92M|    }
  134|  1.46M|    return ret;
  135|  1.46M|  }
_ZNK5draco7VectorDIfLi2EEeqERKS1_:
  206|   533k|  bool operator==(const Self &o) const {
  207|  1.56M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (207:21): [True: 1.04M, False: 514k]
  ------------------
  208|  1.04M|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (208:11): [True: 19.1k, False: 1.02M]
  ------------------
  209|  19.1k|        return false;
  210|  19.1k|      }
  211|  1.04M|    }
  212|   514k|    return true;
  213|   533k|  }
_ZNK5draco7VectorDIfLi2EEixEi:
  113|  6.26M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIfLi3EE11SquaredNormEv:
  234|  19.7k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIfLi3EE3DotERKS1_:
  250|  20.2k|  Scalar Dot(const Self &o) const {
  251|  20.2k|    Scalar ret(0);
  252|  81.1k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (252:21): [True: 60.8k, False: 20.2k]
  ------------------
  253|  60.8k|      ret += (*this)[i] * o[i];
  254|  60.8k|    }
  255|  20.2k|    return ret;
  256|  20.2k|  }
_ZNK5draco7VectorDIfLi3EEmlERKf:
  174|    581|  Self operator*(const Scalar &o) const {
  175|    581|    Self ret;
  176|  2.32k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 1.74k, False: 581]
  ------------------
  177|  1.74k|      ret[i] = (*this)[i] * o;
  178|  1.74k|    }
  179|    581|    return ret;
  180|    581|  }
_ZNK5draco7VectorDIfLi2EEmiERKS1_:
  137|  19.1k|  Self operator-(const Self &o) const {
  138|  19.1k|    Self ret;
  139|  57.3k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 38.2k, False: 19.1k]
  ------------------
  140|  38.2k|      ret[i] = (*this)[i] - o[i];
  141|  38.2k|    }
  142|  19.1k|    return ret;
  143|  19.1k|  }
_ZN5draco7VectorDIfLi2EEC2Ev:
   40|  38.2k|  VectorD() {
   41|   114k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 76.5k, False: 38.2k]
  ------------------
   42|  76.5k|      (*this)[i] = Scalar(0);
   43|  76.5k|    }
   44|  38.2k|  }
_ZN5draco7VectorDIfLi2EEC2ERKfS3_:
   52|  1.08M|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|  1.08M|    DRACO_DCHECK_EQ(dimension, 2);
   54|  1.08M|    v_[0] = c0;
   55|  1.08M|    v_[1] = c1;
   56|  1.08M|  }
_ZN5draco7VectorDIfLi2EEixEi:
  112|   152k|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIlLi2EEeqERKS1_:
  206|   430k|  bool operator==(const Self &o) const {
  207|  1.19M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (207:21): [True: 812k, False: 379k]
  ------------------
  208|   812k|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (208:11): [True: 50.8k, False: 761k]
  ------------------
  209|  50.8k|        return false;
  210|  50.8k|      }
  211|   812k|    }
  212|   379k|    return true;
  213|   430k|  }
_ZNK5draco7VectorDIlLi2EEixEi:
  113|  2.44M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIlLi3EEC2Ev:
   40|  43.6M|  VectorD() {
   41|   174M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 131M, False: 43.6M]
  ------------------
   42|   131M|      (*this)[i] = Scalar(0);
   43|   131M|    }
   44|  43.6M|  }
_ZNK5draco7VectorDIlLi3EE11SquaredNormEv:
  234|  53.5k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIlLi3EE3DotERKS1_:
  250|  56.4k|  Scalar Dot(const Self &o) const {
  251|  56.4k|    Scalar ret(0);
  252|   225k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (252:21): [True: 169k, False: 56.4k]
  ------------------
  253|   169k|      ret += (*this)[i] * o[i];
  254|   169k|    }
  255|  56.4k|    return ret;
  256|  56.4k|  }
_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|  }
_ZN5draco7VectorDImLi2EEC2IlLi2EEERKNS0_IT_XT0_EEE:
  102|  11.0k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  33.2k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 22.1k, False: 11.0k]
  ------------------
  104|  22.1k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 22.1k, False: 0]
  ------------------
  105|  22.1k|        v_[i] = Scalar(src_vector[i]);
  106|  22.1k|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  22.1k|    }
  110|  11.0k|  }
_ZNK5draco7VectorDImLi2EEmlERKm:
  174|  2.79k|  Self operator*(const Scalar &o) const {
  175|  2.79k|    Self ret;
  176|  8.39k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 5.59k, False: 2.79k]
  ------------------
  177|  5.59k|      ret[i] = (*this)[i] * o;
  178|  5.59k|    }
  179|  2.79k|    return ret;
  180|  2.79k|  }
_ZN5draco7VectorDImLi2EEC2Ev:
   40|  11.1k|  VectorD() {
   41|  33.4k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 22.2k, False: 11.1k]
  ------------------
   42|  22.2k|      (*this)[i] = Scalar(0);
   43|  22.2k|    }
   44|  11.1k|  }
_ZNK5draco7VectorDImLi2EEixEi:
  113|  50.0k|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDImLi2EEixEi:
  112|  44.5k|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDImLi2EEplERKS1_:
  129|  3.62k|  Self operator+(const Self &o) const {
  130|  3.62k|    Self ret;
  131|  10.8k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 7.25k, False: 3.62k]
  ------------------
  132|  7.25k|      ret[i] = (*this)[i] + o[i];
  133|  7.25k|    }
  134|  3.62k|    return ret;
  135|  3.62k|  }
_ZN5draco7VectorDImLi2EEC2ERKmS3_:
   52|  2.79k|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|  2.79k|    DRACO_DCHECK_EQ(dimension, 2);
   54|  2.79k|    v_[0] = c0;
   55|  2.79k|    v_[1] = c1;
   56|  2.79k|  }
_ZNK5draco7VectorDImLi2EEmlERKS1_:
  145|  2.79k|  Self operator*(const Self &o) const {
  146|  2.79k|    Self ret;
  147|  8.39k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (147:21): [True: 5.59k, False: 2.79k]
  ------------------
  148|  5.59k|      ret[i] = (*this)[i] * o[i];
  149|  5.59k|    }
  150|  2.79k|    return ret;
  151|  2.79k|  }
_ZN5draco7VectorDIlLi2EEC2ImLi2EEERKNS0_IT_XT0_EEE:
  102|  5.54k|  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.54k]
  ------------------
  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.54k|  }
_ZNK5draco7VectorDIlLi3EEplERKS1_:
  129|  2.75k|  Self operator+(const Self &o) const {
  130|  2.75k|    Self ret;
  131|  11.0k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 8.26k, False: 2.75k]
  ------------------
  132|  8.26k|      ret[i] = (*this)[i] + o[i];
  133|  8.26k|    }
  134|  2.75k|    return ret;
  135|  2.75k|  }
_ZN5dracomlIlLi3EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  292|  2.75k|    const ScalarT &o, const VectorD<ScalarT, dimension_t> &v) {
  293|  2.75k|  return v * o;
  294|  2.75k|}
_ZNK5draco7VectorDIlLi3EEmlERKl:
  174|  2.75k|  Self operator*(const Scalar &o) const {
  175|  2.75k|    Self ret;
  176|  11.0k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 8.26k, False: 2.75k]
  ------------------
  177|  8.26k|      ret[i] = (*this)[i] * o;
  178|  8.26k|    }
  179|  2.75k|    return ret;
  180|  2.75k|  }
_ZN5draco7VectorDIlLi2EEC2ERKlS3_:
   52|   863k|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|   863k|    DRACO_DCHECK_EQ(dimension, 2);
   54|   863k|    v_[0] = c0;
   55|   863k|    v_[1] = c1;
   56|   863k|  }
_ZNK5draco7VectorDIlLi2EEmlERKl:
  174|  2.75k|  Self operator*(const Scalar &o) const {
  175|  2.75k|    Self ret;
  176|  8.26k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 5.50k, False: 2.75k]
  ------------------
  177|  5.50k|      ret[i] = (*this)[i] * o;
  178|  5.50k|    }
  179|  2.75k|    return ret;
  180|  2.75k|  }
_ZN5draco7VectorDIlLi2EEC2Ev:
   40|  11.1k|  VectorD() {
   41|  33.5k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 22.3k, False: 11.1k]
  ------------------
   42|  22.3k|      (*this)[i] = Scalar(0);
   43|  22.3k|    }
   44|  11.1k|  }
_ZNK5draco7VectorDIlLi2EEdvERKl:
  182|  2.74k|  Self operator/(const Scalar &o) const {
  183|  2.74k|    Self ret;
  184|  8.22k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (184:21): [True: 5.48k, False: 2.74k]
  ------------------
  185|  5.48k|      ret[i] = (*this)[i] / o;
  186|  5.48k|    }
  187|  2.74k|    return ret;
  188|  2.74k|  }
_ZNK5draco7VectorDImLi2EEmiERKS1_:
  137|  1.91k|  Self operator-(const Self &o) const {
  138|  1.91k|    Self ret;
  139|  5.73k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 3.82k, False: 1.91k]
  ------------------
  140|  3.82k|      ret[i] = (*this)[i] - o[i];
  141|  3.82k|    }
  142|  1.91k|    return ret;
  143|  1.91k|  }
_ZN5draco7VectorDIlLi2EEixEi:
  112|  44.6k|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEC2Ev:
   40|  2.04M|  VectorD() {
   41|  8.16M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 6.12M, False: 2.04M]
  ------------------
   42|  6.12M|      (*this)[i] = Scalar(0);
   43|  6.12M|    }
   44|  2.04M|  }
_ZN5draco7VectorDIiLi2EEC2ERKiS3_:
   52|  10.3M|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|  10.3M|    DRACO_DCHECK_EQ(dimension, 2);
   54|  10.3M|    v_[0] = c0;
   55|  10.3M|    v_[1] = c1;
   56|  10.3M|  }
_ZN5draco7VectorDIjLi2EEC2IiLi2EEERKNS0_IT_XT0_EEE:
  102|  8.79M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  26.3M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 17.5M, False: 8.79M]
  ------------------
  104|  17.5M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 17.5M, False: 0]
  ------------------
  105|  17.5M|        v_[i] = Scalar(src_vector[i]);
  106|  17.5M|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  17.5M|    }
  110|  8.79M|  }
_ZN5draco7VectorDIjLi2EEC2Ev:
   40|  4.39M|  VectorD() {
   41|  13.1M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 8.79M, False: 4.39M]
  ------------------
   42|  8.79M|      (*this)[i] = Scalar(0);
   43|  8.79M|    }
   44|  4.39M|  }
_ZN5draco7VectorDIiLi2EEC2IjLi2EEERKNS0_IT_XT0_EEE:
  102|  4.39M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  13.1M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 8.79M, False: 4.39M]
  ------------------
  104|  8.79M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 8.79M, False: 0]
  ------------------
  105|  8.79M|        v_[i] = Scalar(src_vector[i]);
  106|  8.79M|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  8.79M|    }
  110|  4.39M|  }
_ZN5draco7VectorDIiLi2EEC2ERKS1_:
   88|  5.99M|  VectorD(const Self &o) {
   89|  17.9M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (89:21): [True: 11.9M, False: 5.99M]
  ------------------
   90|  11.9M|      (*this)[i] = o[i];
   91|  11.9M|    }
   92|  5.99M|  }
_ZN5draco7VectorDIiLi2EEC2Ev:
   40|  2.92M|  VectorD() {
   41|  8.78M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 5.85M, False: 2.92M]
  ------------------
   42|  5.85M|      (*this)[i] = Scalar(0);
   43|  5.85M|    }
   44|  2.92M|  }

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

_ZNK5draco11CornerTable12num_verticesEv:
   73|   133M|  inline int num_vertices() const {
   74|   133M|    return static_cast<int>(vertex_corners_.size());
   75|   133M|  }
_ZNK5draco11CornerTable11num_cornersEv:
   76|  11.7M|  inline int num_corners() const {
   77|  11.7M|    return static_cast<int>(corner_to_vertex_map_.size());
   78|  11.7M|  }
_ZNK5draco11CornerTable9num_facesEv:
   79|  2.69M|  inline int num_faces() const {
   80|  2.69M|    return static_cast<int>(corner_to_vertex_map_.size() / 3);
   81|  2.69M|  }
_ZNK5draco11CornerTable8OppositeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   83|   433M|  inline CornerIndex Opposite(CornerIndex corner) const {
   84|   433M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (84:9): [True: 0, False: 433M]
  ------------------
   85|      0|      return corner;
   86|      0|    }
   87|   433M|    return opposite_corners_[corner];
   88|   433M|  }
_ZNK5draco11CornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   89|   746M|  inline CornerIndex Next(CornerIndex corner) const {
   90|   746M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (90:9): [True: 18.3M, False: 727M]
  ------------------
   91|  18.3M|      return corner;
   92|  18.3M|    }
   93|   727M|    return LocalIndex(++corner) ? corner : corner - 3;
  ------------------
  |  Branch (93:12): [True: 664M, False: 63.0M]
  ------------------
   94|   746M|  }
_ZNK5draco11CornerTable8PreviousENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   95|   603M|  inline CornerIndex Previous(CornerIndex corner) const {
   96|   603M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (96:9): [True: 7.67M, False: 595M]
  ------------------
   97|  7.67M|      return corner;
   98|  7.67M|    }
   99|   595M|    return LocalIndex(corner) ? corner - 1 : corner + 2;
  ------------------
  |  Branch (99:12): [True: 152M, False: 443M]
  ------------------
  100|   603M|  }
_ZNK5draco11CornerTable6VertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  1.15G|  inline VertexIndex Vertex(CornerIndex corner) const {
  102|  1.15G|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (102:9): [True: 0, False: 1.15G]
  ------------------
  103|      0|      return kInvalidVertexIndex;
  104|      0|    }
  105|  1.15G|    return ConfidentVertex(corner);
  106|  1.15G|  }
_ZNK5draco11CornerTable15ConfidentVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  1.15G|  inline VertexIndex ConfidentVertex(CornerIndex corner) const {
  108|  1.15G|    DRACO_DCHECK_GE(corner.value(), 0);
  109|  1.15G|    DRACO_DCHECK_LT(corner.value(), num_corners());
  110|  1.15G|    return corner_to_vertex_map_[corner];
  111|  1.15G|  }
_ZNK5draco11CornerTable4FaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  112|  43.4M|  inline FaceIndex Face(CornerIndex corner) const {
  113|  43.4M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (113:9): [True: 0, False: 43.4M]
  ------------------
  114|      0|      return kInvalidFaceIndex;
  115|      0|    }
  116|  43.4M|    return FaceIndex(corner.value() / 3);
  117|  43.4M|  }
_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|  89.2M|  inline CornerIndex LeftMostCorner(VertexIndex v) const {
  151|  89.2M|    return vertex_corners_[v];
  152|  89.2M|  }
_ZNK5draco11CornerTable12IsOnBoundaryENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  185|   793k|  inline bool IsOnBoundary(VertexIndex vert) const {
  186|   793k|    const CornerIndex corner = LeftMostCorner(vert);
  187|   793k|    if (SwingLeft(corner) == kInvalidCornerIndex) {
  ------------------
  |  Branch (187:9): [True: 21.2k, False: 772k]
  ------------------
  188|  21.2k|      return true;
  189|  21.2k|    }
  190|   772k|    return false;
  191|   793k|  }
_ZNK5draco11CornerTable10SwingRightENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  200|  88.0M|  inline CornerIndex SwingRight(CornerIndex corner) const {
  201|  88.0M|    return Previous(Opposite(Previous(corner)));
  202|  88.0M|  }
_ZNK5draco11CornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  205|  18.0M|  inline CornerIndex SwingLeft(CornerIndex corner) const {
  206|  18.0M|    return Next(Opposite(Next(corner)));
  207|  18.0M|  }
_ZNK5draco11CornerTable13GetLeftCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  217|  4.00M|  inline CornerIndex GetLeftCorner(CornerIndex corner_id) const {
  218|  4.00M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (218:9): [True: 0, False: 4.00M]
  ------------------
  219|      0|      return kInvalidCornerIndex;
  220|      0|    }
  221|  4.00M|    return Opposite(Previous(corner_id));
  222|  4.00M|  }
_ZNK5draco11CornerTable14GetRightCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  223|  4.77M|  inline CornerIndex GetRightCorner(CornerIndex corner_id) const {
  224|  4.77M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (224:9): [True: 0, False: 4.77M]
  ------------------
  225|      0|      return kInvalidCornerIndex;
  226|      0|    }
  227|  4.77M|    return Opposite(Next(corner_id));
  228|  4.77M|  }
_ZN5draco11CornerTable17SetOppositeCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_:
  248|   507M|                                CornerIndex opp_corner_id) {
  249|   507M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  250|   507M|    opposite_corners_[corner_id] = opp_corner_id;
  251|   507M|  }
_ZN5draco11CornerTable17MapCornerToVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEE:
  265|   587M|  inline void MapCornerToVertex(CornerIndex corner_id, VertexIndex vert_id) {
  266|   587M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  267|   587M|    corner_to_vertex_map_[corner_id] = vert_id;
  268|   587M|  }
_ZN5draco11CornerTable12AddNewVertexEv:
  270|   145M|  VertexIndex AddNewVertex() {
  271|   145M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  272|       |    // Add a new invalid vertex.
  273|   145M|    vertex_corners_.push_back(kInvalidCornerIndex);
  274|   145M|    return VertexIndex(static_cast<uint32_t>(vertex_corners_.size() - 1));
  275|   145M|  }
_ZN5draco11CornerTable17SetLeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEE:
  292|   326M|  void SetLeftMostCorner(VertexIndex vert, CornerIndex corner) {
  293|   326M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  294|   326M|    if (vert != kInvalidVertexIndex) {
  ------------------
  |  Branch (294:9): [True: 326M, False: 0]
  ------------------
  295|   326M|      vertex_corners_[vert] = corner;
  296|   326M|    }
  297|   326M|  }
_ZN5draco11CornerTable18MakeVertexIsolatedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  328|  5.02M|  void MakeVertexIsolated(VertexIndex vert) {
  329|  5.02M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  330|  5.02M|    vertex_corners_[vert] = kInvalidCornerIndex;
  331|  5.02M|  }

_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  228|  11.4k|      : corner_table_(table),
  229|  11.4k|        start_corner_(table->LeftMostCorner(vert_id)),
  230|  11.4k|        corner_(start_corner_),
  231|  11.4k|        left_traversal_(true) {}
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE3EndEv:
  244|  4.85M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEppEv:
  267|  93.0k|  VertexCornersIterator &operator++() {
  268|  93.0k|    Next();
  269|  93.0k|    return *this;
  270|  93.0k|  }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEE4NextEv:
  247|  4.15M|  void Next() {
  248|  4.15M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 4.08M, False: 74.1k]
  ------------------
  249|  4.08M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  4.08M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 21.0k, False: 4.06M]
  ------------------
  251|       |        // Open boundary reached.
  252|  21.0k|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  21.0k|        left_traversal_ = false;
  254|  4.06M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 676k, False: 3.38M]
  ------------------
  255|       |        // End reached.
  256|   676k|        corner_ = kInvalidCornerIndex;
  257|   676k|      }
  258|  4.08M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  74.1k|      corner_ = corner_table_->SwingRight(corner_);
  262|  74.1k|    }
  263|  4.15M|  }
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE6CornerEv:
  241|  6.80M|  CornerIndex Corner() const { return corner_; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE3EndEv:
  244|  5.85M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE6CornerEv:
  241|  5.69M|  CornerIndex Corner() const { return corner_; }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE4NextEv:
  247|  3.29M|  void Next() {
  248|  3.29M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 3.26M, False: 30.0k]
  ------------------
  249|  3.26M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  3.26M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 2.42M, False: 838k]
  ------------------
  251|       |        // Open boundary reached.
  252|  2.42M|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  2.42M|        left_traversal_ = false;
  254|  2.42M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 136k, False: 702k]
  ------------------
  255|       |        // End reached.
  256|   136k|        corner_ = kInvalidCornerIndex;
  257|   136k|      }
  258|  3.26M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  30.0k|      corner_ = corner_table_->SwingRight(corner_);
  262|  30.0k|    }
  263|  3.29M|  }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|  2.56M|      : corner_table_(table),
  236|  2.56M|        start_corner_(corner_id),
  237|  2.56M|        corner_(start_corner_),
  238|  2.56M|        left_traversal_(true) {}
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|   686k|      : corner_table_(table),
  236|   686k|        start_corner_(corner_id),
  237|   686k|        corner_(start_corner_),
  238|   686k|        left_traversal_(true) {}

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

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

_ZN5draco24MeshAttributeCornerTableC2Ev:
   23|  41.5k|    : no_interior_seams_(true), corner_table_(nullptr), valence_cache_(*this) {}
_ZN5draco24MeshAttributeCornerTable9InitEmptyEPKNS_11CornerTableE:
   25|  8.93k|bool MeshAttributeCornerTable::InitEmpty(const CornerTable *table) {
   26|  8.93k|  if (table == nullptr) {
  ------------------
  |  Branch (26:7): [True: 0, False: 8.93k]
  ------------------
   27|      0|    return false;
   28|      0|  }
   29|  8.93k|  valence_cache_.ClearValenceCache();
   30|  8.93k|  valence_cache_.ClearValenceCacheInaccurate();
   31|  8.93k|  is_edge_on_seam_.assign(table->num_corners(), false);
   32|  8.93k|  is_vertex_on_seam_.assign(table->num_vertices(), false);
   33|  8.93k|  corner_to_vertex_map_.assign(table->num_corners(), kInvalidVertexIndex);
   34|  8.93k|  vertex_to_attribute_entry_id_map_.reserve(table->num_vertices());
   35|  8.93k|  vertex_to_left_most_corner_map_.reserve(table->num_vertices());
   36|  8.93k|  corner_table_ = table;
   37|  8.93k|  no_interior_seams_ = true;
   38|  8.93k|  return true;
   39|  8.93k|}
_ZN5draco24MeshAttributeCornerTable11AddSeamEdgeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  108|  17.6M|void MeshAttributeCornerTable::AddSeamEdge(CornerIndex c) {
  109|  17.6M|  DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  110|  17.6M|  is_edge_on_seam_[c.value()] = true;
  111|       |  // Mark seam vertices.
  112|  17.6M|  is_vertex_on_seam_[corner_table_->Vertex(corner_table_->Next(c)).value()] =
  113|  17.6M|      true;
  114|  17.6M|  is_vertex_on_seam_[corner_table_->Vertex(corner_table_->Previous(c))
  115|  17.6M|                         .value()] = true;
  116|       |
  117|  17.6M|  const CornerIndex opp_corner = corner_table_->Opposite(c);
  118|  17.6M|  if (opp_corner != kInvalidCornerIndex) {
  ------------------
  |  Branch (118:7): [True: 16.6M, False: 1.09M]
  ------------------
  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.6M|}
_ZN5draco24MeshAttributeCornerTable17RecomputeVerticesEPKNS_4MeshEPKNS_14PointAttributeE:
  130|  8.93k|                                                 const PointAttribute *att) {
  131|  8.93k|  DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  132|  8.93k|  if (mesh != nullptr && att != nullptr) {
  ------------------
  |  Branch (132:7): [True: 0, False: 8.93k]
  |  Branch (132:26): [True: 0, False: 0]
  ------------------
  133|      0|    return RecomputeVerticesInternal<true>(mesh, att);
  134|  8.93k|  } else {
  135|  8.93k|    return RecomputeVerticesInternal<false>(nullptr, nullptr);
  136|  8.93k|  }
  137|  8.93k|}
_ZN5draco24MeshAttributeCornerTable25RecomputeVerticesInternalILb0EEEbPKNS_4MeshEPKNS_14PointAttributeE:
  141|  8.93k|    const Mesh *mesh, const PointAttribute *att) {
  142|  8.93k|  DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  143|  8.93k|  vertex_to_attribute_entry_id_map_.clear();
  144|  8.93k|  vertex_to_left_most_corner_map_.clear();
  145|  8.93k|  int num_new_vertices = 0;
  146|  7.77M|  for (VertexIndex v(0); v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (146:26): [True: 7.76M, False: 8.93k]
  ------------------
  147|  7.76M|    const CornerIndex c = corner_table_->LeftMostCorner(v);
  148|  7.76M|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (148:9): [True: 34.7k, False: 7.72M]
  ------------------
  149|  34.7k|      continue;  // Isolated vertex?
  150|  34.7k|    }
  151|  7.72M|    AttributeValueIndex first_vert_id(num_new_vertices++);
  152|  7.72M|    if (init_vertex_to_attribute_entry_map) {
  ------------------
  |  Branch (152:9): [Folded, False: 7.72M]
  ------------------
  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.72M|    } else {
  156|       |      // Identity mapping
  157|  7.72M|      vertex_to_attribute_entry_id_map_.push_back(first_vert_id);
  158|  7.72M|    }
  159|  7.72M|    CornerIndex first_c = c;
  160|  7.72M|    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.72M|    if (is_vertex_on_seam_[v.value()]) {
  ------------------
  |  Branch (163:9): [True: 6.34M, False: 1.37M]
  ------------------
  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.34M|      act_c = SwingLeft(first_c);
  167|  6.46M|      while (act_c != kInvalidCornerIndex) {
  ------------------
  |  Branch (167:14): [True: 114k, False: 6.34M]
  ------------------
  168|   114k|        first_c = act_c;
  169|   114k|        act_c = SwingLeft(act_c);
  170|   114k|        if (act_c == c) {
  ------------------
  |  Branch (170:13): [True: 0, False: 114k]
  ------------------
  171|       |          // We reached the initial corner which shouldn't happen when we swing
  172|       |          // left from |c|.
  173|      0|          return false;
  174|      0|        }
  175|   114k|      }
  176|  6.34M|    }
  177|  7.72M|    corner_to_vertex_map_[first_c.value()] = VertexIndex(first_vert_id.value());
  178|  7.72M|    vertex_to_left_most_corner_map_.push_back(first_c);
  179|  7.72M|    act_c = corner_table_->SwingRight(first_c);
  180|  43.1M|    while (act_c != kInvalidCornerIndex && act_c != first_c) {
  ------------------
  |  Branch (180:12): [True: 42.0M, False: 1.10M]
  |  Branch (180:44): [True: 35.3M, False: 6.62M]
  ------------------
  181|  35.3M|      if (IsCornerOppositeToSeamEdge(corner_table_->Next(act_c))) {
  ------------------
  |  Branch (181:11): [True: 27.5M, False: 7.88M]
  ------------------
  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.3M|      corner_to_vertex_map_[act_c.value()] = VertexIndex(first_vert_id.value());
  194|  35.3M|      act_c = corner_table_->SwingRight(act_c);
  195|  35.3M|    }
  196|  7.72M|  }
  197|  8.93k|  return true;
  198|  8.93k|}

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

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

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

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

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

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

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

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

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

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

