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

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

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

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

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

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

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

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

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

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

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

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

_ZNK5draco17AttributesDecoder14GetAttributeIdEi:
   44|  87.1k|  int32_t GetAttributeId(int i) const override {
   45|  87.1k|    return point_attribute_ids_[i];
   46|  87.1k|  }
_ZNK5draco17AttributesDecoder16GetNumAttributesEv:
   47|  54.3k|  int32_t GetNumAttributes() const override {
   48|  54.3k|    return static_cast<int32_t>(point_attribute_ids_.size());
   49|  54.3k|  }
_ZNK5draco17AttributesDecoder10GetDecoderEv:
   50|  53.1k|  PointCloudDecoder *GetDecoder() const override {
   51|  53.1k|    return point_cloud_decoder_;
   52|  53.1k|  }
_ZN5draco17AttributesDecoder16DecodeAttributesEPNS_13DecoderBufferE:
   55|  5.91k|  bool DecodeAttributes(DecoderBuffer *in_buffer) override {
   56|  5.91k|    if (!DecodePortableAttributes(in_buffer)) {
  ------------------
  |  Branch (56:9): [True: 2.55k, False: 3.36k]
  ------------------
   57|  2.55k|      return false;
   58|  2.55k|    }
   59|  3.36k|    if (!DecodeDataNeededByPortableTransforms(in_buffer)) {
  ------------------
  |  Branch (59:9): [True: 830, False: 2.53k]
  ------------------
   60|    830|      return false;
   61|    830|    }
   62|  2.53k|    if (!TransformAttributesToOriginalFormat()) {
  ------------------
  |  Branch (62:9): [True: 381, False: 2.15k]
  ------------------
   63|    381|      return false;
   64|    381|    }
   65|  2.15k|    return true;
   66|  2.53k|  }
_ZNK5draco17AttributesDecoder27GetLocalIdForPointAttributeEi:
   69|  2.57k|  int32_t GetLocalIdForPointAttribute(int32_t point_attribute_id) const {
   70|  2.57k|    const int id_map_size =
   71|  2.57k|        static_cast<int>(point_attribute_to_local_id_map_.size());
   72|  2.57k|    if (point_attribute_id >= id_map_size) {
  ------------------
  |  Branch (72:9): [True: 0, False: 2.57k]
  ------------------
   73|      0|      return -1;
   74|      0|    }
   75|  2.57k|    return point_attribute_to_local_id_map_[point_attribute_id];
   76|  2.57k|  }
_ZN5draco17AttributesDecoderD2Ev:
   35|  33.0k|  virtual ~AttributesDecoder() = default;

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

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

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

_ZN5draco17OctahedronToolBoxC2Ev:
   53|  3.34k|      : quantization_bits_(-1),
   54|  3.34k|        max_quantized_value_(-1),
   55|  3.34k|        max_value_(-1),
   56|  3.34k|        dequantization_scale_(1.f),
   57|  3.34k|        center_value_(-1) {}
_ZN5draco17OctahedronToolBox19SetQuantizationBitsEi:
   59|  3.02k|  bool SetQuantizationBits(int32_t q) {
   60|  3.02k|    if (q < 2 || q > 30) {
  ------------------
  |  Branch (60:9): [True: 845, False: 2.18k]
  |  Branch (60:18): [True: 188, False: 1.99k]
  ------------------
   61|  1.03k|      return false;
   62|  1.03k|    }
   63|  1.99k|    quantization_bits_ = q;
   64|  1.99k|    max_quantized_value_ = (1u << quantization_bits_) - 1;
   65|  1.99k|    max_value_ = max_quantized_value_ - 1;
   66|  1.99k|    dequantization_scale_ = 2.f / max_value_;
   67|  1.99k|    center_value_ = max_value_ / 2;
   68|  1.99k|    return true;
   69|  3.02k|  }
_ZNK5draco17OctahedronToolBox28CanonicalizeOctahedralCoordsEiiPiS1_:
   76|  3.26M|                                           int32_t *out_t) const {
   77|  3.26M|    if ((s == 0 && t == 0) || (s == 0 && t == max_value_) ||
  ------------------
  |  Branch (77:10): [True: 2.78k, False: 3.26M]
  |  Branch (77:20): [True: 0, False: 2.78k]
  |  Branch (77:32): [True: 2.78k, False: 3.26M]
  |  Branch (77:42): [True: 0, False: 2.78k]
  ------------------
   78|  3.26M|        (s == max_value_ && t == 0)) {
  ------------------
  |  Branch (78:10): [True: 2.55M, False: 708k]
  |  Branch (78:29): [True: 4.26k, False: 2.55M]
  ------------------
   79|  4.26k|      s = max_value_;
   80|  4.26k|      t = max_value_;
   81|  3.25M|    } else if (s == 0 && t > center_value_) {
  ------------------
  |  Branch (81:16): [True: 2.78k, False: 3.25M]
  |  Branch (81:26): [True: 747, False: 2.03k]
  ------------------
   82|    747|      t = center_value_ - (t - center_value_);
   83|  3.25M|    } else if (s == max_value_ && t < center_value_) {
  ------------------
  |  Branch (83:16): [True: 2.55M, False: 707k]
  |  Branch (83:35): [True: 4.50k, False: 2.54M]
  ------------------
   84|  4.50k|      t = center_value_ + (center_value_ - t);
   85|  3.25M|    } else if (t == max_value_ && s < center_value_) {
  ------------------
  |  Branch (85:16): [True: 2.54M, False: 704k]
  |  Branch (85:35): [True: 214, False: 2.54M]
  ------------------
   86|    214|      s = center_value_ + (center_value_ - s);
   87|  3.25M|    } else if (t == 0 && s > center_value_) {
  ------------------
  |  Branch (87:16): [True: 4.24k, False: 3.24M]
  |  Branch (87:26): [True: 1.73k, False: 2.50k]
  ------------------
   88|  1.73k|      s = center_value_ - (s - center_value_);
   89|  1.73k|    }
   90|       |
   91|  3.26M|    *out_s = s;
   92|  3.26M|    *out_t = t;
   93|  3.26M|  }
_ZNK5draco17OctahedronToolBox40IntegerVectorToQuantizedOctahedralCoordsEPKiPiS3_:
   99|  3.26M|                                                       int32_t *out_t) const {
  100|  3.26M|    DRACO_DCHECK_EQ(
  101|  3.26M|        std::abs(int_vec[0]) + std::abs(int_vec[1]) + std::abs(int_vec[2]),
  102|  3.26M|        center_value_);
  103|  3.26M|    int32_t s, t;
  104|  3.26M|    if (int_vec[0] >= 0) {
  ------------------
  |  Branch (104:9): [True: 1.11M, False: 2.15M]
  ------------------
  105|       |      // Right hemisphere.
  106|  1.11M|      s = (int_vec[1] + center_value_);
  107|  1.11M|      t = (int_vec[2] + center_value_);
  108|  2.15M|    } else {
  109|       |      // Left hemisphere.
  110|  2.15M|      if (int_vec[1] < 0) {
  ------------------
  |  Branch (110:11): [True: 42.9k, False: 2.10M]
  ------------------
  111|  42.9k|        s = std::abs(int_vec[2]);
  112|  2.10M|      } else {
  113|  2.10M|        s = (max_value_ - std::abs(int_vec[2]));
  114|  2.10M|      }
  115|  2.15M|      if (int_vec[2] < 0) {
  ------------------
  |  Branch (115:11): [True: 47.9k, False: 2.10M]
  ------------------
  116|  47.9k|        t = std::abs(int_vec[1]);
  117|  2.10M|      } else {
  118|  2.10M|        t = (max_value_ - std::abs(int_vec[1]));
  119|  2.10M|      }
  120|  2.15M|    }
  121|  3.26M|    CanonicalizeOctahedralCoords(s, t, out_s, out_t);
  122|  3.26M|  }
_ZNK5draco17OctahedronToolBox37QuantizedOctahedralCoordsToUnitVectorEiiPf:
  198|   552k|                                                    float *out_vector) const {
  199|   552k|    OctahedralCoordsToUnitVector(in_s * dequantization_scale_ - 1.f,
  200|   552k|                                 in_t * dequantization_scale_ - 1.f,
  201|   552k|                                 out_vector);
  202|   552k|  }
_ZNK5draco17OctahedronToolBox11IsInDiamondERKiS2_:
  205|  3.17M|  inline bool IsInDiamond(const int32_t &s, const int32_t &t) const {
  206|       |    // Expect center already at origin.
  207|  3.17M|    DRACO_DCHECK_LE(s, center_value_);
  208|  3.17M|    DRACO_DCHECK_LE(t, center_value_);
  209|  3.17M|    DRACO_DCHECK_GE(s, -center_value_);
  210|  3.17M|    DRACO_DCHECK_GE(t, -center_value_);
  211|  3.17M|    const uint32_t st =
  212|  3.17M|        static_cast<uint32_t>(std::abs(s)) + static_cast<uint32_t>(std::abs(t));
  213|  3.17M|    return st <= center_value_;
  214|  3.17M|  }
_ZNK5draco17OctahedronToolBox13InvertDiamondEPiS1_:
  216|  4.56M|  void InvertDiamond(int32_t *s, int32_t *t) const {
  217|       |    // Expect center already at origin.
  218|  4.56M|    DRACO_DCHECK_LE(*s, center_value_);
  219|  4.56M|    DRACO_DCHECK_LE(*t, center_value_);
  220|  4.56M|    DRACO_DCHECK_GE(*s, -center_value_);
  221|  4.56M|    DRACO_DCHECK_GE(*t, -center_value_);
  222|  4.56M|    int32_t sign_s = 0;
  223|  4.56M|    int32_t sign_t = 0;
  224|  4.56M|    if (*s >= 0 && *t >= 0) {
  ------------------
  |  Branch (224:9): [True: 4.23M, False: 330k]
  |  Branch (224:20): [True: 4.14M, False: 91.4k]
  ------------------
  225|  4.14M|      sign_s = 1;
  226|  4.14M|      sign_t = 1;
  227|  4.14M|    } else if (*s <= 0 && *t <= 0) {
  ------------------
  |  Branch (227:16): [True: 360k, False: 61.4k]
  |  Branch (227:27): [True: 303k, False: 56.9k]
  ------------------
  228|   303k|      sign_s = -1;
  229|   303k|      sign_t = -1;
  230|   303k|    } else {
  231|   118k|      sign_s = (*s > 0) ? 1 : -1;
  ------------------
  |  Branch (231:16): [True: 61.4k, False: 56.9k]
  ------------------
  232|   118k|      sign_t = (*t > 0) ? 1 : -1;
  ------------------
  |  Branch (232:16): [True: 56.9k, False: 61.4k]
  ------------------
  233|   118k|    }
  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.56M|    const uint32_t corner_point_s = sign_s * center_value_;
  239|  4.56M|    const uint32_t corner_point_t = sign_t * center_value_;
  240|  4.56M|    uint32_t us = *s;
  241|  4.56M|    uint32_t ut = *t;
  242|  4.56M|    us = us + us - corner_point_s;
  243|  4.56M|    ut = ut + ut - corner_point_t;
  244|  4.56M|    if (sign_s * sign_t >= 0) {
  ------------------
  |  Branch (244:9): [True: 4.44M, False: 118k]
  ------------------
  245|  4.44M|      uint32_t temp = us;
  246|  4.44M|      us = -ut;
  247|  4.44M|      ut = -temp;
  248|  4.44M|    } else {
  249|   118k|      std::swap(us, ut);
  250|   118k|    }
  251|  4.56M|    us = us + corner_point_s;
  252|  4.56M|    ut = ut + corner_point_t;
  253|       |
  254|  4.56M|    *s = us;
  255|  4.56M|    *t = ut;
  256|  4.56M|    *s /= 2;
  257|  4.56M|    *t /= 2;
  258|  4.56M|  }
_ZNK5draco17OctahedronToolBox6ModMaxEi:
  272|  6.34M|  int32_t ModMax(int32_t x) const {
  273|  6.34M|    if (x > this->center_value()) {
  ------------------
  |  Branch (273:9): [True: 5.34k, False: 6.34M]
  ------------------
  274|  5.34k|      return x - this->max_quantized_value();
  275|  5.34k|    }
  276|  6.34M|    if (x < -this->center_value()) {
  ------------------
  |  Branch (276:9): [True: 3.41k, False: 6.33M]
  ------------------
  277|  3.41k|      return x + this->max_quantized_value();
  278|  3.41k|    }
  279|  6.33M|    return x;
  280|  6.34M|  }
_ZNK5draco17OctahedronToolBox17quantization_bitsEv:
  291|  1.89k|  int32_t quantization_bits() const { return quantization_bits_; }
_ZNK5draco17OctahedronToolBox19max_quantized_valueEv:
  292|  8.75k|  int32_t max_quantized_value() const { return max_quantized_value_; }
_ZNK5draco17OctahedronToolBox12center_valueEv:
  294|  19.0M|  int32_t center_value() const { return center_value_; }
_ZNK5draco17OctahedronToolBox28OctahedralCoordsToUnitVectorEffPf:
  298|   552k|                                           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|   552k|    float y = in_s_scaled;
  329|   552k|    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|   552k|    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|   552k|    float x_offset = -x;
  342|   552k|    x_offset = x_offset < 0 ? 0 : x_offset;
  ------------------
  |  Branch (342:16): [True: 15.1k, False: 537k]
  ------------------
  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|   552k|    y += y < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (347:10): [True: 174k, False: 377k]
  ------------------
  348|   552k|    z += z < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (348:10): [True: 174k, False: 377k]
  ------------------
  349|       |
  350|       |    // Normalize the computed vector.
  351|   552k|    const float norm_squared = x * x + y * y + z * z;
  352|   552k|    if (norm_squared < 1e-6) {
  ------------------
  |  Branch (352:9): [True: 0, False: 552k]
  ------------------
  353|      0|      out_vector[0] = 0;
  354|      0|      out_vector[1] = 0;
  355|      0|      out_vector[2] = 0;
  356|   552k|    } else {
  357|   552k|      const float d = 1.0f / std::sqrt(norm_squared);
  358|   552k|      out_vector[0] = x * d;
  359|   552k|      out_vector[1] = y * d;
  360|   552k|      out_vector[2] = z * d;
  361|   552k|    }
  362|   552k|  }
_ZNK5draco17OctahedronToolBox25CanonicalizeIntegerVectorIiEEvPT_:
  173|  3.26M|  void CanonicalizeIntegerVector(T *vec) const {
  174|  3.26M|    static_assert(std::is_integral<T>::value, "T must be an integral type.");
  175|  3.26M|    static_assert(std::is_signed<T>::value, "T must be a signed type.");
  176|  3.26M|    const int64_t abs_sum = static_cast<int64_t>(std::abs(vec[0])) +
  177|  3.26M|                            static_cast<int64_t>(std::abs(vec[1])) +
  178|  3.26M|                            static_cast<int64_t>(std::abs(vec[2]));
  179|       |
  180|  3.26M|    if (abs_sum == 0) {
  ------------------
  |  Branch (180:9): [True: 3.03M, False: 227k]
  ------------------
  181|  3.03M|      vec[0] = center_value_;  // vec[1] == v[2] == 0
  182|  3.03M|    } else {
  183|   227k|      vec[0] =
  184|   227k|          (static_cast<int64_t>(vec[0]) * static_cast<int64_t>(center_value_)) /
  185|   227k|          abs_sum;
  186|   227k|      vec[1] =
  187|   227k|          (static_cast<int64_t>(vec[1]) * static_cast<int64_t>(center_value_)) /
  188|   227k|          abs_sum;
  189|   227k|      if (vec[2] >= 0) {
  ------------------
  |  Branch (189:11): [True: 122k, False: 105k]
  ------------------
  190|   122k|        vec[2] = center_value_ - std::abs(vec[0]) - std::abs(vec[1]);
  191|   122k|      } else {
  192|   105k|        vec[2] = -(center_value_ - std::abs(vec[0]) - std::abs(vec[1]));
  193|   105k|      }
  194|   227k|    }
  195|  3.26M|  }

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

_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    447|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    447|            attribute, transform, mesh_data),
   52|    447|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  193|    436|                                                                *buffer) {
  194|    436|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  195|    436|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    436|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (195:7): [True: 17, False: 419]
  ------------------
  196|       |    // Decode prediction mode.
  197|     17|    uint8_t mode;
  198|     17|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (198:9): [True: 1, False: 16]
  ------------------
  199|      1|      return false;
  200|      1|    }
  201|       |
  202|     16|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (202:9): [True: 13, False: 3]
  ------------------
  203|       |      // Unsupported mode.
  204|     13|      return false;
  205|     13|    }
  206|     16|  }
  207|    422|#endif
  208|       |
  209|       |  // Encode selected edges using separate rans bit coder for each context.
  210|  1.82k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (210:19): [True: 1.52k, False: 300]
  ------------------
  211|  1.52k|    uint32_t num_flags;
  212|  1.52k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (212:9): [True: 15, False: 1.51k]
  ------------------
  213|     15|      return false;
  214|     15|    }
  215|  1.51k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (215:9): [True: 66, False: 1.44k]
  ------------------
  216|     66|      return false;
  217|     66|    }
  218|  1.44k|    if (num_flags > 0) {
  ------------------
  |  Branch (218:9): [True: 625, False: 822]
  ------------------
  219|    625|      is_crease_edge_[i].resize(num_flags);
  220|    625|      RAnsBitDecoder decoder;
  221|    625|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (221:11): [True: 41, False: 584]
  ------------------
  222|     41|        return false;
  223|     41|      }
  224|  1.68M|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (224:28): [True: 1.68M, False: 584]
  ------------------
  225|  1.68M|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  226|  1.68M|      }
  227|    584|      decoder.EndDecoding();
  228|    584|    }
  229|  1.44k|  }
  230|    300|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  231|    300|                                     MeshDataT>::DecodePredictionData(buffer);
  232|    422|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    272|                          const PointIndex * /* entry_to_point_id_map */) {
   87|    272|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    272|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  1.36k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 1.08k, False: 272]
  ------------------
   93|  1.08k|    pred_vals[i].resize(num_components, 0);
   94|  1.08k|  }
   95|    272|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    272|                                         out_data);
   97|       |
   98|    272|  const CornerTable *const table = this->mesh_data().corner_table();
   99|    272|  const std::vector<int32_t> *const vertex_to_data_map =
  100|    272|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    272|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    272|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    272|  const int corner_map_size =
  109|    272|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|  1.39M|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 1.39M, False: 161]
  ------------------
  111|  1.39M|    const CornerIndex start_corner_id =
  112|  1.39M|        this->mesh_data().data_to_corner_map()->at(p);
  113|       |
  114|  1.39M|    CornerIndex corner_id(start_corner_id);
  115|  1.39M|    int num_parallelograms = 0;
  116|  1.39M|    bool first_pass = true;
  117|  2.97M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (117:12): [True: 1.60M, False: 1.36M]
  ------------------
  118|  1.60M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (118:11): [True: 76.4k, False: 1.53M]
  ------------------
  119|  1.60M|              p, corner_id, table, *vertex_to_data_map, out_data,
  120|  1.60M|              num_components, &(pred_vals[num_parallelograms][0]))) {
  121|       |        // Parallelogram prediction applied and stored in
  122|       |        // |pred_vals[num_parallelograms]|
  123|  76.4k|        ++num_parallelograms;
  124|       |        // Stop processing when we reach the maximum number of allowed
  125|       |        // parallelograms.
  126|  76.4k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (126:13): [True: 503, False: 75.9k]
  ------------------
  127|    503|          break;
  128|    503|        }
  129|  76.4k|      }
  130|       |
  131|       |      // Proceed to the next corner attached to the vertex. First swing left
  132|       |      // and if we reach a boundary, swing right from the start corner.
  133|  1.60M|      if (first_pass) {
  ------------------
  |  Branch (133:11): [True: 1.57M, False: 32.6k]
  ------------------
  134|  1.57M|        corner_id = table->SwingLeft(corner_id);
  135|  1.57M|      } else {
  136|  32.6k|        corner_id = table->SwingRight(corner_id);
  137|  32.6k|      }
  138|  1.60M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (138:11): [True: 29.1k, False: 1.57M]
  ------------------
  139|  29.1k|        break;
  140|  29.1k|      }
  141|  1.57M|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (141:11): [True: 1.38M, False: 194k]
  |  Branch (141:47): [True: 1.36M, False: 16.8k]
  ------------------
  142|  1.36M|        first_pass = false;
  143|  1.36M|        corner_id = table->SwingRight(start_corner_id);
  144|  1.36M|      }
  145|  1.57M|    }
  146|       |
  147|       |    // Check which of the available parallelograms are actually used and compute
  148|       |    // the final predicted value.
  149|  1.39M|    int num_used_parallelograms = 0;
  150|  1.39M|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (150:9): [True: 47.5k, False: 1.34M]
  ------------------
  151|  7.41M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (151:23): [True: 7.36M, False: 47.5k]
  ------------------
  152|  7.36M|        multi_pred_vals[i] = 0;
  153|  7.36M|      }
  154|       |      // Check which parallelograms are actually used.
  155|   123k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (155:23): [True: 76.3k, False: 47.3k]
  ------------------
  156|  76.3k|        const int context = num_parallelograms - 1;
  157|  76.3k|        const int pos = is_crease_edge_pos[context]++;
  158|  76.3k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (158:13): [True: 111, False: 76.2k]
  ------------------
  159|    111|          return false;
  160|    111|        }
  161|  76.2k|        const bool is_crease = is_crease_edge_[context][pos];
  162|  76.2k|        if (!is_crease) {
  ------------------
  |  Branch (162:13): [True: 13.2k, False: 63.0k]
  ------------------
  163|  13.2k|          ++num_used_parallelograms;
  164|  1.57M|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (164:27): [True: 1.55M, False: 13.2k]
  ------------------
  165|  1.55M|            multi_pred_vals[j] =
  166|  1.55M|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  167|  1.55M|          }
  168|  13.2k|        }
  169|  76.2k|      }
  170|  47.5k|    }
  171|  1.39M|    const int dst_offset = p * num_components;
  172|  1.39M|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (172:9): [True: 1.38M, False: 5.89k]
  ------------------
  173|       |      // No parallelogram was valid.
  174|       |      // We use the last decoded point as a reference.
  175|  1.38M|      const int src_offset = (p - 1) * num_components;
  176|  1.38M|      this->transform().ComputeOriginalValue(
  177|  1.38M|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  178|  1.38M|    } else {
  179|       |      // Compute the correction from the predicted value.
  180|   725k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (180:23): [True: 719k, False: 5.89k]
  ------------------
  181|   719k|        multi_pred_vals[c] /= num_used_parallelograms;
  182|   719k|      }
  183|  5.89k|      this->transform().ComputeOriginalValue(
  184|  5.89k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  185|  5.89k|    }
  186|  1.39M|  }
  187|    161|  return true;
  188|    272|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    504|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    504|            attribute, transform, mesh_data),
   52|    504|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  193|    490|                                                                *buffer) {
  194|    490|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  195|    490|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    490|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (195:7): [True: 3, False: 487]
  ------------------
  196|       |    // Decode prediction mode.
  197|      3|    uint8_t mode;
  198|      3|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (198:9): [True: 1, False: 2]
  ------------------
  199|      1|      return false;
  200|      1|    }
  201|       |
  202|      2|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (202:9): [True: 1, False: 1]
  ------------------
  203|       |      // Unsupported mode.
  204|      1|      return false;
  205|      1|    }
  206|      2|  }
  207|    488|#endif
  208|       |
  209|       |  // Encode selected edges using separate rans bit coder for each context.
  210|  2.12k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (210:19): [True: 1.76k, False: 360]
  ------------------
  211|  1.76k|    uint32_t num_flags;
  212|  1.76k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (212:9): [True: 17, False: 1.74k]
  ------------------
  213|     17|      return false;
  214|     17|    }
  215|  1.74k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (215:9): [True: 73, False: 1.67k]
  ------------------
  216|     73|      return false;
  217|     73|    }
  218|  1.67k|    if (num_flags > 0) {
  ------------------
  |  Branch (218:9): [True: 654, False: 1.02k]
  ------------------
  219|    654|      is_crease_edge_[i].resize(num_flags);
  220|    654|      RAnsBitDecoder decoder;
  221|    654|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (221:11): [True: 38, False: 616]
  ------------------
  222|     38|        return false;
  223|     38|      }
  224|  1.01M|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (224:28): [True: 1.01M, False: 616]
  ------------------
  225|  1.01M|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  226|  1.01M|      }
  227|    616|      decoder.EndDecoding();
  228|    616|    }
  229|  1.67k|  }
  230|    360|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  231|    360|                                     MeshDataT>::DecodePredictionData(buffer);
  232|    488|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    313|                          const PointIndex * /* entry_to_point_id_map */) {
   87|    313|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    313|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  1.56k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 1.25k, False: 313]
  ------------------
   93|  1.25k|    pred_vals[i].resize(num_components, 0);
   94|  1.25k|  }
   95|    313|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    313|                                         out_data);
   97|       |
   98|    313|  const CornerTable *const table = this->mesh_data().corner_table();
   99|    313|  const std::vector<int32_t> *const vertex_to_data_map =
  100|    313|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    313|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    313|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    313|  const int corner_map_size =
  109|    313|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|   144k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 144k, False: 166]
  ------------------
  111|   144k|    const CornerIndex start_corner_id =
  112|   144k|        this->mesh_data().data_to_corner_map()->at(p);
  113|       |
  114|   144k|    CornerIndex corner_id(start_corner_id);
  115|   144k|    int num_parallelograms = 0;
  116|   144k|    bool first_pass = true;
  117|   919k|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (117:12): [True: 898k, False: 20.3k]
  ------------------
  118|   898k|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (118:11): [True: 263k, False: 634k]
  ------------------
  119|   898k|              p, corner_id, table, *vertex_to_data_map, out_data,
  120|   898k|              num_components, &(pred_vals[num_parallelograms][0]))) {
  121|       |        // Parallelogram prediction applied and stored in
  122|       |        // |pred_vals[num_parallelograms]|
  123|   263k|        ++num_parallelograms;
  124|       |        // Stop processing when we reach the maximum number of allowed
  125|       |        // parallelograms.
  126|   263k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (126:13): [True: 413, False: 263k]
  ------------------
  127|    413|          break;
  128|    413|        }
  129|   263k|      }
  130|       |
  131|       |      // Proceed to the next corner attached to the vertex. First swing left
  132|       |      // and if we reach a boundary, swing right from the start corner.
  133|   898k|      if (first_pass) {
  ------------------
  |  Branch (133:11): [True: 829k, False: 68.6k]
  ------------------
  134|   829k|        corner_id = table->SwingLeft(corner_id);
  135|   829k|      } else {
  136|  68.6k|        corner_id = table->SwingRight(corner_id);
  137|  68.6k|      }
  138|   898k|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (138:11): [True: 123k, False: 774k]
  ------------------
  139|   123k|        break;
  140|   123k|      }
  141|   774k|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (141:11): [True: 36.6k, False: 738k]
  |  Branch (141:47): [True: 20.3k, False: 16.3k]
  ------------------
  142|  20.3k|        first_pass = false;
  143|  20.3k|        corner_id = table->SwingRight(start_corner_id);
  144|  20.3k|      }
  145|   774k|    }
  146|       |
  147|       |    // Check which of the available parallelograms are actually used and compute
  148|       |    // the final predicted value.
  149|   144k|    int num_used_parallelograms = 0;
  150|   144k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (150:9): [True: 141k, False: 2.14k]
  ------------------
  151|  16.0M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (151:23): [True: 15.9M, False: 141k]
  ------------------
  152|  15.9M|        multi_pred_vals[i] = 0;
  153|  15.9M|      }
  154|       |      // Check which parallelograms are actually used.
  155|   405k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (155:23): [True: 263k, False: 141k]
  ------------------
  156|   263k|        const int context = num_parallelograms - 1;
  157|   263k|        const int pos = is_crease_edge_pos[context]++;
  158|   263k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (158:13): [True: 147, False: 263k]
  ------------------
  159|    147|          return false;
  160|    147|        }
  161|   263k|        const bool is_crease = is_crease_edge_[context][pos];
  162|   263k|        if (!is_crease) {
  ------------------
  |  Branch (162:13): [True: 8.11k, False: 255k]
  ------------------
  163|  8.11k|          ++num_used_parallelograms;
  164|   785k|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (164:27): [True: 777k, False: 8.11k]
  ------------------
  165|   777k|            multi_pred_vals[j] =
  166|   777k|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  167|   777k|          }
  168|  8.11k|        }
  169|   263k|      }
  170|   141k|    }
  171|   143k|    const int dst_offset = p * num_components;
  172|   143k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (172:9): [True: 139k, False: 4.41k]
  ------------------
  173|       |      // No parallelogram was valid.
  174|       |      // We use the last decoded point as a reference.
  175|   139k|      const int src_offset = (p - 1) * num_components;
  176|   139k|      this->transform().ComputeOriginalValue(
  177|   139k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  178|   139k|    } else {
  179|       |      // Compute the correction from the predicted value.
  180|   414k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (180:23): [True: 410k, False: 4.41k]
  ------------------
  181|   410k|        multi_pred_vals[c] /= num_used_parallelograms;
  182|   410k|      }
  183|  4.41k|      this->transform().ComputeOriginalValue(
  184|  4.41k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  185|  4.41k|    }
  186|   143k|  }
  187|    166|  return true;
  188|    313|}

_ZN5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE3SetEPKNS_4MeshEPKS1_PKNSt3__16vectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS8_9allocatorISC_EEEEPKNS9_IiNSD_IiEEEE:
   37|  2.96k|           const std::vector<int32_t> *vertex_to_data_map) {
   38|  2.96k|    mesh_ = mesh;
   39|  2.96k|    corner_table_ = table;
   40|  2.96k|    data_to_corner_map_ = data_to_corner_map;
   41|  2.96k|    vertex_to_data_map_ = vertex_to_data_map;
   42|  2.96k|  }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE12corner_tableEv:
   45|  15.9M|  const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE18vertex_to_data_mapEv:
   46|  11.6M|  const std::vector<int32_t> *vertex_to_data_map() const {
   47|  11.6M|    return vertex_to_data_map_;
   48|  11.6M|  }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE18data_to_corner_mapEv:
   49|  7.96M|  const std::vector<CornerIndex> *data_to_corner_map() const {
   50|  7.96M|    return data_to_corner_map_;
   51|  7.96M|  }
_ZN5draco24MeshPredictionSchemeDataINS_11CornerTableEE3SetEPKNS_4MeshEPKS1_PKNSt3__16vectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS8_9allocatorISC_EEEEPKNS9_IiNSD_IiEEEE:
   37|  2.84k|           const std::vector<int32_t> *vertex_to_data_map) {
   38|  2.84k|    mesh_ = mesh;
   39|  2.84k|    corner_table_ = table;
   40|  2.84k|    data_to_corner_map_ = data_to_corner_map;
   41|  2.84k|    vertex_to_data_map_ = vertex_to_data_map;
   42|  2.84k|  }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE12corner_tableEv:
   45|  11.8M|  const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE18vertex_to_data_mapEv:
   46|  10.2M|  const std::vector<int32_t> *vertex_to_data_map() const {
   47|  10.2M|    return vertex_to_data_map_;
   48|  10.2M|  }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE18data_to_corner_mapEv:
   49|  2.48M|  const std::vector<CornerIndex> *data_to_corner_map() const {
   50|  2.48M|    return data_to_corner_map_;
   51|  2.48M|  }
_ZN5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEC2Ev:
   30|  2.96k|      : mesh_(nullptr),
   31|  2.96k|        corner_table_(nullptr),
   32|  2.96k|        vertex_to_data_map_(nullptr),
   33|  2.96k|        data_to_corner_map_(nullptr) {}
_ZN5draco24MeshPredictionSchemeDataINS_11CornerTableEEC2Ev:
   30|  2.84k|      : mesh_(nullptr),
   31|  2.84k|        corner_table_(nullptr),
   32|  2.84k|        vertex_to_data_map_(nullptr),
   33|  2.84k|        data_to_corner_map_(nullptr) {}

_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|   839k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   285k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|  1.16M|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   244k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  2.48k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  2.48k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|  8.06M|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  2.49k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  2.49k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|  2.95M|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    229|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    229|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    183|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    183|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    240|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    240|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    169|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    169|        mesh_data_(mesh_data) {}

_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    453|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_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_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_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: 4, False: 224]
  ------------------
   79|      4|      return false;  // Currently works only for 3 component positions.
   80|      4|    }
   81|    224|    predictor_.SetPositionAttribute(*att);
   82|    224|    return true;
   83|    228|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    224|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    224|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 9, False: 215]
  ------------------
  145|      9|    return false;
  146|      9|  }
  147|       |
  148|    215|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    215|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    215|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 61, False: 154]
  ------------------
  150|     61|    uint8_t prediction_mode;
  151|     61|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 60]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|     60|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 3, False: 57]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      3|      return false;
  157|      3|    }
  158|       |
  159|     57|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 57]
  ------------------
  160|     57|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     57|  }
  164|    211|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    211|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 5, False: 206]
  ------------------
  168|      5|    return false;
  169|      5|  }
  170|       |
  171|    206|  return true;
  172|    211|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    206|                                      const PointIndex *entry_to_point_id_map) {
  103|    206|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    206|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    206|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    206|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    206|  const int corner_map_size =
  111|    206|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    206|  VectorD<int32_t, 3> pred_normal_3d;
  114|    206|  int32_t pred_normal_oct[2];
  115|       |
  116|   839k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 839k, False: 206]
  ------------------
  117|   839k|    const CornerIndex corner_id =
  118|   839k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   839k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   839k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   839k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   839k|                    octahedron_tool_box_.center_value());
  125|   839k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 554k, False: 284k]
  ------------------
  126|   554k|      pred_normal_3d = -pred_normal_3d;
  127|   554k|    }
  128|   839k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   839k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   839k|    const int data_offset = data_id * 2;
  132|   839k|    this->transform().ComputeOriginalValue(
  133|   839k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   839k|  }
  135|    206|  flip_normal_bit_decoder_.EndDecoding();
  136|    206|  return true;
  137|    206|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    206|  void SetQuantizationBits(int q) {
   85|    206|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    206|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    363|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    183|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    183|    DRACO_DCHECK_EQ(i, 0);
   70|    183|    (void)i;
   71|    183|    return GeometryAttribute::POSITION;
   72|    183|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    181|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    181|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 181]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    181|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 180]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    180|    predictor_.SetPositionAttribute(*att);
   82|    180|    return true;
   83|    181|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    180|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    180|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 6, False: 174]
  ------------------
  145|      6|    return false;
  146|      6|  }
  147|       |
  148|    174|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    174|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    174|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 40, False: 134]
  ------------------
  150|     40|    uint8_t prediction_mode;
  151|     40|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 39]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|     39|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 1, False: 38]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      1|      return false;
  157|      1|    }
  158|       |
  159|     38|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 38]
  ------------------
  160|     38|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     38|  }
  164|    172|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    172|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 7, False: 165]
  ------------------
  168|      7|    return false;
  169|      7|  }
  170|       |
  171|    165|  return true;
  172|    172|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    165|                                      const PointIndex *entry_to_point_id_map) {
  103|    165|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    165|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    165|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    165|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    165|  const int corner_map_size =
  111|    165|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    165|  VectorD<int32_t, 3> pred_normal_3d;
  114|    165|  int32_t pred_normal_oct[2];
  115|       |
  116|   285k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 285k, False: 165]
  ------------------
  117|   285k|    const CornerIndex corner_id =
  118|   285k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   285k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   285k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   285k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   285k|                    octahedron_tool_box_.center_value());
  125|   285k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 236k, False: 48.9k]
  ------------------
  126|   236k|      pred_normal_3d = -pred_normal_3d;
  127|   236k|    }
  128|   285k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   285k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   285k|    const int data_offset = data_id * 2;
  132|   285k|    this->transform().ComputeOriginalValue(
  133|   285k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   285k|  }
  135|    165|  flip_normal_bit_decoder_.EndDecoding();
  136|    165|  return true;
  137|    165|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    165|  void SetQuantizationBits(int q) {
   85|    165|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    165|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    477|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    240|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    240|    DRACO_DCHECK_EQ(i, 0);
   70|    240|    (void)i;
   71|    240|    return GeometryAttribute::POSITION;
   72|    240|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    239|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    239|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 239]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    239|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 2, False: 237]
  ------------------
   79|      2|      return false;  // Currently works only for 3 component positions.
   80|      2|    }
   81|    237|    predictor_.SetPositionAttribute(*att);
   82|    237|    return true;
   83|    239|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    236|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    236|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 6, False: 230]
  ------------------
  145|      6|    return false;
  146|      6|  }
  147|       |
  148|    230|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    230|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    230|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 69, False: 161]
  ------------------
  150|     69|    uint8_t prediction_mode;
  151|     69|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 68]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|     68|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 11, False: 57]
  ------------------
  155|       |      // Invalid prediction mode.
  156|     11|      return false;
  157|     11|    }
  158|       |
  159|     57|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 57]
  ------------------
  160|     57|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     57|  }
  164|    218|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    218|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 9, False: 209]
  ------------------
  168|      9|    return false;
  169|      9|  }
  170|       |
  171|    209|  return true;
  172|    218|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    209|                                      const PointIndex *entry_to_point_id_map) {
  103|    209|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    209|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    209|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    209|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    209|  const int corner_map_size =
  111|    209|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    209|  VectorD<int32_t, 3> pred_normal_3d;
  114|    209|  int32_t pred_normal_oct[2];
  115|       |
  116|  1.16M|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 1.16M, False: 209]
  ------------------
  117|  1.16M|    const CornerIndex corner_id =
  118|  1.16M|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|  1.16M|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|  1.16M|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|  1.16M|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|  1.16M|                    octahedron_tool_box_.center_value());
  125|  1.16M|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 1.04M, False: 120k]
  ------------------
  126|  1.04M|      pred_normal_3d = -pred_normal_3d;
  127|  1.04M|    }
  128|  1.16M|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|  1.16M|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|  1.16M|    const int data_offset = data_id * 2;
  132|  1.16M|    this->transform().ComputeOriginalValue(
  133|  1.16M|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|  1.16M|  }
  135|    209|  flip_normal_bit_decoder_.EndDecoding();
  136|    209|  return true;
  137|    209|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    209|  void SetQuantizationBits(int q) {
   85|    209|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    209|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    334|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    169|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    169|    DRACO_DCHECK_EQ(i, 0);
   70|    169|    (void)i;
   71|    169|    return GeometryAttribute::POSITION;
   72|    169|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    168|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    168|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 168]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    168|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 3, False: 165]
  ------------------
   79|      3|      return false;  // Currently works only for 3 component positions.
   80|      3|    }
   81|    165|    predictor_.SetPositionAttribute(*att);
   82|    165|    return true;
   83|    168|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    164|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    164|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 8, False: 156]
  ------------------
  145|      8|    return false;
  146|      8|  }
  147|       |
  148|    156|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    156|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    156|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 17, False: 139]
  ------------------
  150|     17|    uint8_t prediction_mode;
  151|     17|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 0, False: 17]
  ------------------
  152|      0|      return false;
  153|      0|    }
  154|     17|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 1, False: 16]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      1|      return false;
  157|      1|    }
  158|       |
  159|     16|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 16]
  ------------------
  160|     16|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     16|  }
  164|    155|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    155|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 5, False: 150]
  ------------------
  168|      5|    return false;
  169|      5|  }
  170|       |
  171|    150|  return true;
  172|    155|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    150|                                      const PointIndex *entry_to_point_id_map) {
  103|    150|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    150|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    150|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    150|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    150|  const int corner_map_size =
  111|    150|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    150|  VectorD<int32_t, 3> pred_normal_3d;
  114|    150|  int32_t pred_normal_oct[2];
  115|       |
  116|   244k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 244k, False: 150]
  ------------------
  117|   244k|    const CornerIndex corner_id =
  118|   244k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   244k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   244k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   244k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   244k|                    octahedron_tool_box_.center_value());
  125|   244k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 202k, False: 42.1k]
  ------------------
  126|   202k|      pred_normal_3d = -pred_normal_3d;
  127|   202k|    }
  128|   244k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   244k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   244k|    const int data_offset = data_id * 2;
  132|   244k|    this->transform().ComputeOriginalValue(
  133|   244k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   244k|  }
  135|    150|  flip_normal_bit_decoder_.EndDecoding();
  136|    150|  return true;
  137|    150|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    150|  void SetQuantizationBits(int q) {
   85|    150|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    150|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    426|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    426|            attribute, transform, mesh_data),
   37|    426|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    848|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    426|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    426|    DRACO_DCHECK_EQ(i, 0);
   70|    426|    (void)i;
   71|    426|    return GeometryAttribute::POSITION;
   72|    426|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    424|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    424|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 424]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    424|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 2, False: 422]
  ------------------
   79|      2|      return false;  // Currently works only for 3 component positions.
   80|      2|    }
   81|    422|    predictor_.SetPositionAttribute(*att);
   82|    422|    return true;
   83|    424|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    421|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    421|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 34, False: 387]
  ------------------
  145|     34|    return false;
  146|     34|  }
  147|       |
  148|    387|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    387|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    387|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 211, False: 176]
  ------------------
  150|    211|    uint8_t prediction_mode;
  151|    211|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 210]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|    210|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 2, False: 208]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      2|      return false;
  157|      2|    }
  158|       |
  159|    208|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 208]
  ------------------
  160|    208|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|    208|  }
  164|    384|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    384|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 18, False: 366]
  ------------------
  168|     18|    return false;
  169|     18|  }
  170|       |
  171|    366|  return true;
  172|    384|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    366|                                      const PointIndex *entry_to_point_id_map) {
  103|    366|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    366|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    366|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    366|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    366|  const int corner_map_size =
  111|    366|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    366|  VectorD<int32_t, 3> pred_normal_3d;
  114|    366|  int32_t pred_normal_oct[2];
  115|       |
  116|   518k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 517k, False: 366]
  ------------------
  117|   517k|    const CornerIndex corner_id =
  118|   517k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   517k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   517k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   517k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   517k|                    octahedron_tool_box_.center_value());
  125|   517k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 364k, False: 153k]
  ------------------
  126|   364k|      pred_normal_3d = -pred_normal_3d;
  127|   364k|    }
  128|   517k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   517k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   517k|    const int data_offset = data_id * 2;
  132|   517k|    this->transform().ComputeOriginalValue(
  133|   517k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   517k|  }
  135|    366|  flip_normal_bit_decoder_.EndDecoding();
  136|    366|  return true;
  137|    366|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    366|  void SetQuantizationBits(int q) {
   85|    366|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    366|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    423|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    423|            attribute, transform, mesh_data),
   37|    423|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    841|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    423|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    423|    DRACO_DCHECK_EQ(i, 0);
   70|    423|    (void)i;
   71|    423|    return GeometryAttribute::POSITION;
   72|    423|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    422|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    422|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 422]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    422|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 4, False: 418]
  ------------------
   79|      4|      return false;  // Currently works only for 3 component positions.
   80|      4|    }
   81|    418|    predictor_.SetPositionAttribute(*att);
   82|    418|    return true;
   83|    422|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    417|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    417|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 42, False: 375]
  ------------------
  145|     42|    return false;
  146|     42|  }
  147|       |
  148|    375|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    375|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    375|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 147, False: 228]
  ------------------
  150|    147|    uint8_t prediction_mode;
  151|    147|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 146]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|    146|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 1, False: 145]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      1|      return false;
  157|      1|    }
  158|       |
  159|    145|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 145]
  ------------------
  160|    145|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|    145|  }
  164|    373|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    373|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 24, False: 349]
  ------------------
  168|     24|    return false;
  169|     24|  }
  170|       |
  171|    349|  return true;
  172|    373|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    349|                                      const PointIndex *entry_to_point_id_map) {
  103|    349|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    349|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    349|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    349|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    349|  const int corner_map_size =
  111|    349|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    349|  VectorD<int32_t, 3> pred_normal_3d;
  114|    349|  int32_t pred_normal_oct[2];
  115|       |
  116|   210k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 210k, False: 349]
  ------------------
  117|   210k|    const CornerIndex corner_id =
  118|   210k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   210k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   210k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   210k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   210k|                    octahedron_tool_box_.center_value());
  125|   210k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 134k, False: 75.5k]
  ------------------
  126|   134k|      pred_normal_3d = -pred_normal_3d;
  127|   134k|    }
  128|   210k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   210k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   210k|    const int data_offset = data_id * 2;
  132|   210k|    this->transform().ComputeOriginalValue(
  133|   210k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   210k|  }
  135|    349|  flip_normal_bit_decoder_.EndDecoding();
  136|    349|  return true;
  137|    349|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    349|  void SetQuantizationBits(int q) {
   85|    349|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    349|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    229|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    229|            attribute, transform, mesh_data),
   37|    229|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    183|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    183|            attribute, transform, mesh_data),
   37|    183|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    240|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    240|            attribute, transform, mesh_data),
   37|    240|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    169|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    169|            attribute, transform, mesh_data),
   37|    169|        predictor_(mesh_data) {}

_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    286|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    286|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 54, False: 232]
  ------------------
  105|     54|      this->normal_prediction_mode_ = mode;
  106|     54|      return true;
  107|    232|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 232, False: 0]
  ------------------
  108|    232|      this->normal_prediction_mode_ = mode;
  109|    232|      return true;
  110|    232|    }
  111|      0|    return false;
  112|    286|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   839k|                             DataTypeT *prediction) override {
   42|   839k|    DRACO_DCHECK(this->IsInitialized());
   43|   839k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   839k|    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|   839k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   839k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   839k|    VectorD<int64_t, 3> normal;
   53|   839k|    CornerIndex c_next, c_prev;
   54|  1.84M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.00M, False: 839k]
  ------------------
   55|       |      // Getting corners.
   56|  1.00M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 312, False: 1.00M]
  ------------------
   57|    312|        c_next = corner_table->Next(corner_id);
   58|    312|        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|   839k|    constexpr int64_t upper_bound = 1 << 29;
   85|   839k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 208, False: 839k]
  ------------------
   86|    208|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    208|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 65, False: 143]
  ------------------
   88|     65|        const int64_t quotient = abs_sum / upper_bound;
   89|     65|        normal = normal / quotient;
   90|     65|      }
   91|   839k|    } else {
   92|   839k|      const int64_t abs_sum = normal.AbsSum();
   93|   839k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 3.22k, False: 835k]
  ------------------
   94|  3.22k|        const int64_t quotient = abs_sum / upper_bound;
   95|  3.22k|        normal = normal / quotient;
   96|  3.22k|      }
   97|   839k|    }
   98|   839k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   839k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   839k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   839k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   839k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    221|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    221|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 35, False: 186]
  ------------------
  105|     35|      this->normal_prediction_mode_ = mode;
  106|     35|      return true;
  107|    186|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 186, False: 0]
  ------------------
  108|    186|      this->normal_prediction_mode_ = mode;
  109|    186|      return true;
  110|    186|    }
  111|      0|    return false;
  112|    221|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   285k|                             DataTypeT *prediction) override {
   42|   285k|    DRACO_DCHECK(this->IsInitialized());
   43|   285k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   285k|    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|   285k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   285k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   285k|    VectorD<int64_t, 3> normal;
   53|   285k|    CornerIndex c_next, c_prev;
   54|  1.98M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.70M, False: 285k]
  ------------------
   55|       |      // Getting corners.
   56|  1.70M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 204, False: 1.70M]
  ------------------
   57|    204|        c_next = corner_table->Next(corner_id);
   58|    204|        c_prev = corner_table->Previous(corner_id);
   59|  1.70M|      } else {
   60|  1.70M|        c_next = corner_table->Next(cit.Corner());
   61|  1.70M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.70M|      }
   63|  1.70M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.70M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.70M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.70M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.70M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.70M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.70M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.70M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.70M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.70M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.70M|      cit.Next();
   81|  1.70M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   285k|    constexpr int64_t upper_bound = 1 << 29;
   85|   285k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 136, False: 285k]
  ------------------
   86|    136|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    136|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 48, False: 88]
  ------------------
   88|     48|        const int64_t quotient = abs_sum / upper_bound;
   89|     48|        normal = normal / quotient;
   90|     48|      }
   91|   285k|    } else {
   92|   285k|      const int64_t abs_sum = normal.AbsSum();
   93|   285k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 104k, False: 180k]
  ------------------
   94|   104k|        const int64_t quotient = abs_sum / upper_bound;
   95|   104k|        normal = normal / quotient;
   96|   104k|      }
   97|   285k|    }
   98|   285k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   285k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   285k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   285k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   285k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    297|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    297|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 56, False: 241]
  ------------------
  105|     56|      this->normal_prediction_mode_ = mode;
  106|     56|      return true;
  107|    241|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 241, False: 0]
  ------------------
  108|    241|      this->normal_prediction_mode_ = mode;
  109|    241|      return true;
  110|    241|    }
  111|      0|    return false;
  112|    297|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|  1.16M|                             DataTypeT *prediction) override {
   42|  1.16M|    DRACO_DCHECK(this->IsInitialized());
   43|  1.16M|    typedef typename MeshDataT::CornerTable CornerTable;
   44|  1.16M|    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.16M|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|  1.16M|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|  1.16M|    VectorD<int64_t, 3> normal;
   53|  1.16M|    CornerIndex c_next, c_prev;
   54|  2.37M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.21M, False: 1.16M]
  ------------------
   55|       |      // Getting corners.
   56|  1.21M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 306, False: 1.21M]
  ------------------
   57|    306|        c_next = corner_table->Next(corner_id);
   58|    306|        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.16M|    constexpr int64_t upper_bound = 1 << 29;
   85|  1.16M|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 204, False: 1.16M]
  ------------------
   86|    204|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    204|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 55, False: 149]
  ------------------
   88|     55|        const int64_t quotient = abs_sum / upper_bound;
   89|     55|        normal = normal / quotient;
   90|     55|      }
   91|  1.16M|    } else {
   92|  1.16M|      const int64_t abs_sum = normal.AbsSum();
   93|  1.16M|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 2.81k, False: 1.16M]
  ------------------
   94|  2.81k|        const int64_t quotient = abs_sum / upper_bound;
   95|  2.81k|        normal = normal / quotient;
   96|  2.81k|      }
   97|  1.16M|    }
   98|  1.16M|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|  1.16M|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|  1.16M|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|  1.16M|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|  1.16M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    185|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    185|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 15, False: 170]
  ------------------
  105|     15|      this->normal_prediction_mode_ = mode;
  106|     15|      return true;
  107|    170|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 170, False: 0]
  ------------------
  108|    170|      this->normal_prediction_mode_ = mode;
  109|    170|      return true;
  110|    170|    }
  111|      0|    return false;
  112|    185|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   244k|                             DataTypeT *prediction) override {
   42|   244k|    DRACO_DCHECK(this->IsInitialized());
   43|   244k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   244k|    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|   244k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   244k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   244k|    VectorD<int64_t, 3> normal;
   53|   244k|    CornerIndex c_next, c_prev;
   54|  1.69M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.45M, False: 244k]
  ------------------
   55|       |      // Getting corners.
   56|  1.45M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 84, False: 1.45M]
  ------------------
   57|     84|        c_next = corner_table->Next(corner_id);
   58|     84|        c_prev = corner_table->Previous(corner_id);
   59|  1.45M|      } else {
   60|  1.45M|        c_next = corner_table->Next(cit.Corner());
   61|  1.45M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.45M|      }
   63|  1.45M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.45M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.45M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.45M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.45M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.45M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.45M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.45M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.45M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.45M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.45M|      cit.Next();
   81|  1.45M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   244k|    constexpr int64_t upper_bound = 1 << 29;
   85|   244k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 56, False: 244k]
  ------------------
   86|     56|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|     56|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 15, False: 41]
  ------------------
   88|     15|        const int64_t quotient = abs_sum / upper_bound;
   89|     15|        normal = normal / quotient;
   90|     15|      }
   91|   244k|    } else {
   92|   244k|      const int64_t abs_sum = normal.AbsSum();
   93|   244k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 92.6k, False: 151k]
  ------------------
   94|  92.6k|        const int64_t quotient = abs_sum / upper_bound;
   95|  92.6k|        normal = normal / quotient;
   96|  92.6k|      }
   97|   244k|    }
   98|   244k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   244k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   244k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   244k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   244k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    426|      : Base(md) {
   35|    426|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    426|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    634|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    634|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 189, False: 445]
  ------------------
  105|    189|      this->normal_prediction_mode_ = mode;
  106|    189|      return true;
  107|    445|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 445, False: 0]
  ------------------
  108|    445|      this->normal_prediction_mode_ = mode;
  109|    445|      return true;
  110|    445|    }
  111|      0|    return false;
  112|    634|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   517k|                             DataTypeT *prediction) override {
   42|   517k|    DRACO_DCHECK(this->IsInitialized());
   43|   517k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   517k|    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|   517k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   517k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   517k|    VectorD<int64_t, 3> normal;
   53|   517k|    CornerIndex c_next, c_prev;
   54|  1.92M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.40M, False: 517k]
  ------------------
   55|       |      // Getting corners.
   56|  1.40M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 409k, False: 993k]
  ------------------
   57|   409k|        c_next = corner_table->Next(corner_id);
   58|   409k|        c_prev = corner_table->Previous(corner_id);
   59|   993k|      } else {
   60|   993k|        c_next = corner_table->Next(cit.Corner());
   61|   993k|        c_prev = corner_table->Previous(cit.Corner());
   62|   993k|      }
   63|  1.40M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.40M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.40M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.40M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.40M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.40M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.40M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.40M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.40M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.40M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.40M|      cit.Next();
   81|  1.40M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   517k|    constexpr int64_t upper_bound = 1 << 29;
   85|   517k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 69.3k, False: 448k]
  ------------------
   86|  69.3k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  69.3k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 365, False: 68.9k]
  ------------------
   88|    365|        const int64_t quotient = abs_sum / upper_bound;
   89|    365|        normal = normal / quotient;
   90|    365|      }
   91|   448k|    } else {
   92|   448k|      const int64_t abs_sum = normal.AbsSum();
   93|   448k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 1.61k, False: 446k]
  ------------------
   94|  1.61k|        const int64_t quotient = abs_sum / upper_bound;
   95|  1.61k|        normal = normal / quotient;
   96|  1.61k|      }
   97|   448k|    }
   98|   517k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   517k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   517k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   517k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   517k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    423|      : Base(md) {
   35|    423|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    423|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    568|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    568|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 133, False: 435]
  ------------------
  105|    133|      this->normal_prediction_mode_ = mode;
  106|    133|      return true;
  107|    435|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 435, False: 0]
  ------------------
  108|    435|      this->normal_prediction_mode_ = mode;
  109|    435|      return true;
  110|    435|    }
  111|      0|    return false;
  112|    568|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   210k|                             DataTypeT *prediction) override {
   42|   210k|    DRACO_DCHECK(this->IsInitialized());
   43|   210k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   210k|    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|   210k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   210k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   210k|    VectorD<int64_t, 3> normal;
   53|   210k|    CornerIndex c_next, c_prev;
   54|  1.44M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.23M, False: 210k]
  ------------------
   55|       |      // Getting corners.
   56|  1.23M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 411k, False: 819k]
  ------------------
   57|   411k|        c_next = corner_table->Next(corner_id);
   58|   411k|        c_prev = corner_table->Previous(corner_id);
   59|   819k|      } else {
   60|   819k|        c_next = corner_table->Next(cit.Corner());
   61|   819k|        c_prev = corner_table->Previous(cit.Corner());
   62|   819k|      }
   63|  1.23M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.23M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.23M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.23M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.23M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.23M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.23M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.23M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.23M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.23M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.23M|      cit.Next();
   81|  1.23M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   210k|    constexpr int64_t upper_bound = 1 << 29;
   85|   210k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 69.4k, False: 141k]
  ------------------
   86|  69.4k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  69.4k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 253, False: 69.1k]
  ------------------
   88|    253|        const int64_t quotient = abs_sum / upper_bound;
   89|    253|        normal = normal / quotient;
   90|    253|      }
   91|   141k|    } else {
   92|   141k|      const int64_t abs_sum = normal.AbsSum();
   93|   141k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 2.96k, False: 138k]
  ------------------
   94|  2.96k|        const int64_t quotient = abs_sum / upper_bound;
   95|  2.96k|        normal = normal / quotient;
   96|  2.96k|      }
   97|   141k|    }
   98|   210k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   210k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   210k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   210k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   210k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    229|      : Base(md) {
   35|    229|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    229|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    183|      : Base(md) {
   35|    183|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    183|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    240|      : Base(md) {
   35|    240|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    240|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    169|      : Base(md) {
   35|    169|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    169|  };

_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.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_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_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_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    224|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    224|    pos_attribute_ = &position_attribute;
   43|    224|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    206|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    206|    entry_to_point_id_map_ = map;
   46|    206|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.68M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.68M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.68M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.68M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.68M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.68M|    return GetPositionForDataId(data_id);
   77|  3.68M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  3.68M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.68M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.68M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.68M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.68M|    VectorD<int64_t, 3> pos;
   68|  3.68M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.68M|    return pos;
   70|  3.68M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    180|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    180|    pos_attribute_ = &position_attribute;
   43|    180|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    165|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    165|    entry_to_point_id_map_ = map;
   46|    165|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.59M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.59M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.59M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.59M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.59M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.59M|    return GetPositionForDataId(data_id);
   77|  3.59M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  3.59M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.59M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.59M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.59M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.59M|    VectorD<int64_t, 3> pos;
   68|  3.59M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.59M|    return pos;
   70|  3.59M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    237|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    237|    pos_attribute_ = &position_attribute;
   43|    237|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    209|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    209|    entry_to_point_id_map_ = map;
   46|    209|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.15M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.15M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.15M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.15M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.15M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.15M|    return GetPositionForDataId(data_id);
   77|  3.15M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  3.15M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.15M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.15M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.15M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.15M|    VectorD<int64_t, 3> pos;
   68|  3.15M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.15M|    return pos;
   70|  3.15M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    165|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    165|    pos_attribute_ = &position_attribute;
   43|    165|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    150|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    150|    entry_to_point_id_map_ = map;
   46|    150|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    426|      : pos_attribute_(nullptr),
   36|    426|        entry_to_point_id_map_(nullptr),
   37|    426|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    426|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.32M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.32M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.32M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.32M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.32M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.32M|    return GetPositionForDataId(data_id);
   77|  3.32M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  3.32M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.32M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.32M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.32M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.32M|    VectorD<int64_t, 3> pos;
   68|  3.32M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.32M|    return pos;
   70|  3.32M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    422|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    422|    pos_attribute_ = &position_attribute;
   43|    422|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    366|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    366|    entry_to_point_id_map_ = map;
   46|    366|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    423|      : pos_attribute_(nullptr),
   36|    423|        entry_to_point_id_map_(nullptr),
   37|    423|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    423|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.67M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.67M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.67M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.67M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.67M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.67M|    return GetPositionForDataId(data_id);
   77|  2.67M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  2.67M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.67M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.67M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.67M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.67M|    VectorD<int64_t, 3> pos;
   68|  2.67M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.67M|    return pos;
   70|  2.67M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    418|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    418|    pos_attribute_ = &position_attribute;
   43|    418|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    349|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    349|    entry_to_point_id_map_ = map;
   46|    349|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    229|      : pos_attribute_(nullptr),
   36|    229|        entry_to_point_id_map_(nullptr),
   37|    229|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    229|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    183|      : pos_attribute_(nullptr),
   36|    183|        entry_to_point_id_map_(nullptr),
   37|    183|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    183|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    240|      : pos_attribute_(nullptr),
   36|    240|        entry_to_point_id_map_(nullptr),
   37|    240|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    240|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    169|      : pos_attribute_(nullptr),
   36|    169|        entry_to_point_id_map_(nullptr),
   37|    169|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    169|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}

_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    302|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    302|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    286|                          const PointIndex * /* entry_to_point_id_map */) {
   64|    286|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    286|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    286|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    286|      new DataTypeT[num_components]());
   70|       |
   71|    286|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    286|  const CornerTable *const table = this->mesh_data().corner_table();
   74|    286|  const std::vector<int32_t> *const vertex_to_data_map =
   75|    286|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    286|  const int corner_map_size =
   78|    286|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|  1.33M|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (79:19): [True: 1.33M, False: 286]
  ------------------
   80|  1.33M|    const CornerIndex start_corner_id =
   81|  1.33M|        this->mesh_data().data_to_corner_map()->at(p);
   82|       |
   83|  1.33M|    CornerIndex corner_id(start_corner_id);
   84|  1.33M|    int num_parallelograms = 0;
   85|  48.7M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (85:21): [True: 47.4M, False: 1.33M]
  ------------------
   86|  47.4M|      pred_vals[i] = static_cast<DataTypeT>(0);
   87|  47.4M|    }
   88|  3.52M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (88:12): [True: 2.19M, False: 1.33M]
  ------------------
   89|  2.19M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (89:11): [True: 337k, False: 1.85M]
  ------------------
   90|  2.19M|              p, corner_id, table, *vertex_to_data_map, out_data,
   91|  2.19M|              num_components, parallelogram_pred_vals.get())) {
   92|  17.4M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (92:25): [True: 17.1M, False: 337k]
  ------------------
   93|  17.1M|          pred_vals[c] =
   94|  17.1M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   95|  17.1M|        }
   96|   337k|        ++num_parallelograms;
   97|   337k|      }
   98|       |
   99|       |      // Proceed to the next corner attached to the vertex.
  100|  2.19M|      corner_id = table->SwingRight(corner_id);
  101|  2.19M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (101:11): [True: 168k, False: 2.02M]
  ------------------
  102|   168k|        corner_id = kInvalidCornerIndex;
  103|   168k|      }
  104|  2.19M|    }
  105|       |
  106|  1.33M|    const int dst_offset = p * num_components;
  107|  1.33M|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (107:9): [True: 1.15M, False: 181k]
  ------------------
  108|       |      // No parallelogram was valid.
  109|       |      // We use the last decoded point as a reference.
  110|  1.15M|      const int src_offset = (p - 1) * num_components;
  111|  1.15M|      this->transform().ComputeOriginalValue(
  112|  1.15M|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  113|  1.15M|    } else {
  114|       |      // Compute the correction from the predicted value.
  115|  8.94M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (115:23): [True: 8.76M, False: 181k]
  ------------------
  116|  8.76M|        pred_vals[c] /= num_parallelograms;
  117|  8.76M|      }
  118|   181k|      this->transform().ComputeOriginalValue(
  119|   181k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  120|   181k|    }
  121|  1.33M|  }
  122|    286|  return true;
  123|    286|}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    531|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    531|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    500|                          const PointIndex * /* entry_to_point_id_map */) {
   64|    500|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    500|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    500|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    500|      new DataTypeT[num_components]());
   70|       |
   71|    500|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    500|  const CornerTable *const table = this->mesh_data().corner_table();
   74|    500|  const std::vector<int32_t> *const vertex_to_data_map =
   75|    500|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    500|  const int corner_map_size =
   78|    500|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|   949k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (79:19): [True: 948k, False: 500]
  ------------------
   80|   948k|    const CornerIndex start_corner_id =
   81|   948k|        this->mesh_data().data_to_corner_map()->at(p);
   82|       |
   83|   948k|    CornerIndex corner_id(start_corner_id);
   84|   948k|    int num_parallelograms = 0;
   85|  26.0M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (85:21): [True: 25.0M, False: 948k]
  ------------------
   86|  25.0M|      pred_vals[i] = static_cast<DataTypeT>(0);
   87|  25.0M|    }
   88|  6.54M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (88:12): [True: 5.59M, False: 948k]
  ------------------
   89|  5.59M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (89:11): [True: 1.84M, False: 3.75M]
  ------------------
   90|  5.59M|              p, corner_id, table, *vertex_to_data_map, out_data,
   91|  5.59M|              num_components, parallelogram_pred_vals.get())) {
   92|  50.3M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (92:25): [True: 48.4M, False: 1.84M]
  ------------------
   93|  48.4M|          pred_vals[c] =
   94|  48.4M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   95|  48.4M|        }
   96|  1.84M|        ++num_parallelograms;
   97|  1.84M|      }
   98|       |
   99|       |      // Proceed to the next corner attached to the vertex.
  100|  5.59M|      corner_id = table->SwingRight(corner_id);
  101|  5.59M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (101:11): [True: 926k, False: 4.67M]
  ------------------
  102|   926k|        corner_id = kInvalidCornerIndex;
  103|   926k|      }
  104|  5.59M|    }
  105|       |
  106|   948k|    const int dst_offset = p * num_components;
  107|   948k|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (107:9): [True: 3.13k, False: 945k]
  ------------------
  108|       |      // No parallelogram was valid.
  109|       |      // We use the last decoded point as a reference.
  110|  3.13k|      const int src_offset = (p - 1) * num_components;
  111|  3.13k|      this->transform().ComputeOriginalValue(
  112|  3.13k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  113|   945k|    } else {
  114|       |      // Compute the correction from the predicted value.
  115|  25.8M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (115:23): [True: 24.9M, False: 945k]
  ------------------
  116|  24.9M|        pred_vals[c] /= num_parallelograms;
  117|  24.9M|      }
  118|   945k|      this->transform().ComputeOriginalValue(
  119|   945k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  120|   945k|    }
  121|   948k|  }
  122|    500|  return true;
  123|    500|}

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

_ZN5draco30ComputeParallelogramPredictionINS_24MeshAttributeCornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  5.59M|    int num_components, DataTypeT *out_prediction) {
   49|  5.59M|  const CornerIndex oci = table->Opposite(ci);
   50|  5.59M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 4.07M, False: 1.52M]
  ------------------
   51|  4.07M|    return false;
   52|  4.07M|  }
   53|  1.52M|  int vert_opp, vert_next, vert_prev;
   54|  1.52M|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  1.52M|                                        &vert_opp, &vert_next, &vert_prev);
   56|  1.52M|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 871k, False: 648k]
  |  Branch (56:35): [True: 695k, False: 176k]
  ------------------
   57|   695k|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 661k, False: 33.3k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|   661k|    const int v_opp_off = vert_opp * num_components;
   60|   661k|    const int v_next_off = vert_next * num_components;
   61|   661k|    const int v_prev_off = vert_prev * num_components;
   62|  36.4M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 35.7M, False: 661k]
  ------------------
   63|  35.7M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  35.7M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  35.7M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  35.7M|      const int64_t result =
   67|  35.7M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  35.7M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  35.7M|    }
   71|   661k|    return true;
   72|   661k|  }
   73|   858k|  return false;  // Not all data is available for prediction
   74|  1.52M|}
_ZN5draco23GetParallelogramEntriesINS_24MeshAttributeCornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  1.52M|    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.52M|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  1.52M|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  1.52M|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  1.52M|}
_ZN5draco30ComputeParallelogramPredictionINS_11CornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  6.74M|    int num_components, DataTypeT *out_prediction) {
   49|  6.74M|  const CornerIndex oci = table->Opposite(ci);
   50|  6.74M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 40.2k, False: 6.70M]
  ------------------
   51|  40.2k|    return false;
   52|  40.2k|  }
   53|  6.70M|  int vert_opp, vert_next, vert_prev;
   54|  6.70M|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  6.70M|                                        &vert_opp, &vert_next, &vert_prev);
   56|  6.70M|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 3.43M, False: 3.27M]
  |  Branch (56:35): [True: 2.67M, False: 761k]
  ------------------
   57|  2.67M|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 2.35M, False: 311k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|  2.35M|    const int v_opp_off = vert_opp * num_components;
   60|  2.35M|    const int v_next_off = vert_next * num_components;
   61|  2.35M|    const int v_prev_off = vert_prev * num_components;
   62|   100M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 97.9M, False: 2.35M]
  ------------------
   63|  97.9M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  97.9M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  97.9M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  97.9M|      const int64_t result =
   67|  97.9M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  97.9M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  97.9M|    }
   71|  2.35M|    return true;
   72|  2.35M|  }
   73|  4.34M|  return false;  // Not all data is available for prediction
   74|  6.70M|}
_ZN5draco23GetParallelogramEntriesINS_11CornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  6.70M|    int *next_entry, int *prev_entry) {
   32|       |  // One vertex of the input |table| correspond to exactly one attribute value
   33|       |  // entry. The |table| can be either CornerTable for per-vertex attributes,
   34|       |  // or MeshAttributeCornerTable for attributes with interior seams.
   35|  6.70M|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  6.70M|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  6.70M|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  6.70M|}

_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_i:
   44|    197|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   45|    197|            attribute, transform, mesh_data),
   46|    197|        pos_attribute_(nullptr),
   47|    197|        entry_to_point_id_map_(nullptr),
   48|    197|        num_components_(0),
   49|    197|        version_(version) {}
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   71|    391|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   73|    197|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   74|    197|    DRACO_DCHECK_EQ(i, 0);
   75|    197|    (void)i;
   76|    197|    return GeometryAttribute::POSITION;
   77|    197|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   79|    196|  bool SetParentAttribute(const PointAttribute *att) override {
   80|    196|    if (att == nullptr) {
  ------------------
  |  Branch (80:9): [True: 0, False: 196]
  ------------------
   81|      0|      return false;
   82|      0|    }
   83|    196|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (83:9): [True: 0, False: 196]
  ------------------
   84|      0|      return false;  // Invalid attribute type.
   85|      0|    }
   86|    196|    if (att->num_components() != 3) {
  ------------------
  |  Branch (86:9): [True: 2, False: 194]
  ------------------
   87|      2|      return false;  // Currently works only for 3 component positions.
   88|      2|    }
   89|    194|    pos_attribute_ = att;
   90|    194|    return true;
   91|    196|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  153|    189|    DecodePredictionData(DecoderBuffer *buffer) {
  154|       |  // Decode the delta coded orientations.
  155|    189|  uint32_t num_orientations = 0;
  156|    189|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    189|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (156:7): [True: 37, False: 152]
  ------------------
  157|     37|    if (!buffer->Decode(&num_orientations)) {
  ------------------
  |  Branch (157:9): [True: 1, False: 36]
  ------------------
  158|      1|      return false;
  159|      1|    }
  160|    152|  } else {
  161|    152|    if (!DecodeVarint(&num_orientations, buffer)) {
  ------------------
  |  Branch (161:9): [True: 1, False: 151]
  ------------------
  162|      1|      return false;
  163|      1|    }
  164|    152|  }
  165|    187|  if (num_orientations == 0) {
  ------------------
  |  Branch (165:7): [True: 3, False: 184]
  ------------------
  166|      3|    return false;
  167|      3|  }
  168|    184|  if (num_orientations > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (168:7): [True: 13, False: 171]
  ------------------
  169|       |    // We can't have more orientations than the maximum number of decoded
  170|       |    // values.
  171|     13|    return false;
  172|     13|  }
  173|    171|  orientations_.resize(num_orientations);
  174|    171|  bool last_orientation = true;
  175|    171|  RAnsBitDecoder decoder;
  176|    171|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (176:7): [True: 7, False: 164]
  ------------------
  177|      7|    return false;
  178|      7|  }
  179|   276k|  for (uint32_t i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (179:24): [True: 275k, False: 164]
  ------------------
  180|   275k|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (180:9): [True: 85.8k, False: 190k]
  ------------------
  181|  85.8k|      last_orientation = !last_orientation;
  182|  85.8k|    }
  183|   275k|    orientations_[i] = last_orientation;
  184|   275k|  }
  185|    164|  decoder.EndDecoding();
  186|    164|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  187|    164|                                     MeshDataT>::DecodePredictionData(buffer);
  188|    171|}
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  125|    123|                          const PointIndex *entry_to_point_id_map) {
  126|    123|  if (num_components != 2) {
  ------------------
  |  Branch (126:7): [True: 4, False: 119]
  ------------------
  127|       |    // Corrupt/malformed input. Two output components are req'd.
  128|      4|    return false;
  129|      4|  }
  130|    119|  num_components_ = num_components;
  131|    119|  entry_to_point_id_map_ = entry_to_point_id_map;
  132|    119|  predicted_value_ =
  133|    119|      std::unique_ptr<DataTypeT[]>(new DataTypeT[num_components]);
  134|    119|  this->transform().Init(num_components);
  135|       |
  136|    119|  const int corner_map_size =
  137|    119|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  138|   350k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (138:19): [True: 350k, False: 89]
  ------------------
  139|   350k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  140|   350k|    if (!ComputePredictedValue(corner_id, out_data, p)) {
  ------------------
  |  Branch (140:9): [True: 30, False: 350k]
  ------------------
  141|     30|      return false;
  142|     30|    }
  143|       |
  144|   350k|    const int dst_offset = p * num_components;
  145|   350k|    this->transform().ComputeOriginalValue(
  146|   350k|        predicted_value_.get(), in_corr + dst_offset, out_data + dst_offset);
  147|   350k|  }
  148|     89|  return true;
  149|    119|}
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
  193|   350k|                          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|   350k|  const CornerIndex next_corner_id =
  198|   350k|      this->mesh_data().corner_table()->Next(corner_id);
  199|   350k|  const CornerIndex prev_corner_id =
  200|   350k|      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|   350k|  int next_data_id, prev_data_id;
  204|       |
  205|   350k|  int next_vert_id, prev_vert_id;
  206|   350k|  next_vert_id =
  207|   350k|      this->mesh_data().corner_table()->Vertex(next_corner_id).value();
  208|   350k|  prev_vert_id =
  209|   350k|      this->mesh_data().corner_table()->Vertex(prev_corner_id).value();
  210|       |
  211|   350k|  next_data_id = this->mesh_data().vertex_to_data_map()->at(next_vert_id);
  212|   350k|  prev_data_id = this->mesh_data().vertex_to_data_map()->at(prev_vert_id);
  213|       |
  214|   350k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (214:7): [True: 257k, False: 92.5k]
  |  Branch (214:33): [True: 165k, False: 92.5k]
  ------------------
  215|       |    // Both other corners have available UV coordinates for prediction.
  216|   165k|    const Vector2f n_uv = GetTexCoordForEntryId(next_data_id, data);
  217|   165k|    const Vector2f p_uv = GetTexCoordForEntryId(prev_data_id, data);
  218|   165k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (218:9): [True: 163k, False: 1.79k]
  ------------------
  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|   327k|      for (const int i : {0, 1}) {
  ------------------
  |  Branch (222:24): [True: 327k, False: 163k]
  ------------------
  223|   327k|        if (std::isnan(p_uv[i]) || static_cast<double>(p_uv[i]) > INT_MAX ||
  ------------------
  |  Branch (223:13): [True: 0, False: 327k]
  |  Branch (223:36): [True: 55.5k, False: 271k]
  ------------------
  224|   271k|            static_cast<double>(p_uv[i]) < INT_MIN) {
  ------------------
  |  Branch (224:13): [True: 0, False: 271k]
  ------------------
  225|  55.5k|          predicted_value_[i] = INT_MIN;
  226|   271k|        } else {
  227|   271k|          predicted_value_[i] = static_cast<int>(p_uv[i]);
  228|   271k|        }
  229|   327k|      }
  230|   163k|      return true;
  231|   163k|    }
  232|       |
  233|       |    // Get positions at all corners.
  234|  1.79k|    const Vector3f tip_pos = GetPositionForEntryId(data_id);
  235|  1.79k|    const Vector3f next_pos = GetPositionForEntryId(next_data_id);
  236|  1.79k|    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|  1.79k|    const Vector3f pn = prev_pos - next_pos;
  261|  1.79k|    const Vector3f cn = tip_pos - next_pos;
  262|  1.79k|    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|  1.79k|    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|  1.79k|    if (version_ < DRACO_BITSTREAM_VERSION(1, 2) || pn_norm2_squared > 0) {
  ------------------
  |  |  115|  3.58k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (273:9): [True: 0, False: 1.79k]
  |  Branch (273:53): [True: 334, False: 1.45k]
  ------------------
  274|    334|      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|    334|      t = sqrt((cn - pn * s).SquaredNorm() / pn_norm2_squared);
  279|  1.45k|    } else {
  280|  1.45k|      s = 0;
  281|  1.45k|      t = 0;
  282|  1.45k|    }
  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|  1.79k|    const Vector2f pn_uv = p_uv - n_uv;
  299|  1.79k|    const float pnus = pn_uv[0] * s + n_uv[0];
  300|  1.79k|    const float pnut = pn_uv[0] * t;
  301|  1.79k|    const float pnvs = pn_uv[1] * s + n_uv[1];
  302|  1.79k|    const float pnvt = pn_uv[1] * t;
  303|  1.79k|    Vector2f predicted_uv;
  304|  1.79k|    if (orientations_.empty()) {
  ------------------
  |  Branch (304:9): [True: 30, False: 1.76k]
  ------------------
  305|     30|      return false;
  306|     30|    }
  307|       |
  308|       |    // When decoding the data, we already know which orientation to use.
  309|  1.76k|    const bool orientation = orientations_.back();
  310|  1.76k|    orientations_.pop_back();
  311|  1.76k|    if (orientation) {
  ------------------
  |  Branch (311:9): [True: 1.15k, False: 607]
  ------------------
  312|  1.15k|      predicted_uv = Vector2f(pnus - pnvt, pnvs + pnut);
  313|  1.15k|    } else {
  314|    607|      predicted_uv = Vector2f(pnus + pnvt, pnvs - pnut);
  315|    607|    }
  316|  1.76k|    if (std::is_integral<DataTypeT>::value) {
  ------------------
  |  Branch (316:9): [True: 1.76k, 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|  1.76k|      const double u = floor(predicted_uv[0] + 0.5);
  321|  1.76k|      if (std::isnan(u) || u > INT_MAX || u < INT_MIN) {
  ------------------
  |  Branch (321:11): [True: 0, False: 1.76k]
  |  Branch (321:28): [True: 48, False: 1.71k]
  |  Branch (321:43): [True: 36, False: 1.67k]
  ------------------
  322|     84|        predicted_value_[0] = INT_MIN;
  323|  1.67k|      } else {
  324|  1.67k|        predicted_value_[0] = static_cast<int>(u);
  325|  1.67k|      }
  326|  1.76k|      const double v = floor(predicted_uv[1] + 0.5);
  327|  1.76k|      if (std::isnan(v) || v > INT_MAX || v < INT_MIN) {
  ------------------
  |  Branch (327:11): [True: 0, False: 1.76k]
  |  Branch (327:28): [True: 53, False: 1.70k]
  |  Branch (327:43): [True: 39, False: 1.66k]
  ------------------
  328|     92|        predicted_value_[1] = INT_MIN;
  329|  1.66k|      } else {
  330|  1.66k|        predicted_value_[1] = static_cast<int>(v);
  331|  1.66k|      }
  332|  1.76k|    } 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|  1.76k|    return true;
  338|  1.79k|  }
  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|   185k|  int data_offset = 0;
  343|   185k|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (343:7): [True: 92.5k, False: 92.5k]
  ------------------
  344|       |    // Use the value on the previous corner as the prediction.
  345|  92.5k|    data_offset = prev_data_id * num_components_;
  346|  92.5k|  }
  347|   185k|  if (next_data_id < data_id) {
  ------------------
  |  Branch (347:7): [True: 3, False: 185k]
  ------------------
  348|       |    // Use the value on the next corner as the prediction.
  349|      3|    data_offset = next_data_id * num_components_;
  350|   185k|  } else {
  351|       |    // None of the other corners have a valid value. Use the last encoded value
  352|       |    // as the prediction if possible.
  353|   185k|    if (data_id > 0) {
  ------------------
  |  Branch (353:9): [True: 185k, False: 119]
  ------------------
  354|   185k|      data_offset = (data_id - 1) * num_components_;
  355|   185k|    } else {
  356|       |      // We are encoding the first value. Predict 0.
  357|    357|      for (int i = 0; i < num_components_; ++i) {
  ------------------
  |  Branch (357:23): [True: 238, False: 119]
  ------------------
  358|    238|        predicted_value_[i] = 0;
  359|    238|      }
  360|    119|      return true;
  361|    119|    }
  362|   185k|  }
  363|   555k|  for (int i = 0; i < num_components_; ++i) {
  ------------------
  |  Branch (363:19): [True: 370k, False: 185k]
  ------------------
  364|   370k|    predicted_value_[i] = data[data_offset + i];
  365|   370k|  }
  366|   185k|  return true;
  367|   185k|}
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetTexCoordForEntryIdEiPKi:
  102|   330k|  Vector2f GetTexCoordForEntryId(int entry_id, const DataTypeT *data) const {
  103|   330k|    const int data_offset = entry_id * num_components_;
  104|   330k|    return Vector2f(static_cast<float>(data[data_offset]),
  105|   330k|                    static_cast<float>(data[data_offset + 1]));
  106|   330k|  }
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetPositionForEntryIdEi:
   94|  5.37k|  Vector3f GetPositionForEntryId(int entry_id) const {
   95|  5.37k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   96|  5.37k|    Vector3f pos;
   97|  5.37k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   98|  5.37k|                                 &pos[0]);
   99|  5.37k|    return pos;
  100|  5.37k|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_i:
   44|    179|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   45|    179|            attribute, transform, mesh_data),
   46|    179|        pos_attribute_(nullptr),
   47|    179|        entry_to_point_id_map_(nullptr),
   48|    179|        num_components_(0),
   49|    179|        version_(version) {}
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   71|    354|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   73|    179|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   74|    179|    DRACO_DCHECK_EQ(i, 0);
   75|    179|    (void)i;
   76|    179|    return GeometryAttribute::POSITION;
   77|    179|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   79|    177|  bool SetParentAttribute(const PointAttribute *att) override {
   80|    177|    if (att == nullptr) {
  ------------------
  |  Branch (80:9): [True: 0, False: 177]
  ------------------
   81|      0|      return false;
   82|      0|    }
   83|    177|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (83:9): [True: 0, False: 177]
  ------------------
   84|      0|      return false;  // Invalid attribute type.
   85|      0|    }
   86|    177|    if (att->num_components() != 3) {
  ------------------
  |  Branch (86:9): [True: 2, False: 175]
  ------------------
   87|      2|      return false;  // Currently works only for 3 component positions.
   88|      2|    }
   89|    175|    pos_attribute_ = att;
   90|    175|    return true;
   91|    177|  }
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  153|    164|    DecodePredictionData(DecoderBuffer *buffer) {
  154|       |  // Decode the delta coded orientations.
  155|    164|  uint32_t num_orientations = 0;
  156|    164|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    164|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (156:7): [True: 8, False: 156]
  ------------------
  157|      8|    if (!buffer->Decode(&num_orientations)) {
  ------------------
  |  Branch (157:9): [True: 1, False: 7]
  ------------------
  158|      1|      return false;
  159|      1|    }
  160|    156|  } else {
  161|    156|    if (!DecodeVarint(&num_orientations, buffer)) {
  ------------------
  |  Branch (161:9): [True: 1, False: 155]
  ------------------
  162|      1|      return false;
  163|      1|    }
  164|    156|  }
  165|    162|  if (num_orientations == 0) {
  ------------------
  |  Branch (165:7): [True: 3, False: 159]
  ------------------
  166|      3|    return false;
  167|      3|  }
  168|    159|  if (num_orientations > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (168:7): [True: 12, False: 147]
  ------------------
  169|       |    // We can't have more orientations than the maximum number of decoded
  170|       |    // values.
  171|     12|    return false;
  172|     12|  }
  173|    147|  orientations_.resize(num_orientations);
  174|    147|  bool last_orientation = true;
  175|    147|  RAnsBitDecoder decoder;
  176|    147|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (176:7): [True: 6, False: 141]
  ------------------
  177|      6|    return false;
  178|      6|  }
  179|   213k|  for (uint32_t i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (179:24): [True: 213k, False: 141]
  ------------------
  180|   213k|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (180:9): [True: 133k, False: 80.3k]
  ------------------
  181|   133k|      last_orientation = !last_orientation;
  182|   133k|    }
  183|   213k|    orientations_[i] = last_orientation;
  184|   213k|  }
  185|    141|  decoder.EndDecoding();
  186|    141|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  187|    141|                                     MeshDataT>::DecodePredictionData(buffer);
  188|    147|}
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  125|    126|                          const PointIndex *entry_to_point_id_map) {
  126|    126|  if (num_components != 2) {
  ------------------
  |  Branch (126:7): [True: 5, False: 121]
  ------------------
  127|       |    // Corrupt/malformed input. Two output components are req'd.
  128|      5|    return false;
  129|      5|  }
  130|    121|  num_components_ = num_components;
  131|    121|  entry_to_point_id_map_ = entry_to_point_id_map;
  132|    121|  predicted_value_ =
  133|    121|      std::unique_ptr<DataTypeT[]>(new DataTypeT[num_components]);
  134|    121|  this->transform().Init(num_components);
  135|       |
  136|    121|  const int corner_map_size =
  137|    121|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  138|   166k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (138:19): [True: 166k, False: 102]
  ------------------
  139|   166k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  140|   166k|    if (!ComputePredictedValue(corner_id, out_data, p)) {
  ------------------
  |  Branch (140:9): [True: 19, False: 166k]
  ------------------
  141|     19|      return false;
  142|     19|    }
  143|       |
  144|   166k|    const int dst_offset = p * num_components;
  145|   166k|    this->transform().ComputeOriginalValue(
  146|   166k|        predicted_value_.get(), in_corr + dst_offset, out_data + dst_offset);
  147|   166k|  }
  148|    102|  return true;
  149|    121|}
_ZN5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
  193|   166k|                          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|   166k|  const CornerIndex next_corner_id =
  198|   166k|      this->mesh_data().corner_table()->Next(corner_id);
  199|   166k|  const CornerIndex prev_corner_id =
  200|   166k|      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|   166k|  int next_data_id, prev_data_id;
  204|       |
  205|   166k|  int next_vert_id, prev_vert_id;
  206|   166k|  next_vert_id =
  207|   166k|      this->mesh_data().corner_table()->Vertex(next_corner_id).value();
  208|   166k|  prev_vert_id =
  209|   166k|      this->mesh_data().corner_table()->Vertex(prev_corner_id).value();
  210|       |
  211|   166k|  next_data_id = this->mesh_data().vertex_to_data_map()->at(next_vert_id);
  212|   166k|  prev_data_id = this->mesh_data().vertex_to_data_map()->at(prev_vert_id);
  213|       |
  214|   166k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (214:7): [True: 166k, False: 340]
  |  Branch (214:33): [True: 165k, False: 272]
  ------------------
  215|       |    // Both other corners have available UV coordinates for prediction.
  216|   165k|    const Vector2f n_uv = GetTexCoordForEntryId(next_data_id, data);
  217|   165k|    const Vector2f p_uv = GetTexCoordForEntryId(prev_data_id, data);
  218|   165k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (218:9): [True: 159k, False: 6.54k]
  ------------------
  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|   318k|      for (const int i : {0, 1}) {
  ------------------
  |  Branch (222:24): [True: 318k, False: 159k]
  ------------------
  223|   318k|        if (std::isnan(p_uv[i]) || static_cast<double>(p_uv[i]) > INT_MAX ||
  ------------------
  |  Branch (223:13): [True: 0, False: 318k]
  |  Branch (223:36): [True: 12.4k, False: 306k]
  ------------------
  224|   306k|            static_cast<double>(p_uv[i]) < INT_MIN) {
  ------------------
  |  Branch (224:13): [True: 0, False: 306k]
  ------------------
  225|  12.4k|          predicted_value_[i] = INT_MIN;
  226|   306k|        } else {
  227|   306k|          predicted_value_[i] = static_cast<int>(p_uv[i]);
  228|   306k|        }
  229|   318k|      }
  230|   159k|      return true;
  231|   159k|    }
  232|       |
  233|       |    // Get positions at all corners.
  234|  6.54k|    const Vector3f tip_pos = GetPositionForEntryId(data_id);
  235|  6.54k|    const Vector3f next_pos = GetPositionForEntryId(next_data_id);
  236|  6.54k|    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|  6.54k|    const Vector3f pn = prev_pos - next_pos;
  261|  6.54k|    const Vector3f cn = tip_pos - next_pos;
  262|  6.54k|    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|  6.54k|    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|  6.54k|    if (version_ < DRACO_BITSTREAM_VERSION(1, 2) || pn_norm2_squared > 0) {
  ------------------
  |  |  115|  13.0k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (273:9): [True: 0, False: 6.54k]
  |  Branch (273:53): [True: 159, False: 6.38k]
  ------------------
  274|    159|      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|    159|      t = sqrt((cn - pn * s).SquaredNorm() / pn_norm2_squared);
  279|  6.38k|    } else {
  280|  6.38k|      s = 0;
  281|  6.38k|      t = 0;
  282|  6.38k|    }
  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|  6.54k|    const Vector2f pn_uv = p_uv - n_uv;
  299|  6.54k|    const float pnus = pn_uv[0] * s + n_uv[0];
  300|  6.54k|    const float pnut = pn_uv[0] * t;
  301|  6.54k|    const float pnvs = pn_uv[1] * s + n_uv[1];
  302|  6.54k|    const float pnvt = pn_uv[1] * t;
  303|  6.54k|    Vector2f predicted_uv;
  304|  6.54k|    if (orientations_.empty()) {
  ------------------
  |  Branch (304:9): [True: 19, False: 6.52k]
  ------------------
  305|     19|      return false;
  306|     19|    }
  307|       |
  308|       |    // When decoding the data, we already know which orientation to use.
  309|  6.52k|    const bool orientation = orientations_.back();
  310|  6.52k|    orientations_.pop_back();
  311|  6.52k|    if (orientation) {
  ------------------
  |  Branch (311:9): [True: 3.33k, False: 3.19k]
  ------------------
  312|  3.33k|      predicted_uv = Vector2f(pnus - pnvt, pnvs + pnut);
  313|  3.33k|    } else {
  314|  3.19k|      predicted_uv = Vector2f(pnus + pnvt, pnvs - pnut);
  315|  3.19k|    }
  316|  6.52k|    if (std::is_integral<DataTypeT>::value) {
  ------------------
  |  Branch (316:9): [True: 6.52k, 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|  6.52k|      const double u = floor(predicted_uv[0] + 0.5);
  321|  6.52k|      if (std::isnan(u) || u > INT_MAX || u < INT_MIN) {
  ------------------
  |  Branch (321:11): [True: 0, False: 6.52k]
  |  Branch (321:28): [True: 72, False: 6.45k]
  |  Branch (321:43): [True: 22, False: 6.43k]
  ------------------
  322|     94|        predicted_value_[0] = INT_MIN;
  323|  6.43k|      } else {
  324|  6.43k|        predicted_value_[0] = static_cast<int>(u);
  325|  6.43k|      }
  326|  6.52k|      const double v = floor(predicted_uv[1] + 0.5);
  327|  6.52k|      if (std::isnan(v) || v > INT_MAX || v < INT_MIN) {
  ------------------
  |  Branch (327:11): [True: 0, False: 6.52k]
  |  Branch (327:28): [True: 59, False: 6.46k]
  |  Branch (327:43): [True: 24, False: 6.44k]
  ------------------
  328|     83|        predicted_value_[1] = INT_MIN;
  329|  6.44k|      } else {
  330|  6.44k|        predicted_value_[1] = static_cast<int>(v);
  331|  6.44k|      }
  332|  6.52k|    } 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|  6.52k|    return true;
  338|  6.54k|  }
  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|    612|  int data_offset = 0;
  343|    612|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (343:7): [True: 272, False: 340]
  ------------------
  344|       |    // Use the value on the previous corner as the prediction.
  345|    272|    data_offset = prev_data_id * num_components_;
  346|    272|  }
  347|    612|  if (next_data_id < data_id) {
  ------------------
  |  Branch (347:7): [True: 94, False: 518]
  ------------------
  348|       |    // Use the value on the next corner as the prediction.
  349|     94|    data_offset = next_data_id * num_components_;
  350|    518|  } else {
  351|       |    // None of the other corners have a valid value. Use the last encoded value
  352|       |    // as the prediction if possible.
  353|    518|    if (data_id > 0) {
  ------------------
  |  Branch (353:9): [True: 397, False: 121]
  ------------------
  354|    397|      data_offset = (data_id - 1) * num_components_;
  355|    397|    } else {
  356|       |      // We are encoding the first value. Predict 0.
  357|    363|      for (int i = 0; i < num_components_; ++i) {
  ------------------
  |  Branch (357:23): [True: 242, False: 121]
  ------------------
  358|    242|        predicted_value_[i] = 0;
  359|    242|      }
  360|    121|      return true;
  361|    121|    }
  362|    518|  }
  363|  1.47k|  for (int i = 0; i < num_components_; ++i) {
  ------------------
  |  Branch (363:19): [True: 982, False: 491]
  ------------------
  364|    982|    predicted_value_[i] = data[data_offset + i];
  365|    982|  }
  366|    491|  return true;
  367|    612|}
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetTexCoordForEntryIdEiPKi:
  102|   331k|  Vector2f GetTexCoordForEntryId(int entry_id, const DataTypeT *data) const {
  103|   331k|    const int data_offset = entry_id * num_components_;
  104|   331k|    return Vector2f(static_cast<float>(data[data_offset]),
  105|   331k|                    static_cast<float>(data[data_offset + 1]));
  106|   331k|  }
_ZNK5draco36MeshPredictionSchemeTexCoordsDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetPositionForEntryIdEi:
   94|  19.6k|  Vector3f GetPositionForEntryId(int entry_id) const {
   95|  19.6k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   96|  19.6k|    Vector3f pos;
   97|  19.6k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   98|  19.6k|                                 &pos[0]);
   99|  19.6k|    return pos;
  100|  19.6k|  }

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

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

_ZNK5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|    176|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    565|  bool AreCorrectionsPositive() override {
   71|    565|    return transform_.AreCorrectionsPositive();
   72|    565|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    161|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|    161|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 29, False: 132]
  ------------------
   50|     29|      return false;
   51|     29|    }
   52|    132|    return true;
   53|    161|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE9transformEv:
   81|  1.27M|  inline Transform &transform() { return transform_; }
_ZNK5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|    241|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    627|  bool AreCorrectionsPositive() override {
   71|    627|    return transform_.AreCorrectionsPositive();
   72|    627|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    227|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|    227|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 31, False: 196]
  ------------------
   50|     31|      return false;
   51|     31|    }
   52|    196|    return true;
   53|    227|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE9transformEv:
   81|  1.90M|  inline Transform &transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   46|  5.45k|      : attribute_(attribute), transform_(transform) {}
_ZNK5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22GetNumParentAttributesEv:
   58|  3.68k|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22AreCorrectionsPositiveEv:
   70|  5.23k|  bool AreCorrectionsPositive() override {
   71|  5.23k|    return transform_.AreCorrectionsPositive();
   72|  5.23k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|  4.04k|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|  4.04k|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 279, False: 3.76k]
  ------------------
   50|    279|      return false;
   51|    279|    }
   52|  3.76k|    return true;
   53|  4.04k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE9transformEv:
   81|  8.52M|  inline Transform &transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    588|      : attribute_(attribute), transform_(transform) {}
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    650|      : attribute_(attribute), transform_(transform) {}

_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    588|                                 const PointCloudDecoder *decoder) {
  188|    588|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    588|      method, att_id, decoder, TransformT());
  190|    588|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    588|                                 const TransformT &transform) {
  156|    588|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 588]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    588|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|    588|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 588, 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|    588|    const MeshDecoder *const mesh_decoder =
  167|    588|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|    588|    auto ret = CreateMeshPredictionScheme<
  170|    588|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    588|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    588|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    588|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 412, False: 176]
  ------------------
  174|    412|      return ret;
  175|    412|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    588|  }
  178|       |  // Create delta decoder.
  179|    176|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    176|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    588|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    244|      uint16_t bitstream_version) {
  143|    244|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    244|        method, attribute, transform, mesh_data, bitstream_version);
  145|    244|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    244|        uint16_t bitstream_version) {
  127|    244|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 229, False: 15]
  ------------------
  128|    229|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    229|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    229|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    229|                                                  mesh_data));
  132|    229|      }
  133|     15|      return nullptr;
  134|    244|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    187|      uint16_t bitstream_version) {
  143|    187|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    187|        method, attribute, transform, mesh_data, bitstream_version);
  145|    187|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    187|        uint16_t bitstream_version) {
  127|    187|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 183, False: 4]
  ------------------
  128|    183|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    183|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    183|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    183|                                                  mesh_data));
  132|    183|      }
  133|      4|      return nullptr;
  134|    187|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    650|                                 const PointCloudDecoder *decoder) {
  188|    650|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    650|      method, att_id, decoder, TransformT());
  190|    650|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    650|                                 const TransformT &transform) {
  156|    650|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 650]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    650|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|    650|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 650, 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|    650|    const MeshDecoder *const mesh_decoder =
  167|    650|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|    650|    auto ret = CreateMeshPredictionScheme<
  170|    650|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    650|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    650|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    650|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 409, False: 241]
  ------------------
  174|    409|      return ret;
  175|    409|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    650|  }
  178|       |  // Create delta decoder.
  179|    241|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    241|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    650|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    241|      uint16_t bitstream_version) {
  143|    241|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    241|        method, attribute, transform, mesh_data, bitstream_version);
  145|    241|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    241|        uint16_t bitstream_version) {
  111|    241|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 240, False: 1]
  ------------------
  112|    240|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    240|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    240|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    240|                                                  mesh_data));
  116|    240|      }
  117|      1|      return nullptr;
  118|    241|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    171|      uint16_t bitstream_version) {
  143|    171|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    171|        method, attribute, transform, mesh_data, bitstream_version);
  145|    171|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    171|        uint16_t bitstream_version) {
  111|    171|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 169, False: 2]
  ------------------
  112|    169|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    169|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    169|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    169|                                                  mesh_data));
  116|    169|      }
  117|      2|      return nullptr;
  118|    171|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|  5.45k|                                 const PointCloudDecoder *decoder) {
  188|  5.45k|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|  5.45k|      method, att_id, decoder, TransformT());
  190|  5.45k|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|  5.45k|                                 const TransformT &transform) {
  156|  5.45k|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 5.45k]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|  5.45k|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|  5.45k|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 5.45k, False: 0]
  ------------------
  161|       |    // Cast the decoder to mesh decoder. This is not necessarily safe if there
  162|       |    // is some other decoder decides to use TRIANGULAR_MESH as the return type,
  163|       |    // but unfortunately there is not nice work around for this without using
  164|       |    // RTTI (double dispatch and similar concepts will not work because of the
  165|       |    // template nature of the prediction schemes).
  166|  5.45k|    const MeshDecoder *const mesh_decoder =
  167|  5.45k|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|  5.45k|    auto ret = CreateMeshPredictionScheme<
  170|  5.45k|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|  5.45k|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|  5.45k|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|  5.45k|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 4.97k, False: 479]
  ------------------
  174|  4.97k|      return ret;
  175|  4.97k|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|  5.45k|  }
  178|       |  // Create delta decoder.
  179|    479|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    479|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|  5.45k|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  2.48k|      uint16_t bitstream_version) {
  143|  2.48k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  2.48k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  2.48k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  2.48k|        uint16_t bitstream_version) {
   53|  2.48k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 843, False: 1.63k]
  ------------------
   54|    843|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    843|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    843|                                                         MeshDataT>(
   57|    843|                attribute, transform, mesh_data));
   58|    843|      }
   59|  1.63k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  1.63k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 302, False: 1.33k]
  ------------------
   61|    302|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    302|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    302|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    302|                                                  mesh_data));
   65|    302|      }
   66|  1.33k|#endif
   67|  1.33k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 447, False: 889]
  ------------------
   68|    447|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    447|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    447|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    447|                                                  mesh_data));
   72|    447|      }
   73|    889|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|    889|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 197, False: 692]
  ------------------
   75|    197|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    197|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    197|                                                     MeshDataT>(
   78|    197|                attribute, transform, mesh_data, bitstream_version));
   79|    197|      }
   80|    692|#endif
   81|    692|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 266, False: 426]
  ------------------
   82|    266|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    266|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    266|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    266|                                                  mesh_data));
   86|    266|      }
   87|    426|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    426|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 426, False: 0]
  ------------------
   89|    426|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    426|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    426|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    426|                                                  mesh_data));
   93|    426|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  2.48k|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  2.49k|      uint16_t bitstream_version) {
  143|  2.49k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  2.49k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  2.49k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  2.49k|        uint16_t bitstream_version) {
   53|  2.49k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 581, False: 1.91k]
  ------------------
   54|    581|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    581|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    581|                                                         MeshDataT>(
   57|    581|                attribute, transform, mesh_data));
   58|    581|      }
   59|  1.91k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  1.91k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 531, False: 1.37k]
  ------------------
   61|    531|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    531|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    531|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    531|                                                  mesh_data));
   65|    531|      }
   66|  1.37k|#endif
   67|  1.37k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 504, False: 875]
  ------------------
   68|    504|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    504|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    504|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    504|                                                  mesh_data));
   72|    504|      }
   73|    875|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|    875|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 179, False: 696]
  ------------------
   75|    179|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    179|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    179|                                                     MeshDataT>(
   78|    179|                attribute, transform, mesh_data, bitstream_version));
   79|    179|      }
   80|    696|#endif
   81|    696|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 273, False: 423]
  ------------------
   82|    273|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    273|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    273|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    273|                                                  mesh_data));
   86|    273|      }
   87|    423|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    423|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 423, False: 0]
  ------------------
   89|    423|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    423|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    423|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    423|                                                  mesh_data));
   93|    423|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  2.49k|    }

_ZN5draco28PredictionSchemeDeltaDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    132|    const PointIndex *) {
   50|    132|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    132|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    132|  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|   149k|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 149k, False: 132]
  ------------------
   57|   149k|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|   149k|                                           in_corr + i, out_data + i);
   59|   149k|  }
   60|    132|  return true;
   61|    132|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    196|    const PointIndex *) {
   50|    196|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    196|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    196|  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|   489k|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 489k, False: 196]
  ------------------
   57|   489k|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|   489k|                                           in_corr + i, out_data + i);
   59|   489k|  }
   60|    196|  return true;
   61|    196|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    479|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    384|    const PointIndex *) {
   50|    384|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    384|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    384|  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|   614k|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 613k, False: 384]
  ------------------
   57|   613k|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|   613k|                                           in_corr + i, out_data + i);
   59|   613k|  }
   60|    384|  return true;
   61|    384|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    176|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    241|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}

_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    588|    uint16_t bitstream_version) {
   38|    588|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|    588|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 588, False: 0]
  ------------------
   40|    588|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 87, False: 501]
  ------------------
   41|    501|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 5, False: 496]
  ------------------
   42|    496|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 3, False: 493]
  ------------------
   43|    493|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 0, False: 493]
  ------------------
   44|    493|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 439, False: 54]
  ------------------
   45|    538|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 4, False: 50]
  ------------------
   46|    538|    const CornerTable *const ct = source->GetCornerTable();
   47|    538|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|    538|        source->GetAttributeEncodingData(att_id);
   49|    538|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 107, False: 431]
  |  Branch (49:26): [True: 0, False: 431]
  ------------------
   50|       |      // No connectivity data found.
   51|    107|      return nullptr;
   52|    107|    }
   53|       |    // Connectivity data exists.
   54|    431|    const MeshAttributeCornerTable *const att_ct =
   55|    431|        source->GetAttributeCornerTable(att_id);
   56|    431|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 244, False: 187]
  ------------------
   57|    244|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    244|      MeshData md;
   59|    244|      md.Set(source->mesh(), att_ct,
   60|    244|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    244|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    244|      MeshPredictionSchemeFactoryT factory;
   63|    244|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    244|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 229, False: 15]
  ------------------
   65|    229|        return ret;
   66|    229|      }
   67|    244|    } else {
   68|    187|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    187|      MeshData md;
   70|    187|      md.Set(source->mesh(), ct,
   71|    187|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    187|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    187|      MeshPredictionSchemeFactoryT factory;
   74|    187|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    187|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 183, False: 4]
  ------------------
   76|    183|        return ret;
   77|    183|      }
   78|    187|    }
   79|    431|  }
   80|     69|  return nullptr;
   81|    588|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    650|    uint16_t bitstream_version) {
   38|    650|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|    650|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 650, False: 0]
  ------------------
   40|    650|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 15, False: 635]
  ------------------
   41|    635|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 27, False: 608]
  ------------------
   42|    608|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 2, False: 606]
  ------------------
   43|    606|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 18, False: 588]
  ------------------
   44|    588|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 467, False: 121]
  ------------------
   45|    575|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 46, False: 75]
  ------------------
   46|    575|    const CornerTable *const ct = source->GetCornerTable();
   47|    575|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|    575|        source->GetAttributeEncodingData(att_id);
   49|    575|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 163, False: 412]
  |  Branch (49:26): [True: 0, False: 412]
  ------------------
   50|       |      // No connectivity data found.
   51|    163|      return nullptr;
   52|    163|    }
   53|       |    // Connectivity data exists.
   54|    412|    const MeshAttributeCornerTable *const att_ct =
   55|    412|        source->GetAttributeCornerTable(att_id);
   56|    412|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 241, False: 171]
  ------------------
   57|    241|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    241|      MeshData md;
   59|    241|      md.Set(source->mesh(), att_ct,
   60|    241|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    241|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    241|      MeshPredictionSchemeFactoryT factory;
   63|    241|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    241|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 240, False: 1]
  ------------------
   65|    240|        return ret;
   66|    240|      }
   67|    241|    } else {
   68|    171|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    171|      MeshData md;
   70|    171|      md.Set(source->mesh(), ct,
   71|    171|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    171|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    171|      MeshPredictionSchemeFactoryT factory;
   74|    171|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    171|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 169, False: 2]
  ------------------
   76|    169|        return ret;
   77|    169|      }
   78|    171|    }
   79|    412|  }
   80|     78|  return nullptr;
   81|    650|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|  5.45k|    uint16_t bitstream_version) {
   38|  5.45k|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|  5.45k|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 5.45k, False: 0]
  ------------------
   40|  5.45k|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 1.54k, False: 3.90k]
  ------------------
   41|  3.90k|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 905, False: 3.00k]
  ------------------
   42|  3.00k|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 968, False: 2.03k]
  ------------------
   43|  2.03k|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 545, False: 1.48k]
  ------------------
   44|  1.48k|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 862, False: 626]
  ------------------
   45|  5.20k|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 377, False: 249]
  ------------------
   46|  5.20k|    const CornerTable *const ct = source->GetCornerTable();
   47|  5.20k|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|  5.20k|        source->GetAttributeEncodingData(att_id);
   49|  5.20k|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 230, False: 4.97k]
  |  Branch (49:26): [True: 0, False: 4.97k]
  ------------------
   50|       |      // No connectivity data found.
   51|    230|      return nullptr;
   52|    230|    }
   53|       |    // Connectivity data exists.
   54|  4.97k|    const MeshAttributeCornerTable *const att_ct =
   55|  4.97k|        source->GetAttributeCornerTable(att_id);
   56|  4.97k|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 2.48k, False: 2.49k]
  ------------------
   57|  2.48k|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|  2.48k|      MeshData md;
   59|  2.48k|      md.Set(source->mesh(), att_ct,
   60|  2.48k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|  2.48k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|  2.48k|      MeshPredictionSchemeFactoryT factory;
   63|  2.48k|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|  2.48k|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 2.48k, False: 0]
  ------------------
   65|  2.48k|        return ret;
   66|  2.48k|      }
   67|  2.49k|    } else {
   68|  2.49k|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|  2.49k|      MeshData md;
   70|  2.49k|      md.Set(source->mesh(), ct,
   71|  2.49k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|  2.49k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|  2.49k|      MeshPredictionSchemeFactoryT factory;
   74|  2.49k|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|  2.49k|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 2.49k, False: 0]
  ------------------
   76|  2.49k|        return ret;
   77|  2.49k|      }
   78|  2.49k|    }
   79|  4.97k|  }
   80|    249|  return nullptr;
   81|  5.45k|}

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

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

_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE14IsInBottomLeftERKNS_7VectorDIiLi2EEE:
   92|  1.90M|  bool IsInBottomLeft(const Point2 &p) const {
   93|  1.90M|    if (p[0] == 0 && p[1] == 0) {
  ------------------
  |  Branch (93:9): [True: 1.62M, False: 270k]
  |  Branch (93:22): [True: 1.50M, False: 120k]
  ------------------
   94|  1.50M|      return true;
   95|  1.50M|    }
   96|   391k|    return (p[0] < 0 && p[1] <= 0);
  ------------------
  |  Branch (96:13): [True: 162k, False: 228k]
  |  Branch (96:25): [True: 122k, False: 40.0k]
  ------------------
   97|  1.90M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE16GetRotationCountENS_7VectorDIiLi2EEE:
   50|  1.90M|  int32_t GetRotationCount(Point2 pred) const {
   51|  1.90M|    const DataType sign_x = pred[0];
   52|  1.90M|    const DataType sign_y = pred[1];
   53|       |
   54|  1.90M|    int32_t rotation_count = 0;
   55|  1.90M|    if (sign_x == 0) {
  ------------------
  |  Branch (55:9): [True: 1.62M, False: 270k]
  ------------------
   56|  1.62M|      if (sign_y == 0) {
  ------------------
  |  Branch (56:11): [True: 1.50M, False: 120k]
  ------------------
   57|  1.50M|        rotation_count = 0;
   58|  1.50M|      } else if (sign_y > 0) {
  ------------------
  |  Branch (58:18): [True: 90.2k, False: 30.5k]
  ------------------
   59|  90.2k|        rotation_count = 3;
   60|  90.2k|      } else {
   61|  30.5k|        rotation_count = 1;
   62|  30.5k|      }
   63|  1.62M|    } else if (sign_x > 0) {
  ------------------
  |  Branch (63:16): [True: 107k, False: 162k]
  ------------------
   64|   107k|      if (sign_y >= 0) {
  ------------------
  |  Branch (64:11): [True: 82.1k, False: 25.6k]
  ------------------
   65|  82.1k|        rotation_count = 2;
   66|  82.1k|      } else {
   67|  25.6k|        rotation_count = 1;
   68|  25.6k|      }
   69|   162k|    } else {
   70|   162k|      if (sign_y <= 0) {
  ------------------
  |  Branch (70:11): [True: 122k, False: 40.0k]
  ------------------
   71|   122k|        rotation_count = 0;
   72|   122k|      } else {
   73|  40.0k|        rotation_count = 3;
   74|  40.0k|      }
   75|   162k|    }
   76|  1.90M|    return rotation_count;
   77|  1.90M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE11RotatePointENS_7VectorDIiLi2EEEi:
   79|   537k|  Point2 RotatePoint(Point2 p, int32_t rotation_count) const {
   80|   537k|    switch (rotation_count) {
   81|   186k|      case 1:
  ------------------
  |  Branch (81:7): [True: 186k, False: 350k]
  ------------------
   82|   186k|        return Point2(p[1], -p[0]);
   83|   164k|      case 2:
  ------------------
  |  Branch (83:7): [True: 164k, False: 373k]
  ------------------
   84|   164k|        return Point2(-p[0], -p[1]);
   85|   186k|      case 3:
  ------------------
  |  Branch (85:7): [True: 186k, False: 350k]
  ------------------
   86|   186k|        return Point2(-p[1], p[0]);
   87|      0|      default:
  ------------------
  |  Branch (87:7): [True: 0, False: 537k]
  ------------------
   88|      0|        return p;
   89|   537k|    }
   90|   537k|  }
_ZN5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiEC2Ev:
   40|    650|  PredictionSchemeNormalOctahedronCanonicalizedTransformBase() : Base() {}

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

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

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

_ZNK5draco33PredictionSchemeWrapTransformBaseIiE22AreCorrectionsPositiveEv:
   60|  5.23k|  bool AreCorrectionsPositive() const { return false; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE13set_min_valueERKi:
  100|  4.55k|  inline void set_min_value(const DataTypeT &v) { min_value_ = v; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE13set_max_valueERKi:
  102|  4.55k|  inline void set_max_value(const DataTypeT &v) { max_value_ = v; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE20InitCorrectionBoundsEv:
   83|  4.55k|  bool InitCorrectionBounds() {
   84|  4.55k|    const int64_t dif =
   85|  4.55k|        static_cast<int64_t>(max_value_) - static_cast<int64_t>(min_value_);
   86|  4.55k|    if (dif < 0 || dif >= std::numeric_limits<DataTypeT>::max()) {
  ------------------
  |  Branch (86:9): [True: 0, False: 4.55k]
  |  Branch (86:20): [True: 30, False: 4.52k]
  ------------------
   87|     30|      return false;
   88|     30|    }
   89|  4.52k|    max_dif_ = 1 + static_cast<DataTypeT>(dif);
   90|  4.52k|    max_correction_ = max_dif_ / 2;
   91|  4.52k|    min_correction_ = -max_correction_;
   92|  4.52k|    if ((max_dif_ & 1) == 0) {
  ------------------
  |  Branch (92:9): [True: 2.01k, False: 2.51k]
  ------------------
   93|  2.01k|      max_correction_ -= 1;
   94|  2.01k|    }
   95|  4.52k|    return true;
   96|  4.55k|  }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE4InitEi:
   55|  3.74k|  void Init(int num_components) {
   56|  3.74k|    num_components_ = num_components;
   57|  3.74k|    clamped_value_.resize(num_components);
   58|  3.74k|  }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE19ClampPredictedValueEPKi:
   63|  8.52M|      const DataTypeT *predicted_val) const {
   64|   227M|    for (int i = 0; i < this->num_components(); ++i) {
  ------------------
  |  Branch (64:21): [True: 218M, False: 8.52M]
  ------------------
   65|   218M|      if (predicted_val[i] > max_value_) {
  ------------------
  |  Branch (65:11): [True: 194k, False: 218M]
  ------------------
   66|   194k|        clamped_value_[i] = max_value_;
   67|   218M|      } else if (predicted_val[i] < min_value_) {
  ------------------
  |  Branch (67:18): [True: 12.6M, False: 206M]
  ------------------
   68|  12.6M|        clamped_value_[i] = min_value_;
   69|   206M|      } else {
   70|   206M|        clamped_value_[i] = predicted_val[i];
   71|   206M|      }
   72|   218M|    }
   73|  8.52M|    return clamped_value_.data();
   74|  8.52M|  }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE14num_componentsEv:
   98|   454M|  inline int num_components() const { return num_components_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE9max_valueEv:
  101|   218M|  inline DataTypeT max_value() const { return max_value_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE7max_difEv:
  103|  1.44M|  inline DataTypeT max_dif() const { return max_dif_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE9min_valueEv:
   99|   218M|  inline DataTypeT min_value() const { return min_value_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE17quantization_bitsEv:
   77|    715|  int quantization_bits() const {
   78|    715|    DRACO_DCHECK(false);
   79|    715|    return -1;
   80|    715|  }
_ZN5draco33PredictionSchemeWrapTransformBaseIiEC2Ev:
   44|  5.45k|      : num_components_(0),
   45|  5.45k|        min_value_(0),
   46|  5.45k|        max_value_(0),
   47|  5.45k|        max_dif_(0),
   48|  5.45k|        max_correction_(0),
   49|  5.45k|        min_correction_(0) {}

_ZN5draco26SequentialAttributeDecoderC2Ev:
   20|  27.9k|    : decoder_(nullptr), attribute_(nullptr), attribute_id_(-1) {}
_ZN5draco26SequentialAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   23|  27.9k|                                      int attribute_id) {
   24|  27.9k|  decoder_ = decoder;
   25|  27.9k|  attribute_ = decoder->point_cloud()->attribute(attribute_id);
   26|  27.9k|  attribute_id_ = attribute_id;
   27|  27.9k|  return true;
   28|  27.9k|}
_ZN5draco26SequentialAttributeDecoder23DecodePortableAttributeERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   38|  12.0k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   39|  12.0k|  if (attribute_->num_components() <= 0 ||
  ------------------
  |  Branch (39:7): [True: 0, False: 12.0k]
  ------------------
   40|  12.0k|      !attribute_->Reset(point_ids.size())) {
  ------------------
  |  Branch (40:7): [True: 0, False: 12.0k]
  ------------------
   41|      0|    return false;
   42|      0|  }
   43|  12.0k|  if (!DecodeValues(point_ids, in_buffer)) {
  ------------------
  |  Branch (43:7): [True: 2.55k, False: 9.46k]
  ------------------
   44|  2.55k|    return false;
   45|  2.55k|  }
   46|  9.46k|  return true;
   47|  12.0k|}
_ZN5draco26SequentialAttributeDecoder35DecodeDataNeededByPortableTransformERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   50|  4.40k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   51|       |  // Default implementation does not apply any transform.
   52|  4.40k|  return true;
   53|  4.40k|}
_ZN5draco26SequentialAttributeDecoder34TransformAttributeToOriginalFormatERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEE:
   56|    417|    const std::vector<PointIndex> &point_ids) {
   57|       |  // Default implementation does not apply any transform.
   58|    417|  return true;
   59|    417|}
_ZN5draco26SequentialAttributeDecoder20GetPortableAttributeEv:
   61|  8.94k|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.94k|  if (!attribute_->is_mapping_identity() && portable_attribute_ &&
  ------------------
  |  Branch (64:7): [True: 6.19k, False: 2.74k]
  |  Branch (64:45): [True: 5.82k, False: 365]
  ------------------
   65|  5.82k|      portable_attribute_->is_mapping_identity()) {
  ------------------
  |  Branch (65:7): [True: 4.53k, False: 1.29k]
  ------------------
   66|  4.53k|    portable_attribute_->SetExplicitMapping(attribute_->indices_map_size());
   67|  4.53k|    for (PointIndex i(0);
   68|  26.2M|         i < static_cast<uint32_t>(attribute_->indices_map_size()); ++i) {
  ------------------
  |  Branch (68:10): [True: 26.2M, False: 4.53k]
  ------------------
   69|  26.2M|      portable_attribute_->SetPointMapEntry(i, attribute_->mapped_index(i));
   70|  26.2M|    }
   71|  4.53k|  }
   72|  8.94k|  return portable_attribute_.get();
   73|  8.94k|}
_ZN5draco26SequentialAttributeDecoder20InitPredictionSchemeEPNS_25PredictionSchemeInterfaceE:
   76|  6.68k|    PredictionSchemeInterface *ps) {
   77|  9.23k|  for (int i = 0; i < ps->GetNumParentAttributes(); ++i) {
  ------------------
  |  Branch (77:19): [True: 2.58k, False: 6.65k]
  ------------------
   78|  2.58k|    const int att_id = decoder_->point_cloud()->GetNamedAttributeId(
   79|  2.58k|        ps->GetParentAttributeType(i));
   80|  2.58k|    if (att_id == -1) {
  ------------------
  |  Branch (80:9): [True: 8, False: 2.57k]
  ------------------
   81|      8|      return false;  // Requested attribute does not exist.
   82|      8|    }
   83|  2.57k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   84|  2.57k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.57k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (84:9): [True: 0, False: 2.57k]
  ------------------
   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.57k|#endif
   90|  2.57k|    {
   91|  2.57k|      const PointAttribute *const pa = decoder_->GetPortableAttribute(att_id);
   92|  2.57k|      if (pa == nullptr || !ps->SetParentAttribute(pa)) {
  ------------------
  |  Branch (92:11): [True: 5, False: 2.57k]
  |  Branch (92:28): [True: 22, False: 2.55k]
  ------------------
   93|     27|        return false;
   94|     27|      }
   95|  2.57k|    }
   96|  2.57k|  }
   97|  6.65k|  return true;
   98|  6.68k|}
_ZN5draco26SequentialAttributeDecoder12DecodeValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
  101|    733|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
  102|    733|  const int32_t num_values = static_cast<uint32_t>(point_ids.size());
  103|    733|  const int entry_size = static_cast<int>(attribute_->byte_stride());
  104|    733|  std::unique_ptr<uint8_t[]> value_data_ptr(new uint8_t[entry_size]);
  105|    733|  uint8_t *const value_data = value_data_ptr.get();
  106|    733|  int out_byte_pos = 0;
  107|       |  // Decode raw attribute values in their original format.
  108|  7.29k|  for (int i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (108:19): [True: 6.68k, False: 611]
  ------------------
  109|  6.68k|    if (!in_buffer->Decode(value_data, entry_size)) {
  ------------------
  |  Branch (109:9): [True: 122, False: 6.56k]
  ------------------
  110|    122|      return false;
  111|    122|    }
  112|  6.56k|    attribute_->buffer()->Write(out_byte_pos, value_data, entry_size);
  113|  6.56k|    out_byte_pos += entry_size;
  114|  6.56k|  }
  115|    611|  return true;
  116|    733|}

_ZNK5draco26SequentialAttributeDecoder9attributeEv:
   53|  9.34k|  const PointAttribute *attribute() const { return attribute_; }
_ZN5draco26SequentialAttributeDecoder9attributeEv:
   54|  10.4M|  PointAttribute *attribute() { return attribute_; }
_ZNK5draco26SequentialAttributeDecoder12attribute_idEv:
   55|  6.68k|  int attribute_id() const { return attribute_id_; }
_ZNK5draco26SequentialAttributeDecoder7decoderEv:
   56|  34.2k|  PointCloudDecoder *decoder() const { return decoder_; }
_ZN5draco26SequentialAttributeDecoder20SetPortableAttributeENSt3__110unique_ptrINS_14PointAttributeENS1_14default_deleteIS3_EEEE:
   69|  10.6k|  void SetPortableAttribute(std::unique_ptr<PointAttribute> att) {
   70|  10.6k|    portable_attribute_ = std::move(att);
   71|  10.6k|  }
_ZN5draco26SequentialAttributeDecoder18portable_attributeEv:
   73|  36.6k|  PointAttribute *portable_attribute() { return portable_attribute_.get(); }
_ZN5draco26SequentialAttributeDecoderD2Ev:
   29|  27.9k|  virtual ~SequentialAttributeDecoder() = default;

_ZN5draco37SequentialAttributeDecodersControllerC2ENSt3__110unique_ptrINS_15PointsSequencerENS1_14default_deleteIS3_EEEE:
   26|  33.0k|    : sequencer_(std::move(sequencer)) {}
_ZN5draco37SequentialAttributeDecodersController27DecodeAttributesDecoderDataEPNS_13DecoderBufferE:
   29|  10.0k|    DecoderBuffer *buffer) {
   30|  10.0k|  if (!AttributesDecoder::DecodeAttributesDecoderData(buffer)) {
  ------------------
  |  Branch (30:7): [True: 223, False: 9.79k]
  ------------------
   31|    223|    return false;
   32|    223|  }
   33|       |  // Decode unique ids of all sequential encoders and create them.
   34|  9.79k|  const int32_t num_attributes = GetNumAttributes();
   35|  9.79k|  sequential_decoders_.resize(num_attributes);
   36|  37.7k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (36:19): [True: 27.9k, False: 9.76k]
  ------------------
   37|  27.9k|    uint8_t decoder_type;
   38|  27.9k|    if (!buffer->Decode(&decoder_type)) {
  ------------------
  |  Branch (38:9): [True: 11, False: 27.9k]
  ------------------
   39|     11|      return false;
   40|     11|    }
   41|       |    // Create the decoder from the id.
   42|  27.9k|    sequential_decoders_[i] = CreateSequentialDecoder(decoder_type);
   43|  27.9k|    if (!sequential_decoders_[i]) {
  ------------------
  |  Branch (43:9): [True: 20, False: 27.9k]
  ------------------
   44|     20|      return false;
   45|     20|    }
   46|  27.9k|    if (!sequential_decoders_[i]->Init(GetDecoder(), GetAttributeId(i))) {
  ------------------
  |  Branch (46:9): [True: 6, False: 27.9k]
  ------------------
   47|      6|      return false;
   48|      6|    }
   49|  27.9k|  }
   50|  9.76k|  return true;
   51|  9.79k|}
_ZN5draco37SequentialAttributeDecodersController16DecodeAttributesEPNS_13DecoderBufferE:
   54|  5.93k|    DecoderBuffer *buffer) {
   55|  5.93k|  if (!sequencer_ || !sequencer_->GenerateSequence(&point_ids_)) {
  ------------------
  |  Branch (55:7): [True: 0, False: 5.93k]
  |  Branch (55:22): [True: 10, False: 5.92k]
  ------------------
   56|     10|    return false;
   57|     10|  }
   58|       |  // Initialize point to attribute value mapping for all decoded attributes.
   59|  5.92k|  const int32_t num_attributes = GetNumAttributes();
   60|  22.9k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (60:19): [True: 16.9k, False: 5.91k]
  ------------------
   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.91k|  return AttributesDecoder::DecodeAttributes(buffer);
   68|  5.92k|}
_ZN5draco37SequentialAttributeDecodersController24DecodePortableAttributesEPNS_13DecoderBufferE:
   71|  5.91k|    DecoderBuffer *in_buffer) {
   72|  5.91k|  const int32_t num_attributes = GetNumAttributes();
   73|  15.3k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (73:19): [True: 12.0k, False: 3.36k]
  ------------------
   74|  12.0k|    if (!sequential_decoders_[i]->DecodePortableAttribute(point_ids_,
  ------------------
  |  Branch (74:9): [True: 2.55k, False: 9.46k]
  ------------------
   75|  12.0k|                                                          in_buffer)) {
   76|  2.55k|      return false;
   77|  2.55k|    }
   78|  12.0k|  }
   79|  3.36k|  return true;
   80|  5.91k|}
_ZN5draco37SequentialAttributeDecodersController36DecodeDataNeededByPortableTransformsEPNS_13DecoderBufferE:
   83|  3.36k|    DecodeDataNeededByPortableTransforms(DecoderBuffer *in_buffer) {
   84|  3.36k|  const int32_t num_attributes = GetNumAttributes();
   85|  8.39k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (85:19): [True: 5.86k, False: 2.53k]
  ------------------
   86|  5.86k|    if (!sequential_decoders_[i]->DecodeDataNeededByPortableTransform(
  ------------------
  |  Branch (86:9): [True: 830, False: 5.03k]
  ------------------
   87|  5.86k|            point_ids_, in_buffer)) {
   88|    830|      return false;
   89|    830|    }
   90|  5.86k|  }
   91|  2.53k|  return true;
   92|  3.36k|}
_ZN5draco37SequentialAttributeDecodersController35TransformAttributesToOriginalFormatEv:
   95|  2.53k|    TransformAttributesToOriginalFormat() {
   96|  2.53k|  const int32_t num_attributes = GetNumAttributes();
   97|  6.48k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (97:19): [True: 4.33k, False: 2.15k]
  ------------------
   98|       |    // Check whether the attribute transform should be skipped.
   99|  4.33k|    if (GetDecoder()->options()) {
  ------------------
  |  Branch (99:9): [True: 4.33k, False: 0]
  ------------------
  100|  4.33k|      const PointAttribute *const attribute =
  101|  4.33k|          sequential_decoders_[i]->attribute();
  102|  4.33k|      const PointAttribute *const portable_attribute =
  103|  4.33k|          sequential_decoders_[i]->GetPortableAttribute();
  104|  4.33k|      if (portable_attribute &&
  ------------------
  |  Branch (104:11): [True: 3.91k, False: 417]
  |  Branch (104:11): [True: 799, False: 3.53k]
  ------------------
  105|  3.91k|          GetDecoder()->options()->GetAttributeBool(
  ------------------
  |  Branch (105:11): [True: 799, False: 3.11k]
  ------------------
  106|  3.91k|              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|    799|        sequential_decoders_[i]->attribute()->CopyFrom(*portable_attribute);
  113|    799|        continue;
  114|    799|      }
  115|  4.33k|    }
  116|  3.53k|    if (!sequential_decoders_[i]->TransformAttributeToOriginalFormat(
  ------------------
  |  Branch (116:9): [True: 381, False: 3.15k]
  ------------------
  117|  3.53k|            point_ids_)) {
  118|    381|      return false;
  119|    381|    }
  120|  3.53k|  }
  121|  2.15k|  return true;
  122|  2.53k|}
_ZN5draco37SequentialAttributeDecodersController23CreateSequentialDecoderEh:
  126|  27.9k|    uint8_t decoder_type) {
  127|  27.9k|  switch (decoder_type) {
  128|  2.16k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_GENERIC:
  ------------------
  |  Branch (128:5): [True: 2.16k, False: 25.7k]
  ------------------
  129|  2.16k|      return std::unique_ptr<SequentialAttributeDecoder>(
  130|  2.16k|          new SequentialAttributeDecoder());
  131|  23.6k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_INTEGER:
  ------------------
  |  Branch (131:5): [True: 23.6k, False: 4.29k]
  ------------------
  132|  23.6k|      return std::unique_ptr<SequentialAttributeDecoder>(
  133|  23.6k|          new SequentialIntegerAttributeDecoder());
  134|    612|    case SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION:
  ------------------
  |  Branch (134:5): [True: 612, False: 27.3k]
  ------------------
  135|    612|      return std::unique_ptr<SequentialAttributeDecoder>(
  136|    612|          new SequentialQuantizationAttributeDecoder());
  137|      0|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
  138|  1.50k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS:
  ------------------
  |  Branch (138:5): [True: 1.50k, False: 26.4k]
  ------------------
  139|  1.50k|      return std::unique_ptr<SequentialNormalAttributeDecoder>(
  140|  1.50k|          new SequentialNormalAttributeDecoder());
  141|      0|#endif
  142|     20|    default:
  ------------------
  |  Branch (142:5): [True: 20, False: 27.9k]
  ------------------
  143|     20|      break;
  144|  27.9k|  }
  145|       |  // Unknown or unsupported decoder type.
  146|     20|  return nullptr;
  147|  27.9k|}

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

_ZN5draco33SequentialIntegerAttributeDecoderC2Ev:
   23|  25.7k|SequentialIntegerAttributeDecoder::SequentialIntegerAttributeDecoder() {}
_ZN5draco33SequentialIntegerAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   26|  25.7k|                                             int attribute_id) {
   27|  25.7k|  if (!SequentialAttributeDecoder::Init(decoder, attribute_id)) {
  ------------------
  |  Branch (27:7): [True: 0, False: 25.7k]
  ------------------
   28|      0|    return false;
   29|      0|  }
   30|  25.7k|  return true;
   31|  25.7k|}
_ZN5draco33SequentialIntegerAttributeDecoder34TransformAttributeToOriginalFormatERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEE:
   34|  3.11k|    const std::vector<PointIndex> &point_ids) {
   35|  3.11k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   36|  3.11k|  if (decoder() &&
  ------------------
  |  Branch (36:7): [True: 3.11k, False: 0]
  ------------------
   37|  3.11k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.11k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (37:7): [True: 5, False: 3.11k]
  ------------------
   38|      5|    return true;  // Don't revert the transform here for older files.
   39|      5|  }
   40|  3.11k|#endif
   41|  3.11k|  return StoreValues(static_cast<uint32_t>(point_ids.size()));
   42|  3.11k|}
_ZN5draco33SequentialIntegerAttributeDecoder12DecodeValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   45|  11.2k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   46|       |  // Decode prediction scheme.
   47|  11.2k|  int8_t prediction_scheme_method;
   48|  11.2k|  if (!in_buffer->Decode(&prediction_scheme_method)) {
  ------------------
  |  Branch (48:7): [True: 188, False: 11.0k]
  ------------------
   49|    188|    return false;
   50|    188|  }
   51|       |  // Check that decoded prediction scheme method type is valid.
   52|  11.0k|  if (prediction_scheme_method < PREDICTION_NONE ||
  ------------------
  |  Branch (52:7): [True: 80, False: 11.0k]
  ------------------
   53|  11.0k|      prediction_scheme_method >= NUM_PREDICTION_SCHEMES) {
  ------------------
  |  Branch (53:7): [True: 164, False: 10.8k]
  ------------------
   54|    244|    return false;
   55|    244|  }
   56|  10.8k|  if (prediction_scheme_method != PREDICTION_NONE) {
  ------------------
  |  Branch (56:7): [True: 10.4k, False: 373]
  ------------------
   57|  10.4k|    int8_t prediction_transform_type;
   58|  10.4k|    if (!in_buffer->Decode(&prediction_transform_type)) {
  ------------------
  |  Branch (58:9): [True: 70, False: 10.4k]
  ------------------
   59|     70|      return false;
   60|     70|    }
   61|       |    // Check that decoded prediction scheme transform type is valid.
   62|  10.4k|    if (prediction_transform_type < PREDICTION_TRANSFORM_NONE ||
  ------------------
  |  Branch (62:9): [True: 28, False: 10.3k]
  ------------------
   63|  10.3k|        prediction_transform_type >= NUM_PREDICTION_SCHEME_TRANSFORM_TYPES) {
  ------------------
  |  Branch (63:9): [True: 84, False: 10.2k]
  ------------------
   64|    112|      return false;
   65|    112|    }
   66|  10.2k|    prediction_scheme_ = CreateIntPredictionScheme(
   67|  10.2k|        static_cast<PredictionSchemeMethod>(prediction_scheme_method),
   68|  10.2k|        static_cast<PredictionSchemeTransformType>(prediction_transform_type));
   69|  10.2k|  }
   70|       |
   71|  10.6k|  if (prediction_scheme_) {
  ------------------
  |  Branch (71:7): [True: 6.68k, False: 3.97k]
  ------------------
   72|  6.68k|    if (!InitPredictionScheme(prediction_scheme_.get())) {
  ------------------
  |  Branch (72:9): [True: 35, False: 6.65k]
  ------------------
   73|     35|      return false;
   74|     35|    }
   75|  6.68k|  }
   76|       |
   77|  10.6k|  if (!DecodeIntegerValues(point_ids, in_buffer)) {
  ------------------
  |  Branch (77:7): [True: 1.78k, False: 8.85k]
  ------------------
   78|  1.78k|    return false;
   79|  1.78k|  }
   80|       |
   81|  8.85k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   82|  8.85k|  const int32_t num_values = static_cast<uint32_t>(point_ids.size());
   83|  8.85k|  if (decoder() &&
  ------------------
  |  Branch (83:7): [True: 8.85k, False: 0]
  ------------------
   84|  8.85k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  8.85k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (84:7): [True: 37, False: 8.81k]
  ------------------
   85|       |    // For older files, revert the transform right after we decode the data.
   86|     37|    if (!StoreValues(num_values)) {
  ------------------
  |  Branch (86:9): [True: 1, False: 36]
  ------------------
   87|      1|      return false;
   88|      1|    }
   89|     37|  }
   90|  8.85k|#endif
   91|  8.85k|  return true;
   92|  8.85k|}
_ZN5draco33SequentialIntegerAttributeDecoder25CreateIntPredictionSchemeENS_22PredictionSchemeMethodENS_29PredictionSchemeTransformTypeE:
   97|  9.00k|    PredictionSchemeTransformType transform_type) {
   98|  9.00k|  if (transform_type != PREDICTION_TRANSFORM_WRAP) {
  ------------------
  |  Branch (98:7): [True: 3.55k, False: 5.45k]
  ------------------
   99|  3.55k|    return nullptr;  // For now we support only wrap transform.
  100|  3.55k|  }
  101|  5.45k|  return CreatePredictionSchemeForDecoder<
  102|  5.45k|      int32_t, PredictionSchemeWrapDecodingTransform<int32_t>>(
  103|  5.45k|      method, attribute_id(), decoder());
  104|  9.00k|}
_ZN5draco33SequentialIntegerAttributeDecoder19DecodeIntegerValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
  107|  10.6k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
  108|  10.6k|  const int num_components = GetNumValueComponents();
  109|  10.6k|  if (num_components <= 0) {
  ------------------
  |  Branch (109:7): [True: 0, False: 10.6k]
  ------------------
  110|      0|    return false;
  111|      0|  }
  112|  10.6k|  const size_t num_entries = point_ids.size();
  113|  10.6k|  const size_t num_values = num_entries * num_components;
  114|  10.6k|  PreparePortableAttribute(static_cast<int>(num_entries), num_components);
  115|  10.6k|  int32_t *const portable_attribute_data = GetPortableAttributeData();
  116|  10.6k|  if (portable_attribute_data == nullptr) {
  ------------------
  |  Branch (116:7): [True: 13, False: 10.6k]
  ------------------
  117|     13|    return false;
  118|     13|  }
  119|  10.6k|  uint8_t compressed;
  120|  10.6k|  if (!in_buffer->Decode(&compressed)) {
  ------------------
  |  Branch (120:7): [True: 27, False: 10.5k]
  ------------------
  121|     27|    return false;
  122|     27|  }
  123|  10.5k|  if (compressed > 0) {
  ------------------
  |  Branch (123:7): [True: 752, False: 9.82k]
  ------------------
  124|       |    // Decode compressed values.
  125|    752|    if (!DecodeSymbols(static_cast<uint32_t>(num_values), num_components,
  ------------------
  |  Branch (125:9): [True: 278, False: 474]
  ------------------
  126|    752|                       in_buffer,
  127|    752|                       reinterpret_cast<uint32_t *>(portable_attribute_data))) {
  128|    278|      return false;
  129|    278|    }
  130|  9.82k|  } else {
  131|       |    // Decode the integer data directly.
  132|       |    // Get the number of bytes for a given entry.
  133|  9.82k|    uint8_t num_bytes;
  134|  9.82k|    if (!in_buffer->Decode(&num_bytes)) {
  ------------------
  |  Branch (134:9): [True: 11, False: 9.81k]
  ------------------
  135|     11|      return false;
  136|     11|    }
  137|  9.81k|    if (num_bytes == DataTypeLength(DT_INT32)) {
  ------------------
  |  Branch (137:9): [True: 352, False: 9.46k]
  ------------------
  138|    352|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (138:11): [True: 0, False: 352]
  ------------------
  139|    352|          sizeof(int32_t) * num_values) {
  140|      0|        return false;
  141|      0|      }
  142|    352|      if (!in_buffer->Decode(portable_attribute_data,
  ------------------
  |  Branch (142:11): [True: 4, False: 348]
  ------------------
  143|    352|                             sizeof(int32_t) * num_values)) {
  144|      4|        return false;
  145|      4|      }
  146|  9.46k|    } else {
  147|  9.46k|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (147:11): [True: 33, False: 9.43k]
  ------------------
  148|  9.46k|          num_bytes * num_values) {
  149|     33|        return false;
  150|     33|      }
  151|  9.43k|      if (in_buffer->remaining_size() <
  ------------------
  |  Branch (151:11): [True: 17, False: 9.41k]
  ------------------
  152|  9.43k|          static_cast<int64_t>(num_bytes) * static_cast<int64_t>(num_values)) {
  153|     17|        return false;
  154|     17|      }
  155|  1.13G|      for (size_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (155:26): [True: 1.13G, False: 9.41k]
  ------------------
  156|  1.13G|        if (!in_buffer->Decode(portable_attribute_data + i, num_bytes)) {
  ------------------
  |  Branch (156:13): [True: 0, False: 1.13G]
  ------------------
  157|      0|          return false;
  158|      0|        }
  159|  1.13G|      }
  160|  9.41k|    }
  161|  9.81k|  }
  162|       |
  163|  10.2k|  if (num_values > 0 && (prediction_scheme_ == nullptr ||
  ------------------
  |  Branch (163:7): [True: 10.2k, False: 0]
  |  Branch (163:26): [True: 3.80k, False: 6.42k]
  ------------------
  164|  9.04k|                         !prediction_scheme_->AreCorrectionsPositive())) {
  ------------------
  |  Branch (164:26): [True: 5.23k, False: 1.19k]
  ------------------
  165|       |    // Convert the values back to the original signed format.
  166|  9.04k|    ConvertSymbolsToSignedInts(
  167|  9.04k|        reinterpret_cast<const uint32_t *>(portable_attribute_data),
  168|  9.04k|        static_cast<int>(num_values), portable_attribute_data);
  169|  9.04k|  }
  170|       |
  171|       |  // If the data was encoded with a prediction scheme, we must revert it.
  172|  10.2k|  if (prediction_scheme_) {
  ------------------
  |  Branch (172:7): [True: 6.42k, False: 3.80k]
  ------------------
  173|  6.42k|    if (!prediction_scheme_->DecodePredictionData(in_buffer)) {
  ------------------
  |  Branch (173:9): [True: 887, False: 5.54k]
  ------------------
  174|    887|      return false;
  175|    887|    }
  176|       |
  177|  5.54k|    if (num_values > 0) {
  ------------------
  |  Branch (177:9): [True: 5.54k, False: 0]
  ------------------
  178|  5.54k|      if (!prediction_scheme_->ComputeOriginalValues(
  ------------------
  |  Branch (178:11): [True: 498, False: 5.04k]
  ------------------
  179|  5.54k|              portable_attribute_data, portable_attribute_data,
  180|  5.54k|              static_cast<int>(num_values), num_components, point_ids.data())) {
  181|    498|        return false;
  182|    498|      }
  183|  5.54k|    }
  184|  5.54k|  }
  185|  8.85k|  return true;
  186|  10.2k|}
_ZN5draco33SequentialIntegerAttributeDecoder11StoreValuesEj:
  188|  2.59k|bool SequentialIntegerAttributeDecoder::StoreValues(uint32_t num_values) {
  189|  2.59k|  switch (attribute()->data_type()) {
  190|    162|    case DT_UINT8:
  ------------------
  |  Branch (190:5): [True: 162, False: 2.43k]
  ------------------
  191|    162|      StoreTypedValues<uint8_t>(num_values);
  192|    162|      break;
  193|  1.73k|    case DT_INT8:
  ------------------
  |  Branch (193:5): [True: 1.73k, False: 858]
  ------------------
  194|  1.73k|      StoreTypedValues<int8_t>(num_values);
  195|  1.73k|      break;
  196|     96|    case DT_UINT16:
  ------------------
  |  Branch (196:5): [True: 96, False: 2.49k]
  ------------------
  197|     96|      StoreTypedValues<uint16_t>(num_values);
  198|     96|      break;
  199|    151|    case DT_INT16:
  ------------------
  |  Branch (199:5): [True: 151, False: 2.44k]
  ------------------
  200|    151|      StoreTypedValues<int16_t>(num_values);
  201|    151|      break;
  202|    138|    case DT_UINT32:
  ------------------
  |  Branch (202:5): [True: 138, False: 2.45k]
  ------------------
  203|    138|      StoreTypedValues<uint32_t>(num_values);
  204|    138|      break;
  205|    207|    case DT_INT32:
  ------------------
  |  Branch (205:5): [True: 207, False: 2.38k]
  ------------------
  206|    207|      StoreTypedValues<int32_t>(num_values);
  207|    207|      break;
  208|    104|    default:
  ------------------
  |  Branch (208:5): [True: 104, False: 2.49k]
  ------------------
  209|    104|      return false;
  210|  2.59k|  }
  211|  2.49k|  return true;
  212|  2.59k|}
_ZN5draco33SequentialIntegerAttributeDecoder24PreparePortableAttributeEii:
  236|  10.6k|    int num_entries, int num_components) {
  237|  10.6k|  GeometryAttribute ga;
  238|  10.6k|  ga.Init(attribute()->attribute_type(), nullptr, num_components, DT_INT32,
  239|  10.6k|          false, num_components * DataTypeLength(DT_INT32), 0);
  240|  10.6k|  std::unique_ptr<PointAttribute> port_att(new PointAttribute(ga));
  241|  10.6k|  port_att->SetIdentityMapping();
  242|  10.6k|  port_att->Reset(num_entries);
  243|  10.6k|  port_att->set_unique_id(attribute()->unique_id());
  244|  10.6k|  SetPortableAttribute(std::move(port_att));
  245|  10.6k|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIhEEvj:
  215|    162|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    162|  const int num_components = attribute()->num_components();
  217|    162|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    162|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    162|      new AttributeTypeT[num_components]);
  220|    162|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    162|  int val_id = 0;
  222|    162|  int out_byte_pos = 0;
  223|  1.05M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 1.05M, False: 162]
  ------------------
  224|  17.5M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 16.5M, False: 1.05M]
  ------------------
  225|  16.5M|      const AttributeTypeT value =
  226|  16.5M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|  16.5M|      att_val[c] = value;
  228|  16.5M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|  1.05M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|  1.05M|    out_byte_pos += entry_size;
  232|  1.05M|  }
  233|    162|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIaEEvj:
  215|  1.73k|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|  1.73k|  const int num_components = attribute()->num_components();
  217|  1.73k|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|  1.73k|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|  1.73k|      new AttributeTypeT[num_components]);
  220|  1.73k|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|  1.73k|  int val_id = 0;
  222|  1.73k|  int out_byte_pos = 0;
  223|  5.31M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 5.31M, False: 1.73k]
  ------------------
  224|   376M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 370M, False: 5.31M]
  ------------------
  225|   370M|      const AttributeTypeT value =
  226|   370M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|   370M|      att_val[c] = value;
  228|   370M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|  5.31M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|  5.31M|    out_byte_pos += entry_size;
  232|  5.31M|  }
  233|  1.73k|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesItEEvj:
  215|     96|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|     96|  const int num_components = attribute()->num_components();
  217|     96|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|     96|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|     96|      new AttributeTypeT[num_components]);
  220|     96|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|     96|  int val_id = 0;
  222|     96|  int out_byte_pos = 0;
  223|   264k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 264k, False: 96]
  ------------------
  224|  14.3M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 14.0M, False: 264k]
  ------------------
  225|  14.0M|      const AttributeTypeT value =
  226|  14.0M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|  14.0M|      att_val[c] = value;
  228|  14.0M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|   264k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|   264k|    out_byte_pos += entry_size;
  232|   264k|  }
  233|     96|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIsEEvj:
  215|    151|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    151|  const int num_components = attribute()->num_components();
  217|    151|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    151|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    151|      new AttributeTypeT[num_components]);
  220|    151|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    151|  int val_id = 0;
  222|    151|  int out_byte_pos = 0;
  223|   567k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 567k, False: 151]
  ------------------
  224|  33.7M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 33.1M, False: 567k]
  ------------------
  225|  33.1M|      const AttributeTypeT value =
  226|  33.1M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|  33.1M|      att_val[c] = value;
  228|  33.1M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|   567k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|   567k|    out_byte_pos += entry_size;
  232|   567k|  }
  233|    151|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIjEEvj:
  215|    138|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    138|  const int num_components = attribute()->num_components();
  217|    138|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    138|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    138|      new AttributeTypeT[num_components]);
  220|    138|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    138|  int val_id = 0;
  222|    138|  int out_byte_pos = 0;
  223|   953k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 953k, False: 138]
  ------------------
  224|   187M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 186M, False: 953k]
  ------------------
  225|   186M|      const AttributeTypeT value =
  226|   186M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|   186M|      att_val[c] = value;
  228|   186M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|   953k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|   953k|    out_byte_pos += entry_size;
  232|   953k|  }
  233|    138|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIiEEvj:
  215|    207|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    207|  const int num_components = attribute()->num_components();
  217|    207|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    207|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    207|      new AttributeTypeT[num_components]);
  220|    207|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    207|  int val_id = 0;
  222|    207|  int out_byte_pos = 0;
  223|  2.30M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 2.30M, False: 207]
  ------------------
  224|   228M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 226M, False: 2.30M]
  ------------------
  225|   226M|      const AttributeTypeT value =
  226|   226M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|   226M|      att_val[c] = value;
  228|   226M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|  2.30M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|  2.30M|    out_byte_pos += entry_size;
  232|  2.30M|  }
  233|    207|}

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

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

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

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

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

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

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

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

_ZN5draco10AnsDecoderC2Ev:
   56|  33.6k|  AnsDecoder() : buf(nullptr), buf_offset(0), state(0) {}
rans_bit_decoder.cc:_ZN5dracoL13ans_read_initEPNS_10AnsDecoderEPKhi:
  300|  21.1k|                                const uint8_t *const buf, int offset) {
  301|  21.1k|  unsigned x;
  302|  21.1k|  if (offset < 1) {
  ------------------
  |  Branch (302:7): [True: 28, False: 21.1k]
  ------------------
  303|     28|    return 1;
  304|     28|  }
  305|  21.1k|  ans->buf = buf;
  306|  21.1k|  x = buf[offset - 1] >> 6;
  307|  21.1k|  if (x == 0) {
  ------------------
  |  Branch (307:7): [True: 18.4k, False: 2.62k]
  ------------------
  308|  18.4k|    ans->buf_offset = offset - 1;
  309|  18.4k|    ans->state = buf[offset - 1] & 0x3F;
  310|  18.4k|  } else if (x == 1) {
  ------------------
  |  Branch (310:14): [True: 2.31k, False: 315]
  ------------------
  311|  2.31k|    if (offset < 2) {
  ------------------
  |  Branch (311:9): [True: 3, False: 2.30k]
  ------------------
  312|      3|      return 1;
  313|      3|    }
  314|  2.30k|    ans->buf_offset = offset - 2;
  315|  2.30k|    ans->state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  316|  2.30k|  } else if (x == 2) {
  ------------------
  |  Branch (316:14): [True: 305, False: 10]
  ------------------
  317|    305|    if (offset < 3) {
  ------------------
  |  Branch (317:9): [True: 1, False: 304]
  ------------------
  318|      1|      return 1;
  319|      1|    }
  320|    304|    ans->buf_offset = offset - 3;
  321|    304|    ans->state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  322|    304|  } else {
  323|     10|    return 1;
  324|     10|  }
  325|  21.0k|  ans->state += DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  21.0k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  326|  21.0k|  if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   64|  21.0k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
                if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  21.0k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (326:7): [True: 1, False: 21.0k]
  ------------------
  327|      1|    return 1;
  328|      1|  }
  329|  21.0k|  return 0;
  330|  21.0k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|  2.30k|static uint32_t mem_get_le16(const void *vmem) {
   68|  2.30k|  uint32_t val;
   69|  2.30k|  const uint8_t *mem = (const uint8_t *)vmem;
   70|       |
   71|  2.30k|  val = mem[1] << 8;
   72|  2.30k|  val |= mem[0];
   73|  2.30k|  return val;
   74|  2.30k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    304|static uint32_t mem_get_le24(const void *vmem) {
   77|    304|  uint32_t val;
   78|    304|  const uint8_t *mem = (const uint8_t *)vmem;
   79|       |
   80|    304|  val = mem[2] << 16;
   81|    304|  val |= mem[1] << 8;
   82|    304|  val |= mem[0];
   83|    304|  return val;
   84|    304|}
rans_bit_decoder.cc:_ZN5dracoL14rabs_desc_readEPNS_10AnsDecoderEh:
  166|  11.1G|static inline int rabs_desc_read(struct AnsDecoder *ans, AnsP8 p0) {
  167|  11.1G|  int val;
  168|       |#if DRACO_ANS_IMPL1
  169|       |  unsigned l_s;
  170|       |#else
  171|  11.1G|  unsigned quot, rem, x, xn;
  172|  11.1G|#endif
  173|  11.1G|  const AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
  ------------------
  |  |   63|  11.1G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  174|  11.1G|  if (ans->state < DRACO_ANS_L_BASE && ans->buf_offset > 0) {
  ------------------
  |  |   64|  22.3G|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  |  Branch (174:7): [True: 10.3G, False: 777M]
  |  Branch (174:40): [True: 153k, False: 10.3G]
  ------------------
  175|   153k|    ans->state = ans->state * DRACO_ANS_IO_BASE + ans->buf[--ans->buf_offset];
  ------------------
  |  |   65|   153k|#define DRACO_ANS_IO_BASE 256
  ------------------
  176|   153k|  }
  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|  11.1G|  x = ans->state;
  184|  11.1G|  quot = x / DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|  11.1G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  185|  11.1G|  rem = x % DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|  11.1G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  186|  11.1G|  xn = quot * p;
  187|  11.1G|  val = rem < p;
  188|  11.1G|  if (UNPREDICTABLE(val)) {
  ------------------
  |  |  165|  22.3G|#define UNPREDICTABLE(x) x
  |  |  ------------------
  |  |  |  Branch (165:26): [True: 10.4G, False: 749M]
  |  |  ------------------
  ------------------
  189|  10.4G|    ans->state = xn + rem;
  190|  10.4G|  } else {
  191|       |    // ans->state = quot * p0 + rem - p;
  192|   749M|    ans->state = x - xn - p;
  193|   749M|  }
  194|  11.1G|#endif
  195|  11.1G|  return val;
  196|  11.1G|}
rans_bit_decoder.cc:_ZN5dracoL12ans_read_endEPNS_10AnsDecoderE:
  332|  46.3k|static inline int ans_read_end(struct AnsDecoder *const ans) {
  333|  46.3k|  return ans->state == DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  46.3k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  334|  46.3k|}
_ZN5draco11RAnsDecoderILi12EEC2Ev:
  416|  4.64k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi12EE24rans_build_look_up_tableEPKjj:
  481|  2.62k|                                       uint32_t num_symbols) {
  482|  2.62k|    lut_table_.resize(rans_precision);
  483|  2.62k|    probability_table_.resize(num_symbols);
  484|  2.62k|    uint32_t cum_prob = 0;
  485|  2.62k|    uint32_t act_prob = 0;
  486|  23.3k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 20.8k, False: 2.42k]
  ------------------
  487|  20.8k|      probability_table_[i].prob = token_probs[i];
  488|  20.8k|      probability_table_[i].cum_prob = cum_prob;
  489|  20.8k|      cum_prob += token_probs[i];
  490|  20.8k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 195, False: 20.6k]
  ------------------
  491|    195|        return false;
  492|    195|      }
  493|  9.05M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 9.03M, False: 20.6k]
  ------------------
  494|  9.03M|        lut_table_[j] = i;
  495|  9.03M|      }
  496|  20.6k|      act_prob = cum_prob;
  497|  20.6k|    }
  498|  2.42k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 286, False: 2.14k]
  ------------------
  499|    286|      return false;
  500|    286|    }
  501|  2.14k|    return true;
  502|  2.42k|  }
_ZN5draco11RAnsDecoderILi12EE9read_initEPKhi:
  421|  1.84k|  inline int read_init(const uint8_t *const buf, int offset) {
  422|  1.84k|    unsigned x;
  423|  1.84k|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 179, False: 1.66k]
  ------------------
  424|    179|      return 1;
  425|    179|    }
  426|  1.66k|    ans_.buf = buf;
  427|  1.66k|    x = buf[offset - 1] >> 6;
  428|  1.66k|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 970, False: 698]
  ------------------
  429|    970|      ans_.buf_offset = offset - 1;
  430|    970|      ans_.state = buf[offset - 1] & 0x3F;
  431|    970|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 325, False: 373]
  ------------------
  432|    325|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 78, False: 247]
  ------------------
  433|     78|        return 1;
  434|     78|      }
  435|    247|      ans_.buf_offset = offset - 2;
  436|    247|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    373|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 264, False: 109]
  ------------------
  438|    264|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 82, False: 182]
  ------------------
  439|     82|        return 1;
  440|     82|      }
  441|    182|      ans_.buf_offset = offset - 3;
  442|    182|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    182|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 109, False: 0]
  ------------------
  444|    109|      ans_.buf_offset = offset - 4;
  445|    109|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|    109|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|  1.50k|    ans_.state += l_rans_base;
  450|  1.50k|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  1.50k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 103, False: 1.40k]
  ------------------
  451|    103|      return 1;
  452|    103|    }
  453|  1.40k|    return 0;
  454|  1.50k|  }
symbol_decoding.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|    396|static uint32_t mem_get_le16(const void *vmem) {
   68|    396|  uint32_t val;
   69|    396|  const uint8_t *mem = (const uint8_t *)vmem;
   70|       |
   71|    396|  val = mem[1] << 8;
   72|    396|  val |= mem[0];
   73|    396|  return val;
   74|    396|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    294|static uint32_t mem_get_le24(const void *vmem) {
   77|    294|  uint32_t val;
   78|    294|  const uint8_t *mem = (const uint8_t *)vmem;
   79|       |
   80|    294|  val = mem[2] << 16;
   81|    294|  val |= mem[1] << 8;
   82|    294|  val |= mem[0];
   83|    294|  return val;
   84|    294|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le32EPKv:
   86|    413|static inline uint32_t mem_get_le32(const void *vmem) {
   87|    413|  uint32_t val;
   88|    413|  const uint8_t *mem = (const uint8_t *)vmem;
   89|       |
   90|    413|  val = mem[3] << 24;
   91|    413|  val |= mem[2] << 16;
   92|    413|  val |= mem[1] << 8;
   93|    413|  val |= mem[0];
   94|    413|  return val;
   95|    413|}
_ZN5draco11RAnsDecoderILi12EE9rans_readEv:
  462|  94.3M|  inline int rans_read() {
  463|  94.3M|    unsigned rem;
  464|  94.3M|    unsigned quo;
  465|  94.3M|    struct rans_dec_sym sym;
  466|  94.3M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 86.4M, False: 7.88M]
  |  Branch (466:40): [True: 24.0k, False: 86.4M]
  ------------------
  467|  24.0k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  24.0k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  24.0k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|  94.3M|    quo = ans_.state / rans_precision;
  472|  94.3M|    rem = ans_.state % rans_precision;
  473|  94.3M|    fetch_sym(&sym, rem);
  474|  94.3M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  94.3M|    return sym.val;
  476|  94.3M|  }
_ZN5draco11RAnsDecoderILi12EE9fetch_symEPNS_12rans_dec_symEj:
  505|  94.3M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  94.3M|    uint32_t symbol = lut_table_[rem];
  507|  94.3M|    out->val = symbol;
  508|  94.3M|    out->prob = probability_table_[symbol].prob;
  509|  94.3M|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  94.3M|  }
_ZN5draco11RAnsDecoderILi12EE8read_endEv:
  456|  1.32k|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi13EEC2Ev:
  416|    526|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi13EE24rans_build_look_up_tableEPKjj:
  481|    391|                                       uint32_t num_symbols) {
  482|    391|    lut_table_.resize(rans_precision);
  483|    391|    probability_table_.resize(num_symbols);
  484|    391|    uint32_t cum_prob = 0;
  485|    391|    uint32_t act_prob = 0;
  486|  9.68k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 9.31k, False: 365]
  ------------------
  487|  9.31k|      probability_table_[i].prob = token_probs[i];
  488|  9.31k|      probability_table_[i].cum_prob = cum_prob;
  489|  9.31k|      cum_prob += token_probs[i];
  490|  9.31k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 26, False: 9.29k]
  ------------------
  491|     26|        return false;
  492|     26|      }
  493|  2.85M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 2.84M, False: 9.29k]
  ------------------
  494|  2.84M|        lut_table_[j] = i;
  495|  2.84M|      }
  496|  9.29k|      act_prob = cum_prob;
  497|  9.29k|    }
  498|    365|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 31, False: 334]
  ------------------
  499|     31|      return false;
  500|     31|    }
  501|    334|    return true;
  502|    365|  }
_ZN5draco11RAnsDecoderILi13EE9read_initEPKhi:
  421|    246|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    246|    unsigned x;
  423|    246|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 9, False: 237]
  ------------------
  424|      9|      return 1;
  425|      9|    }
  426|    237|    ans_.buf = buf;
  427|    237|    x = buf[offset - 1] >> 6;
  428|    237|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 140, False: 97]
  ------------------
  429|    140|      ans_.buf_offset = offset - 1;
  430|    140|      ans_.state = buf[offset - 1] & 0x3F;
  431|    140|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 45, False: 52]
  ------------------
  432|     45|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 15, False: 30]
  ------------------
  433|     15|        return 1;
  434|     15|      }
  435|     30|      ans_.buf_offset = offset - 2;
  436|     30|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     52|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 26, False: 26]
  ------------------
  438|     26|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 9, False: 17]
  ------------------
  439|      9|        return 1;
  440|      9|      }
  441|     17|      ans_.buf_offset = offset - 3;
  442|     17|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     26|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 26, False: 0]
  ------------------
  444|     26|      ans_.buf_offset = offset - 4;
  445|     26|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     26|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|    213|    ans_.state += l_rans_base;
  450|    213|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    213|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 20, False: 193]
  ------------------
  451|     20|      return 1;
  452|     20|    }
  453|    193|    return 0;
  454|    213|  }
_ZN5draco11RAnsDecoderILi13EE9rans_readEv:
  462|  12.5M|  inline int rans_read() {
  463|  12.5M|    unsigned rem;
  464|  12.5M|    unsigned quo;
  465|  12.5M|    struct rans_dec_sym sym;
  466|  12.5M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 12.5M, False: 12.2k]
  |  Branch (466:40): [True: 3.71k, False: 12.5M]
  ------------------
  467|  3.71k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  3.71k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  3.71k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|  12.5M|    quo = ans_.state / rans_precision;
  472|  12.5M|    rem = ans_.state % rans_precision;
  473|  12.5M|    fetch_sym(&sym, rem);
  474|  12.5M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  12.5M|    return sym.val;
  476|  12.5M|  }
_ZN5draco11RAnsDecoderILi13EE9fetch_symEPNS_12rans_dec_symEj:
  505|  12.5M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  12.5M|    uint32_t symbol = lut_table_[rem];
  507|  12.5M|    out->val = symbol;
  508|  12.5M|    out->prob = probability_table_[symbol].prob;
  509|  12.5M|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  12.5M|  }
_ZN5draco11RAnsDecoderILi13EE8read_endEv:
  456|    193|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi15EEC2Ev:
  416|    431|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi15EE24rans_build_look_up_tableEPKjj:
  481|    292|                                       uint32_t num_symbols) {
  482|    292|    lut_table_.resize(rans_precision);
  483|    292|    probability_table_.resize(num_symbols);
  484|    292|    uint32_t cum_prob = 0;
  485|    292|    uint32_t act_prob = 0;
  486|  11.3k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 11.0k, False: 265]
  ------------------
  487|  11.0k|      probability_table_[i].prob = token_probs[i];
  488|  11.0k|      probability_table_[i].cum_prob = cum_prob;
  489|  11.0k|      cum_prob += token_probs[i];
  490|  11.0k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 27, False: 11.0k]
  ------------------
  491|     27|        return false;
  492|     27|      }
  493|  7.82M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 7.81M, False: 11.0k]
  ------------------
  494|  7.81M|        lut_table_[j] = i;
  495|  7.81M|      }
  496|  11.0k|      act_prob = cum_prob;
  497|  11.0k|    }
  498|    265|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 43, False: 222]
  ------------------
  499|     43|      return false;
  500|     43|    }
  501|    222|    return true;
  502|    265|  }
_ZN5draco11RAnsDecoderILi15EE9read_initEPKhi:
  421|    141|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    141|    unsigned x;
  423|    141|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 11, False: 130]
  ------------------
  424|     11|      return 1;
  425|     11|    }
  426|    130|    ans_.buf = buf;
  427|    130|    x = buf[offset - 1] >> 6;
  428|    130|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 27, False: 103]
  ------------------
  429|     27|      ans_.buf_offset = offset - 1;
  430|     27|      ans_.state = buf[offset - 1] & 0x3F;
  431|    103|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 30, False: 73]
  ------------------
  432|     30|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 11, False: 19]
  ------------------
  433|     11|        return 1;
  434|     11|      }
  435|     19|      ans_.buf_offset = offset - 2;
  436|     19|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     73|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 26, False: 47]
  ------------------
  438|     26|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 12, False: 14]
  ------------------
  439|     12|        return 1;
  440|     12|      }
  441|     14|      ans_.buf_offset = offset - 3;
  442|     14|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     47|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 47, False: 0]
  ------------------
  444|     47|      ans_.buf_offset = offset - 4;
  445|     47|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     47|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|    107|    ans_.state += l_rans_base;
  450|    107|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    107|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 29, False: 78]
  ------------------
  451|     29|      return 1;
  452|     29|    }
  453|     78|    return 0;
  454|    107|  }
_ZN5draco11RAnsDecoderILi15EE9rans_readEv:
  462|   577k|  inline int rans_read() {
  463|   577k|    unsigned rem;
  464|   577k|    unsigned quo;
  465|   577k|    struct rans_dec_sym sym;
  466|   578k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 224k, False: 353k]
  |  Branch (466:40): [True: 313, False: 223k]
  ------------------
  467|    313|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    313|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|    313|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|   577k|    quo = ans_.state / rans_precision;
  472|   577k|    rem = ans_.state % rans_precision;
  473|   577k|    fetch_sym(&sym, rem);
  474|   577k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   577k|    return sym.val;
  476|   577k|  }
_ZN5draco11RAnsDecoderILi15EE9fetch_symEPNS_12rans_dec_symEj:
  505|   577k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   577k|    uint32_t symbol = lut_table_[rem];
  507|   577k|    out->val = symbol;
  508|   577k|    out->prob = probability_table_[symbol].prob;
  509|   577k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   577k|  }
_ZN5draco11RAnsDecoderILi15EE8read_endEv:
  456|     78|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi16EEC2Ev:
  416|    382|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi16EE24rans_build_look_up_tableEPKjj:
  481|    236|                                       uint32_t num_symbols) {
  482|    236|    lut_table_.resize(rans_precision);
  483|    236|    probability_table_.resize(num_symbols);
  484|    236|    uint32_t cum_prob = 0;
  485|    236|    uint32_t act_prob = 0;
  486|  11.1k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 10.9k, False: 214]
  ------------------
  487|  10.9k|      probability_table_[i].prob = token_probs[i];
  488|  10.9k|      probability_table_[i].cum_prob = cum_prob;
  489|  10.9k|      cum_prob += token_probs[i];
  490|  10.9k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 22, False: 10.8k]
  ------------------
  491|     22|        return false;
  492|     22|      }
  493|  12.0M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 12.0M, False: 10.8k]
  ------------------
  494|  12.0M|        lut_table_[j] = i;
  495|  12.0M|      }
  496|  10.8k|      act_prob = cum_prob;
  497|  10.8k|    }
  498|    214|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 50, False: 164]
  ------------------
  499|     50|      return false;
  500|     50|    }
  501|    164|    return true;
  502|    214|  }
_ZN5draco11RAnsDecoderILi16EE9read_initEPKhi:
  421|     89|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     89|    unsigned x;
  423|     89|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 7, False: 82]
  ------------------
  424|      7|      return 1;
  425|      7|    }
  426|     82|    ans_.buf = buf;
  427|     82|    x = buf[offset - 1] >> 6;
  428|     82|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 44, False: 38]
  ------------------
  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: 12, False: 26]
  ------------------
  432|     12|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 2, False: 10]
  ------------------
  433|      2|        return 1;
  434|      2|      }
  435|     10|      ans_.buf_offset = offset - 2;
  436|     10|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     26|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 12, False: 14]
  ------------------
  438|     12|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 0, False: 12]
  ------------------
  439|      0|        return 1;
  440|      0|      }
  441|     12|      ans_.buf_offset = offset - 3;
  442|     12|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     14|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 14, False: 0]
  ------------------
  444|     14|      ans_.buf_offset = offset - 4;
  445|     14|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     14|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     80|    ans_.state += l_rans_base;
  450|     80|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     80|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 11, False: 69]
  ------------------
  451|     11|      return 1;
  452|     11|    }
  453|     69|    return 0;
  454|     80|  }
_ZN5draco11RAnsDecoderILi16EE9rans_readEv:
  462|   430k|  inline int rans_read() {
  463|   430k|    unsigned rem;
  464|   430k|    unsigned quo;
  465|   430k|    struct rans_dec_sym sym;
  466|   433k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 202k, False: 230k]
  |  Branch (466:40): [True: 2.18k, False: 200k]
  ------------------
  467|  2.18k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  2.18k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  2.18k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|   430k|    quo = ans_.state / rans_precision;
  472|   430k|    rem = ans_.state % rans_precision;
  473|   430k|    fetch_sym(&sym, rem);
  474|   430k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   430k|    return sym.val;
  476|   430k|  }
_ZN5draco11RAnsDecoderILi16EE9fetch_symEPNS_12rans_dec_symEj:
  505|   430k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   430k|    uint32_t symbol = lut_table_[rem];
  507|   430k|    out->val = symbol;
  508|   430k|    out->prob = probability_table_[symbol].prob;
  509|   430k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   430k|  }
_ZN5draco11RAnsDecoderILi16EE8read_endEv:
  456|     69|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi18EEC2Ev:
  416|    399|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi18EE24rans_build_look_up_tableEPKjj:
  481|    248|                                       uint32_t num_symbols) {
  482|    248|    lut_table_.resize(rans_precision);
  483|    248|    probability_table_.resize(num_symbols);
  484|    248|    uint32_t cum_prob = 0;
  485|    248|    uint32_t act_prob = 0;
  486|  9.60k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 9.38k, False: 220]
  ------------------
  487|  9.38k|      probability_table_[i].prob = token_probs[i];
  488|  9.38k|      probability_table_[i].cum_prob = cum_prob;
  489|  9.38k|      cum_prob += token_probs[i];
  490|  9.38k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 28, False: 9.35k]
  ------------------
  491|     28|        return false;
  492|     28|      }
  493|  51.3M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 51.3M, False: 9.35k]
  ------------------
  494|  51.3M|        lut_table_[j] = i;
  495|  51.3M|      }
  496|  9.35k|      act_prob = cum_prob;
  497|  9.35k|    }
  498|    220|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 41, False: 179]
  ------------------
  499|     41|      return false;
  500|     41|    }
  501|    179|    return true;
  502|    220|  }
_ZN5draco11RAnsDecoderILi18EE9read_initEPKhi:
  421|     97|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     97|    unsigned x;
  423|     97|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 2, False: 95]
  ------------------
  424|      2|      return 1;
  425|      2|    }
  426|     95|    ans_.buf = buf;
  427|     95|    x = buf[offset - 1] >> 6;
  428|     95|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 35, False: 60]
  ------------------
  429|     35|      ans_.buf_offset = offset - 1;
  430|     35|      ans_.state = buf[offset - 1] & 0x3F;
  431|     60|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 25, False: 35]
  ------------------
  432|     25|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 13, False: 12]
  ------------------
  433|     13|        return 1;
  434|     13|      }
  435|     12|      ans_.buf_offset = offset - 2;
  436|     12|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     35|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 14, False: 21]
  ------------------
  438|     14|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 11, False: 3]
  ------------------
  439|     11|        return 1;
  440|     11|      }
  441|      3|      ans_.buf_offset = offset - 3;
  442|      3|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     21|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 21, False: 0]
  ------------------
  444|     21|      ans_.buf_offset = offset - 4;
  445|     21|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     21|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     71|    ans_.state += l_rans_base;
  450|     71|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     71|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 7, False: 64]
  ------------------
  451|      7|      return 1;
  452|      7|    }
  453|     64|    return 0;
  454|     71|  }
_ZN5draco11RAnsDecoderILi18EE9rans_readEv:
  462|  80.1k|  inline int rans_read() {
  463|  80.1k|    unsigned rem;
  464|  80.1k|    unsigned quo;
  465|  80.1k|    struct rans_dec_sym sym;
  466|  81.0k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 69.7k, False: 11.2k]
  |  Branch (466:40): [True: 909, False: 68.8k]
  ------------------
  467|    909|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    909|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|    909|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|  80.1k|    quo = ans_.state / rans_precision;
  472|  80.1k|    rem = ans_.state % rans_precision;
  473|  80.1k|    fetch_sym(&sym, rem);
  474|  80.1k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  80.1k|    return sym.val;
  476|  80.1k|  }
_ZN5draco11RAnsDecoderILi18EE9fetch_symEPNS_12rans_dec_symEj:
  505|  80.1k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  80.1k|    uint32_t symbol = lut_table_[rem];
  507|  80.1k|    out->val = symbol;
  508|  80.1k|    out->prob = probability_table_[symbol].prob;
  509|  80.1k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  80.1k|  }
_ZN5draco11RAnsDecoderILi18EE8read_endEv:
  456|     64|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi19EEC2Ev:
  416|    422|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi19EE24rans_build_look_up_tableEPKjj:
  481|    266|                                       uint32_t num_symbols) {
  482|    266|    lut_table_.resize(rans_precision);
  483|    266|    probability_table_.resize(num_symbols);
  484|    266|    uint32_t cum_prob = 0;
  485|    266|    uint32_t act_prob = 0;
  486|  4.51k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 4.26k, False: 247]
  ------------------
  487|  4.26k|      probability_table_[i].prob = token_probs[i];
  488|  4.26k|      probability_table_[i].cum_prob = cum_prob;
  489|  4.26k|      cum_prob += token_probs[i];
  490|  4.26k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 19, False: 4.24k]
  ------------------
  491|     19|        return false;
  492|     19|      }
  493|   102M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 102M, False: 4.24k]
  ------------------
  494|   102M|        lut_table_[j] = i;
  495|   102M|      }
  496|  4.24k|      act_prob = cum_prob;
  497|  4.24k|    }
  498|    247|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 67, False: 180]
  ------------------
  499|     67|      return false;
  500|     67|    }
  501|    180|    return true;
  502|    247|  }
_ZN5draco11RAnsDecoderILi19EE9read_initEPKhi:
  421|    101|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    101|    unsigned x;
  423|    101|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 6, False: 95]
  ------------------
  424|      6|      return 1;
  425|      6|    }
  426|     95|    ans_.buf = buf;
  427|     95|    x = buf[offset - 1] >> 6;
  428|     95|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 20, False: 75]
  ------------------
  429|     20|      ans_.buf_offset = offset - 1;
  430|     20|      ans_.state = buf[offset - 1] & 0x3F;
  431|     75|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 23, False: 52]
  ------------------
  432|     23|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 4, False: 19]
  ------------------
  433|      4|        return 1;
  434|      4|      }
  435|     19|      ans_.buf_offset = offset - 2;
  436|     19|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     52|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 11, False: 41]
  ------------------
  438|     11|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 3, False: 8]
  ------------------
  439|      3|        return 1;
  440|      3|      }
  441|      8|      ans_.buf_offset = offset - 3;
  442|      8|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     41|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 41, False: 0]
  ------------------
  444|     41|      ans_.buf_offset = offset - 4;
  445|     41|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     41|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     88|    ans_.state += l_rans_base;
  450|     88|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     88|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 8, False: 80]
  ------------------
  451|      8|      return 1;
  452|      8|    }
  453|     80|    return 0;
  454|     88|  }
_ZN5draco11RAnsDecoderILi19EE9rans_readEv:
  462|  78.7k|  inline int rans_read() {
  463|  78.7k|    unsigned rem;
  464|  78.7k|    unsigned quo;
  465|  78.7k|    struct rans_dec_sym sym;
  466|  79.6k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 66.6k, False: 13.0k]
  |  Branch (466:40): [True: 910, False: 65.7k]
  ------------------
  467|    910|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    910|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|    910|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|  78.7k|    quo = ans_.state / rans_precision;
  472|  78.7k|    rem = ans_.state % rans_precision;
  473|  78.7k|    fetch_sym(&sym, rem);
  474|  78.7k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  78.7k|    return sym.val;
  476|  78.7k|  }
_ZN5draco11RAnsDecoderILi19EE9fetch_symEPNS_12rans_dec_symEj:
  505|  78.7k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  78.7k|    uint32_t symbol = lut_table_[rem];
  507|  78.7k|    out->val = symbol;
  508|  78.7k|    out->prob = probability_table_[symbol].prob;
  509|  78.7k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  78.7k|  }
_ZN5draco11RAnsDecoderILi19EE8read_endEv:
  456|     80|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi20EEC2Ev:
  416|  1.81k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi20EE24rans_build_look_up_tableEPKjj:
  481|  1.11k|                                       uint32_t num_symbols) {
  482|  1.11k|    lut_table_.resize(rans_precision);
  483|  1.11k|    probability_table_.resize(num_symbols);
  484|  1.11k|    uint32_t cum_prob = 0;
  485|  1.11k|    uint32_t act_prob = 0;
  486|  44.2k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 43.1k, False: 1.05k]
  ------------------
  487|  43.1k|      probability_table_[i].prob = token_probs[i];
  488|  43.1k|      probability_table_[i].cum_prob = cum_prob;
  489|  43.1k|      cum_prob += token_probs[i];
  490|  43.1k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 55, False: 43.0k]
  ------------------
  491|     55|        return false;
  492|     55|      }
  493|  1.01G|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 1.01G, False: 43.0k]
  ------------------
  494|  1.01G|        lut_table_[j] = i;
  495|  1.01G|      }
  496|  43.0k|      act_prob = cum_prob;
  497|  43.0k|    }
  498|  1.05k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 135, False: 924]
  ------------------
  499|    135|      return false;
  500|    135|    }
  501|    924|    return true;
  502|  1.05k|  }
_ZN5draco11RAnsDecoderILi20EE9read_initEPKhi:
  421|    554|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    554|    unsigned x;
  423|    554|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 53, False: 501]
  ------------------
  424|     53|      return 1;
  425|     53|    }
  426|    501|    ans_.buf = buf;
  427|    501|    x = buf[offset - 1] >> 6;
  428|    501|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 147, False: 354]
  ------------------
  429|    147|      ans_.buf_offset = offset - 1;
  430|    147|      ans_.state = buf[offset - 1] & 0x3F;
  431|    354|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 104, False: 250]
  ------------------
  432|    104|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 45, False: 59]
  ------------------
  433|     45|        return 1;
  434|     45|      }
  435|     59|      ans_.buf_offset = offset - 2;
  436|     59|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    250|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 95, False: 155]
  ------------------
  438|     95|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 37, False: 58]
  ------------------
  439|     37|        return 1;
  440|     37|      }
  441|     58|      ans_.buf_offset = offset - 3;
  442|     58|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    155|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 155, False: 0]
  ------------------
  444|    155|      ans_.buf_offset = offset - 4;
  445|    155|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|    155|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|    419|    ans_.state += l_rans_base;
  450|    419|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    419|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 58, False: 361]
  ------------------
  451|     58|      return 1;
  452|     58|    }
  453|    361|    return 0;
  454|    419|  }
_ZN5draco11RAnsDecoderILi20EE9rans_readEv:
  462|  1.09M|  inline int rans_read() {
  463|  1.09M|    unsigned rem;
  464|  1.09M|    unsigned quo;
  465|  1.09M|    struct rans_dec_sym sym;
  466|  1.10M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 802k, False: 300k]
  |  Branch (466:40): [True: 5.41k, False: 796k]
  ------------------
  467|  5.41k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  5.41k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  5.41k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|  1.09M|    quo = ans_.state / rans_precision;
  472|  1.09M|    rem = ans_.state % rans_precision;
  473|  1.09M|    fetch_sym(&sym, rem);
  474|  1.09M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  1.09M|    return sym.val;
  476|  1.09M|  }
_ZN5draco11RAnsDecoderILi20EE9fetch_symEPNS_12rans_dec_symEj:
  505|  1.09M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  1.09M|    uint32_t symbol = lut_table_[rem];
  507|  1.09M|    out->val = symbol;
  508|  1.09M|    out->prob = probability_table_[symbol].prob;
  509|  1.09M|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  1.09M|  }
_ZN5draco11RAnsDecoderILi20EE8read_endEv:
  456|    361|  inline int read_end() { return ans_.state == l_rans_base; }

_ZN5draco17RAnsSymbolDecoderILi5EEC2Ev:
   33|  1.34k|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi5EE6CreateEPNS_13DecoderBufferE:
   59|  1.34k|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|  1.34k|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 1.34k]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|  1.34k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|  1.34k|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.34k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 133, False: 1.20k]
  ------------------
   67|    133|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 11, False: 122]
  ------------------
   68|     11|      return false;
   69|     11|    }
   70|       |
   71|    133|  } else
   72|  1.20k|#endif
   73|  1.20k|  {
   74|  1.20k|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 43, False: 1.16k]
  ------------------
   75|     43|      return false;
   76|     43|    }
   77|  1.20k|  }
   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.28k|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 114, False: 1.17k]
  ------------------
   83|    114|    return false;
   84|    114|  }
   85|  1.17k|  probability_table_.resize(num_symbols_);
   86|  1.17k|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 353, False: 821]
  ------------------
   87|    353|    return true;
   88|    353|  }
   89|       |  // Decode the table.
   90|   311k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 311k, False: 521]
  ------------------
   91|   311k|    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|   311k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 86, False: 311k]
  ------------------
   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|   311k|    const int token = prob_data & 3;
  102|   311k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 5.67k, False: 305k]
  ------------------
  103|  5.67k|      const uint32_t offset = prob_data >> 2;
  104|  5.67k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 193, False: 5.47k]
  ------------------
  105|    193|        return false;
  106|    193|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   204k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 198k, False: 5.47k]
  ------------------
  109|   198k|        probability_table_[i + j] = 0;
  110|   198k|      }
  111|  5.47k|      i += offset;
  112|   305k|    } else {
  113|   305k|      const int extra_bytes = token;
  114|   305k|      uint32_t prob = prob_data >> 2;
  115|   324k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 19.0k, False: 305k]
  ------------------
  116|  19.0k|        uint8_t eb;
  117|  19.0k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 21, False: 19.0k]
  ------------------
  118|     21|          return false;
  119|     21|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  19.0k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  19.0k|      }
  124|   305k|      probability_table_[i] = prob;
  125|   305k|    }
  126|   311k|  }
  127|    521|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 137, False: 384]
  ------------------
  128|    137|    return false;
  129|    137|  }
  130|    384|  return true;
  131|    521|}
_ZN5draco17RAnsSymbolDecoderILi5EE13StartDecodingEPNS_13DecoderBufferE:
  135|    684|    DecoderBuffer *buffer) {
  136|    684|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    684|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    684|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    684|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 51, False: 633]
  ------------------
  140|     51|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 5, False: 46]
  ------------------
  141|      5|      return false;
  142|      5|    }
  143|       |
  144|     51|  } else
  145|    633|#endif
  146|    633|  {
  147|    633|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 18, False: 615]
  ------------------
  148|     18|      return false;
  149|     18|    }
  150|    633|  }
  151|    661|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 78, False: 583]
  ------------------
  152|     78|    return false;
  153|     78|  }
  154|    583|  const uint8_t *const data_head =
  155|    583|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    583|  buffer->Advance(bytes_encoded);
  158|    583|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 152, False: 431]
  ------------------
  159|    152|    return false;
  160|    152|  }
  161|    431|  return true;
  162|    583|}
_ZNK5draco17RAnsSymbolDecoderILi5EE11num_symbolsEv:
   38|    493|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi5EE12DecodeSymbolEv:
   43|  11.6M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi5EE11EndDecodingEv:
  165|    355|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    355|  ans_.read_end();
  167|    355|}
_ZN5draco17RAnsSymbolDecoderILi1EEC2Ev:
   33|    643|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi1EE6CreateEPNS_13DecoderBufferE:
   59|    643|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    643|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 643]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    643|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    643|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    643|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 65, False: 578]
  ------------------
   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|    578|#endif
   73|    578|  {
   74|    578|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 12, False: 566]
  ------------------
   75|     12|      return false;
   76|     12|    }
   77|    578|  }
   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|    625|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 55, False: 570]
  ------------------
   83|     55|    return false;
   84|     55|  }
   85|    570|  probability_table_.resize(num_symbols_);
   86|    570|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 36, False: 534]
  ------------------
   87|     36|    return true;
   88|     36|  }
   89|       |  // Decode the table.
   90|  1.67M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.67M, False: 353]
  ------------------
   91|  1.67M|    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.67M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 63, False: 1.67M]
  ------------------
   95|     63|      return false;
   96|     63|    }
   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.67M|    const int token = prob_data & 3;
  102|  1.67M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 1.11M, False: 561k]
  ------------------
  103|  1.11M|      const uint32_t offset = prob_data >> 2;
  104|  1.11M|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 87, False: 1.11M]
  ------------------
  105|     87|        return false;
  106|     87|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  57.3M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 56.2M, False: 1.11M]
  ------------------
  109|  56.2M|        probability_table_[i + j] = 0;
  110|  56.2M|      }
  111|  1.11M|      i += offset;
  112|  1.11M|    } else {
  113|   561k|      const int extra_bytes = token;
  114|   561k|      uint32_t prob = prob_data >> 2;
  115|   975k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 414k, False: 561k]
  ------------------
  116|   414k|        uint8_t eb;
  117|   414k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 31, False: 414k]
  ------------------
  118|     31|          return false;
  119|     31|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   414k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   414k|      }
  124|   561k|      probability_table_[i] = prob;
  125|   561k|    }
  126|  1.67M|  }
  127|    353|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 168, False: 185]
  ------------------
  128|    168|    return false;
  129|    168|  }
  130|    185|  return true;
  131|    353|}
_ZNK5draco17RAnsSymbolDecoderILi1EE11num_symbolsEv:
   38|    221|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi1EE13StartDecodingEPNS_13DecoderBufferE:
  135|    185|    DecoderBuffer *buffer) {
  136|    185|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    185|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    185|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    185|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 4, False: 181]
  ------------------
  140|      4|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 4]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      4|  } else
  145|    181|#endif
  146|    181|  {
  147|    181|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 11, False: 170]
  ------------------
  148|     11|      return false;
  149|     11|    }
  150|    181|  }
  151|    174|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 25, False: 149]
  ------------------
  152|     25|    return false;
  153|     25|  }
  154|    149|  const uint8_t *const data_head =
  155|    149|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    149|  buffer->Advance(bytes_encoded);
  158|    149|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 36, False: 113]
  ------------------
  159|     36|    return false;
  160|     36|  }
  161|    113|  return true;
  162|    149|}
_ZN5draco17RAnsSymbolDecoderILi1EE12DecodeSymbolEv:
   43|  23.2M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi1EE11EndDecodingEv:
  165|    113|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    113|  ans_.read_end();
  167|    113|}
_ZN5draco17RAnsSymbolDecoderILi2EEC2Ev:
   33|    528|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi2EE6CreateEPNS_13DecoderBufferE:
   59|    528|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    528|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 528]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    528|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    528|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    528|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 52, False: 476]
  ------------------
   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|    476|#endif
   73|    476|  {
   74|    476|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 11, False: 465]
  ------------------
   75|     11|      return false;
   76|     11|    }
   77|    476|  }
   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|    517|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 34, False: 483]
  ------------------
   83|     34|    return false;
   84|     34|  }
   85|    483|  probability_table_.resize(num_symbols_);
   86|    483|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 472]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|   960k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 960k, False: 332]
  ------------------
   91|   960k|    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|   960k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 47, False: 960k]
  ------------------
   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|   960k|    const int token = prob_data & 3;
  102|   960k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 732k, False: 228k]
  ------------------
  103|   732k|      const uint32_t offset = prob_data >> 2;
  104|   732k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 52, False: 732k]
  ------------------
  105|     52|        return false;
  106|     52|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  19.6M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 18.9M, False: 732k]
  ------------------
  109|  18.9M|        probability_table_[i + j] = 0;
  110|  18.9M|      }
  111|   732k|      i += offset;
  112|   732k|    } else {
  113|   228k|      const int extra_bytes = token;
  114|   228k|      uint32_t prob = prob_data >> 2;
  115|   400k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 172k, False: 228k]
  ------------------
  116|   172k|        uint8_t eb;
  117|   172k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 41, False: 172k]
  ------------------
  118|     41|          return false;
  119|     41|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   172k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   172k|      }
  124|   228k|      probability_table_[i] = prob;
  125|   228k|    }
  126|   960k|  }
  127|    332|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 43, False: 289]
  ------------------
  128|     43|    return false;
  129|     43|  }
  130|    289|  return true;
  131|    332|}
_ZNK5draco17RAnsSymbolDecoderILi2EE11num_symbolsEv:
   38|    300|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi2EE13StartDecodingEPNS_13DecoderBufferE:
  135|    289|    DecoderBuffer *buffer) {
  136|    289|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    289|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    289|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    289|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 18, False: 271]
  ------------------
  140|     18|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 18]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     18|  } else
  145|    271|#endif
  146|    271|  {
  147|    271|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 3, False: 268]
  ------------------
  148|      3|      return false;
  149|      3|    }
  150|    271|  }
  151|    286|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 62, False: 224]
  ------------------
  152|     62|    return false;
  153|     62|  }
  154|    224|  const uint8_t *const data_head =
  155|    224|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    224|  buffer->Advance(bytes_encoded);
  158|    224|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 40, False: 184]
  ------------------
  159|     40|    return false;
  160|     40|  }
  161|    184|  return true;
  162|    224|}
_ZN5draco17RAnsSymbolDecoderILi2EE12DecodeSymbolEv:
   43|  1.51M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi2EE11EndDecodingEv:
  165|    184|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    184|  ans_.read_end();
  167|    184|}
_ZN5draco17RAnsSymbolDecoderILi3EEC2Ev:
   33|    533|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi3EE6CreateEPNS_13DecoderBufferE:
   59|    533|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    533|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 533]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    533|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    533|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    533|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 96, False: 437]
  ------------------
   67|     96|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 96]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     96|  } else
   72|    437|#endif
   73|    437|  {
   74|    437|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 9, False: 428]
  ------------------
   75|      9|      return false;
   76|      9|    }
   77|    437|  }
   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|    524|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 22, False: 502]
  ------------------
   83|     22|    return false;
   84|     22|  }
   85|    502|  probability_table_.resize(num_symbols_);
   86|    502|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 13, False: 489]
  ------------------
   87|     13|    return true;
   88|     13|  }
   89|       |  // Decode the table.
   90|  66.9k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 66.5k, False: 381]
  ------------------
   91|  66.5k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  66.5k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 49, False: 66.4k]
  ------------------
   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|  66.4k|    const int token = prob_data & 3;
  102|  66.4k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 18.3k, False: 48.1k]
  ------------------
  103|  18.3k|      const uint32_t offset = prob_data >> 2;
  104|  18.3k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 36, False: 18.2k]
  ------------------
  105|     36|        return false;
  106|     36|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   740k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 722k, False: 18.2k]
  ------------------
  109|   722k|        probability_table_[i + j] = 0;
  110|   722k|      }
  111|  18.2k|      i += offset;
  112|  48.1k|    } else {
  113|  48.1k|      const int extra_bytes = token;
  114|  48.1k|      uint32_t prob = prob_data >> 2;
  115|  90.4k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 42.2k, False: 48.1k]
  ------------------
  116|  42.2k|        uint8_t eb;
  117|  42.2k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 23, False: 42.2k]
  ------------------
  118|     23|          return false;
  119|     23|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  42.2k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  42.2k|      }
  124|  48.1k|      probability_table_[i] = prob;
  125|  48.1k|    }
  126|  66.4k|  }
  127|    381|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 40, False: 341]
  ------------------
  128|     40|    return false;
  129|     40|  }
  130|    341|  return true;
  131|    381|}
_ZNK5draco17RAnsSymbolDecoderILi3EE11num_symbolsEv:
   38|    354|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi3EE13StartDecodingEPNS_13DecoderBufferE:
  135|    341|    DecoderBuffer *buffer) {
  136|    341|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    341|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    341|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    341|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 73, False: 268]
  ------------------
  140|     73|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 73]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     73|  } else
  145|    268|#endif
  146|    268|  {
  147|    268|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 15, False: 253]
  ------------------
  148|     15|      return false;
  149|     15|    }
  150|    268|  }
  151|    326|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 114, False: 212]
  ------------------
  152|    114|    return false;
  153|    114|  }
  154|    212|  const uint8_t *const data_head =
  155|    212|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    212|  buffer->Advance(bytes_encoded);
  158|    212|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 59, False: 153]
  ------------------
  159|     59|    return false;
  160|     59|  }
  161|    153|  return true;
  162|    212|}
_ZN5draco17RAnsSymbolDecoderILi3EE12DecodeSymbolEv:
   43|  9.35M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi3EE11EndDecodingEv:
  165|    153|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    153|  ans_.read_end();
  167|    153|}
_ZN5draco17RAnsSymbolDecoderILi4EEC2Ev:
   33|    374|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi4EE6CreateEPNS_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: 8, False: 366]
  ------------------
   67|      8|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 8]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|      8|  } else
   72|    366|#endif
   73|    366|  {
   74|    366|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 358]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    366|  }
   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: 15, False: 351]
  ------------------
   83|     15|    return false;
   84|     15|  }
   85|    351|  probability_table_.resize(num_symbols_);
   86|    351|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 13, False: 338]
  ------------------
   87|     13|    return true;
   88|     13|  }
   89|       |  // Decode the table.
   90|   374k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 374k, False: 251]
  ------------------
   91|   374k|    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|   374k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 49, False: 374k]
  ------------------
   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|   374k|    const int token = prob_data & 3;
  102|   374k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 368k, False: 5.60k]
  ------------------
  103|   368k|      const uint32_t offset = prob_data >> 2;
  104|   368k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 25, False: 368k]
  ------------------
  105|     25|        return false;
  106|     25|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  21.3M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 20.9M, False: 368k]
  ------------------
  109|  20.9M|        probability_table_[i + j] = 0;
  110|  20.9M|      }
  111|   368k|      i += offset;
  112|   368k|    } else {
  113|  5.60k|      const int extra_bytes = token;
  114|  5.60k|      uint32_t prob = prob_data >> 2;
  115|  9.21k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 3.63k, False: 5.58k]
  ------------------
  116|  3.63k|        uint8_t eb;
  117|  3.63k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 13, False: 3.61k]
  ------------------
  118|     13|          return false;
  119|     13|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  3.61k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  3.61k|      }
  124|  5.58k|      probability_table_[i] = prob;
  125|  5.58k|    }
  126|   374k|  }
  127|    251|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 28, False: 223]
  ------------------
  128|     28|    return false;
  129|     28|  }
  130|    223|  return true;
  131|    251|}
_ZNK5draco17RAnsSymbolDecoderILi4EE11num_symbolsEv:
   38|    236|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi4EE13StartDecodingEPNS_13DecoderBufferE:
  135|    223|    DecoderBuffer *buffer) {
  136|    223|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    223|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    223|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    223|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 1, False: 222]
  ------------------
  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|    222|#endif
  146|    222|  {
  147|    222|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 5, False: 217]
  ------------------
  148|      5|      return false;
  149|      5|    }
  150|    222|  }
  151|    218|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 12, False: 206]
  ------------------
  152|     12|    return false;
  153|     12|  }
  154|    206|  const uint8_t *const data_head =
  155|    206|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    206|  buffer->Advance(bytes_encoded);
  158|    206|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 40, False: 166]
  ------------------
  159|     40|    return false;
  160|     40|  }
  161|    166|  return true;
  162|    206|}
_ZN5draco17RAnsSymbolDecoderILi4EE12DecodeSymbolEv:
   43|  8.94M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi4EE11EndDecodingEv:
  165|    166|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    166|  ans_.read_end();
  167|    166|}
_ZN5draco17RAnsSymbolDecoderILi6EEC2Ev:
   33|    401|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi6EE6CreateEPNS_13DecoderBufferE:
   59|    401|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    401|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 401]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    401|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    401|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    401|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 76, False: 325]
  ------------------
   67|     76|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 76]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     76|  } else
   72|    325|#endif
   73|    325|  {
   74|    325|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 5, False: 320]
  ------------------
   75|      5|      return false;
   76|      5|    }
   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|    396|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 29, False: 367]
  ------------------
   83|     29|    return false;
   84|     29|  }
   85|    367|  probability_table_.resize(num_symbols_);
   86|    367|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 8, False: 359]
  ------------------
   87|      8|    return true;
   88|      8|  }
   89|       |  // Decode the table.
   90|  12.3k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 12.0k, False: 277]
  ------------------
   91|  12.0k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  12.0k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 43, False: 12.0k]
  ------------------
   95|     43|      return false;
   96|     43|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  12.0k|    const int token = prob_data & 3;
  102|  12.0k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 4.95k, False: 7.06k]
  ------------------
  103|  4.95k|      const uint32_t offset = prob_data >> 2;
  104|  4.95k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 24, False: 4.92k]
  ------------------
  105|     24|        return false;
  106|     24|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   206k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 201k, False: 4.92k]
  ------------------
  109|   201k|        probability_table_[i + j] = 0;
  110|   201k|      }
  111|  4.92k|      i += offset;
  112|  7.06k|    } else {
  113|  7.06k|      const int extra_bytes = token;
  114|  7.06k|      uint32_t prob = prob_data >> 2;
  115|  11.6k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 4.57k, False: 7.04k]
  ------------------
  116|  4.57k|        uint8_t eb;
  117|  4.57k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 15, False: 4.55k]
  ------------------
  118|     15|          return false;
  119|     15|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  4.55k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  4.55k|      }
  124|  7.04k|      probability_table_[i] = prob;
  125|  7.04k|    }
  126|  12.0k|  }
  127|    277|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 22, False: 255]
  ------------------
  128|     22|    return false;
  129|     22|  }
  130|    255|  return true;
  131|    277|}
_ZNK5draco17RAnsSymbolDecoderILi6EE11num_symbolsEv:
   38|    263|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi6EE13StartDecodingEPNS_13DecoderBufferE:
  135|    255|    DecoderBuffer *buffer) {
  136|    255|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    255|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    255|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    255|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 57, False: 198]
  ------------------
  140|     57|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 55]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     57|  } else
  145|    198|#endif
  146|    198|  {
  147|    198|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 3, False: 195]
  ------------------
  148|      3|      return false;
  149|      3|    }
  150|    198|  }
  151|    250|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 81, False: 169]
  ------------------
  152|     81|    return false;
  153|     81|  }
  154|    169|  const uint8_t *const data_head =
  155|    169|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    169|  buffer->Advance(bytes_encoded);
  158|    169|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 38, False: 131]
  ------------------
  159|     38|    return false;
  160|     38|  }
  161|    131|  return true;
  162|    169|}
_ZN5draco17RAnsSymbolDecoderILi6EE12DecodeSymbolEv:
   43|  4.67M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi6EE11EndDecodingEv:
  165|    131|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    131|  ans_.read_end();
  167|    131|}
_ZN5draco17RAnsSymbolDecoderILi7EEC2Ev:
   33|    381|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi7EE6CreateEPNS_13DecoderBufferE:
   59|    381|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    381|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 381]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    381|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    381|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    381|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 61, False: 320]
  ------------------
   67|     61|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 61]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     61|  } else
   72|    320|#endif
   73|    320|  {
   74|    320|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 4, False: 316]
  ------------------
   75|      4|      return false;
   76|      4|    }
   77|    320|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    377|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 13, False: 364]
  ------------------
   83|     13|    return false;
   84|     13|  }
   85|    364|  probability_table_.resize(num_symbols_);
   86|    364|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 5, False: 359]
  ------------------
   87|      5|    return true;
   88|      5|  }
   89|       |  // Decode the table.
   90|  2.11M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 2.11M, False: 233]
  ------------------
   91|  2.11M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  2.11M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 59, False: 2.11M]
  ------------------
   95|     59|      return false;
   96|     59|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  2.11M|    const int token = prob_data & 3;
  102|  2.11M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 637k, False: 1.48M]
  ------------------
  103|   637k|      const uint32_t offset = prob_data >> 2;
  104|   637k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 40, False: 637k]
  ------------------
  105|     40|        return false;
  106|     40|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  28.4M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 27.7M, False: 637k]
  ------------------
  109|  27.7M|        probability_table_[i + j] = 0;
  110|  27.7M|      }
  111|   637k|      i += offset;
  112|  1.48M|    } else {
  113|  1.48M|      const int extra_bytes = token;
  114|  1.48M|      uint32_t prob = prob_data >> 2;
  115|  2.40M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 918k, False: 1.48M]
  ------------------
  116|   918k|        uint8_t eb;
  117|   918k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 27, False: 918k]
  ------------------
  118|     27|          return false;
  119|     27|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   918k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   918k|      }
  124|  1.48M|      probability_table_[i] = prob;
  125|  1.48M|    }
  126|  2.11M|  }
  127|    233|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 19, False: 214]
  ------------------
  128|     19|    return false;
  129|     19|  }
  130|    214|  return true;
  131|    233|}
_ZNK5draco17RAnsSymbolDecoderILi7EE11num_symbolsEv:
   38|    219|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi7EE13StartDecodingEPNS_13DecoderBufferE:
  135|    214|    DecoderBuffer *buffer) {
  136|    214|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    214|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    214|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    214|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 40, False: 174]
  ------------------
  140|     40|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 3, False: 37]
  ------------------
  141|      3|      return false;
  142|      3|    }
  143|       |
  144|     40|  } else
  145|    174|#endif
  146|    174|  {
  147|    174|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 13, False: 161]
  ------------------
  148|     13|      return false;
  149|     13|    }
  150|    174|  }
  151|    198|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 58, False: 140]
  ------------------
  152|     58|    return false;
  153|     58|  }
  154|    140|  const uint8_t *const data_head =
  155|    140|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    140|  buffer->Advance(bytes_encoded);
  158|    140|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 38, False: 102]
  ------------------
  159|     38|    return false;
  160|     38|  }
  161|    102|  return true;
  162|    140|}
_ZN5draco17RAnsSymbolDecoderILi7EE12DecodeSymbolEv:
   43|  13.7M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi7EE11EndDecodingEv:
  165|    102|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    102|  ans_.read_end();
  167|    102|}
_ZN5draco17RAnsSymbolDecoderILi8EEC2Ev:
   33|    441|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi8EE6CreateEPNS_13DecoderBufferE:
   59|    441|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    441|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 441]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    441|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    441|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    441|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 80, False: 361]
  ------------------
   67|     80|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 78]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     80|  } else
   72|    361|#endif
   73|    361|  {
   74|    361|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 10, False: 351]
  ------------------
   75|     10|      return false;
   76|     10|    }
   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|    429|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 29, False: 400]
  ------------------
   83|     29|    return false;
   84|     29|  }
   85|    400|  probability_table_.resize(num_symbols_);
   86|    400|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 17, False: 383]
  ------------------
   87|     17|    return true;
   88|     17|  }
   89|       |  // Decode the table.
   90|   880k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 880k, False: 275]
  ------------------
   91|   880k|    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|   880k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 56, False: 880k]
  ------------------
   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|   880k|    const int token = prob_data & 3;
  102|   880k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 221k, False: 659k]
  ------------------
  103|   221k|      const uint32_t offset = prob_data >> 2;
  104|   221k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 32, False: 220k]
  ------------------
  105|     32|        return false;
  106|     32|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  11.4M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 11.1M, False: 220k]
  ------------------
  109|  11.1M|        probability_table_[i + j] = 0;
  110|  11.1M|      }
  111|   220k|      i += offset;
  112|   659k|    } else {
  113|   659k|      const int extra_bytes = token;
  114|   659k|      uint32_t prob = prob_data >> 2;
  115|   858k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 199k, False: 659k]
  ------------------
  116|   199k|        uint8_t eb;
  117|   199k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 20, False: 198k]
  ------------------
  118|     20|          return false;
  119|     20|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   198k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   198k|      }
  124|   659k|      probability_table_[i] = prob;
  125|   659k|    }
  126|   880k|  }
  127|    275|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 24, False: 251]
  ------------------
  128|     24|    return false;
  129|     24|  }
  130|    251|  return true;
  131|    275|}
_ZNK5draco17RAnsSymbolDecoderILi8EE11num_symbolsEv:
   38|    268|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi8EE13StartDecodingEPNS_13DecoderBufferE:
  135|    251|    DecoderBuffer *buffer) {
  136|    251|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    251|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    251|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    251|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 39, False: 212]
  ------------------
  140|     39|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 39]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     39|  } else
  145|    212|#endif
  146|    212|  {
  147|    212|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 212]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    212|  }
  151|    251|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 87, False: 164]
  ------------------
  152|     87|    return false;
  153|     87|  }
  154|    164|  const uint8_t *const data_head =
  155|    164|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    164|  buffer->Advance(bytes_encoded);
  158|    164|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 39, False: 125]
  ------------------
  159|     39|    return false;
  160|     39|  }
  161|    125|  return true;
  162|    164|}
_ZN5draco17RAnsSymbolDecoderILi8EE12DecodeSymbolEv:
   43|  21.1M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi8EE11EndDecodingEv:
  165|    125|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    125|  ans_.read_end();
  167|    125|}
_ZN5draco17RAnsSymbolDecoderILi9EEC2Ev:
   33|    526|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi9EE6CreateEPNS_13DecoderBufferE:
   59|    526|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    526|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 526]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    526|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    526|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    526|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 36, False: 490]
  ------------------
   67|     36|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 36]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     36|  } else
   72|    490|#endif
   73|    490|  {
   74|    490|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 11, False: 479]
  ------------------
   75|     11|      return false;
   76|     11|    }
   77|    490|  }
   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|    515|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 26, False: 489]
  ------------------
   83|     26|    return false;
   84|     26|  }
   85|    489|  probability_table_.resize(num_symbols_);
   86|    489|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 478]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|  57.9k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 57.5k, False: 391]
  ------------------
   91|  57.5k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  57.5k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 35, False: 57.4k]
  ------------------
   95|     35|      return false;
   96|     35|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  57.4k|    const int token = prob_data & 3;
  102|  57.4k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 14.2k, False: 43.2k]
  ------------------
  103|  14.2k|      const uint32_t offset = prob_data >> 2;
  104|  14.2k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 30, False: 14.1k]
  ------------------
  105|     30|        return false;
  106|     30|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   496k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 482k, False: 14.1k]
  ------------------
  109|   482k|        probability_table_[i + j] = 0;
  110|   482k|      }
  111|  14.1k|      i += offset;
  112|  43.2k|    } else {
  113|  43.2k|      const int extra_bytes = token;
  114|  43.2k|      uint32_t prob = prob_data >> 2;
  115|  76.0k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 32.7k, False: 43.2k]
  ------------------
  116|  32.7k|        uint8_t eb;
  117|  32.7k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 22, False: 32.7k]
  ------------------
  118|     22|          return false;
  119|     22|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  32.7k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  32.7k|      }
  124|  43.2k|      probability_table_[i] = prob;
  125|  43.2k|    }
  126|  57.4k|  }
  127|    391|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 57, False: 334]
  ------------------
  128|     57|    return false;
  129|     57|  }
  130|    334|  return true;
  131|    391|}
_ZNK5draco17RAnsSymbolDecoderILi9EE11num_symbolsEv:
   38|    345|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi9EE13StartDecodingEPNS_13DecoderBufferE:
  135|    334|    DecoderBuffer *buffer) {
  136|    334|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    334|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    334|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    334|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 10, False: 324]
  ------------------
  140|     10|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 9]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     10|  } else
  145|    324|#endif
  146|    324|  {
  147|    324|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 2, False: 322]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|    324|  }
  151|    331|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 85, False: 246]
  ------------------
  152|     85|    return false;
  153|     85|  }
  154|    246|  const uint8_t *const data_head =
  155|    246|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    246|  buffer->Advance(bytes_encoded);
  158|    246|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 53, False: 193]
  ------------------
  159|     53|    return false;
  160|     53|  }
  161|    193|  return true;
  162|    246|}
_ZN5draco17RAnsSymbolDecoderILi9EE12DecodeSymbolEv:
   43|  12.5M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi9EE11EndDecodingEv:
  165|    193|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    193|  ans_.read_end();
  167|    193|}
_ZN5draco17RAnsSymbolDecoderILi10EEC2Ev:
   33|    431|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi10EE6CreateEPNS_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: 46, False: 385]
  ------------------
   67|     46|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 45]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     46|  } else
   72|    385|#endif
   73|    385|  {
   74|    385|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 15, False: 370]
  ------------------
   75|     15|      return false;
   76|     15|    }
   77|    385|  }
   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|    415|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 15, False: 400]
  ------------------
   83|     15|    return false;
   84|     15|  }
   85|    400|  probability_table_.resize(num_symbols_);
   86|    400|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 4, False: 396]
  ------------------
   87|      4|    return true;
   88|      4|  }
   89|       |  // Decode the table.
   90|  92.6k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 92.3k, False: 292]
  ------------------
   91|  92.3k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  92.3k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 45, False: 92.2k]
  ------------------
   95|     45|      return false;
   96|     45|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  92.2k|    const int token = prob_data & 3;
  102|  92.2k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 13.9k, False: 78.2k]
  ------------------
  103|  13.9k|      const uint32_t offset = prob_data >> 2;
  104|  13.9k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 30, False: 13.9k]
  ------------------
  105|     30|        return false;
  106|     30|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   410k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 396k, False: 13.9k]
  ------------------
  109|   396k|        probability_table_[i + j] = 0;
  110|   396k|      }
  111|  13.9k|      i += offset;
  112|  78.2k|    } else {
  113|  78.2k|      const int extra_bytes = token;
  114|  78.2k|      uint32_t prob = prob_data >> 2;
  115|   157k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 79.6k, False: 78.2k]
  ------------------
  116|  79.6k|        uint8_t eb;
  117|  79.6k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 29, False: 79.5k]
  ------------------
  118|     29|          return false;
  119|     29|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  79.5k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  79.5k|      }
  124|  78.2k|      probability_table_[i] = prob;
  125|  78.2k|    }
  126|  92.2k|  }
  127|    292|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 70, False: 222]
  ------------------
  128|     70|    return false;
  129|     70|  }
  130|    222|  return true;
  131|    292|}
_ZNK5draco17RAnsSymbolDecoderILi10EE11num_symbolsEv:
   38|    226|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi10EE13StartDecodingEPNS_13DecoderBufferE:
  135|    222|    DecoderBuffer *buffer) {
  136|    222|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    222|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    222|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    222|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 29, False: 193]
  ------------------
  140|     29|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 28]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     29|  } else
  145|    193|#endif
  146|    193|  {
  147|    193|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 4, False: 189]
  ------------------
  148|      4|      return false;
  149|      4|    }
  150|    193|  }
  151|    217|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 76, False: 141]
  ------------------
  152|     76|    return false;
  153|     76|  }
  154|    141|  const uint8_t *const data_head =
  155|    141|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    141|  buffer->Advance(bytes_encoded);
  158|    141|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 63, False: 78]
  ------------------
  159|     63|    return false;
  160|     63|  }
  161|     78|  return true;
  162|    141|}
_ZN5draco17RAnsSymbolDecoderILi10EE12DecodeSymbolEv:
   43|   577k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi10EE11EndDecodingEv:
  165|     78|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     78|  ans_.read_end();
  167|     78|}
_ZN5draco17RAnsSymbolDecoderILi11EEC2Ev:
   33|    382|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi11EE6CreateEPNS_13DecoderBufferE:
   59|    382|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    382|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 382]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    382|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    382|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    382|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 36, False: 346]
  ------------------
   67|     36|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 36]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     36|  } else
   72|    346|#endif
   73|    346|  {
   74|    346|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 12, False: 334]
  ------------------
   75|     12|      return false;
   76|     12|    }
   77|    346|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    370|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 27, False: 343]
  ------------------
   83|     27|    return false;
   84|     27|  }
   85|    343|  probability_table_.resize(num_symbols_);
   86|    343|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 332]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|  99.1k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 98.8k, False: 236]
  ------------------
   91|  98.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|  98.8k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 44, False: 98.8k]
  ------------------
   95|     44|      return false;
   96|     44|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  98.8k|    const int token = prob_data & 3;
  102|  98.8k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 29.6k, False: 69.1k]
  ------------------
  103|  29.6k|      const uint32_t offset = prob_data >> 2;
  104|  29.6k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 30, False: 29.5k]
  ------------------
  105|     30|        return false;
  106|     30|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  1.40M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 1.37M, False: 29.5k]
  ------------------
  109|  1.37M|        probability_table_[i + j] = 0;
  110|  1.37M|      }
  111|  29.5k|      i += offset;
  112|  69.1k|    } else {
  113|  69.1k|      const int extra_bytes = token;
  114|  69.1k|      uint32_t prob = prob_data >> 2;
  115|   120k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 51.1k, False: 69.1k]
  ------------------
  116|  51.1k|        uint8_t eb;
  117|  51.1k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 22, False: 51.1k]
  ------------------
  118|     22|          return false;
  119|     22|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  51.1k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  51.1k|      }
  124|  69.1k|      probability_table_[i] = prob;
  125|  69.1k|    }
  126|  98.8k|  }
  127|    236|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 72, False: 164]
  ------------------
  128|     72|    return false;
  129|     72|  }
  130|    164|  return true;
  131|    236|}
_ZNK5draco17RAnsSymbolDecoderILi11EE11num_symbolsEv:
   38|    175|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi11EE13StartDecodingEPNS_13DecoderBufferE:
  135|    164|    DecoderBuffer *buffer) {
  136|    164|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    164|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    164|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    164|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 164]
  ------------------
  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|    164|#endif
  146|    164|  {
  147|    164|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 14, False: 150]
  ------------------
  148|     14|      return false;
  149|     14|    }
  150|    164|  }
  151|    150|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 61, False: 89]
  ------------------
  152|     61|    return false;
  153|     61|  }
  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: 20, False: 69]
  ------------------
  159|     20|    return false;
  160|     20|  }
  161|     69|  return true;
  162|     89|}
_ZN5draco17RAnsSymbolDecoderILi11EE12DecodeSymbolEv:
   43|   430k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi11EE11EndDecodingEv:
  165|     69|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     69|  ans_.read_end();
  167|     69|}
_ZN5draco17RAnsSymbolDecoderILi12EEC2Ev:
   33|    399|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi12EE6CreateEPNS_13DecoderBufferE:
   59|    399|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    399|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 399]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    399|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    399|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    399|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 47, False: 352]
  ------------------
   67|     47|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 47]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     47|  } else
   72|    352|#endif
   73|    352|  {
   74|    352|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 9, False: 343]
  ------------------
   75|      9|      return false;
   76|      9|    }
   77|    352|  }
   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|    390|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 16, False: 374]
  ------------------
   83|     16|    return false;
   84|     16|  }
   85|    374|  probability_table_.resize(num_symbols_);
   86|    374|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 5, False: 369]
  ------------------
   87|      5|    return true;
   88|      5|  }
   89|       |  // Decode the table.
   90|   311k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 311k, False: 248]
  ------------------
   91|   311k|    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|   311k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 52, False: 311k]
  ------------------
   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|   311k|    const int token = prob_data & 3;
  102|   311k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 39.6k, False: 271k]
  ------------------
  103|  39.6k|      const uint32_t offset = prob_data >> 2;
  104|  39.6k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 37, False: 39.6k]
  ------------------
  105|     37|        return false;
  106|     37|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  1.32M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 1.28M, False: 39.6k]
  ------------------
  109|  1.28M|        probability_table_[i + j] = 0;
  110|  1.28M|      }
  111|  39.6k|      i += offset;
  112|   271k|    } else {
  113|   271k|      const int extra_bytes = token;
  114|   271k|      uint32_t prob = prob_data >> 2;
  115|   507k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 235k, False: 271k]
  ------------------
  116|   235k|        uint8_t eb;
  117|   235k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 32, False: 235k]
  ------------------
  118|     32|          return false;
  119|     32|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   235k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   235k|      }
  124|   271k|      probability_table_[i] = prob;
  125|   271k|    }
  126|   311k|  }
  127|    248|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 69, False: 179]
  ------------------
  128|     69|    return false;
  129|     69|  }
  130|    179|  return true;
  131|    248|}
_ZNK5draco17RAnsSymbolDecoderILi12EE11num_symbolsEv:
   38|    184|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi12EE13StartDecodingEPNS_13DecoderBufferE:
  135|    179|    DecoderBuffer *buffer) {
  136|    179|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    179|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    179|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    179|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 29, False: 150]
  ------------------
  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|    150|#endif
  146|    150|  {
  147|    150|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 3, False: 147]
  ------------------
  148|      3|      return false;
  149|      3|    }
  150|    150|  }
  151|    174|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 77, False: 97]
  ------------------
  152|     77|    return false;
  153|     77|  }
  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: 33, False: 64]
  ------------------
  159|     33|    return false;
  160|     33|  }
  161|     64|  return true;
  162|     97|}
_ZN5draco17RAnsSymbolDecoderILi12EE12DecodeSymbolEv:
   43|  80.1k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi12EE11EndDecodingEv:
  165|     64|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     64|  ans_.read_end();
  167|     64|}
_ZN5draco17RAnsSymbolDecoderILi13EEC2Ev:
   33|    422|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi13EE6CreateEPNS_13DecoderBufferE:
   59|    422|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    422|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 422]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    422|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    422|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    422|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 22, False: 400]
  ------------------
   67|     22|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 22]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     22|  } else
   72|    400|#endif
   73|    400|  {
   74|    400|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 7, False: 393]
  ------------------
   75|      7|      return false;
   76|      7|    }
   77|    400|  }
   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|    415|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 15, False: 400]
  ------------------
   83|     15|    return false;
   84|     15|  }
   85|    400|  probability_table_.resize(num_symbols_);
   86|    400|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 10, False: 390]
  ------------------
   87|     10|    return true;
   88|     10|  }
   89|       |  // Decode the table.
   90|  1.00M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.00M, False: 266]
  ------------------
   91|  1.00M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  1.00M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 57, False: 1.00M]
  ------------------
   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.00M|    const int token = prob_data & 3;
  102|  1.00M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 450k, False: 558k]
  ------------------
  103|   450k|      const uint32_t offset = prob_data >> 2;
  104|   450k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 39, False: 450k]
  ------------------
  105|     39|        return false;
  106|     39|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  25.3M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 24.9M, False: 450k]
  ------------------
  109|  24.9M|        probability_table_[i + j] = 0;
  110|  24.9M|      }
  111|   450k|      i += offset;
  112|   558k|    } else {
  113|   558k|      const int extra_bytes = token;
  114|   558k|      uint32_t prob = prob_data >> 2;
  115|   812k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 253k, False: 558k]
  ------------------
  116|   253k|        uint8_t eb;
  117|   253k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 28, False: 253k]
  ------------------
  118|     28|          return false;
  119|     28|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   253k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   253k|      }
  124|   558k|      probability_table_[i] = prob;
  125|   558k|    }
  126|  1.00M|  }
  127|    266|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 86, False: 180]
  ------------------
  128|     86|    return false;
  129|     86|  }
  130|    180|  return true;
  131|    266|}
_ZNK5draco17RAnsSymbolDecoderILi13EE11num_symbolsEv:
   38|    190|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi13EE13StartDecodingEPNS_13DecoderBufferE:
  135|    180|    DecoderBuffer *buffer) {
  136|    180|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    180|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    180|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    180|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 180]
  ------------------
  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|    180|#endif
  146|    180|  {
  147|    180|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 180]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    180|  }
  151|    180|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 79, False: 101]
  ------------------
  152|     79|    return false;
  153|     79|  }
  154|    101|  const uint8_t *const data_head =
  155|    101|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    101|  buffer->Advance(bytes_encoded);
  158|    101|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 21, False: 80]
  ------------------
  159|     21|    return false;
  160|     21|  }
  161|     80|  return true;
  162|    101|}
_ZN5draco17RAnsSymbolDecoderILi13EE12DecodeSymbolEv:
   43|  78.7k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi13EE11EndDecodingEv:
  165|     80|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     80|  ans_.read_end();
  167|     80|}
_ZN5draco17RAnsSymbolDecoderILi14EEC2Ev:
   33|    386|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi14EE6CreateEPNS_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: 37, False: 349]
  ------------------
   67|     37|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 36]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     37|  } else
   72|    349|#endif
   73|    349|  {
   74|    349|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 5, False: 344]
  ------------------
   75|      5|      return false;
   76|      5|    }
   77|    349|  }
   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|    380|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 9, False: 371]
  ------------------
   83|      9|    return false;
   84|      9|  }
   85|    371|  probability_table_.resize(num_symbols_);
   86|    371|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 9, False: 362]
  ------------------
   87|      9|    return true;
   88|      9|  }
   89|       |  // Decode the table.
   90|   542k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 541k, False: 237]
  ------------------
   91|   541k|    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|   541k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 61, False: 541k]
  ------------------
   95|     61|      return false;
   96|     61|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   541k|    const int token = prob_data & 3;
  102|   541k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 420k, False: 121k]
  ------------------
  103|   420k|      const uint32_t offset = prob_data >> 2;
  104|   420k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 42, False: 420k]
  ------------------
  105|     42|        return false;
  106|     42|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  17.8M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 17.4M, False: 420k]
  ------------------
  109|  17.4M|        probability_table_[i + j] = 0;
  110|  17.4M|      }
  111|   420k|      i += offset;
  112|   420k|    } else {
  113|   121k|      const int extra_bytes = token;
  114|   121k|      uint32_t prob = prob_data >> 2;
  115|   209k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 87.7k, False: 121k]
  ------------------
  116|  87.7k|        uint8_t eb;
  117|  87.7k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 22, False: 87.6k]
  ------------------
  118|     22|          return false;
  119|     22|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  87.6k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  87.6k|      }
  124|   121k|      probability_table_[i] = prob;
  125|   121k|    }
  126|   541k|  }
  127|    237|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 39, False: 198]
  ------------------
  128|     39|    return false;
  129|     39|  }
  130|    198|  return true;
  131|    237|}
_ZNK5draco17RAnsSymbolDecoderILi14EE11num_symbolsEv:
   38|    207|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi14EE13StartDecodingEPNS_13DecoderBufferE:
  135|    198|    DecoderBuffer *buffer) {
  136|    198|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    198|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    198|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    198|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 13, False: 185]
  ------------------
  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|    185|#endif
  146|    185|  {
  147|    185|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 10, False: 175]
  ------------------
  148|     10|      return false;
  149|     10|    }
  150|    185|  }
  151|    187|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 61, False: 126]
  ------------------
  152|     61|    return false;
  153|     61|  }
  154|    126|  const uint8_t *const data_head =
  155|    126|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    126|  buffer->Advance(bytes_encoded);
  158|    126|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 51, False: 75]
  ------------------
  159|     51|    return false;
  160|     51|  }
  161|     75|  return true;
  162|    126|}
_ZN5draco17RAnsSymbolDecoderILi14EE12DecodeSymbolEv:
   43|   129k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi14EE11EndDecodingEv:
  165|     75|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     75|  ans_.read_end();
  167|     75|}
_ZN5draco17RAnsSymbolDecoderILi15EEC2Ev:
   33|    405|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi15EE6CreateEPNS_13DecoderBufferE:
   59|    405|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    405|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 405]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    405|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    405|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    405|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 86, False: 319]
  ------------------
   67|     86|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 5, False: 81]
  ------------------
   68|      5|      return false;
   69|      5|    }
   70|       |
   71|     86|  } else
   72|    319|#endif
   73|    319|  {
   74|    319|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 4, False: 315]
  ------------------
   75|      4|      return false;
   76|      4|    }
   77|    319|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    396|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 25, False: 371]
  ------------------
   83|     25|    return false;
   84|     25|  }
   85|    371|  probability_table_.resize(num_symbols_);
   86|    371|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 11, False: 360]
  ------------------
   87|     11|    return true;
   88|     11|  }
   89|       |  // Decode the table.
   90|  2.52M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 2.52M, False: 254]
  ------------------
   91|  2.52M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  2.52M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 57, False: 2.52M]
  ------------------
   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|  2.52M|    const int token = prob_data & 3;
  102|  2.52M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 2.30M, False: 224k]
  ------------------
  103|  2.30M|      const uint32_t offset = prob_data >> 2;
  104|  2.30M|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 26, False: 2.30M]
  ------------------
  105|     26|        return false;
  106|     26|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   135M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 132M, False: 2.30M]
  ------------------
  109|   132M|        probability_table_[i + j] = 0;
  110|   132M|      }
  111|  2.30M|      i += offset;
  112|  2.30M|    } else {
  113|   224k|      const int extra_bytes = token;
  114|   224k|      uint32_t prob = prob_data >> 2;
  115|   384k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 159k, False: 224k]
  ------------------
  116|   159k|        uint8_t eb;
  117|   159k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 23, False: 159k]
  ------------------
  118|     23|          return false;
  119|     23|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   159k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   159k|      }
  124|   224k|      probability_table_[i] = prob;
  125|   224k|    }
  126|  2.52M|  }
  127|    254|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 34, False: 220]
  ------------------
  128|     34|    return false;
  129|     34|  }
  130|    220|  return true;
  131|    254|}
_ZNK5draco17RAnsSymbolDecoderILi15EE11num_symbolsEv:
   38|    231|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi15EE13StartDecodingEPNS_13DecoderBufferE:
  135|    220|    DecoderBuffer *buffer) {
  136|    220|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    220|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    220|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    220|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 47, False: 173]
  ------------------
  140|     47|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 45]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     47|  } else
  145|    173|#endif
  146|    173|  {
  147|    173|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 8, False: 165]
  ------------------
  148|      8|      return false;
  149|      8|    }
  150|    173|  }
  151|    210|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 82, False: 128]
  ------------------
  152|     82|    return false;
  153|     82|  }
  154|    128|  const uint8_t *const data_head =
  155|    128|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    128|  buffer->Advance(bytes_encoded);
  158|    128|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 42, False: 86]
  ------------------
  159|     42|    return false;
  160|     42|  }
  161|     86|  return true;
  162|    128|}
_ZN5draco17RAnsSymbolDecoderILi15EE12DecodeSymbolEv:
   43|   339k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi15EE11EndDecodingEv:
  165|     86|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     86|  ans_.read_end();
  167|     86|}
_ZN5draco17RAnsSymbolDecoderILi16EEC2Ev:
   33|    339|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi16EE6CreateEPNS_13DecoderBufferE:
   59|    339|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    339|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 339]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    339|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    339|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    339|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 28, False: 311]
  ------------------
   67|     28|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 27]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     28|  } else
   72|    311|#endif
   73|    311|  {
   74|    311|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 12, False: 299]
  ------------------
   75|     12|      return false;
   76|     12|    }
   77|    311|  }
   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|    326|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 13, False: 313]
  ------------------
   83|     13|    return false;
   84|     13|  }
   85|    313|  probability_table_.resize(num_symbols_);
   86|    313|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 12, False: 301]
  ------------------
   87|     12|    return true;
   88|     12|  }
   89|       |  // Decode the table.
   90|   526k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 526k, False: 209]
  ------------------
   91|   526k|    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|   526k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 51, False: 526k]
  ------------------
   95|     51|      return false;
   96|     51|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   526k|    const int token = prob_data & 3;
  102|   526k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 81.2k, False: 445k]
  ------------------
  103|  81.2k|      const uint32_t offset = prob_data >> 2;
  104|  81.2k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 20, False: 81.2k]
  ------------------
  105|     20|        return false;
  106|     20|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  2.72M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 2.64M, False: 81.2k]
  ------------------
  109|  2.64M|        probability_table_[i + j] = 0;
  110|  2.64M|      }
  111|  81.2k|      i += offset;
  112|   445k|    } else {
  113|   445k|      const int extra_bytes = token;
  114|   445k|      uint32_t prob = prob_data >> 2;
  115|   823k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 378k, False: 445k]
  ------------------
  116|   378k|        uint8_t eb;
  117|   378k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 21, False: 378k]
  ------------------
  118|     21|          return false;
  119|     21|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   378k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   378k|      }
  124|   445k|      probability_table_[i] = prob;
  125|   445k|    }
  126|   526k|  }
  127|    209|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 38, False: 171]
  ------------------
  128|     38|    return false;
  129|     38|  }
  130|    171|  return true;
  131|    209|}
_ZNK5draco17RAnsSymbolDecoderILi16EE11num_symbolsEv:
   38|    183|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi16EE13StartDecodingEPNS_13DecoderBufferE:
  135|    171|    DecoderBuffer *buffer) {
  136|    171|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    171|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    171|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    171|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 7, False: 164]
  ------------------
  140|      7|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 6]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|      7|  } else
  145|    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|    170|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 59, False: 111]
  ------------------
  152|     59|    return false;
  153|     59|  }
  154|    111|  const uint8_t *const data_head =
  155|    111|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    111|  buffer->Advance(bytes_encoded);
  158|    111|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 38, False: 73]
  ------------------
  159|     38|    return false;
  160|     38|  }
  161|     73|  return true;
  162|    111|}
_ZN5draco17RAnsSymbolDecoderILi16EE12DecodeSymbolEv:
   43|   286k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi16EE11EndDecodingEv:
  165|     73|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     73|  ans_.read_end();
  167|     73|}
_ZN5draco17RAnsSymbolDecoderILi17EEC2Ev:
   33|    336|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi17EE6CreateEPNS_13DecoderBufferE:
   59|    336|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    336|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 336]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    336|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    336|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    336|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 49, False: 287]
  ------------------
   67|     49|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 3, False: 46]
  ------------------
   68|      3|      return false;
   69|      3|    }
   70|       |
   71|     49|  } else
   72|    287|#endif
   73|    287|  {
   74|    287|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 9, False: 278]
  ------------------
   75|      9|      return false;
   76|      9|    }
   77|    287|  }
   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|    324|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 24, False: 300]
  ------------------
   83|     24|    return false;
   84|     24|  }
   85|    300|  probability_table_.resize(num_symbols_);
   86|    300|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 10, False: 290]
  ------------------
   87|     10|    return true;
   88|     10|  }
   89|       |  // Decode the table.
   90|  14.4k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 14.2k, False: 209]
  ------------------
   91|  14.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|  14.2k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 45, False: 14.2k]
  ------------------
   95|     45|      return false;
   96|     45|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  14.2k|    const int token = prob_data & 3;
  102|  14.2k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 6.85k, False: 7.37k]
  ------------------
  103|  6.85k|      const uint32_t offset = prob_data >> 2;
  104|  6.85k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 25, False: 6.83k]
  ------------------
  105|     25|        return false;
  106|     25|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   293k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 286k, False: 6.83k]
  ------------------
  109|   286k|        probability_table_[i + j] = 0;
  110|   286k|      }
  111|  6.83k|      i += offset;
  112|  7.37k|    } else {
  113|  7.37k|      const int extra_bytes = token;
  114|  7.37k|      uint32_t prob = prob_data >> 2;
  115|  11.6k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 4.30k, False: 7.36k]
  ------------------
  116|  4.30k|        uint8_t eb;
  117|  4.30k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 11, False: 4.29k]
  ------------------
  118|     11|          return false;
  119|     11|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  4.29k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  4.29k|      }
  124|  7.36k|      probability_table_[i] = prob;
  125|  7.36k|    }
  126|  14.2k|  }
  127|    209|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 32, False: 177]
  ------------------
  128|     32|    return false;
  129|     32|  }
  130|    177|  return true;
  131|    209|}
_ZNK5draco17RAnsSymbolDecoderILi17EE11num_symbolsEv:
   38|    187|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi17EE13StartDecodingEPNS_13DecoderBufferE:
  135|    177|    DecoderBuffer *buffer) {
  136|    177|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    177|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    177|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    177|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 25, False: 152]
  ------------------
  140|     25|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 24]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     25|  } else
  145|    152|#endif
  146|    152|  {
  147|    152|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 152]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    152|  }
  151|    176|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 74, False: 102]
  ------------------
  152|     74|    return false;
  153|     74|  }
  154|    102|  const uint8_t *const data_head =
  155|    102|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    102|  buffer->Advance(bytes_encoded);
  158|    102|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 29, False: 73]
  ------------------
  159|     29|    return false;
  160|     29|  }
  161|     73|  return true;
  162|    102|}
_ZN5draco17RAnsSymbolDecoderILi17EE12DecodeSymbolEv:
   43|   265k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi17EE11EndDecodingEv:
  165|     73|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     73|  ans_.read_end();
  167|     73|}
_ZN5draco17RAnsSymbolDecoderILi18EEC2Ev:
   33|    350|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi18EE6CreateEPNS_13DecoderBufferE:
   59|    350|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    350|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 350]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    350|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    350|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    350|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 98, False: 252]
  ------------------
   67|     98|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 97]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     98|  } else
   72|    252|#endif
   73|    252|  {
   74|    252|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 3, False: 249]
  ------------------
   75|      3|      return false;
   76|      3|    }
   77|    252|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    346|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 28, False: 318]
  ------------------
   83|     28|    return false;
   84|     28|  }
   85|    318|  probability_table_.resize(num_symbols_);
   86|    318|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 9, False: 309]
  ------------------
   87|      9|    return true;
   88|      9|  }
   89|       |  // Decode the table.
   90|   332k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 332k, False: 205]
  ------------------
   91|   332k|    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|   332k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 46, False: 332k]
  ------------------
   95|     46|      return false;
   96|     46|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   332k|    const int token = prob_data & 3;
  102|   332k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 74.0k, False: 258k]
  ------------------
  103|  74.0k|      const uint32_t offset = prob_data >> 2;
  104|  74.0k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 35, False: 73.9k]
  ------------------
  105|     35|        return false;
  106|     35|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  3.21M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 3.14M, False: 73.9k]
  ------------------
  109|  3.14M|        probability_table_[i + j] = 0;
  110|  3.14M|      }
  111|  73.9k|      i += offset;
  112|   258k|    } else {
  113|   258k|      const int extra_bytes = token;
  114|   258k|      uint32_t prob = prob_data >> 2;
  115|   499k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 241k, False: 258k]
  ------------------
  116|   241k|        uint8_t eb;
  117|   241k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 23, False: 241k]
  ------------------
  118|     23|          return false;
  119|     23|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   241k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   241k|      }
  124|   258k|      probability_table_[i] = prob;
  125|   258k|    }
  126|   332k|  }
  127|    205|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 47, False: 158]
  ------------------
  128|     47|    return false;
  129|     47|  }
  130|    158|  return true;
  131|    205|}
_ZNK5draco17RAnsSymbolDecoderILi18EE11num_symbolsEv:
   38|    167|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi18EE13StartDecodingEPNS_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: 39, False: 119]
  ------------------
  140|     39|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 37]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     39|  } else
  145|    119|#endif
  146|    119|  {
  147|    119|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 119]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    119|  }
  151|    156|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 69, False: 87]
  ------------------
  152|     69|    return false;
  153|     69|  }
  154|     87|  const uint8_t *const data_head =
  155|     87|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     87|  buffer->Advance(bytes_encoded);
  158|     87|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 33, False: 54]
  ------------------
  159|     33|    return false;
  160|     33|  }
  161|     54|  return true;
  162|     87|}
_ZN5draco17RAnsSymbolDecoderILi18EE12DecodeSymbolEv:
   43|  77.0k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi18EE11EndDecodingEv:
  165|     54|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     54|  ans_.read_end();
  167|     54|}

_ZN5draco13DecodeSymbolsEjiPNS_13DecoderBufferEPj:
   33|  12.5k|                   DecoderBuffer *src_buffer, uint32_t *out_values) {
   34|  12.5k|  if (num_values == 0) {
  ------------------
  |  Branch (34:7): [True: 75, False: 12.4k]
  ------------------
   35|     75|    return true;
   36|     75|  }
   37|       |  // Decode which scheme to use.
   38|  12.4k|  uint8_t scheme;
   39|  12.4k|  if (!src_buffer->Decode(&scheme)) {
  ------------------
  |  Branch (39:7): [True: 175, False: 12.3k]
  ------------------
   40|    175|    return false;
   41|    175|  }
   42|  12.3k|  if (scheme == SYMBOL_CODING_TAGGED) {
  ------------------
  |  Branch (42:7): [True: 1.14k, False: 11.1k]
  ------------------
   43|  1.14k|    return DecodeTaggedSymbols<RAnsSymbolDecoder>(num_values, num_components,
   44|  1.14k|                                                  src_buffer, out_values);
   45|  11.1k|  } else if (scheme == SYMBOL_CODING_RAW) {
  ------------------
  |  Branch (45:14): [True: 8.02k, False: 3.15k]
  ------------------
   46|  8.02k|    return DecodeRawSymbols<RAnsSymbolDecoder>(num_values, src_buffer,
   47|  8.02k|                                               out_values);
   48|  8.02k|  }
   49|  3.15k|  return false;
   50|  12.3k|}
_ZN5draco19DecodeTaggedSymbolsINS_17RAnsSymbolDecoderEEEbjiPNS_13DecoderBufferEPj:
   54|  1.14k|                         DecoderBuffer *src_buffer, uint32_t *out_values) {
   55|       |  // Decode the encoded data.
   56|  1.14k|  SymbolDecoderT<5> tag_decoder;
   57|  1.14k|  if (!tag_decoder.Create(src_buffer)) {
  ------------------
  |  Branch (57:7): [True: 563, False: 577]
  ------------------
   58|    563|    return false;
   59|    563|  }
   60|       |
   61|    577|  if (!tag_decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (61:7): [True: 244, False: 333]
  ------------------
   62|    244|    return false;
   63|    244|  }
   64|       |
   65|    333|  if (num_values > 0 && tag_decoder.num_symbols() == 0) {
  ------------------
  |  Branch (65:7): [True: 333, False: 0]
  |  Branch (65:25): [True: 61, False: 272]
  ------------------
   66|     61|    return false;  // Wrong number of symbols.
   67|     61|  }
   68|       |
   69|       |  // src_buffer now points behind the encoded tag data (to the place where the
   70|       |  // values are encoded).
   71|    272|  src_buffer->StartBitDecoding(false, nullptr);
   72|    272|  int value_id = 0;
   73|  3.45M|  for (uint32_t i = 0; i < num_values; i += num_components) {
  ------------------
  |  Branch (73:24): [True: 3.45M, False: 257]
  ------------------
   74|       |    // Decode the tag.
   75|  3.45M|    const uint32_t bit_length = tag_decoder.DecodeSymbol();
   76|       |    // Decode the actual value.
   77|  10.5M|    for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (77:21): [True: 7.10M, False: 3.45M]
  ------------------
   78|  7.10M|      uint32_t val;
   79|  7.10M|      if (!src_buffer->DecodeLeastSignificantBits32(bit_length, &val)) {
  ------------------
  |  Branch (79:11): [True: 15, False: 7.10M]
  ------------------
   80|     15|        return false;
   81|     15|      }
   82|  7.10M|      out_values[value_id++] = val;
   83|  7.10M|    }
   84|  3.45M|  }
   85|    257|  tag_decoder.EndDecoding();
   86|    257|  src_buffer->EndBitDecoding();
   87|    257|  return true;
   88|    272|}
_ZN5draco16DecodeRawSymbolsINS_17RAnsSymbolDecoderEEEbjPNS_13DecoderBufferEPj:
  116|  8.02k|                      uint32_t *out_values) {
  117|  8.02k|  uint8_t max_bit_length;
  118|  8.02k|  if (!src_buffer->Decode(&max_bit_length)) {
  ------------------
  |  Branch (118:7): [True: 63, False: 7.95k]
  ------------------
  119|     63|    return false;
  120|     63|  }
  121|  7.95k|  switch (max_bit_length) {
  122|    643|    case 1:
  ------------------
  |  Branch (122:5): [True: 643, False: 7.31k]
  ------------------
  123|    643|      return DecodeRawSymbolsInternal<SymbolDecoderT<1>>(num_values, src_buffer,
  124|    643|                                                         out_values);
  125|    528|    case 2:
  ------------------
  |  Branch (125:5): [True: 528, False: 7.43k]
  ------------------
  126|    528|      return DecodeRawSymbolsInternal<SymbolDecoderT<2>>(num_values, src_buffer,
  127|    528|                                                         out_values);
  128|    533|    case 3:
  ------------------
  |  Branch (128:5): [True: 533, False: 7.42k]
  ------------------
  129|    533|      return DecodeRawSymbolsInternal<SymbolDecoderT<3>>(num_values, src_buffer,
  130|    533|                                                         out_values);
  131|    374|    case 4:
  ------------------
  |  Branch (131:5): [True: 374, False: 7.58k]
  ------------------
  132|    374|      return DecodeRawSymbolsInternal<SymbolDecoderT<4>>(num_values, src_buffer,
  133|    374|                                                         out_values);
  134|    202|    case 5:
  ------------------
  |  Branch (134:5): [True: 202, False: 7.75k]
  ------------------
  135|    202|      return DecodeRawSymbolsInternal<SymbolDecoderT<5>>(num_values, src_buffer,
  136|    202|                                                         out_values);
  137|    401|    case 6:
  ------------------
  |  Branch (137:5): [True: 401, False: 7.55k]
  ------------------
  138|    401|      return DecodeRawSymbolsInternal<SymbolDecoderT<6>>(num_values, src_buffer,
  139|    401|                                                         out_values);
  140|    381|    case 7:
  ------------------
  |  Branch (140:5): [True: 381, False: 7.57k]
  ------------------
  141|    381|      return DecodeRawSymbolsInternal<SymbolDecoderT<7>>(num_values, src_buffer,
  142|    381|                                                         out_values);
  143|    441|    case 8:
  ------------------
  |  Branch (143:5): [True: 441, False: 7.51k]
  ------------------
  144|    441|      return DecodeRawSymbolsInternal<SymbolDecoderT<8>>(num_values, src_buffer,
  145|    441|                                                         out_values);
  146|    526|    case 9:
  ------------------
  |  Branch (146:5): [True: 526, False: 7.43k]
  ------------------
  147|    526|      return DecodeRawSymbolsInternal<SymbolDecoderT<9>>(num_values, src_buffer,
  148|    526|                                                         out_values);
  149|    431|    case 10:
  ------------------
  |  Branch (149:5): [True: 431, False: 7.52k]
  ------------------
  150|    431|      return DecodeRawSymbolsInternal<SymbolDecoderT<10>>(
  151|    431|          num_values, src_buffer, out_values);
  152|    382|    case 11:
  ------------------
  |  Branch (152:5): [True: 382, False: 7.57k]
  ------------------
  153|    382|      return DecodeRawSymbolsInternal<SymbolDecoderT<11>>(
  154|    382|          num_values, src_buffer, out_values);
  155|    399|    case 12:
  ------------------
  |  Branch (155:5): [True: 399, False: 7.56k]
  ------------------
  156|    399|      return DecodeRawSymbolsInternal<SymbolDecoderT<12>>(
  157|    399|          num_values, src_buffer, out_values);
  158|    422|    case 13:
  ------------------
  |  Branch (158:5): [True: 422, False: 7.53k]
  ------------------
  159|    422|      return DecodeRawSymbolsInternal<SymbolDecoderT<13>>(
  160|    422|          num_values, src_buffer, out_values);
  161|    386|    case 14:
  ------------------
  |  Branch (161:5): [True: 386, False: 7.57k]
  ------------------
  162|    386|      return DecodeRawSymbolsInternal<SymbolDecoderT<14>>(
  163|    386|          num_values, src_buffer, out_values);
  164|    405|    case 15:
  ------------------
  |  Branch (164:5): [True: 405, False: 7.55k]
  ------------------
  165|    405|      return DecodeRawSymbolsInternal<SymbolDecoderT<15>>(
  166|    405|          num_values, src_buffer, out_values);
  167|    339|    case 16:
  ------------------
  |  Branch (167:5): [True: 339, False: 7.62k]
  ------------------
  168|    339|      return DecodeRawSymbolsInternal<SymbolDecoderT<16>>(
  169|    339|          num_values, src_buffer, out_values);
  170|    336|    case 17:
  ------------------
  |  Branch (170:5): [True: 336, False: 7.62k]
  ------------------
  171|    336|      return DecodeRawSymbolsInternal<SymbolDecoderT<17>>(
  172|    336|          num_values, src_buffer, out_values);
  173|    350|    case 18:
  ------------------
  |  Branch (173:5): [True: 350, False: 7.60k]
  ------------------
  174|    350|      return DecodeRawSymbolsInternal<SymbolDecoderT<18>>(
  175|    350|          num_values, src_buffer, out_values);
  176|    480|    default:
  ------------------
  |  Branch (176:5): [True: 480, False: 7.47k]
  ------------------
  177|    480|      return false;
  178|  7.95k|  }
  179|  7.95k|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi1EEEEEbjPNS_13DecoderBufferEPj:
   92|    643|                              uint32_t *out_values) {
   93|    643|  SymbolDecoderT decoder;
   94|    643|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 422, False: 221]
  ------------------
   95|    422|    return false;
   96|    422|  }
   97|       |
   98|    221|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 221, False: 0]
  |  Branch (98:25): [True: 36, False: 185]
  ------------------
   99|     36|    return false;  // Wrong number of symbols.
  100|     36|  }
  101|       |
  102|    185|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 72, False: 113]
  ------------------
  103|     72|    return false;
  104|     72|  }
  105|  23.2M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 23.2M, False: 113]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  23.2M|    const uint32_t value = decoder.DecodeSymbol();
  108|  23.2M|    out_values[i] = value;
  109|  23.2M|  }
  110|    113|  decoder.EndDecoding();
  111|    113|  return true;
  112|    185|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi2EEEEEbjPNS_13DecoderBufferEPj:
   92|    528|                              uint32_t *out_values) {
   93|    528|  SymbolDecoderT decoder;
   94|    528|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 228, False: 300]
  ------------------
   95|    228|    return false;
   96|    228|  }
   97|       |
   98|    300|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 300, False: 0]
  |  Branch (98:25): [True: 11, False: 289]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    289|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 105, False: 184]
  ------------------
  103|    105|    return false;
  104|    105|  }
  105|  1.51M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 1.51M, False: 184]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  1.51M|    const uint32_t value = decoder.DecodeSymbol();
  108|  1.51M|    out_values[i] = value;
  109|  1.51M|  }
  110|    184|  decoder.EndDecoding();
  111|    184|  return true;
  112|    289|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi3EEEEEbjPNS_13DecoderBufferEPj:
   92|    533|                              uint32_t *out_values) {
   93|    533|  SymbolDecoderT decoder;
   94|    533|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 179, False: 354]
  ------------------
   95|    179|    return false;
   96|    179|  }
   97|       |
   98|    354|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 354, False: 0]
  |  Branch (98:25): [True: 13, False: 341]
  ------------------
   99|     13|    return false;  // Wrong number of symbols.
  100|     13|  }
  101|       |
  102|    341|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 188, False: 153]
  ------------------
  103|    188|    return false;
  104|    188|  }
  105|  9.35M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 9.35M, False: 153]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  9.35M|    const uint32_t value = decoder.DecodeSymbol();
  108|  9.35M|    out_values[i] = value;
  109|  9.35M|  }
  110|    153|  decoder.EndDecoding();
  111|    153|  return true;
  112|    341|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi4EEEEEbjPNS_13DecoderBufferEPj:
   92|    374|                              uint32_t *out_values) {
   93|    374|  SymbolDecoderT decoder;
   94|    374|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 138, False: 236]
  ------------------
   95|    138|    return false;
   96|    138|  }
   97|       |
   98|    236|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 236, False: 0]
  |  Branch (98:25): [True: 13, False: 223]
  ------------------
   99|     13|    return false;  // Wrong number of symbols.
  100|     13|  }
  101|       |
  102|    223|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 57, False: 166]
  ------------------
  103|     57|    return false;
  104|     57|  }
  105|  8.94M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 8.94M, False: 166]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  8.94M|    const uint32_t value = decoder.DecodeSymbol();
  108|  8.94M|    out_values[i] = value;
  109|  8.94M|  }
  110|    166|  decoder.EndDecoding();
  111|    166|  return true;
  112|    223|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi5EEEEEbjPNS_13DecoderBufferEPj:
   92|    202|                              uint32_t *out_values) {
   93|    202|  SymbolDecoderT decoder;
   94|    202|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 42, False: 160]
  ------------------
   95|     42|    return false;
   96|     42|  }
   97|       |
   98|    160|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 160, False: 0]
  |  Branch (98:25): [True: 53, False: 107]
  ------------------
   99|     53|    return false;  // Wrong number of symbols.
  100|     53|  }
  101|       |
  102|    107|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 9, False: 98]
  ------------------
  103|      9|    return false;
  104|      9|  }
  105|  8.20M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 8.20M, False: 98]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  8.20M|    const uint32_t value = decoder.DecodeSymbol();
  108|  8.20M|    out_values[i] = value;
  109|  8.20M|  }
  110|     98|  decoder.EndDecoding();
  111|     98|  return true;
  112|    107|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi6EEEEEbjPNS_13DecoderBufferEPj:
   92|    401|                              uint32_t *out_values) {
   93|    401|  SymbolDecoderT decoder;
   94|    401|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 138, False: 263]
  ------------------
   95|    138|    return false;
   96|    138|  }
   97|       |
   98|    263|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 263, False: 0]
  |  Branch (98:25): [True: 8, False: 255]
  ------------------
   99|      8|    return false;  // Wrong number of symbols.
  100|      8|  }
  101|       |
  102|    255|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 124, False: 131]
  ------------------
  103|    124|    return false;
  104|    124|  }
  105|  4.67M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 4.67M, False: 131]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  4.67M|    const uint32_t value = decoder.DecodeSymbol();
  108|  4.67M|    out_values[i] = value;
  109|  4.67M|  }
  110|    131|  decoder.EndDecoding();
  111|    131|  return true;
  112|    255|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi7EEEEEbjPNS_13DecoderBufferEPj:
   92|    381|                              uint32_t *out_values) {
   93|    381|  SymbolDecoderT decoder;
   94|    381|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 162, False: 219]
  ------------------
   95|    162|    return false;
   96|    162|  }
   97|       |
   98|    219|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 219, False: 0]
  |  Branch (98:25): [True: 5, False: 214]
  ------------------
   99|      5|    return false;  // Wrong number of symbols.
  100|      5|  }
  101|       |
  102|    214|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 112, False: 102]
  ------------------
  103|    112|    return false;
  104|    112|  }
  105|  13.7M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 13.7M, False: 102]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  13.7M|    const uint32_t value = decoder.DecodeSymbol();
  108|  13.7M|    out_values[i] = value;
  109|  13.7M|  }
  110|    102|  decoder.EndDecoding();
  111|    102|  return true;
  112|    214|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi8EEEEEbjPNS_13DecoderBufferEPj:
   92|    441|                              uint32_t *out_values) {
   93|    441|  SymbolDecoderT decoder;
   94|    441|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 173, False: 268]
  ------------------
   95|    173|    return false;
   96|    173|  }
   97|       |
   98|    268|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 268, False: 0]
  |  Branch (98:25): [True: 17, False: 251]
  ------------------
   99|     17|    return false;  // Wrong number of symbols.
  100|     17|  }
  101|       |
  102|    251|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 126, False: 125]
  ------------------
  103|    126|    return false;
  104|    126|  }
  105|  21.1M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 21.1M, False: 125]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  21.1M|    const uint32_t value = decoder.DecodeSymbol();
  108|  21.1M|    out_values[i] = value;
  109|  21.1M|  }
  110|    125|  decoder.EndDecoding();
  111|    125|  return true;
  112|    251|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi9EEEEEbjPNS_13DecoderBufferEPj:
   92|    526|                              uint32_t *out_values) {
   93|    526|  SymbolDecoderT decoder;
   94|    526|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 181, False: 345]
  ------------------
   95|    181|    return false;
   96|    181|  }
   97|       |
   98|    345|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 345, False: 0]
  |  Branch (98:25): [True: 11, False: 334]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    334|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 141, False: 193]
  ------------------
  103|    141|    return false;
  104|    141|  }
  105|  12.5M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 12.5M, False: 193]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  12.5M|    const uint32_t value = decoder.DecodeSymbol();
  108|  12.5M|    out_values[i] = value;
  109|  12.5M|  }
  110|    193|  decoder.EndDecoding();
  111|    193|  return true;
  112|    334|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi10EEEEEbjPNS_13DecoderBufferEPj:
   92|    431|                              uint32_t *out_values) {
   93|    431|  SymbolDecoderT decoder;
   94|    431|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 205, False: 226]
  ------------------
   95|    205|    return false;
   96|    205|  }
   97|       |
   98|    226|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 226, False: 0]
  |  Branch (98:25): [True: 4, False: 222]
  ------------------
   99|      4|    return false;  // Wrong number of symbols.
  100|      4|  }
  101|       |
  102|    222|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 144, False: 78]
  ------------------
  103|    144|    return false;
  104|    144|  }
  105|   577k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 577k, False: 78]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   577k|    const uint32_t value = decoder.DecodeSymbol();
  108|   577k|    out_values[i] = value;
  109|   577k|  }
  110|     78|  decoder.EndDecoding();
  111|     78|  return true;
  112|    222|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi11EEEEEbjPNS_13DecoderBufferEPj:
   92|    382|                              uint32_t *out_values) {
   93|    382|  SymbolDecoderT decoder;
   94|    382|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 207, False: 175]
  ------------------
   95|    207|    return false;
   96|    207|  }
   97|       |
   98|    175|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 175, False: 0]
  |  Branch (98:25): [True: 11, False: 164]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    164|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 95, False: 69]
  ------------------
  103|     95|    return false;
  104|     95|  }
  105|   430k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 430k, False: 69]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   430k|    const uint32_t value = decoder.DecodeSymbol();
  108|   430k|    out_values[i] = value;
  109|   430k|  }
  110|     69|  decoder.EndDecoding();
  111|     69|  return true;
  112|    164|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi12EEEEEbjPNS_13DecoderBufferEPj:
   92|    399|                              uint32_t *out_values) {
   93|    399|  SymbolDecoderT decoder;
   94|    399|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 215, False: 184]
  ------------------
   95|    215|    return false;
   96|    215|  }
   97|       |
   98|    184|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 184, False: 0]
  |  Branch (98:25): [True: 5, False: 179]
  ------------------
   99|      5|    return false;  // Wrong number of symbols.
  100|      5|  }
  101|       |
  102|    179|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 115, False: 64]
  ------------------
  103|    115|    return false;
  104|    115|  }
  105|  80.1k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 80.1k, False: 64]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  80.1k|    const uint32_t value = decoder.DecodeSymbol();
  108|  80.1k|    out_values[i] = value;
  109|  80.1k|  }
  110|     64|  decoder.EndDecoding();
  111|     64|  return true;
  112|    179|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi13EEEEEbjPNS_13DecoderBufferEPj:
   92|    422|                              uint32_t *out_values) {
   93|    422|  SymbolDecoderT decoder;
   94|    422|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 232, False: 190]
  ------------------
   95|    232|    return false;
   96|    232|  }
   97|       |
   98|    190|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 190, False: 0]
  |  Branch (98:25): [True: 10, False: 180]
  ------------------
   99|     10|    return false;  // Wrong number of symbols.
  100|     10|  }
  101|       |
  102|    180|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 100, False: 80]
  ------------------
  103|    100|    return false;
  104|    100|  }
  105|  78.8k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 78.7k, False: 80]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  78.7k|    const uint32_t value = decoder.DecodeSymbol();
  108|  78.7k|    out_values[i] = value;
  109|  78.7k|  }
  110|     80|  decoder.EndDecoding();
  111|     80|  return true;
  112|    180|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi14EEEEEbjPNS_13DecoderBufferEPj:
   92|    386|                              uint32_t *out_values) {
   93|    386|  SymbolDecoderT decoder;
   94|    386|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 179, False: 207]
  ------------------
   95|    179|    return false;
   96|    179|  }
   97|       |
   98|    207|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 207, False: 0]
  |  Branch (98:25): [True: 9, False: 198]
  ------------------
   99|      9|    return false;  // Wrong number of symbols.
  100|      9|  }
  101|       |
  102|    198|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 123, False: 75]
  ------------------
  103|    123|    return false;
  104|    123|  }
  105|   129k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 129k, False: 75]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   129k|    const uint32_t value = decoder.DecodeSymbol();
  108|   129k|    out_values[i] = value;
  109|   129k|  }
  110|     75|  decoder.EndDecoding();
  111|     75|  return true;
  112|    198|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi15EEEEEbjPNS_13DecoderBufferEPj:
   92|    405|                              uint32_t *out_values) {
   93|    405|  SymbolDecoderT decoder;
   94|    405|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 174, False: 231]
  ------------------
   95|    174|    return false;
   96|    174|  }
   97|       |
   98|    231|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 231, False: 0]
  |  Branch (98:25): [True: 11, False: 220]
  ------------------
   99|     11|    return false;  // Wrong number of symbols.
  100|     11|  }
  101|       |
  102|    220|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 134, False: 86]
  ------------------
  103|    134|    return false;
  104|    134|  }
  105|   339k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 339k, False: 86]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   339k|    const uint32_t value = decoder.DecodeSymbol();
  108|   339k|    out_values[i] = value;
  109|   339k|  }
  110|     86|  decoder.EndDecoding();
  111|     86|  return true;
  112|    220|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi16EEEEEbjPNS_13DecoderBufferEPj:
   92|    339|                              uint32_t *out_values) {
   93|    339|  SymbolDecoderT decoder;
   94|    339|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 156, False: 183]
  ------------------
   95|    156|    return false;
   96|    156|  }
   97|       |
   98|    183|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 183, False: 0]
  |  Branch (98:25): [True: 12, False: 171]
  ------------------
   99|     12|    return false;  // Wrong number of symbols.
  100|     12|  }
  101|       |
  102|    171|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 98, False: 73]
  ------------------
  103|     98|    return false;
  104|     98|  }
  105|   286k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 286k, False: 73]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   286k|    const uint32_t value = decoder.DecodeSymbol();
  108|   286k|    out_values[i] = value;
  109|   286k|  }
  110|     73|  decoder.EndDecoding();
  111|     73|  return true;
  112|    171|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi17EEEEEbjPNS_13DecoderBufferEPj:
   92|    336|                              uint32_t *out_values) {
   93|    336|  SymbolDecoderT decoder;
   94|    336|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 149, False: 187]
  ------------------
   95|    149|    return false;
   96|    149|  }
   97|       |
   98|    187|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 187, False: 0]
  |  Branch (98:25): [True: 10, False: 177]
  ------------------
   99|     10|    return false;  // Wrong number of symbols.
  100|     10|  }
  101|       |
  102|    177|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 104, False: 73]
  ------------------
  103|    104|    return false;
  104|    104|  }
  105|   265k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 265k, False: 73]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   265k|    const uint32_t value = decoder.DecodeSymbol();
  108|   265k|    out_values[i] = value;
  109|   265k|  }
  110|     73|  decoder.EndDecoding();
  111|     73|  return true;
  112|    177|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi18EEEEEbjPNS_13DecoderBufferEPj:
   92|    350|                              uint32_t *out_values) {
   93|    350|  SymbolDecoderT decoder;
   94|    350|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 183, False: 167]
  ------------------
   95|    183|    return false;
   96|    183|  }
   97|       |
   98|    167|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 167, False: 0]
  |  Branch (98:25): [True: 9, False: 158]
  ------------------
   99|      9|    return false;  // Wrong number of symbols.
  100|      9|  }
  101|       |
  102|    158|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 104, False: 54]
  ------------------
  103|    104|    return false;
  104|    104|  }
  105|  77.0k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 77.0k, False: 54]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  77.0k|    const uint32_t value = decoder.DecodeSymbol();
  108|  77.0k|    out_values[i] = value;
  109|  77.0k|  }
  110|     54|  decoder.EndDecoding();
  111|     54|  return true;
  112|    158|}

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

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

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

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

_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEEC2Ev:
   48|  3.56k|    : decoder_(nullptr),
   49|  3.56k|      last_symbol_id_(-1),
   50|  3.56k|      last_vert_id_(-1),
   51|  3.56k|      last_face_id_(-1),
   52|  3.56k|      num_new_vertices_(0),
   53|  3.56k|      num_encoded_vertices_(0),
   54|  3.56k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  3.56k|    MeshEdgebreakerDecoder *decoder) {
   59|  3.56k|  decoder_ = decoder;
   60|  3.56k|  return true;
   61|  3.56k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE23GetAttributeCornerTableEi:
   66|  3.66k|    int att_id) const {
   67|  4.98k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 4.16k, False: 828]
  ------------------
   68|  4.16k|    const int decoder_id = attribute_data_[i].decoder_id;
   69|  4.16k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 1.31k, False: 2.84k]
  |  Branch (69:27): [True: 0, False: 2.84k]
  ------------------
   70|  1.31k|      continue;
   71|  1.31k|    }
   72|  2.84k|    const AttributesDecoderInterface *const dec =
   73|  2.84k|        decoder_->attributes_decoder(decoder_id);
   74|  5.95k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 5.94k, False: 9]
  ------------------
   75|  5.94k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 2.83k, False: 3.10k]
  ------------------
   76|  2.83k|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 1.99k, False: 844]
  ------------------
   77|  1.99k|          return &attribute_data_[i].connectivity_data;
   78|  1.99k|        }
   79|    844|        return nullptr;
   80|  2.83k|      }
   81|  5.94k|    }
   82|  2.84k|  }
   83|    828|  return nullptr;
   84|  3.66k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE24GetAttributeEncodingDataEi:
   89|  3.66k|    int att_id) const {
   90|  4.98k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 4.16k, False: 828]
  ------------------
   91|  4.16k|    const int decoder_id = attribute_data_[i].decoder_id;
   92|  4.16k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 1.31k, False: 2.84k]
  |  Branch (92:27): [True: 0, False: 2.84k]
  ------------------
   93|  1.31k|      continue;
   94|  1.31k|    }
   95|  2.84k|    const AttributesDecoderInterface *const dec =
   96|  2.84k|        decoder_->attributes_decoder(decoder_id);
   97|  5.95k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 5.94k, False: 9]
  ------------------
   98|  5.94k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 2.83k, False: 3.10k]
  ------------------
   99|  2.83k|        return &attribute_data_[i].encoding_data;
  100|  2.83k|      }
  101|  5.94k|    }
  102|  2.84k|  }
  103|    828|  return &pos_encoding_data_;
  104|  3.66k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE23CreateAttributesDecoderEi:
  130|  2.98k|    int32_t att_decoder_id) {
  131|  2.98k|  int8_t att_data_id;
  132|  2.98k|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 10, False: 2.97k]
  ------------------
  133|     10|    return false;
  134|     10|  }
  135|  2.97k|  uint8_t decoder_type;
  136|  2.97k|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 6, False: 2.97k]
  ------------------
  137|      6|    return false;
  138|      6|  }
  139|       |
  140|  2.97k|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 2.31k, False: 658]
  ------------------
  141|  2.31k|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 97, False: 2.21k]
  ------------------
  142|     97|      return false;  // Unexpected attribute data.
  143|     97|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|  2.21k|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 8, False: 2.21k]
  ------------------
  148|      8|      return false;
  149|      8|    }
  150|       |
  151|  2.21k|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|  2.21k|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    658|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 4, False: 654]
  ------------------
  155|      4|      return false;  // Some other decoder is already using the data. Error.
  156|      4|    }
  157|    654|    pos_data_decoder_id_ = att_decoder_id;
  158|    654|  }
  159|       |
  160|  2.86k|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|  2.86k|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  2.86k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 2.85k, False: 6]
  ------------------
  162|  2.85k|    uint8_t traversal_method_encoded;
  163|  2.85k|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 6, False: 2.85k]
  ------------------
  164|      6|      return false;
  165|      6|    }
  166|       |    // Check that decoded traversal method is valid.
  167|  2.85k|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 19, False: 2.83k]
  ------------------
  168|     19|      return false;
  169|     19|    }
  170|  2.83k|    traversal_method =
  171|  2.83k|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|  2.83k|  }
  173|       |
  174|  2.83k|  const Mesh *mesh = decoder_->mesh();
  175|  2.83k|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|  2.83k|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 1.35k, False: 1.48k]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|  1.35k|    MeshAttributeIndicesEncodingData *encoding_data = nullptr;
  181|  1.35k|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 634, False: 716]
  ------------------
  182|    634|      encoding_data = &pos_encoding_data_;
  183|    716|    } else {
  184|    716|      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|    716|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|    716|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|  1.35k|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 190, False: 1.16k]
  ------------------
  191|    190|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|    190|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|    190|          AttTraverser;
  194|    190|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|  1.16k|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 1.16k, False: 0]
  ------------------
  196|  1.16k|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|  1.16k|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|  1.16k|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|  1.16k|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|  1.48k|  } else {
  203|  1.48k|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 9, False: 1.48k]
  ------------------
  204|      9|      return false;  // Unsupported method.
  205|      9|    }
  206|  1.48k|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 7, False: 1.47k]
  ------------------
  207|      7|      return false;  // Attribute data must be specified.
  208|      7|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|  1.47k|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|  1.47k|        AttObserver;
  214|  1.47k|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|  1.47k|        AttTraverser;
  216|       |
  217|  1.47k|    MeshAttributeIndicesEncodingData *const encoding_data =
  218|  1.47k|        &attribute_data_[att_data_id].encoding_data;
  219|  1.47k|    const MeshAttributeCornerTable *const corner_table =
  220|  1.47k|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|  1.47k|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|  1.47k|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|  1.47k|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|  1.47k|                             encoding_data);
  227|       |
  228|  1.47k|    AttTraverser att_traverser;
  229|  1.47k|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|  1.47k|    traversal_sequencer->SetTraverser(att_traverser);
  232|  1.47k|    sequencer = std::move(traversal_sequencer);
  233|  1.47k|  }
  234|       |
  235|  2.82k|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 2.82k]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|  2.82k|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|  2.82k|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|  2.82k|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|  2.82k|                                        std::move(att_controller));
  244|  2.82k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18DecodeConnectivityEv:
  247|  3.56k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  3.56k|  num_new_vertices_ = 0;
  249|  3.56k|  new_to_parent_vertex_map_.clear();
  250|  3.56k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  3.56k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.56k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 564, False: 2.99k]
  ------------------
  252|    564|    uint32_t num_new_verts;
  253|    564|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    564|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 178, False: 386]
  ------------------
  254|    178|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 178]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    386|    } else {
  258|    386|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 386]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    386|    }
  262|    564|    num_new_vertices_ = num_new_verts;
  263|    564|  }
  264|  3.56k|#endif
  265|       |
  266|  3.56k|  uint32_t num_encoded_vertices;
  267|  3.56k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  3.56k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.56k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 178, False: 3.38k]
  ------------------
  269|    178|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 178]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    178|  } else
  274|  3.38k|#endif
  275|  3.38k|  {
  276|  3.38k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 1, False: 3.38k]
  ------------------
  277|      1|      return false;
  278|      1|    }
  279|  3.38k|  }
  280|  3.56k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  3.56k|  uint32_t num_faces;
  283|  3.56k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  3.56k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.56k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 178, False: 3.38k]
  ------------------
  285|    178|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 178]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    178|  } else
  290|  3.38k|#endif
  291|  3.38k|  {
  292|  3.38k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 3.38k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  3.38k|  }
  296|  3.56k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 2, False: 3.55k]
  ------------------
  297|      2|    return false;  // Draco cannot handle this many faces.
  298|      2|  }
  299|       |
  300|  3.55k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 3, False: 3.55k]
  ------------------
  301|      3|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      3|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|  3.55k|  const uint32_t min_num_face_edges = 3 * num_faces / 2;
  307|       |
  308|       |  // Maximum number of edges that can exist between |num_encoded_vertices_|.
  309|       |  // This is based on graph theory assuming simple connected graph.
  310|  3.55k|  const uint64_t num_encoded_vertices_64 =
  311|  3.55k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  3.55k|  const uint64_t max_num_vertex_edges =
  313|  3.55k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  3.55k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 0, False: 3.55k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      0|    return false;
  317|      0|  }
  318|       |
  319|  3.55k|  uint8_t num_attribute_data;
  320|  3.55k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 3.55k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  3.55k|  uint32_t num_encoded_symbols;
  325|  3.55k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  3.55k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.55k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 174, False: 3.38k]
  ------------------
  327|    174|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 174]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    174|  } else
  332|  3.38k|#endif
  333|  3.38k|  {
  334|  3.38k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 3.38k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  3.38k|  }
  338|       |
  339|  3.55k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 10, False: 3.54k]
  ------------------
  340|       |    // Number of faces needs to be the same or greater than the number of
  341|       |    // symbols (it can be greater because the initial face may not be encoded as
  342|       |    // a symbol).
  343|     10|    return false;
  344|     10|  }
  345|  3.54k|  const uint32_t max_encoded_faces =
  346|  3.54k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  3.54k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 21, False: 3.52k]
  ------------------
  348|       |    // Faces can only be 1 1/3 times bigger than number of encoded symbols. This
  349|       |    // could only happen if all new encoded components started with interior
  350|       |    // triangles. E.g. A mesh with multiple tetrahedrons.
  351|     21|    return false;
  352|     21|  }
  353|       |
  354|  3.52k|  uint32_t num_encoded_split_symbols;
  355|  3.52k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  3.52k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.52k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 152, False: 3.37k]
  ------------------
  357|    152|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 152]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    152|  } else
  362|  3.37k|#endif
  363|  3.37k|  {
  364|  3.37k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 3.37k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  3.37k|  }
  368|       |
  369|  3.52k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 13, False: 3.51k]
  ------------------
  370|     13|    return false;  // Split symbols are a sub-set of all symbols.
  371|     13|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  3.51k|  vertex_traversal_length_.clear();
  375|  3.51k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  3.51k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 3.51k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  3.51k|  processed_corner_ids_.clear();
  380|  3.51k|  processed_corner_ids_.reserve(num_faces);
  381|  3.51k|  processed_connectivity_corners_.clear();
  382|  3.51k|  processed_connectivity_corners_.reserve(num_faces);
  383|  3.51k|  topology_split_data_.clear();
  384|  3.51k|  hole_event_data_.clear();
  385|  3.51k|  init_face_configurations_.clear();
  386|  3.51k|  init_corners_.clear();
  387|       |
  388|  3.51k|  last_symbol_id_ = -1;
  389|  3.51k|  last_face_id_ = -1;
  390|  3.51k|  last_vert_id_ = -1;
  391|       |
  392|  3.51k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  3.51k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  3.51k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 1, False: 3.51k]
  ------------------
  397|  3.51k|          num_faces, num_encoded_vertices_ + num_encoded_split_symbols)) {
  398|      1|    return false;
  399|      1|  }
  400|       |
  401|       |  // Start with all vertices marked as holes (boundaries).
  402|       |  // Only vertices decoded with TOPOLOGY_C symbol (and the initial face) will
  403|       |  // be marked as non hole vertices. We need to allocate the array larger
  404|       |  // because split symbols can create extra vertices during the decoding
  405|       |  // process (these extra vertices are then eliminated during deduplication).
  406|  3.51k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  3.51k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  3.51k|  int32_t topology_split_decoded_bytes = -1;
  410|  3.51k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.51k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 530, False: 2.98k]
  ------------------
  411|    530|    uint32_t encoded_connectivity_size;
  412|    530|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    530|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 144, False: 386]
  ------------------
  413|    144|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 6, False: 138]
  ------------------
  414|      6|        return false;
  415|      6|      }
  416|    386|    } else {
  417|    386|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 386]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|    386|    }
  421|    524|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 2, False: 522]
  ------------------
  422|    522|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 17, False: 505]
  ------------------
  423|     19|      return false;
  424|     19|    }
  425|    505|    DecoderBuffer event_buffer;
  426|    505|    event_buffer.Init(
  427|    505|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    505|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    505|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    505|    topology_split_decoded_bytes =
  432|    505|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    505|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 126, False: 379]
  ------------------
  434|    126|      return false;
  435|    126|    }
  436|       |
  437|    505|  } else
  438|  2.98k|#endif
  439|  2.98k|  {
  440|  2.98k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 12, False: 2.96k]
  ------------------
  441|     12|      return false;
  442|     12|    }
  443|  2.98k|  }
  444|       |
  445|  3.34k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  3.34k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  3.34k|                                           num_encoded_split_symbols);
  449|  3.34k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  3.34k|  DecoderBuffer traversal_end_buffer;
  452|  3.34k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 122, False: 3.22k]
  ------------------
  453|    122|    return false;
  454|    122|  }
  455|       |
  456|  3.22k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  3.22k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 268, False: 2.95k]
  ------------------
  458|    268|    return false;
  459|    268|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|  2.95k|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|  2.95k|                           traversal_end_buffer.remaining_size(),
  464|  2.95k|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|  2.95k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|  2.95k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.95k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 271, False: 2.68k]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|    271|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|    271|  }
  471|  2.95k|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|  2.95k|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 2.89k, False: 66]
  ------------------
  475|  2.89k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|  2.89k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  2.89k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 261, False: 2.63k]
  ------------------
  477|  1.54k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 1.27k, False: 261]
  ------------------
  478|  1.27k|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 1.27k]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|  1.27k|      }
  482|       |
  483|    261|    } else
  484|  2.63k|#endif
  485|  2.63k|    {
  486|   391k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 389k, False: 2.63k]
  ------------------
  487|   389k|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 389k]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|   389k|      }
  491|  2.63k|    }
  492|  2.89k|  }
  493|  2.95k|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  7.62k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 4.66k, False: 2.95k]
  ------------------
  498|  4.66k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  1.00M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 1.00M, False: 4.66k]
  ------------------
  501|  1.00M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  1.00M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  4.66k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 4.66k]
  ------------------
  505|  4.66k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  4.66k|  }
  509|       |
  510|  2.95k|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  7.62k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 4.66k, False: 2.95k]
  ------------------
  512|       |    // For non-position attributes, preallocate the vertex to value mapping
  513|       |    // using the maximum number of vertices from the base corner table and the
  514|       |    // attribute corner table (since the attribute decoder may use either of
  515|       |    // it).
  516|  4.66k|    int32_t att_connectivity_verts =
  517|  4.66k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  4.66k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 545, False: 4.12k]
  ------------------
  519|    545|      att_connectivity_verts = corner_table_->num_vertices();
  520|    545|    }
  521|  4.66k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  4.66k|  }
  523|  2.95k|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 1, False: 2.95k]
  ------------------
  524|      1|    return false;
  525|      1|  }
  526|  2.95k|  return true;
  527|  2.95k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE19OnAttributesDecodedEv:
  530|    633|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|    633|  return true;
  532|    633|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18DecodeConnectivityEi:
  536|  3.22k|    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.22k|  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.22k|  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.22k|  std::vector<VertexIndex> invalid_vertices;
  558|  3.22k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  3.22k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  3.22k|  int num_faces = 0;
  562|  25.1M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 25.1M, False: 3.04k]
  ------------------
  563|  25.1M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  25.1M|    bool check_topology_split = false;
  566|  25.1M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  25.1M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 11.5M, False: 13.6M]
  ------------------
  568|       |      // Create a new face between two edges on the open boundary.
  569|       |      // The first edge is opposite to the corner "a" from the image below.
  570|       |      // The other edge is opposite to the corner "b" that can be reached
  571|       |      // through a CCW traversal around the vertex "v".
  572|       |      // One new active boundary edge is created, opposite to the new corner
  573|       |      // "x".
  574|       |      //
  575|       |      //     *-------*
  576|       |      //    / \     / \
  577|       |      //   /   \   /   \
  578|       |      //  /     \ /     \
  579|       |      // *-------v-------*
  580|       |      //  \b    /x\    a/
  581|       |      //   \   /   \   /
  582|       |      //    \ /  C  \ /
  583|       |      //     *.......*
  584|       |
  585|       |      // Find the corner "b" from the corner "a" which is the corner on the
  586|       |      // top of the active stack.
  587|  11.5M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 0, False: 11.5M]
  ------------------
  588|      0|        return -1;
  589|      0|      }
  590|       |
  591|  11.5M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  11.5M|      const VertexIndex vertex_x =
  593|  11.5M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  11.5M|      const CornerIndex corner_b =
  595|  11.5M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  11.5M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 131, False: 11.5M]
  ------------------
  598|       |        // All matched corners must be different.
  599|    131|        return -1;
  600|    131|      }
  601|  11.5M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 11.5M]
  |  Branch (601:11): [True: 0, False: 11.5M]
  ------------------
  602|  11.5M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 11.5M]
  ------------------
  603|       |        // One of the corners is already opposite to an existing face, which
  604|       |        // should not happen unless the input was tampered with.
  605|      0|        return -1;
  606|      0|      }
  607|       |
  608|       |      // New tip corner.
  609|  11.5M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  11.5M|      SetOppositeCorners(corner_a, corner + 1);
  612|  11.5M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  11.5M|      const VertexIndex vert_a_prev =
  616|  11.5M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  11.5M|      const VertexIndex vert_b_next =
  618|  11.5M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  11.5M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 11.5M]
  |  Branch (619:38): [True: 0, False: 11.5M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  11.5M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  11.5M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  11.5M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  11.5M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  11.5M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  11.5M|      active_corner_stack.back() = corner;
  631|  13.6M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 4.09M, False: 9.51M]
  |  Branch (631:40): [True: 2.76M, False: 6.75M]
  ------------------
  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|  6.85M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 0, False: 6.85M]
  ------------------
  647|      0|        return -1;
  648|      0|      }
  649|  6.85M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  6.85M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 6.85M]
  ------------------
  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|  6.85M|      const CornerIndex corner(3 * face.value());
  658|  6.85M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  6.85M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 4.09M, False: 2.76M]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  4.09M|        opp_corner = corner + 2;
  662|  4.09M|        corner_l = corner + 1;
  663|  4.09M|        corner_r = corner;
  664|  4.09M|      } else {
  665|       |        // "l" is the new first corner.
  666|  2.76M|        opp_corner = corner + 1;
  667|  2.76M|        corner_l = corner;
  668|  2.76M|        corner_r = corner + 2;
  669|  2.76M|      }
  670|  6.85M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  6.85M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  6.85M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 1, False: 6.85M]
  ------------------
  675|      1|        return -1;  // Unexpected number of decoded vertices.
  676|      1|      }
  677|       |
  678|  6.85M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  6.85M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  6.85M|      const VertexIndex vertex_r =
  682|  6.85M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  6.85M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  6.85M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  6.85M|      corner_table_->MapCornerToVertex(
  688|  6.85M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  6.85M|      active_corner_stack.back() = corner;
  690|  6.85M|      check_topology_split = true;
  691|  6.85M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 3.33M, False: 3.41M]
  ------------------
  692|       |      // Create a new face that merges two last active edges from the active
  693|       |      // stack. No new vertex is created, but two vertices at corners "p" and
  694|       |      // "n" need to be merged into a single vertex.
  695|       |      //
  696|       |      // *-------v-------*
  697|       |      //  \a   p/x\n   b/
  698|       |      //   \   /   \   /
  699|       |      //    \ /  S  \ /
  700|       |      //     *.......*
  701|       |      //
  702|  3.33M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 0, False: 3.33M]
  ------------------
  703|      0|        return -1;
  704|      0|      }
  705|  3.33M|      const CornerIndex corner_b = active_corner_stack.back();
  706|  3.33M|      active_corner_stack.pop_back();
  707|       |
  708|       |      // Corner "a" can correspond either to a normal active edge, or to an edge
  709|       |      // created from the topology split event.
  710|  3.33M|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  3.33M|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 148, False: 3.33M]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|    148|        active_corner_stack.push_back(it->second);
  714|    148|      }
  715|  3.33M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 16, False: 3.33M]
  ------------------
  716|     16|        return -1;
  717|     16|      }
  718|  3.33M|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  3.33M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 3.33M]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  3.33M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 3, False: 3.33M]
  |  Branch (724:11): [True: 3, False: 3.33M]
  ------------------
  725|  3.33M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 3.33M]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|      3|        return -1;
  729|      3|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  3.33M|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  3.33M|      SetOppositeCorners(corner_a, corner + 2);
  735|  3.33M|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  3.33M|      const VertexIndex vertex_p =
  739|  3.33M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  3.33M|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  3.33M|      corner_table_->MapCornerToVertex(
  742|  3.33M|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  3.33M|      const VertexIndex vert_b_prev =
  744|  3.33M|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  3.33M|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  3.33M|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  3.33M|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  3.33M|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  3.33M|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  3.33M|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  3.33M|                                       corner_table_->LeftMostCorner(vertex_n));
  753|       |
  754|       |      // Also update the vertex id at corner "n" and all corners that are
  755|       |      // connected to it in the CCW direction.
  756|  3.33M|      const CornerIndex first_corner = corner_n;
  757|  14.5M|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 11.1M, False: 3.33M]
  ------------------
  758|  11.1M|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|  11.1M|        corner_n = corner_table_->SwingLeft(corner_n);
  760|  11.1M|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 3, False: 11.1M]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      3|          return -1;
  764|      3|        }
  765|  11.1M|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  3.33M|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  3.33M|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 1.54M, False: 1.78M]
  ------------------
  770|  1.54M|        invalid_vertices.push_back(vertex_n);
  771|  1.54M|      }
  772|  3.33M|      active_corner_stack.back() = corner;
  773|  3.41M|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 3.41M, False: 0]
  ------------------
  774|  3.41M|      const CornerIndex corner(3 * face.value());
  775|  3.41M|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  3.41M|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  3.41M|      corner_table_->MapCornerToVertex(corner + 1,
  779|  3.41M|                                       corner_table_->AddNewVertex());
  780|  3.41M|      corner_table_->MapCornerToVertex(corner + 2,
  781|  3.41M|                                       corner_table_->AddNewVertex());
  782|       |
  783|  3.41M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 1, False: 3.41M]
  ------------------
  784|      1|        return -1;  // Unexpected number of decoded vertices.
  785|      1|      }
  786|       |
  787|  3.41M|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  3.41M|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  3.41M|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  3.41M|      active_corner_stack.push_back(corner);
  792|  3.41M|      check_topology_split = true;
  793|  3.41M|    } else {
  794|       |      // Error. Unknown symbol decoded.
  795|      0|      return -1;
  796|      0|    }
  797|       |    // Inform the traversal decoder that a new corner has been reached.
  798|  25.1M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  25.1M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 10.2M, False: 14.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|  10.2M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  10.2M|      EdgeFaceName split_edge;
  812|  10.2M|      int encoder_split_symbol_id;
  813|  10.2M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 2.07k, False: 10.2M]
  ------------------
  814|  10.2M|                             &encoder_split_symbol_id)) {
  815|  2.07k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 31, False: 2.03k]
  ------------------
  816|     31|          return -1;  // Wrong split symbol id.
  817|     31|        }
  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.03k|        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.03k|        CornerIndex new_active_corner;
  831|  2.03k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 1.10k, False: 931]
  ------------------
  832|  1.10k|          new_active_corner = corner_table_->Next(act_top_corner);
  833|  1.10k|        } else {
  834|    931|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|    931|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  2.03k|        const int decoder_split_symbol_id =
  839|  2.03k|            num_symbols - encoder_split_symbol_id - 1;
  840|  2.03k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  2.03k|            new_active_corner;
  842|  2.03k|      }
  843|  10.2M|    }
  844|  25.1M|  }
  845|  3.04k|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 3.04k]
  ------------------
  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|  26.8k|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 23.9k, False: 2.97k]
  ------------------
  850|  23.9k|    const CornerIndex corner = active_corner_stack.back();
  851|  23.9k|    active_corner_stack.pop_back();
  852|  23.9k|    const bool interior_face =
  853|  23.9k|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  23.9k|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 12.3k, False: 11.5k]
  ------------------
  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|  12.3k|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 16, False: 12.3k]
  ------------------
  877|     16|        return -1;  // More faces than expected added to the mesh.
  878|     16|      }
  879|       |
  880|  12.3k|      const CornerIndex corner_a = corner;
  881|  12.3k|      const VertexIndex vert_n =
  882|  12.3k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  12.3k|      const CornerIndex corner_b =
  884|  12.3k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  12.3k|      const VertexIndex vert_x =
  887|  12.3k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  12.3k|      const CornerIndex corner_c =
  889|  12.3k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  12.3k|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 6, False: 12.3k]
  |  Branch (891:33): [True: 37, False: 12.3k]
  |  Branch (891:55): [True: 0, False: 12.3k]
  ------------------
  892|       |        // All matched corners must be different.
  893|     43|        return -1;
  894|     43|      }
  895|  12.3k|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 5, False: 12.3k]
  |  Branch (895:11): [True: 9, False: 12.3k]
  ------------------
  896|  12.3k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 2, False: 12.3k]
  ------------------
  897|  12.3k|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 2, False: 12.3k]
  ------------------
  898|       |        // One of the corners is already opposite to an existing face, which
  899|       |        // should not happen unless the input was tampered with.
  900|      9|        return -1;
  901|      9|      }
  902|       |
  903|  12.3k|      const VertexIndex vert_p =
  904|  12.3k|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  12.3k|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  12.3k|      const CornerIndex new_corner(3 * face.value());
  909|  12.3k|      SetOppositeCorners(new_corner, corner);
  910|  12.3k|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  12.3k|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  12.3k|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  12.3k|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  12.3k|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|  49.2k|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 36.9k, False: 12.3k]
  ------------------
  920|  36.9k|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|  36.9k|      }
  922|       |
  923|  12.3k|      init_face_configurations_.push_back(true);
  924|  12.3k|      init_corners_.push_back(new_corner);
  925|  12.3k|    } else {
  926|       |      // The initial face wasn't interior and the traversal had to start from
  927|       |      // an open boundary. In this case no new face is added, but we need to
  928|       |      // keep record about the first opposite corner to this boundary.
  929|  11.5k|      init_face_configurations_.push_back(false);
  930|  11.5k|      init_corners_.push_back(corner);
  931|  11.5k|    }
  932|  23.9k|  }
  933|  2.97k|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 13, False: 2.95k]
  ------------------
  934|     13|    return -1;  // Unexpected number of decoded faces.
  935|     13|  }
  936|       |
  937|  2.95k|  int num_vertices = corner_table_->num_vertices();
  938|       |  // If any vertex was marked as isolated, we want to remove it from the corner
  939|       |  // table to ensure that all vertices in range <0, num_vertices> are valid.
  940|  6.77k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 6.77k, False: 2.95k]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  6.77k|    VertexIndex src_vert(num_vertices - 1);
  943|  7.90k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 1.12k, False: 6.77k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|  1.12k|      src_vert = VertexIndex(--num_vertices - 1);
  946|  1.12k|    }
  947|  6.77k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 1.12k, False: 5.65k]
  ------------------
  948|  1.12k|      continue;  // No need to swap anything.
  949|  1.12k|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  5.65k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  80.9k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 75.2k, False: 5.65k]
  ------------------
  954|  75.2k|      const CornerIndex cid = vcit.Corner();
  955|  75.2k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 1, False: 75.2k]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      1|        return -1;
  959|      1|      }
  960|  75.2k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  75.2k|    }
  962|  5.65k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  5.65k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  5.65k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  5.65k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  5.65k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  5.65k|    num_vertices--;
  972|  5.65k|  }
  973|  2.95k|  return num_vertices;
  974|  2.95k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  3.48k|    DecoderBuffer *decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  3.48k|  uint32_t num_topology_splits;
  982|  3.48k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  3.48k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.48k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 124, False: 3.36k]
  ------------------
  984|    124|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 1, False: 123]
  ------------------
  985|      1|      return -1;
  986|      1|    }
  987|       |
  988|    124|  } else
  989|  3.36k|#endif
  990|  3.36k|  {
  991|  3.36k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 3.36k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  3.36k|  }
  995|  3.48k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 1.66k, False: 1.81k]
  ------------------
  996|  1.66k|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 6, False: 1.66k]
  ------------------
  997|  1.66k|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|      6|      return -1;
  999|      6|    }
 1000|  1.66k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|  1.66k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  1.66k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 61, False: 1.60k]
  ------------------
 1002|  30.9k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 30.8k, False: 28]
  ------------------
 1003|  30.8k|        TopologySplitEventData event_data;
 1004|  30.8k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 19, False: 30.8k]
  ------------------
 1005|     19|          return -1;
 1006|     19|        }
 1007|  30.8k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 12, False: 30.8k]
  ------------------
 1008|     12|          return -1;
 1009|     12|        }
 1010|  30.8k|        uint8_t edge_data;
 1011|  30.8k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 2, False: 30.8k]
  ------------------
 1012|      2|          return -1;
 1013|      2|        }
 1014|  30.8k|        event_data.source_edge = edge_data & 1;
 1015|  30.8k|        topology_split_data_.push_back(event_data);
 1016|  30.8k|      }
 1017|       |
 1018|     61|    } else
 1019|  1.60k|#endif
 1020|  1.60k|    {
 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.60k|      int last_source_symbol_id = 0;
 1024|  6.39k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 4.80k, False: 1.59k]
  ------------------
 1025|  4.80k|        TopologySplitEventData event_data;
 1026|  4.80k|        uint32_t delta;
 1027|  4.80k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 5, False: 4.79k]
  ------------------
 1028|      5|          return -1;
 1029|      5|        }
 1030|  4.79k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  4.79k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 3, False: 4.79k]
  ------------------
 1032|      3|          return -1;
 1033|      3|        }
 1034|  4.79k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 3, False: 4.79k]
  ------------------
 1035|      3|          return -1;
 1036|      3|        }
 1037|  4.79k|        event_data.split_symbol_id =
 1038|  4.79k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  4.79k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  4.79k|        topology_split_data_.push_back(event_data);
 1041|  4.79k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|  1.59k|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  6.06k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 4.47k, False: 1.59k]
  ------------------
 1045|  4.47k|        uint32_t edge_data;
 1046|  4.47k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  4.47k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 1.00k, False: 3.46k]
  ------------------
 1047|  1.00k|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  3.46k|        } else {
 1049|  3.46k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  3.46k|        }
 1051|  4.47k|        TopologySplitEventData &event_data = topology_split_data_[i];
 1052|  4.47k|        event_data.source_edge = edge_data & 1;
 1053|  4.47k|      }
 1054|  1.59k|      decoder_buffer->EndBitDecoding();
 1055|  1.59k|    }
 1056|  1.66k|  }
 1057|  3.43k|  uint32_t num_hole_events = 0;
 1058|  3.43k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  3.43k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.43k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 85, False: 3.35k]
  ------------------
 1060|     85|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 3, False: 82]
  ------------------
 1061|      3|      return -1;
 1062|      3|    }
 1063|  3.35k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  3.35k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 312, False: 3.03k]
  ------------------
 1064|    312|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 5, False: 307]
  ------------------
 1065|      5|      return -1;
 1066|      5|    }
 1067|    312|  }
 1068|  3.42k|#endif
 1069|  3.42k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 106, False: 3.32k]
  ------------------
 1070|    106|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|    106|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    106|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 58, False: 48]
  ------------------
 1072|   338k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 338k, False: 6]
  ------------------
 1073|   338k|        HoleEventData event_data;
 1074|   338k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 52, False: 338k]
  ------------------
 1075|     52|          return -1;
 1076|     52|        }
 1077|   338k|        hole_event_data_.push_back(event_data);
 1078|   338k|      }
 1079|       |
 1080|     58|    } else
 1081|     48|#endif
 1082|     48|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     48|      int last_symbol_id = 0;
 1085|   542k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 542k, False: 21]
  ------------------
 1086|   542k|        HoleEventData event_data;
 1087|   542k|        uint32_t delta;
 1088|   542k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 27, False: 542k]
  ------------------
 1089|     27|          return -1;
 1090|     27|        }
 1091|   542k|        event_data.symbol_id = delta + last_symbol_id;
 1092|   542k|        last_symbol_id = event_data.symbol_id;
 1093|   542k|        hole_event_data_.push_back(event_data);
 1094|   542k|      }
 1095|     48|    }
 1096|    106|  }
 1097|  3.34k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  3.42k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|  1.27k|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|  1.27k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|  1.27k|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|  5.11k|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 3.83k, False: 1.27k]
  ------------------
 1109|  3.83k|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|  3.83k|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 1.49k, False: 2.34k]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|  3.35k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 1.86k, False: 1.49k]
  ------------------
 1114|  1.86k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|  1.86k|      }
 1116|  1.49k|      continue;
 1117|  1.49k|    }
 1118|       |
 1119|  6.01k|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 3.66k, False: 2.34k]
  ------------------
 1120|  3.66k|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|  3.66k|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 1.95k, False: 1.71k]
  ------------------
 1122|  1.95k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|  1.95k|      }
 1124|  3.66k|    }
 1125|  2.34k|  }
 1126|  1.27k|  return true;
 1127|  1.27k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|   389k|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|   389k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|   389k|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|   389k|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  1.55M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 1.16M, False: 389k]
  ------------------
 1139|  1.16M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  1.16M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 61.7k, False: 1.10M]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   178k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 117k, False: 61.7k]
  ------------------
 1144|   117k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   117k|      }
 1146|  61.7k|      continue;
 1147|  61.7k|    }
 1148|  1.10M|    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.10M|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 553k, False: 553k]
  ------------------
 1151|   553k|      continue;
 1152|   553k|    }
 1153|       |
 1154|  1.59M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 1.04M, False: 553k]
  ------------------
 1155|  1.04M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  1.04M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 883k, False: 156k]
  ------------------
 1157|   883k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|   883k|      }
 1159|  1.04M|    }
 1160|   553k|  }
 1161|   389k|  return true;
 1162|   389k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE21AssignPointsToCornersEi:
 1166|  2.95k|    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|  2.95k|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|  2.95k|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 66, False: 2.89k]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|   171k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 171k, False: 66]
  ------------------
 1176|   171k|      Mesh::Face face;
 1177|   171k|      const CornerIndex start_corner(3 * f.value());
 1178|   686k|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 514k, False: 171k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|   514k|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|   514k|        face[c] = vert_id;
 1182|   514k|      }
 1183|   171k|      decoder_->mesh()->SetFace(f, face);
 1184|   171k|    }
 1185|     66|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|     66|    return true;
 1187|     66|  }
 1188|       |  // Else we need to deduplicate multiple attributes.
 1189|       |
 1190|       |  // Map between point id and an associated corner id. Only one corner for
 1191|       |  // each point is stored. The corners are used to sample the attribute values
 1192|       |  // in the last stage of the deduplication.
 1193|  2.89k|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|  2.89k|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|   260k|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 257k, False: 2.89k]
  ------------------
 1197|   257k|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|   257k|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 23.9k, False: 233k]
  ------------------
 1199|  23.9k|      continue;  // Isolated vertex.
 1200|  23.9k|    }
 1201|   233k|    CornerIndex deduplication_first_corner = c;
 1202|   233k|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 63.2k, False: 170k]
  ------------------
 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|  63.2k|      deduplication_first_corner = c;
 1206|   170k|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|   201k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 182k, False: 19.0k]
  ------------------
 1210|   182k|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 18.7k, False: 163k]
  ------------------
 1211|  18.7k|          continue;  // No seam for this attribute, ignore it.
 1212|  18.7k|        }
 1213|       |        // Else there needs to be at least one seam edge.
 1214|       |
 1215|       |        // At this point, we use identity mapping between corners and point ids.
 1216|   163k|        const VertexIndex vert_id =
 1217|   163k|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|   163k|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|   163k|        bool seam_found = false;
 1220|   221k|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 208k, False: 12.9k]
  ------------------
 1221|   208k|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 1, False: 208k]
  ------------------
 1222|      1|            return false;
 1223|      1|          }
 1224|   208k|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 150k, False: 57.7k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|   150k|            deduplication_first_corner = act_c;
 1227|   150k|            seam_found = true;
 1228|   150k|            break;
 1229|   150k|          }
 1230|  57.7k|          act_c = corner_table_->SwingRight(act_c);
 1231|  57.7k|        }
 1232|   163k|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 150k, False: 12.9k]
  ------------------
 1233|   150k|          break;  // No reason to process other attributes if we found a seam.
 1234|   150k|        }
 1235|   163k|      }
 1236|   170k|    }
 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|   233k|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|   233k|    corner_to_point_map[c.value()] =
 1246|   233k|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|   233k|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|   233k|    CornerIndex prev_c = c;
 1250|   233k|    c = corner_table_->SwingRight(c);
 1251|  1.17M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 1.11M, False: 63.7k]
  |  Branch (1251:40): [True: 946k, False: 169k]
  ------------------
 1252|   946k|      bool attribute_seam = false;
 1253|  1.12M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 1.02M, False: 101k]
  ------------------
 1254|  1.02M|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 845k, False: 177k]
  ------------------
 1255|  1.02M|            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|   845k|          attribute_seam = true;
 1259|   845k|          break;
 1260|   845k|        }
 1261|  1.02M|      }
 1262|   946k|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 845k, False: 101k]
  ------------------
 1263|   845k|        corner_to_point_map[c.value()] =
 1264|   845k|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|   845k|        point_to_corner_map.push_back(c.value());
 1266|   845k|      } else {
 1267|   101k|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|   101k|      }
 1269|   946k|      prev_c = c;
 1270|   946k|      c = corner_table_->SwingRight(c);
 1271|   946k|    }
 1272|   233k|  }
 1273|       |  // Add faces.
 1274|   393k|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 390k, False: 2.89k]
  ------------------
 1275|   390k|    Mesh::Face face;
 1276|  1.56M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 1.17M, False: 390k]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|  1.17M|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|  1.17M|    }
 1280|   390k|    decoder_->mesh()->SetFace(f, face);
 1281|   390k|  }
 1282|  2.89k|  decoder_->point_cloud()->set_num_points(
 1283|  2.89k|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|  2.89k|  return true;
 1285|  2.89k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEEC2Ev:
   48|  2.23k|    : decoder_(nullptr),
   49|  2.23k|      last_symbol_id_(-1),
   50|  2.23k|      last_vert_id_(-1),
   51|  2.23k|      last_face_id_(-1),
   52|  2.23k|      num_new_vertices_(0),
   53|  2.23k|      num_encoded_vertices_(0),
   54|  2.23k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  2.23k|    MeshEdgebreakerDecoder *decoder) {
   59|  2.23k|  decoder_ = decoder;
   60|  2.23k|  return true;
   61|  2.23k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE23GetAttributeCornerTableEi:
   66|  1.89k|    int att_id) const {
   67|  2.96k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 2.29k, False: 667]
  ------------------
   68|  2.29k|    const int decoder_id = attribute_data_[i].decoder_id;
   69|  2.29k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 1.06k, False: 1.23k]
  |  Branch (69:27): [True: 0, False: 1.23k]
  ------------------
   70|  1.06k|      continue;
   71|  1.06k|    }
   72|  1.23k|    const AttributesDecoderInterface *const dec =
   73|  1.23k|        decoder_->attributes_decoder(decoder_id);
   74|  3.02k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 3.02k, False: 2]
  ------------------
   75|  3.02k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 1.22k, False: 1.79k]
  ------------------
   76|  1.22k|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 940, False: 288]
  ------------------
   77|    940|          return &attribute_data_[i].connectivity_data;
   78|    940|        }
   79|    288|        return nullptr;
   80|  1.22k|      }
   81|  3.02k|    }
   82|  1.23k|  }
   83|    667|  return nullptr;
   84|  1.89k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE24GetAttributeEncodingDataEi:
   89|  1.89k|    int att_id) const {
   90|  2.96k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 2.29k, False: 667]
  ------------------
   91|  2.29k|    const int decoder_id = attribute_data_[i].decoder_id;
   92|  2.29k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 1.06k, False: 1.23k]
  |  Branch (92:27): [True: 0, False: 1.23k]
  ------------------
   93|  1.06k|      continue;
   94|  1.06k|    }
   95|  1.23k|    const AttributesDecoderInterface *const dec =
   96|  1.23k|        decoder_->attributes_decoder(decoder_id);
   97|  3.02k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 3.02k, False: 2]
  ------------------
   98|  3.02k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 1.22k, False: 1.79k]
  ------------------
   99|  1.22k|        return &attribute_data_[i].encoding_data;
  100|  1.22k|      }
  101|  3.02k|    }
  102|  1.23k|  }
  103|    667|  return &pos_encoding_data_;
  104|  1.89k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE23CreateAttributesDecoderEi:
  130|  1.52k|    int32_t att_decoder_id) {
  131|  1.52k|  int8_t att_data_id;
  132|  1.52k|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 36, False: 1.49k]
  ------------------
  133|     36|    return false;
  134|     36|  }
  135|  1.49k|  uint8_t decoder_type;
  136|  1.49k|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 37, False: 1.45k]
  ------------------
  137|     37|    return false;
  138|     37|  }
  139|       |
  140|  1.45k|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 981, False: 475]
  ------------------
  141|    981|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 46, False: 935]
  ------------------
  142|     46|      return false;  // Unexpected attribute data.
  143|     46|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|    935|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 4, False: 931]
  ------------------
  148|      4|      return false;
  149|      4|    }
  150|       |
  151|    931|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|    931|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    475|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 2, False: 473]
  ------------------
  155|      2|      return false;  // Some other decoder is already using the data. Error.
  156|      2|    }
  157|    473|    pos_data_decoder_id_ = att_decoder_id;
  158|    473|  }
  159|       |
  160|  1.40k|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|  1.40k|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  1.40k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 1.40k, False: 0]
  ------------------
  162|  1.40k|    uint8_t traversal_method_encoded;
  163|  1.40k|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 10, False: 1.39k]
  ------------------
  164|     10|      return false;
  165|     10|    }
  166|       |    // Check that decoded traversal method is valid.
  167|  1.39k|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 24, False: 1.37k]
  ------------------
  168|     24|      return false;
  169|     24|    }
  170|  1.37k|    traversal_method =
  171|  1.37k|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|  1.37k|  }
  173|       |
  174|  1.37k|  const Mesh *mesh = decoder_->mesh();
  175|  1.37k|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|  1.37k|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 680, False: 690]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|    680|    MeshAttributeIndicesEncodingData *encoding_data = nullptr;
  181|    680|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 453, False: 227]
  ------------------
  182|    453|      encoding_data = &pos_encoding_data_;
  183|    453|    } else {
  184|    227|      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|    227|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|    227|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|    680|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 277, False: 403]
  ------------------
  191|    277|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|    277|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|    277|          AttTraverser;
  194|    277|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|    403|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 403, False: 0]
  ------------------
  196|    403|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|    403|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|    403|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|    403|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|    690|  } else {
  203|    690|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 5, False: 685]
  ------------------
  204|      5|      return false;  // Unsupported method.
  205|      5|    }
  206|    685|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 4, False: 681]
  ------------------
  207|      4|      return false;  // Attribute data must be specified.
  208|      4|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|    681|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|    681|        AttObserver;
  214|    681|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|    681|        AttTraverser;
  216|       |
  217|    681|    MeshAttributeIndicesEncodingData *const encoding_data =
  218|    681|        &attribute_data_[att_data_id].encoding_data;
  219|    681|    const MeshAttributeCornerTable *const corner_table =
  220|    681|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|    681|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|    681|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|    681|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|    681|                             encoding_data);
  227|       |
  228|    681|    AttTraverser att_traverser;
  229|    681|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|    681|    traversal_sequencer->SetTraverser(att_traverser);
  232|    681|    sequencer = std::move(traversal_sequencer);
  233|    681|  }
  234|       |
  235|  1.36k|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 1.36k]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|  1.36k|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|  1.36k|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|  1.36k|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|  1.36k|                                        std::move(att_controller));
  244|  1.36k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18DecodeConnectivityEv:
  247|  2.23k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  2.23k|  num_new_vertices_ = 0;
  249|  2.23k|  new_to_parent_vertex_map_.clear();
  250|  2.23k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  2.23k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.23k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 590, False: 1.64k]
  ------------------
  252|    590|    uint32_t num_new_verts;
  253|    590|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    590|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 234, False: 356]
  ------------------
  254|    234|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 234]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    356|    } else {
  258|    356|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 356]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    356|    }
  262|    590|    num_new_vertices_ = num_new_verts;
  263|    590|  }
  264|  2.23k|#endif
  265|       |
  266|  2.23k|  uint32_t num_encoded_vertices;
  267|  2.23k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  2.23k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.23k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 234, False: 1.99k]
  ------------------
  269|    234|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 234]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    234|  } else
  274|  1.99k|#endif
  275|  1.99k|  {
  276|  1.99k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 1.99k]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|  1.99k|  }
  280|  2.23k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  2.23k|  uint32_t num_faces;
  283|  2.23k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  2.23k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.23k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 234, False: 1.99k]
  ------------------
  285|    234|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 234]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    234|  } else
  290|  1.99k|#endif
  291|  1.99k|  {
  292|  1.99k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 1.99k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  1.99k|  }
  296|  2.23k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 3, False: 2.23k]
  ------------------
  297|      3|    return false;  // Draco cannot handle this many faces.
  298|      3|  }
  299|       |
  300|  2.23k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 2, False: 2.22k]
  ------------------
  301|      2|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      2|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|  2.22k|  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.22k|  const uint64_t num_encoded_vertices_64 =
  311|  2.22k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  2.22k|  const uint64_t max_num_vertex_edges =
  313|  2.22k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  2.22k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 1, False: 2.22k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      1|    return false;
  317|      1|  }
  318|       |
  319|  2.22k|  uint8_t num_attribute_data;
  320|  2.22k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 2.22k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  2.22k|  uint32_t num_encoded_symbols;
  325|  2.22k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  2.22k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.22k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 228, False: 1.99k]
  ------------------
  327|    228|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 228]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    228|  } else
  332|  1.99k|#endif
  333|  1.99k|  {
  334|  1.99k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 1.99k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  1.99k|  }
  338|       |
  339|  2.22k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 5, False: 2.22k]
  ------------------
  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.22k|  const uint32_t max_encoded_faces =
  346|  2.22k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  2.22k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 18, False: 2.20k]
  ------------------
  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|     18|    return false;
  352|     18|  }
  353|       |
  354|  2.20k|  uint32_t num_encoded_split_symbols;
  355|  2.20k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  2.20k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.20k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 212, False: 1.99k]
  ------------------
  357|    212|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 212]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    212|  } else
  362|  1.99k|#endif
  363|  1.99k|  {
  364|  1.99k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 1.99k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  1.99k|  }
  368|       |
  369|  2.20k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 9, False: 2.19k]
  ------------------
  370|      9|    return false;  // Split symbols are a sub-set of all symbols.
  371|      9|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  2.19k|  vertex_traversal_length_.clear();
  375|  2.19k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  2.19k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 2.19k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  2.19k|  processed_corner_ids_.clear();
  380|  2.19k|  processed_corner_ids_.reserve(num_faces);
  381|  2.19k|  processed_connectivity_corners_.clear();
  382|  2.19k|  processed_connectivity_corners_.reserve(num_faces);
  383|  2.19k|  topology_split_data_.clear();
  384|  2.19k|  hole_event_data_.clear();
  385|  2.19k|  init_face_configurations_.clear();
  386|  2.19k|  init_corners_.clear();
  387|       |
  388|  2.19k|  last_symbol_id_ = -1;
  389|  2.19k|  last_face_id_ = -1;
  390|  2.19k|  last_vert_id_ = -1;
  391|       |
  392|  2.19k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  2.19k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  2.19k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 1, False: 2.19k]
  ------------------
  397|  2.19k|          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.19k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  2.19k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  2.19k|  int32_t topology_split_decoded_bytes = -1;
  410|  2.19k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.19k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 560, False: 1.63k]
  ------------------
  411|    560|    uint32_t encoded_connectivity_size;
  412|    560|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    560|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 206, False: 354]
  ------------------
  413|    206|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 2, False: 204]
  ------------------
  414|      2|        return false;
  415|      2|      }
  416|    354|    } else {
  417|    354|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 354]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|    354|    }
  421|    558|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 1, False: 557]
  ------------------
  422|    557|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 20, False: 537]
  ------------------
  423|     21|      return false;
  424|     21|    }
  425|    537|    DecoderBuffer event_buffer;
  426|    537|    event_buffer.Init(
  427|    537|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    537|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    537|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    537|    topology_split_decoded_bytes =
  432|    537|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    537|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 202, False: 335]
  ------------------
  434|    202|      return false;
  435|    202|    }
  436|       |
  437|    537|  } else
  438|  1.63k|#endif
  439|  1.63k|  {
  440|  1.63k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 28, False: 1.60k]
  ------------------
  441|     28|      return false;
  442|     28|    }
  443|  1.63k|  }
  444|       |
  445|  1.94k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  1.94k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  1.94k|                                           num_encoded_split_symbols);
  449|  1.94k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  1.94k|  DecoderBuffer traversal_end_buffer;
  452|  1.94k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 140, False: 1.80k]
  ------------------
  453|    140|    return false;
  454|    140|  }
  455|       |
  456|  1.80k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  1.80k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 222, False: 1.57k]
  ------------------
  458|    222|    return false;
  459|    222|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|  1.57k|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|  1.57k|                           traversal_end_buffer.remaining_size(),
  464|  1.57k|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|  1.57k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|  1.57k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  1.57k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 255, False: 1.32k]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|    255|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|    255|  }
  471|  1.57k|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|  1.57k|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 1.39k, False: 188]
  ------------------
  475|  1.39k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|  1.39k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  1.39k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 188, False: 1.20k]
  ------------------
  477|   414k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 414k, False: 188]
  ------------------
  478|   414k|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 414k]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|   414k|      }
  482|       |
  483|    188|    } else
  484|  1.20k|#endif
  485|  1.20k|    {
  486|  9.45M|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 9.45M, False: 1.20k]
  ------------------
  487|  9.45M|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 9.45M]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|  9.45M|      }
  491|  1.20k|    }
  492|  1.39k|  }
  493|  1.57k|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  3.52k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 1.95k, False: 1.57k]
  ------------------
  498|  1.95k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  15.2M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 15.2M, False: 1.95k]
  ------------------
  501|  15.2M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  15.2M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  1.95k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 1.95k]
  ------------------
  505|  1.95k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  1.95k|  }
  509|       |
  510|  1.57k|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  3.52k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 1.95k, False: 1.57k]
  ------------------
  512|       |    // For non-position attributes, preallocate the vertex to value mapping
  513|       |    // using the maximum number of vertices from the base corner table and the
  514|       |    // attribute corner table (since the attribute decoder may use either of
  515|       |    // it).
  516|  1.95k|    int32_t att_connectivity_verts =
  517|  1.95k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  1.95k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 409, False: 1.54k]
  ------------------
  519|    409|      att_connectivity_verts = corner_table_->num_vertices();
  520|    409|    }
  521|  1.95k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  1.95k|  }
  523|  1.57k|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 11, False: 1.56k]
  ------------------
  524|     11|    return false;
  525|     11|  }
  526|  1.56k|  return true;
  527|  1.57k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE19OnAttributesDecodedEv:
  530|    332|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|    332|  return true;
  532|    332|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18DecodeConnectivityEi:
  536|  1.80k|    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.80k|  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.80k|  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.80k|  std::vector<VertexIndex> invalid_vertices;
  558|  1.80k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  1.80k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  1.80k|  int num_faces = 0;
  562|  81.4M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 81.4M, False: 1.67k]
  ------------------
  563|  81.4M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  81.4M|    bool check_topology_split = false;
  566|  81.4M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  81.4M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 39.8M, False: 41.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|  39.8M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 0, False: 39.8M]
  ------------------
  588|      0|        return -1;
  589|      0|      }
  590|       |
  591|  39.8M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  39.8M|      const VertexIndex vertex_x =
  593|  39.8M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  39.8M|      const CornerIndex corner_b =
  595|  39.8M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  39.8M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 29, False: 39.8M]
  ------------------
  598|       |        // All matched corners must be different.
  599|     29|        return -1;
  600|     29|      }
  601|  39.8M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 39.8M]
  |  Branch (601:11): [True: 0, False: 39.8M]
  ------------------
  602|  39.8M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 39.8M]
  ------------------
  603|       |        // One of the corners is already opposite to an existing face, which
  604|       |        // should not happen unless the input was tampered with.
  605|      0|        return -1;
  606|      0|      }
  607|       |
  608|       |      // New tip corner.
  609|  39.8M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  39.8M|      SetOppositeCorners(corner_a, corner + 1);
  612|  39.8M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  39.8M|      const VertexIndex vert_a_prev =
  616|  39.8M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  39.8M|      const VertexIndex vert_b_next =
  618|  39.8M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  39.8M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 39.8M]
  |  Branch (619:38): [True: 0, False: 39.8M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  39.8M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  39.8M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  39.8M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  39.8M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  39.8M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  39.8M|      active_corner_stack.back() = corner;
  631|  41.5M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 41.4M, False: 82.2k]
  |  Branch (631:40): [True: 16.1k, False: 66.1k]
  ------------------
  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|  41.4M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 0, False: 41.4M]
  ------------------
  647|      0|        return -1;
  648|      0|      }
  649|  41.4M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  41.4M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 41.4M]
  ------------------
  651|       |        // Active corner is already opposite to an existing face, which should
  652|       |        // not happen unless the input was tampered with.
  653|      0|        return -1;
  654|      0|      }
  655|       |
  656|       |      // First corner on the new face is either corner "l" or "r".
  657|  41.4M|      const CornerIndex corner(3 * face.value());
  658|  41.4M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  41.4M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 41.4M, False: 16.1k]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  41.4M|        opp_corner = corner + 2;
  662|  41.4M|        corner_l = corner + 1;
  663|  41.4M|        corner_r = corner;
  664|  41.4M|      } else {
  665|       |        // "l" is the new first corner.
  666|  16.1k|        opp_corner = corner + 1;
  667|  16.1k|        corner_l = corner;
  668|  16.1k|        corner_r = corner + 2;
  669|  16.1k|      }
  670|  41.4M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  41.4M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  41.4M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 12, False: 41.4M]
  ------------------
  675|     12|        return -1;  // Unexpected number of decoded vertices.
  676|     12|      }
  677|       |
  678|  41.4M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  41.4M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  41.4M|      const VertexIndex vertex_r =
  682|  41.4M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  41.4M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  41.4M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  41.4M|      corner_table_->MapCornerToVertex(
  688|  41.4M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  41.4M|      active_corner_stack.back() = corner;
  690|  41.4M|      check_topology_split = true;
  691|  41.4M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 15.3k, False: 50.8k]
  ------------------
  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|  15.3k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 0, False: 15.3k]
  ------------------
  703|      0|        return -1;
  704|      0|      }
  705|  15.3k|      const CornerIndex corner_b = active_corner_stack.back();
  706|  15.3k|      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|  15.3k|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  15.3k|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 40, False: 15.2k]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|     40|        active_corner_stack.push_back(it->second);
  714|     40|      }
  715|  15.3k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 17, False: 15.3k]
  ------------------
  716|     17|        return -1;
  717|     17|      }
  718|  15.3k|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  15.3k|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 15.3k]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  15.3k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 6, False: 15.3k]
  |  Branch (724:11): [True: 6, False: 15.3k]
  ------------------
  725|  15.3k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 15.3k]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|      6|        return -1;
  729|      6|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  15.3k|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  15.3k|      SetOppositeCorners(corner_a, corner + 2);
  735|  15.3k|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  15.3k|      const VertexIndex vertex_p =
  739|  15.3k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  15.3k|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  15.3k|      corner_table_->MapCornerToVertex(
  742|  15.3k|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  15.3k|      const VertexIndex vert_b_prev =
  744|  15.3k|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  15.3k|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  15.3k|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  15.3k|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  15.3k|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  15.3k|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  15.3k|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  15.3k|                                       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|  15.3k|      const CornerIndex first_corner = corner_n;
  757|  72.8k|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 57.5k, False: 15.3k]
  ------------------
  758|  57.5k|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|  57.5k|        corner_n = corner_table_->SwingLeft(corner_n);
  760|  57.5k|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 5, False: 57.5k]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      5|          return -1;
  764|      5|        }
  765|  57.5k|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  15.3k|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  15.3k|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 4.72k, False: 10.5k]
  ------------------
  770|  4.72k|        invalid_vertices.push_back(vertex_n);
  771|  4.72k|      }
  772|  15.3k|      active_corner_stack.back() = corner;
  773|  50.8k|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 50.8k, False: 0]
  ------------------
  774|  50.8k|      const CornerIndex corner(3 * face.value());
  775|  50.8k|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  50.8k|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  50.8k|      corner_table_->MapCornerToVertex(corner + 1,
  779|  50.8k|                                       corner_table_->AddNewVertex());
  780|  50.8k|      corner_table_->MapCornerToVertex(corner + 2,
  781|  50.8k|                                       corner_table_->AddNewVertex());
  782|       |
  783|  50.8k|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 3, False: 50.8k]
  ------------------
  784|      3|        return -1;  // Unexpected number of decoded vertices.
  785|      3|      }
  786|       |
  787|  50.8k|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  50.8k|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  50.8k|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  50.8k|      active_corner_stack.push_back(corner);
  792|  50.8k|      check_topology_split = true;
  793|  50.8k|    } 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|  81.4M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  81.4M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 41.5M, False: 39.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|  41.5M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  41.5M|      EdgeFaceName split_edge;
  812|  41.5M|      int encoder_split_symbol_id;
  813|  41.5M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 1.96k, False: 41.5M]
  ------------------
  814|  41.5M|                             &encoder_split_symbol_id)) {
  815|  1.96k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 50, False: 1.91k]
  ------------------
  816|     50|          return -1;  // Wrong split symbol id.
  817|     50|        }
  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.91k|        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.91k|        CornerIndex new_active_corner;
  831|  1.91k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 640, False: 1.27k]
  ------------------
  832|    640|          new_active_corner = corner_table_->Next(act_top_corner);
  833|  1.27k|        } else {
  834|  1.27k|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|  1.27k|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  1.91k|        const int decoder_split_symbol_id =
  839|  1.91k|            num_symbols - encoder_split_symbol_id - 1;
  840|  1.91k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  1.91k|            new_active_corner;
  842|  1.91k|      }
  843|  41.5M|    }
  844|  81.4M|  }
  845|  1.67k|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 1.67k]
  ------------------
  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|  33.8k|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 32.2k, False: 1.63k]
  ------------------
  850|  32.2k|    const CornerIndex corner = active_corner_stack.back();
  851|  32.2k|    active_corner_stack.pop_back();
  852|  32.2k|    const bool interior_face =
  853|  32.2k|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  32.2k|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 22.7k, False: 9.44k]
  ------------------
  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|  22.7k|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 20, False: 22.7k]
  ------------------
  877|     20|        return -1;  // More faces than expected added to the mesh.
  878|     20|      }
  879|       |
  880|  22.7k|      const CornerIndex corner_a = corner;
  881|  22.7k|      const VertexIndex vert_n =
  882|  22.7k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  22.7k|      const CornerIndex corner_b =
  884|  22.7k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  22.7k|      const VertexIndex vert_x =
  887|  22.7k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  22.7k|      const CornerIndex corner_c =
  889|  22.7k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  22.7k|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 2, False: 22.7k]
  |  Branch (891:33): [True: 14, False: 22.7k]
  |  Branch (891:55): [True: 0, False: 22.7k]
  ------------------
  892|       |        // All matched corners must be different.
  893|     16|        return -1;
  894|     16|      }
  895|  22.7k|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 5, False: 22.7k]
  |  Branch (895:11): [True: 5, False: 22.7k]
  ------------------
  896|  22.7k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 0, False: 22.7k]
  ------------------
  897|  22.7k|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 0, False: 22.7k]
  ------------------
  898|       |        // One of the corners is already opposite to an existing face, which
  899|       |        // should not happen unless the input was tampered with.
  900|      5|        return -1;
  901|      5|      }
  902|       |
  903|  22.7k|      const VertexIndex vert_p =
  904|  22.7k|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  22.7k|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  22.7k|      const CornerIndex new_corner(3 * face.value());
  909|  22.7k|      SetOppositeCorners(new_corner, corner);
  910|  22.7k|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  22.7k|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  22.7k|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  22.7k|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  22.7k|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|  90.9k|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 68.1k, False: 22.7k]
  ------------------
  920|  68.1k|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|  68.1k|      }
  922|       |
  923|  22.7k|      init_face_configurations_.push_back(true);
  924|  22.7k|      init_corners_.push_back(new_corner);
  925|  22.7k|    } 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.44k|      init_face_configurations_.push_back(false);
  930|  9.44k|      init_corners_.push_back(corner);
  931|  9.44k|    }
  932|  32.2k|  }
  933|  1.63k|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 56, False: 1.58k]
  ------------------
  934|     56|    return -1;  // Unexpected number of decoded faces.
  935|     56|  }
  936|       |
  937|  1.58k|  int num_vertices = corner_table_->num_vertices();
  938|       |  // If any vertex was marked as isolated, we want to remove it from the corner
  939|       |  // table to ensure that all vertices in range <0, num_vertices> are valid.
  940|  1.93k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 1.93k, False: 1.57k]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  1.93k|    VertexIndex src_vert(num_vertices - 1);
  943|  2.14k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 205, False: 1.93k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|    205|      src_vert = VertexIndex(--num_vertices - 1);
  946|    205|    }
  947|  1.93k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 205, False: 1.73k]
  ------------------
  948|    205|      continue;  // No need to swap anything.
  949|    205|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  1.73k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  8.72k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 6.99k, False: 1.72k]
  ------------------
  954|  6.99k|      const CornerIndex cid = vcit.Corner();
  955|  6.99k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 3, False: 6.99k]
  ------------------
  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.99k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  6.99k|    }
  962|  1.72k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  1.72k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  1.72k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  1.72k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  1.72k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  1.72k|    num_vertices--;
  972|  1.72k|  }
  973|  1.57k|  return num_vertices;
  974|  1.58k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  2.17k|    DecoderBuffer *decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  2.17k|  uint32_t num_topology_splits;
  982|  2.17k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  2.17k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.17k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 183, False: 1.98k]
  ------------------
  984|    183|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 1, False: 182]
  ------------------
  985|      1|      return -1;
  986|      1|    }
  987|       |
  988|    183|  } else
  989|  1.98k|#endif
  990|  1.98k|  {
  991|  1.98k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 1.98k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  1.98k|  }
  995|  2.17k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 818, False: 1.35k]
  ------------------
  996|    818|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 42, False: 776]
  ------------------
  997|    818|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|     42|      return -1;
  999|     42|    }
 1000|    776|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|    776|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    776|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 99, False: 677]
  ------------------
 1002|   244k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 243k, False: 52]
  ------------------
 1003|   243k|        TopologySplitEventData event_data;
 1004|   243k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 27, False: 243k]
  ------------------
 1005|     27|          return -1;
 1006|     27|        }
 1007|   243k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 12, False: 243k]
  ------------------
 1008|     12|          return -1;
 1009|     12|        }
 1010|   243k|        uint8_t edge_data;
 1011|   243k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 8, False: 243k]
  ------------------
 1012|      8|          return -1;
 1013|      8|        }
 1014|   243k|        event_data.source_edge = edge_data & 1;
 1015|   243k|        topology_split_data_.push_back(event_data);
 1016|   243k|      }
 1017|       |
 1018|     99|    } else
 1019|    677|#endif
 1020|    677|    {
 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|    677|      int last_source_symbol_id = 0;
 1024|  19.2k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 18.6k, False: 656]
  ------------------
 1025|  18.6k|        TopologySplitEventData event_data;
 1026|  18.6k|        uint32_t delta;
 1027|  18.6k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 6, False: 18.6k]
  ------------------
 1028|      6|          return -1;
 1029|      6|        }
 1030|  18.6k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  18.6k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 5, False: 18.6k]
  ------------------
 1032|      5|          return -1;
 1033|      5|        }
 1034|  18.6k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 10, False: 18.6k]
  ------------------
 1035|     10|          return -1;
 1036|     10|        }
 1037|  18.6k|        event_data.split_symbol_id =
 1038|  18.6k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  18.6k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  18.6k|        topology_split_data_.push_back(event_data);
 1041|  18.6k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|    656|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  18.7k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 18.0k, False: 656]
  ------------------
 1045|  18.0k|        uint32_t edge_data;
 1046|  18.0k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  18.0k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 2.45k, False: 15.6k]
  ------------------
 1047|  2.45k|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  15.6k|        } else {
 1049|  15.6k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  15.6k|        }
 1051|  18.0k|        TopologySplitEventData &event_data = topology_split_data_[i];
 1052|  18.0k|        event_data.source_edge = edge_data & 1;
 1053|  18.0k|      }
 1054|    656|      decoder_buffer->EndBitDecoding();
 1055|    656|    }
 1056|    776|  }
 1057|  2.06k|  uint32_t num_hole_events = 0;
 1058|  2.06k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  2.06k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.06k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 108, False: 1.95k]
  ------------------
 1060|    108|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 4, False: 104]
  ------------------
 1061|      4|      return -1;
 1062|      4|    }
 1063|  1.95k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  1.95k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 251, False: 1.70k]
  ------------------
 1064|    251|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 8, False: 243]
  ------------------
 1065|      8|      return -1;
 1066|      8|    }
 1067|    251|  }
 1068|  2.04k|#endif
 1069|  2.04k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 127, False: 1.92k]
  ------------------
 1070|    127|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|    127|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    127|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 89, False: 38]
  ------------------
 1072|   762k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 762k, False: 6]
  ------------------
 1073|   762k|        HoleEventData event_data;
 1074|   762k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 83, False: 762k]
  ------------------
 1075|     83|          return -1;
 1076|     83|        }
 1077|   762k|        hole_event_data_.push_back(event_data);
 1078|   762k|      }
 1079|       |
 1080|     89|    } else
 1081|     38|#endif
 1082|     38|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     38|      int last_symbol_id = 0;
 1085|  24.3k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 24.3k, False: 14]
  ------------------
 1086|  24.3k|        HoleEventData event_data;
 1087|  24.3k|        uint32_t delta;
 1088|  24.3k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 24, False: 24.3k]
  ------------------
 1089|     24|          return -1;
 1090|     24|        }
 1091|  24.3k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  24.3k|        last_symbol_id = event_data.symbol_id;
 1093|  24.3k|        hole_event_data_.push_back(event_data);
 1094|  24.3k|      }
 1095|     38|    }
 1096|    127|  }
 1097|  1.94k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  2.04k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|   414k|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|   414k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|   414k|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|  1.65M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 1.24M, False: 414k]
  ------------------
 1109|  1.24M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|  1.24M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 5.77k, False: 1.23M]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|  11.8k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 6.05k, False: 5.77k]
  ------------------
 1114|  6.05k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|  6.05k|      }
 1116|  5.77k|      continue;
 1117|  5.77k|    }
 1118|       |
 1119|  2.47M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 1.24M, False: 1.23M]
  ------------------
 1120|  1.24M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|  1.24M|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 420k, False: 820k]
  ------------------
 1122|   420k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|   420k|      }
 1124|  1.24M|    }
 1125|  1.23M|  }
 1126|   414k|  return true;
 1127|   414k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|  9.45M|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|  9.45M|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|  9.45M|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|  9.45M|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  37.8M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 28.3M, False: 9.45M]
  ------------------
 1139|  28.3M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  28.3M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 116k, False: 28.2M]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   281k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 165k, False: 116k]
  ------------------
 1144|   165k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   165k|      }
 1146|   116k|      continue;
 1147|   116k|    }
 1148|  28.2M|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|  28.2M|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 14.1M, False: 14.1M]
  ------------------
 1151|  14.1M|      continue;
 1152|  14.1M|    }
 1153|       |
 1154|  31.7M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 17.6M, False: 14.1M]
  ------------------
 1155|  17.6M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  17.6M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 14.6M, False: 3.00M]
  ------------------
 1157|  14.6M|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|  14.6M|      }
 1159|  17.6M|    }
 1160|  14.1M|  }
 1161|  9.45M|  return true;
 1162|  9.45M|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE21AssignPointsToCornersEi:
 1166|  1.57k|    int num_connectivity_verts) {
 1167|       |  // Map between the existing and deduplicated point ids.
 1168|       |  // Note that at this point we have one point id for each corner of the
 1169|       |  // mesh so there is corner_table_->num_corners() point ids.
 1170|  1.57k|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|  1.57k|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 188, False: 1.39k]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|  1.91M|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 1.91M, False: 188]
  ------------------
 1176|  1.91M|      Mesh::Face face;
 1177|  1.91M|      const CornerIndex start_corner(3 * f.value());
 1178|  7.67M|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 5.75M, False: 1.91M]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|  5.75M|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|  5.75M|        face[c] = vert_id;
 1182|  5.75M|      }
 1183|  1.91M|      decoder_->mesh()->SetFace(f, face);
 1184|  1.91M|    }
 1185|    188|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|    188|    return true;
 1187|    188|  }
 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.39k|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|  1.39k|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|  4.97M|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 4.97M, False: 1.38k]
  ------------------
 1197|  4.97M|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|  4.97M|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 2.72k, False: 4.97M]
  ------------------
 1199|  2.72k|      continue;  // Isolated vertex.
 1200|  2.72k|    }
 1201|  4.97M|    CornerIndex deduplication_first_corner = c;
 1202|  4.97M|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 121k, False: 4.85M]
  ------------------
 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|   121k|      deduplication_first_corner = c;
 1206|  4.85M|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|  5.50M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 4.92M, False: 583k]
  ------------------
 1210|  4.92M|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 637k, False: 4.28M]
  ------------------
 1211|   637k|          continue;  // No seam for this attribute, ignore it.
 1212|   637k|        }
 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.28M|        const VertexIndex vert_id =
 1217|  4.28M|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|  4.28M|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|  4.28M|        bool seam_found = false;
 1220|  4.40M|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 4.38M, False: 14.4k]
  ------------------
 1221|  4.38M|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 11, False: 4.38M]
  ------------------
 1222|     11|            return false;
 1223|     11|          }
 1224|  4.38M|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 4.26M, False: 118k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|  4.26M|            deduplication_first_corner = act_c;
 1227|  4.26M|            seam_found = true;
 1228|  4.26M|            break;
 1229|  4.26M|          }
 1230|   118k|          act_c = corner_table_->SwingRight(act_c);
 1231|   118k|        }
 1232|  4.28M|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 4.26M, False: 14.4k]
  ------------------
 1233|  4.26M|          break;  // No reason to process other attributes if we found a seam.
 1234|  4.26M|        }
 1235|  4.28M|      }
 1236|  4.85M|    }
 1237|       |
 1238|       |    // Do a deduplication pass over the corners on the processed vertex.
 1239|       |    // At this point each corner corresponds to one point id and our goal is to
 1240|       |    // merge similar points into a single point id.
 1241|       |    // We do a single pass in a clockwise direction over the corners and we add
 1242|       |    // a new point id whenever one of the attributes change.
 1243|  4.97M|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|  4.97M|    corner_to_point_map[c.value()] =
 1246|  4.97M|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|  4.97M|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|  4.97M|    CornerIndex prev_c = c;
 1250|  4.97M|    c = corner_table_->SwingRight(c);
 1251|  29.4M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 29.3M, False: 122k]
  |  Branch (1251:40): [True: 24.4M, False: 4.85M]
  ------------------
 1252|  24.4M|      bool attribute_seam = false;
 1253|  27.8M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 24.8M, False: 3.01M]
  ------------------
 1254|  24.8M|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 21.4M, False: 3.36M]
  ------------------
 1255|  24.8M|            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|  21.4M|          attribute_seam = true;
 1259|  21.4M|          break;
 1260|  21.4M|        }
 1261|  24.8M|      }
 1262|  24.4M|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 21.4M, False: 3.01M]
  ------------------
 1263|  21.4M|        corner_to_point_map[c.value()] =
 1264|  21.4M|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|  21.4M|        point_to_corner_map.push_back(c.value());
 1266|  21.4M|      } else {
 1267|  3.01M|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|  3.01M|      }
 1269|  24.4M|      prev_c = c;
 1270|  24.4M|      c = corner_table_->SwingRight(c);
 1271|  24.4M|    }
 1272|  4.97M|  }
 1273|       |  // Add faces.
 1274|  9.81M|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 9.81M, False: 1.38k]
  ------------------
 1275|  9.81M|    Mesh::Face face;
 1276|  39.2M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 29.4M, False: 9.81M]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|  29.4M|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|  29.4M|    }
 1280|  9.81M|    decoder_->mesh()->SetFace(f, face);
 1281|  9.81M|  }
 1282|  1.38k|  decoder_->point_cloud()->set_num_points(
 1283|  1.38k|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|  1.38k|  return true;
 1285|  1.39k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEEC2Ev:
   48|  2.85k|    : decoder_(nullptr),
   49|  2.85k|      last_symbol_id_(-1),
   50|  2.85k|      last_vert_id_(-1),
   51|  2.85k|      last_face_id_(-1),
   52|  2.85k|      num_new_vertices_(0),
   53|  2.85k|      num_encoded_vertices_(0),
   54|  2.85k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  2.85k|    MeshEdgebreakerDecoder *decoder) {
   59|  2.85k|  decoder_ = decoder;
   60|  2.85k|  return true;
   61|  2.85k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE23GetAttributeCornerTableEi:
   66|    255|    int att_id) const {
   67|    364|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 160, False: 204]
  ------------------
   68|    160|    const int decoder_id = attribute_data_[i].decoder_id;
   69|    160|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 96, False: 64]
  |  Branch (69:27): [True: 0, False: 64]
  ------------------
   70|     96|      continue;
   71|     96|    }
   72|     64|    const AttributesDecoderInterface *const dec =
   73|     64|        decoder_->attributes_decoder(decoder_id);
   74|    133|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 120, False: 13]
  ------------------
   75|    120|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 51, False: 69]
  ------------------
   76|     51|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 33, False: 18]
  ------------------
   77|     33|          return &attribute_data_[i].connectivity_data;
   78|     33|        }
   79|     18|        return nullptr;
   80|     51|      }
   81|    120|    }
   82|     64|  }
   83|    204|  return nullptr;
   84|    255|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE24GetAttributeEncodingDataEi:
   89|    255|    int att_id) const {
   90|    364|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 160, False: 204]
  ------------------
   91|    160|    const int decoder_id = attribute_data_[i].decoder_id;
   92|    160|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 96, False: 64]
  |  Branch (92:27): [True: 0, False: 64]
  ------------------
   93|     96|      continue;
   94|     96|    }
   95|     64|    const AttributesDecoderInterface *const dec =
   96|     64|        decoder_->attributes_decoder(decoder_id);
   97|    133|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 120, False: 13]
  ------------------
   98|    120|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 51, False: 69]
  ------------------
   99|     51|        return &attribute_data_[i].encoding_data;
  100|     51|      }
  101|    120|    }
  102|     64|  }
  103|    204|  return &pos_encoding_data_;
  104|    255|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE23CreateAttributesDecoderEi:
  130|    358|    int32_t att_decoder_id) {
  131|    358|  int8_t att_data_id;
  132|    358|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 19, False: 339]
  ------------------
  133|     19|    return false;
  134|     19|  }
  135|    339|  uint8_t decoder_type;
  136|    339|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 8, False: 331]
  ------------------
  137|      8|    return false;
  138|      8|  }
  139|       |
  140|    331|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 176, False: 155]
  ------------------
  141|    176|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 32, False: 144]
  ------------------
  142|     32|      return false;  // Unexpected attribute data.
  143|     32|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|    144|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 8, False: 136]
  ------------------
  148|      8|      return false;
  149|      8|    }
  150|       |
  151|    136|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|    155|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    155|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 1, False: 154]
  ------------------
  155|      1|      return false;  // Some other decoder is already using the data. Error.
  156|      1|    }
  157|    154|    pos_data_decoder_id_ = att_decoder_id;
  158|    154|  }
  159|       |
  160|    290|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|    290|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    290|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 290, False: 0]
  ------------------
  162|    290|    uint8_t traversal_method_encoded;
  163|    290|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 5, False: 285]
  ------------------
  164|      5|      return false;
  165|      5|    }
  166|       |    // Check that decoded traversal method is valid.
  167|    285|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 21, False: 264]
  ------------------
  168|     21|      return false;
  169|     21|    }
  170|    264|    traversal_method =
  171|    264|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|    264|  }
  173|       |
  174|    264|  const Mesh *mesh = decoder_->mesh();
  175|    264|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|    264|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 192, False: 72]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|    192|    MeshAttributeIndicesEncodingData *encoding_data = nullptr;
  181|    192|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 133, False: 59]
  ------------------
  182|    133|      encoding_data = &pos_encoding_data_;
  183|    133|    } else {
  184|     59|      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|     59|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|     59|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|    192|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 52, False: 140]
  ------------------
  191|     52|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|     52|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|     52|          AttTraverser;
  194|     52|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|    140|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 140, False: 0]
  ------------------
  196|    140|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|    140|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|    140|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|    140|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|    192|  } else {
  203|     72|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 7, False: 65]
  ------------------
  204|      7|      return false;  // Unsupported method.
  205|      7|    }
  206|     65|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 3, False: 62]
  ------------------
  207|      3|      return false;  // Attribute data must be specified.
  208|      3|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|     62|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|     62|        AttObserver;
  214|     62|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|     62|        AttTraverser;
  216|       |
  217|     62|    MeshAttributeIndicesEncodingData *const encoding_data =
  218|     62|        &attribute_data_[att_data_id].encoding_data;
  219|     62|    const MeshAttributeCornerTable *const corner_table =
  220|     62|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|     62|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|     62|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|     62|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|     62|                             encoding_data);
  227|       |
  228|     62|    AttTraverser att_traverser;
  229|     62|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|     62|    traversal_sequencer->SetTraverser(att_traverser);
  232|     62|    sequencer = std::move(traversal_sequencer);
  233|     62|  }
  234|       |
  235|    254|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 254]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|    254|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|    254|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|    254|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|    254|                                        std::move(att_controller));
  244|    254|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18DecodeConnectivityEv:
  247|  2.85k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  2.85k|  num_new_vertices_ = 0;
  249|  2.85k|  new_to_parent_vertex_map_.clear();
  250|  2.85k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  2.85k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.85k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 533, False: 2.32k]
  ------------------
  252|    533|    uint32_t num_new_verts;
  253|    533|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    533|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 342, False: 191]
  ------------------
  254|    342|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 342]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    342|    } else {
  258|    191|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 191]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    191|    }
  262|    533|    num_new_vertices_ = num_new_verts;
  263|    533|  }
  264|  2.85k|#endif
  265|       |
  266|  2.85k|  uint32_t num_encoded_vertices;
  267|  2.85k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  2.85k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.85k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 342, False: 2.51k]
  ------------------
  269|    342|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 342]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    342|  } else
  274|  2.51k|#endif
  275|  2.51k|  {
  276|  2.51k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 2.51k]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|  2.51k|  }
  280|  2.85k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  2.85k|  uint32_t num_faces;
  283|  2.85k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  2.85k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.85k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 342, False: 2.51k]
  ------------------
  285|    342|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 342]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    342|  } else
  290|  2.51k|#endif
  291|  2.51k|  {
  292|  2.51k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 2.51k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  2.51k|  }
  296|  2.85k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 2, False: 2.85k]
  ------------------
  297|      2|    return false;  // Draco cannot handle this many faces.
  298|      2|  }
  299|       |
  300|  2.85k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 9, False: 2.84k]
  ------------------
  301|      9|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      9|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|  2.84k|  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.84k|  const uint64_t num_encoded_vertices_64 =
  311|  2.84k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  2.84k|  const uint64_t max_num_vertex_edges =
  313|  2.84k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  2.84k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 2, False: 2.84k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      2|    return false;
  317|      2|  }
  318|       |
  319|  2.84k|  uint8_t num_attribute_data;
  320|  2.84k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 2.84k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  2.84k|  uint32_t num_encoded_symbols;
  325|  2.84k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  2.84k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.84k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 337, False: 2.50k]
  ------------------
  327|    337|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 337]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    337|  } else
  332|  2.50k|#endif
  333|  2.50k|  {
  334|  2.50k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 2.50k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  2.50k|  }
  338|       |
  339|  2.84k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 4, False: 2.84k]
  ------------------
  340|       |    // Number of faces needs to be the same or greater than the number of
  341|       |    // symbols (it can be greater because the initial face may not be encoded as
  342|       |    // a symbol).
  343|      4|    return false;
  344|      4|  }
  345|  2.84k|  const uint32_t max_encoded_faces =
  346|  2.84k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  2.84k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 23, False: 2.81k]
  ------------------
  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|     23|    return false;
  352|     23|  }
  353|       |
  354|  2.81k|  uint32_t num_encoded_split_symbols;
  355|  2.81k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  2.81k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.81k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 324, False: 2.49k]
  ------------------
  357|    324|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 324]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    324|  } else
  362|  2.49k|#endif
  363|  2.49k|  {
  364|  2.49k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 2.49k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  2.49k|  }
  368|       |
  369|  2.81k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 12, False: 2.80k]
  ------------------
  370|     12|    return false;  // Split symbols are a sub-set of all symbols.
  371|     12|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  2.80k|  vertex_traversal_length_.clear();
  375|  2.80k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  2.80k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 2.80k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  2.80k|  processed_corner_ids_.clear();
  380|  2.80k|  processed_corner_ids_.reserve(num_faces);
  381|  2.80k|  processed_connectivity_corners_.clear();
  382|  2.80k|  processed_connectivity_corners_.reserve(num_faces);
  383|  2.80k|  topology_split_data_.clear();
  384|  2.80k|  hole_event_data_.clear();
  385|  2.80k|  init_face_configurations_.clear();
  386|  2.80k|  init_corners_.clear();
  387|       |
  388|  2.80k|  last_symbol_id_ = -1;
  389|  2.80k|  last_face_id_ = -1;
  390|  2.80k|  last_vert_id_ = -1;
  391|       |
  392|  2.80k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  2.80k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  2.80k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 0, False: 2.80k]
  ------------------
  397|  2.80k|          num_faces, num_encoded_vertices_ + num_encoded_split_symbols)) {
  398|      0|    return false;
  399|      0|  }
  400|       |
  401|       |  // Start with all vertices marked as holes (boundaries).
  402|       |  // Only vertices decoded with TOPOLOGY_C symbol (and the initial face) will
  403|       |  // be marked as non hole vertices. We need to allocate the array larger
  404|       |  // because split symbols can create extra vertices during the decoding
  405|       |  // process (these extra vertices are then eliminated during deduplication).
  406|  2.80k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  2.80k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  2.80k|  int32_t topology_split_decoded_bytes = -1;
  410|  2.80k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.80k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 511, False: 2.29k]
  ------------------
  411|    511|    uint32_t encoded_connectivity_size;
  412|    511|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    511|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 321, False: 190]
  ------------------
  413|    321|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 5, False: 316]
  ------------------
  414|      5|        return false;
  415|      5|      }
  416|    321|    } else {
  417|    190|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 190]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|    190|    }
  421|    506|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 3, False: 503]
  ------------------
  422|    503|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 31, False: 472]
  ------------------
  423|     34|      return false;
  424|     34|    }
  425|    472|    DecoderBuffer event_buffer;
  426|    472|    event_buffer.Init(
  427|    472|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    472|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    472|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    472|    topology_split_decoded_bytes =
  432|    472|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    472|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 94, False: 378]
  ------------------
  434|     94|      return false;
  435|     94|    }
  436|       |
  437|    472|  } else
  438|  2.29k|#endif
  439|  2.29k|  {
  440|  2.29k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 44, False: 2.25k]
  ------------------
  441|     44|      return false;
  442|     44|    }
  443|  2.29k|  }
  444|       |
  445|  2.63k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  2.63k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  2.63k|                                           num_encoded_split_symbols);
  449|  2.63k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  2.63k|  DecoderBuffer traversal_end_buffer;
  452|  2.63k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 1.32k, False: 1.30k]
  ------------------
  453|  1.32k|    return false;
  454|  1.32k|  }
  455|       |
  456|  1.30k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  1.30k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 969, False: 338]
  ------------------
  458|    969|    return false;
  459|    969|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|    338|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|    338|                           traversal_end_buffer.remaining_size(),
  464|    338|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|    338|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|    338|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    338|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 6, False: 332]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|      6|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|      6|  }
  471|    338|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|    338|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 224, False: 114]
  ------------------
  475|    224|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|    224|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|    224|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 5, False: 219]
  ------------------
  477|     15|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 10, False: 5]
  ------------------
  478|     10|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 10]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|     10|      }
  482|       |
  483|      5|    } else
  484|    219|#endif
  485|    219|    {
  486|   839k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 839k, False: 219]
  ------------------
  487|   839k|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 839k]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|   839k|      }
  491|    219|    }
  492|    224|  }
  493|    338|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  1.51k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 1.18k, False: 338]
  ------------------
  498|  1.18k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  2.28M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 2.28M, False: 1.18k]
  ------------------
  501|  2.28M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  2.28M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  1.18k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 1.18k]
  ------------------
  505|  1.18k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  1.18k|  }
  509|       |
  510|    338|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  1.51k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 1.18k, False: 338]
  ------------------
  512|       |    // For non-position attributes, preallocate the vertex to value mapping
  513|       |    // using the maximum number of vertices from the base corner table and the
  514|       |    // attribute corner table (since the attribute decoder may use either of
  515|       |    // it).
  516|  1.18k|    int32_t att_connectivity_verts =
  517|  1.18k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  1.18k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 2, False: 1.17k]
  ------------------
  519|      2|      att_connectivity_verts = corner_table_->num_vertices();
  520|      2|    }
  521|  1.18k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  1.18k|  }
  523|    338|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 7, False: 331]
  ------------------
  524|      7|    return false;
  525|      7|  }
  526|    331|  return true;
  527|    338|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE19OnAttributesDecodedEv:
  530|     34|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|     34|  return true;
  532|     34|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18DecodeConnectivityEi:
  536|  1.30k|    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.30k|  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.30k|  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.30k|  std::vector<VertexIndex> invalid_vertices;
  558|  1.30k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  1.30k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  1.30k|  int num_faces = 0;
  562|  61.0M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 61.0M, False: 499]
  ------------------
  563|  61.0M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  61.0M|    bool check_topology_split = false;
  566|  61.0M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  61.0M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 4.32M, False: 56.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|  4.32M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 121, False: 4.32M]
  ------------------
  588|    121|        return -1;
  589|    121|      }
  590|       |
  591|  4.32M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  4.32M|      const VertexIndex vertex_x =
  593|  4.32M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  4.32M|      const CornerIndex corner_b =
  595|  4.32M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  4.32M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 299, False: 4.32M]
  ------------------
  598|       |        // All matched corners must be different.
  599|    299|        return -1;
  600|    299|      }
  601|  4.32M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 4.32M]
  |  Branch (601:11): [True: 0, False: 4.32M]
  ------------------
  602|  4.32M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 4.32M]
  ------------------
  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.32M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  4.32M|      SetOppositeCorners(corner_a, corner + 1);
  612|  4.32M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  4.32M|      const VertexIndex vert_a_prev =
  616|  4.32M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  4.32M|      const VertexIndex vert_b_next =
  618|  4.32M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  4.32M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 4.32M]
  |  Branch (619:38): [True: 0, False: 4.32M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  4.32M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  4.32M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  4.32M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  4.32M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  4.32M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  4.32M|      active_corner_stack.back() = corner;
  631|  56.7M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 1.97k, False: 56.7M]
  |  Branch (631:40): [True: 51.9M, False: 4.83M]
  ------------------
  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.9M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 1, False: 51.9M]
  ------------------
  647|      1|        return -1;
  648|      1|      }
  649|  51.9M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  51.9M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 51.9M]
  ------------------
  651|       |        // Active corner is already opposite to an existing face, which should
  652|       |        // not happen unless the input was tampered with.
  653|      0|        return -1;
  654|      0|      }
  655|       |
  656|       |      // First corner on the new face is either corner "l" or "r".
  657|  51.9M|      const CornerIndex corner(3 * face.value());
  658|  51.9M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  51.9M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 1.97k, False: 51.9M]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  1.97k|        opp_corner = corner + 2;
  662|  1.97k|        corner_l = corner + 1;
  663|  1.97k|        corner_r = corner;
  664|  51.9M|      } else {
  665|       |        // "l" is the new first corner.
  666|  51.9M|        opp_corner = corner + 1;
  667|  51.9M|        corner_l = corner;
  668|  51.9M|        corner_r = corner + 2;
  669|  51.9M|      }
  670|  51.9M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  51.9M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  51.9M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 7, False: 51.9M]
  ------------------
  675|      7|        return -1;  // Unexpected number of decoded vertices.
  676|      7|      }
  677|       |
  678|  51.9M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  51.9M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  51.9M|      const VertexIndex vertex_r =
  682|  51.9M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  51.9M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  51.9M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  51.9M|      corner_table_->MapCornerToVertex(
  688|  51.9M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  51.9M|      active_corner_stack.back() = corner;
  690|  51.9M|      check_topology_split = true;
  691|  51.9M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 27.4k, False: 4.80M]
  ------------------
  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|  27.4k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 1, False: 27.4k]
  ------------------
  703|      1|        return -1;
  704|      1|      }
  705|  27.4k|      const CornerIndex corner_b = active_corner_stack.back();
  706|  27.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|  27.4k|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  27.4k|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 37, False: 27.4k]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|     37|        active_corner_stack.push_back(it->second);
  714|     37|      }
  715|  27.4k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 44, False: 27.4k]
  ------------------
  716|     44|        return -1;
  717|     44|      }
  718|  27.4k|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  27.4k|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 27.4k]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  27.4k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 3, False: 27.4k]
  |  Branch (724:11): [True: 3, False: 27.4k]
  ------------------
  725|  27.4k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 27.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|      3|        return -1;
  729|      3|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  27.4k|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  27.4k|      SetOppositeCorners(corner_a, corner + 2);
  735|  27.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|  27.4k|      const VertexIndex vertex_p =
  739|  27.4k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  27.4k|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  27.4k|      corner_table_->MapCornerToVertex(
  742|  27.4k|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  27.4k|      const VertexIndex vert_b_prev =
  744|  27.4k|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  27.4k|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  27.4k|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  27.4k|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  27.4k|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  27.4k|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  27.4k|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  27.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|  27.4k|      const CornerIndex first_corner = corner_n;
  757|   633k|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 605k, False: 27.4k]
  ------------------
  758|   605k|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|   605k|        corner_n = corner_table_->SwingLeft(corner_n);
  760|   605k|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 3, False: 605k]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      3|          return -1;
  764|      3|        }
  765|   605k|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  27.4k|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  27.4k|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 26.6k, False: 760]
  ------------------
  770|  26.6k|        invalid_vertices.push_back(vertex_n);
  771|  26.6k|      }
  772|  27.4k|      active_corner_stack.back() = corner;
  773|  4.80M|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 4.80M, False: 257]
  ------------------
  774|  4.80M|      const CornerIndex corner(3 * face.value());
  775|  4.80M|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  4.80M|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  4.80M|      corner_table_->MapCornerToVertex(corner + 1,
  779|  4.80M|                                       corner_table_->AddNewVertex());
  780|  4.80M|      corner_table_->MapCornerToVertex(corner + 2,
  781|  4.80M|                                       corner_table_->AddNewVertex());
  782|       |
  783|  4.80M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 10, False: 4.80M]
  ------------------
  784|     10|        return -1;  // Unexpected number of decoded vertices.
  785|     10|      }
  786|       |
  787|  4.80M|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  4.80M|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  4.80M|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  4.80M|      active_corner_stack.push_back(corner);
  792|  4.80M|      check_topology_split = true;
  793|  4.80M|    } else {
  794|       |      // Error. Unknown symbol decoded.
  795|    257|      return -1;
  796|    257|    }
  797|       |    // Inform the traversal decoder that a new corner has been reached.
  798|  61.0M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  61.0M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 56.7M, False: 4.34M]
  ------------------
  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|  56.7M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  56.7M|      EdgeFaceName split_edge;
  812|  56.7M|      int encoder_split_symbol_id;
  813|  56.7M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 1.61k, False: 56.7M]
  ------------------
  814|  56.7M|                             &encoder_split_symbol_id)) {
  815|  1.61k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 62, False: 1.55k]
  ------------------
  816|     62|          return -1;  // Wrong split symbol id.
  817|     62|        }
  818|       |        // Symbol was part of a topology split. Now we need to determine which
  819|       |        // edge should be added to the active edges stack.
  820|  1.55k|        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.55k|        CornerIndex new_active_corner;
  831|  1.55k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 732, False: 821]
  ------------------
  832|    732|          new_active_corner = corner_table_->Next(act_top_corner);
  833|    821|        } else {
  834|    821|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|    821|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  1.55k|        const int decoder_split_symbol_id =
  839|  1.55k|            num_symbols - encoder_split_symbol_id - 1;
  840|  1.55k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  1.55k|            new_active_corner;
  842|  1.55k|      }
  843|  56.7M|    }
  844|  61.0M|  }
  845|    499|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 499]
  ------------------
  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|  4.13M|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 4.13M, False: 416]
  ------------------
  850|  4.13M|    const CornerIndex corner = active_corner_stack.back();
  851|  4.13M|    active_corner_stack.pop_back();
  852|  4.13M|    const bool interior_face =
  853|  4.13M|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  4.13M|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 2.23M, False: 1.89M]
  ------------------
  855|       |      // The start face is interior, we need to find three corners that are
  856|       |      // opposite to it. The first opposite corner "a" is the corner from the
  857|       |      // top of the active corner stack and the remaining two corners "b" and
  858|       |      // "c" are then the next corners from the left-most corners of vertices
  859|       |      // "n" and "x" respectively.
  860|       |      //
  861|       |      //           *-------*
  862|       |      //          / \     / \
  863|       |      //         /   \   /   \
  864|       |      //        /     \ /     \
  865|       |      //       *-------p-------*
  866|       |      //      / \a    . .    c/ \
  867|       |      //     /   \   .   .   /   \
  868|       |      //    /     \ .  I  . /     \
  869|       |      //   *-------n.......x------*
  870|       |      //    \     / \     / \     /
  871|       |      //     \   /   \   /   \   /
  872|       |      //      \ /     \b/     \ /
  873|       |      //       *-------*-------*
  874|       |      //
  875|       |
  876|  2.23M|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 79, False: 2.23M]
  ------------------
  877|     79|        return -1;  // More faces than expected added to the mesh.
  878|     79|      }
  879|       |
  880|  2.23M|      const CornerIndex corner_a = corner;
  881|  2.23M|      const VertexIndex vert_n =
  882|  2.23M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  2.23M|      const CornerIndex corner_b =
  884|  2.23M|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  2.23M|      const VertexIndex vert_x =
  887|  2.23M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  2.23M|      const CornerIndex corner_c =
  889|  2.23M|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  2.23M|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 1, False: 2.23M]
  |  Branch (891:33): [True: 3, False: 2.23M]
  |  Branch (891:55): [True: 0, False: 2.23M]
  ------------------
  892|       |        // All matched corners must be different.
  893|      4|        return -1;
  894|      4|      }
  895|  2.23M|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 0, False: 2.23M]
  |  Branch (895:11): [True: 0, False: 2.23M]
  ------------------
  896|  2.23M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 0, False: 2.23M]
  ------------------
  897|  2.23M|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 0, False: 2.23M]
  ------------------
  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.23M|      const VertexIndex vert_p =
  904|  2.23M|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  2.23M|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  2.23M|      const CornerIndex new_corner(3 * face.value());
  909|  2.23M|      SetOppositeCorners(new_corner, corner);
  910|  2.23M|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  2.23M|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  2.23M|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  2.23M|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  2.23M|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|  8.95M|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 6.71M, False: 2.23M]
  ------------------
  920|  6.71M|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|  6.71M|      }
  922|       |
  923|  2.23M|      init_face_configurations_.push_back(true);
  924|  2.23M|      init_corners_.push_back(new_corner);
  925|  2.23M|    } else {
  926|       |      // The initial face wasn't interior and the traversal had to start from
  927|       |      // an open boundary. In this case no new face is added, but we need to
  928|       |      // keep record about the first opposite corner to this boundary.
  929|  1.89M|      init_face_configurations_.push_back(false);
  930|  1.89M|      init_corners_.push_back(corner);
  931|  1.89M|    }
  932|  4.13M|  }
  933|    416|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 75, False: 341]
  ------------------
  934|     75|    return -1;  // Unexpected number of decoded faces.
  935|     75|  }
  936|       |
  937|    341|  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.26k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 3.26k, False: 338]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  3.26k|    VertexIndex src_vert(num_vertices - 1);
  943|  3.90k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 648, False: 3.26k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|    648|      src_vert = VertexIndex(--num_vertices - 1);
  946|    648|    }
  947|  3.26k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 453, False: 2.80k]
  ------------------
  948|    453|      continue;  // No need to swap anything.
  949|    453|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  2.80k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  11.3k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 8.54k, False: 2.80k]
  ------------------
  954|  8.54k|      const CornerIndex cid = vcit.Corner();
  955|  8.54k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 3, False: 8.53k]
  ------------------
  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|  8.53k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  8.53k|    }
  962|  2.80k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  2.80k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  2.80k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  2.80k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  2.80k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  2.80k|    num_vertices--;
  972|  2.80k|  }
  973|    338|  return num_vertices;
  974|    341|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  2.76k|    DecoderBuffer *decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  2.76k|  uint32_t num_topology_splits;
  982|  2.76k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  2.76k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.76k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 288, False: 2.48k]
  ------------------
  984|    288|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 2, False: 286]
  ------------------
  985|      2|      return -1;
  986|      2|    }
  987|       |
  988|    288|  } else
  989|  2.48k|#endif
  990|  2.48k|  {
  991|  2.48k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 2.48k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  2.48k|  }
  995|  2.76k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 608, False: 2.15k]
  ------------------
  996|    608|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 32, False: 576]
  ------------------
  997|    608|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|     32|      return -1;
  999|     32|    }
 1000|    576|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|    576|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    576|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 39, False: 537]
  ------------------
 1002|   134k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 134k, False: 5]
  ------------------
 1003|   134k|        TopologySplitEventData event_data;
 1004|   134k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 23, False: 134k]
  ------------------
 1005|     23|          return -1;
 1006|     23|        }
 1007|   134k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 9, False: 134k]
  ------------------
 1008|      9|          return -1;
 1009|      9|        }
 1010|   134k|        uint8_t edge_data;
 1011|   134k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 2, False: 134k]
  ------------------
 1012|      2|          return -1;
 1013|      2|        }
 1014|   134k|        event_data.source_edge = edge_data & 1;
 1015|   134k|        topology_split_data_.push_back(event_data);
 1016|   134k|      }
 1017|       |
 1018|     39|    } else
 1019|    537|#endif
 1020|    537|    {
 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|    537|      int last_source_symbol_id = 0;
 1024|  4.87k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 4.37k, False: 508]
  ------------------
 1025|  4.37k|        TopologySplitEventData event_data;
 1026|  4.37k|        uint32_t delta;
 1027|  4.37k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 8, False: 4.36k]
  ------------------
 1028|      8|          return -1;
 1029|      8|        }
 1030|  4.36k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  4.36k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 9, False: 4.35k]
  ------------------
 1032|      9|          return -1;
 1033|      9|        }
 1034|  4.35k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 12, False: 4.34k]
  ------------------
 1035|     12|          return -1;
 1036|     12|        }
 1037|  4.34k|        event_data.split_symbol_id =
 1038|  4.34k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  4.34k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  4.34k|        topology_split_data_.push_back(event_data);
 1041|  4.34k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|    508|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  4.27k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 3.76k, False: 508]
  ------------------
 1045|  3.76k|        uint32_t edge_data;
 1046|  3.76k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.76k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 668, False: 3.09k]
  ------------------
 1047|    668|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  3.09k|        } else {
 1049|  3.09k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  3.09k|        }
 1051|  3.76k|        TopologySplitEventData &event_data = topology_split_data_[i];
 1052|  3.76k|        event_data.source_edge = edge_data & 1;
 1053|  3.76k|      }
 1054|    508|      decoder_buffer->EndBitDecoding();
 1055|    508|    }
 1056|    576|  }
 1057|  2.67k|  uint32_t num_hole_events = 0;
 1058|  2.67k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  2.67k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.67k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 240, False: 2.43k]
  ------------------
 1060|    240|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 2, False: 238]
  ------------------
 1061|      2|      return -1;
 1062|      2|    }
 1063|  2.43k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  2.43k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 137, False: 2.29k]
  ------------------
 1064|    137|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 6, False: 131]
  ------------------
 1065|      6|      return -1;
 1066|      6|    }
 1067|    137|  }
 1068|  2.66k|#endif
 1069|  2.66k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 50, False: 2.61k]
  ------------------
 1070|     50|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     50|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     50|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 20, False: 30]
  ------------------
 1072|  28.7k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 28.7k, False: 2]
  ------------------
 1073|  28.7k|        HoleEventData event_data;
 1074|  28.7k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 18, False: 28.6k]
  ------------------
 1075|     18|          return -1;
 1076|     18|        }
 1077|  28.6k|        hole_event_data_.push_back(event_data);
 1078|  28.6k|      }
 1079|       |
 1080|     20|    } else
 1081|     30|#endif
 1082|     30|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     30|      int last_symbol_id = 0;
 1085|  1.81k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 1.79k, False: 15]
  ------------------
 1086|  1.79k|        HoleEventData event_data;
 1087|  1.79k|        uint32_t delta;
 1088|  1.79k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 15, False: 1.78k]
  ------------------
 1089|     15|          return -1;
 1090|     15|        }
 1091|  1.78k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  1.78k|        last_symbol_id = event_data.symbol_id;
 1093|  1.78k|        hole_event_data_.push_back(event_data);
 1094|  1.78k|      }
 1095|     30|    }
 1096|     50|  }
 1097|  2.63k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  2.66k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|     10|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|     10|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|     10|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|     40|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 30, False: 10]
  ------------------
 1109|     30|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|     30|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 10, False: 20]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|     20|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 10, False: 10]
  ------------------
 1114|     10|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|     10|      }
 1116|     10|      continue;
 1117|     10|    }
 1118|       |
 1119|     40|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 20, False: 20]
  ------------------
 1120|     20|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|     20|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 10, False: 10]
  ------------------
 1122|     10|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|     10|      }
 1124|     20|    }
 1125|     20|  }
 1126|     10|  return true;
 1127|     10|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|   839k|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|   839k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|   839k|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|   839k|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  3.35M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 2.51M, False: 839k]
  ------------------
 1139|  2.51M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  2.51M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 429k, False: 2.08M]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|  1.29M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 860k, False: 429k]
  ------------------
 1144|   860k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   860k|      }
 1146|   429k|      continue;
 1147|   429k|    }
 1148|  2.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|  2.08M|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 1.04M, False: 1.04M]
  ------------------
 1151|  1.04M|      continue;
 1152|  1.04M|    }
 1153|       |
 1154|  3.13M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 2.08M, False: 1.04M]
  ------------------
 1155|  2.08M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  2.08M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 1.42M, False: 660k]
  ------------------
 1157|  1.42M|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|  1.42M|      }
 1159|  2.08M|    }
 1160|  1.04M|  }
 1161|   839k|  return true;
 1162|   839k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE21AssignPointsToCornersEi:
 1166|    338|    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|    338|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|    338|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 114, False: 224]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|   102k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 102k, False: 114]
  ------------------
 1176|   102k|      Mesh::Face face;
 1177|   102k|      const CornerIndex start_corner(3 * f.value());
 1178|   408k|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 306k, False: 102k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|   306k|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|   306k|        face[c] = vert_id;
 1182|   306k|      }
 1183|   102k|      decoder_->mesh()->SetFace(f, face);
 1184|   102k|    }
 1185|    114|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|    114|    return true;
 1187|    114|  }
 1188|       |  // Else we need to deduplicate multiple attributes.
 1189|       |
 1190|       |  // Map between point id and an associated corner id. Only one corner for
 1191|       |  // each point is stored. The corners are used to sample the attribute values
 1192|       |  // in the last stage of the deduplication.
 1193|    224|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|    224|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|   628k|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 627k, False: 217]
  ------------------
 1197|   627k|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|   627k|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 97, False: 627k]
  ------------------
 1199|     97|      continue;  // Isolated vertex.
 1200|     97|    }
 1201|   627k|    CornerIndex deduplication_first_corner = c;
 1202|   627k|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 429k, False: 198k]
  ------------------
 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|   429k|      deduplication_first_corner = c;
 1206|   429k|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|   314k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 271k, False: 42.8k]
  ------------------
 1210|   271k|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 111k, False: 159k]
  ------------------
 1211|   111k|          continue;  // No seam for this attribute, ignore it.
 1212|   111k|        }
 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|   159k|        const VertexIndex vert_id =
 1217|   159k|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|   159k|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|   159k|        bool seam_found = false;
 1220|   180k|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 176k, False: 4.29k]
  ------------------
 1221|   176k|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 7, False: 176k]
  ------------------
 1222|      7|            return false;
 1223|      7|          }
 1224|   176k|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 155k, False: 21.0k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|   155k|            deduplication_first_corner = act_c;
 1227|   155k|            seam_found = true;
 1228|   155k|            break;
 1229|   155k|          }
 1230|  21.0k|          act_c = corner_table_->SwingRight(act_c);
 1231|  21.0k|        }
 1232|   159k|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 155k, False: 4.29k]
  ------------------
 1233|   155k|          break;  // No reason to process other attributes if we found a seam.
 1234|   155k|        }
 1235|   159k|      }
 1236|   198k|    }
 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|   627k|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|   627k|    corner_to_point_map[c.value()] =
 1246|   627k|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|   627k|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|   627k|    CornerIndex prev_c = c;
 1250|   627k|    c = corner_table_->SwingRight(c);
 1251|  2.55M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 2.12M, False: 429k]
  |  Branch (1251:40): [True: 1.92M, False: 198k]
  ------------------
 1252|  1.92M|      bool attribute_seam = false;
 1253|  2.96M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 2.60M, False: 355k]
  ------------------
 1254|  2.60M|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 1.57M, False: 1.03M]
  ------------------
 1255|  2.60M|            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.57M|          attribute_seam = true;
 1259|  1.57M|          break;
 1260|  1.57M|        }
 1261|  2.60M|      }
 1262|  1.92M|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 1.57M, False: 355k]
  ------------------
 1263|  1.57M|        corner_to_point_map[c.value()] =
 1264|  1.57M|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|  1.57M|        point_to_corner_map.push_back(c.value());
 1266|  1.57M|      } else {
 1267|   355k|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|   355k|      }
 1269|  1.92M|      prev_c = c;
 1270|  1.92M|      c = corner_table_->SwingRight(c);
 1271|  1.92M|    }
 1272|   627k|  }
 1273|       |  // Add faces.
 1274|   801k|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 800k, False: 217]
  ------------------
 1275|   800k|    Mesh::Face face;
 1276|  3.20M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 2.40M, False: 800k]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|  2.40M|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|  2.40M|    }
 1280|   800k|    decoder_->mesh()->SetFace(f, face);
 1281|   800k|  }
 1282|    217|  decoder_->point_cloud()->set_num_points(
 1283|    217|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|    217|  return true;
 1285|    224|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    190|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|    190|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    190|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    190|  const Mesh *mesh = decoder_->mesh();
  115|    190|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    190|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    190|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    190|                           encoding_data);
  120|       |
  121|    190|  TraverserT att_traverser;
  122|    190|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    190|  traversal_sequencer->SetTraverser(att_traverser);
  125|    190|  return std::move(traversal_sequencer);
  126|    190|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|  1.16k|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|  1.16k|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|  1.16k|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|  1.16k|  const Mesh *mesh = decoder_->mesh();
  115|  1.16k|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|  1.16k|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|  1.16k|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|  1.16k|                           encoding_data);
  120|       |
  121|  1.16k|  TraverserT att_traverser;
  122|  1.16k|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|  1.16k|  traversal_sequencer->SetTraverser(att_traverser);
  125|  1.16k|  return std::move(traversal_sequencer);
  126|  1.16k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    277|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|    277|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    277|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    277|  const Mesh *mesh = decoder_->mesh();
  115|    277|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    277|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    277|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    277|                           encoding_data);
  120|       |
  121|    277|  TraverserT att_traverser;
  122|    277|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    277|  traversal_sequencer->SetTraverser(att_traverser);
  125|    277|  return std::move(traversal_sequencer);
  126|    277|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    403|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|    403|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    403|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    403|  const Mesh *mesh = decoder_->mesh();
  115|    403|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    403|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    403|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    403|                           encoding_data);
  120|       |
  121|    403|  TraverserT att_traverser;
  122|    403|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    403|  traversal_sequencer->SetTraverser(att_traverser);
  125|    403|  return std::move(traversal_sequencer);
  126|    403|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|     52|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|     52|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|     52|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|     52|  const Mesh *mesh = decoder_->mesh();
  115|     52|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|     52|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|     52|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|     52|                           encoding_data);
  120|       |
  121|     52|  TraverserT att_traverser;
  122|     52|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|     52|  traversal_sequencer->SetTraverser(att_traverser);
  125|     52|  return std::move(traversal_sequencer);
  126|     52|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    140|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|    140|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    140|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    140|  const Mesh *mesh = decoder_->mesh();
  115|    140|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    140|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    140|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    140|                           encoding_data);
  120|       |
  121|    140|  TraverserT att_traverser;
  122|    140|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    140|  traversal_sequencer->SetTraverser(att_traverser);
  125|    140|  return std::move(traversal_sequencer);
  126|    140|}

_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE10GetDecoderEv:
   65|  10.0k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE14GetCornerTableEv:
   66|  3.66k|  const CornerTable *GetCornerTable() const override {
   67|  3.66k|    return corner_table_.get();
   68|  3.66k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  10.2M|                       int *out_encoder_split_symbol_id) {
   87|  10.2M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 2.01M, False: 8.26M]
  ------------------
   88|  2.01M|      return false;
   89|  2.01M|    }
   90|  8.26M|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 31, False: 8.26M]
  ------------------
   91|  8.26M|        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|     31|      *out_encoder_split_symbol_id = -1;
   98|     31|      return true;
   99|     31|    }
  100|  8.26M|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 8.26M, False: 2.03k]
  ------------------
  101|  8.26M|      return false;
  102|  8.26M|    }
  103|  2.03k|    *out_face_edge =
  104|  2.03k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  2.03k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  2.03k|    topology_split_data_.pop_back();
  108|  2.03k|    return true;
  109|  8.26M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  36.6M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  36.6M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  36.6M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  36.6M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE13AttributeDataC2Ev:
  210|  11.1k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE10GetDecoderEv:
   65|  5.82k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE14GetCornerTableEv:
   66|  3.83k|  const CornerTable *GetCornerTable() const override {
   67|  3.83k|    return corner_table_.get();
   68|  3.83k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  41.5M|                       int *out_encoder_split_symbol_id) {
   87|  41.5M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 40.9M, False: 550k]
  ------------------
   88|  40.9M|      return false;
   89|  40.9M|    }
   90|   550k|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 50, False: 549k]
  ------------------
   91|   550k|        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|     50|      *out_encoder_split_symbol_id = -1;
   98|     50|      return true;
   99|     50|    }
  100|   549k|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 548k, False: 1.91k]
  ------------------
  101|   548k|      return false;
  102|   548k|    }
  103|  1.91k|    *out_face_edge =
  104|  1.91k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  1.91k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  1.91k|    topology_split_data_.pop_back();
  108|  1.91k|    return true;
  109|   549k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|   121M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|   121M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|   121M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|   121M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE13AttributeDataC2Ev:
  210|  14.4k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE10GetDecoderEv:
   65|  14.4k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE14GetCornerTableEv:
   66|  2.88k|  const CornerTable *GetCornerTable() const override {
   67|  2.88k|    return corner_table_.get();
   68|  2.88k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  56.7M|                       int *out_encoder_split_symbol_id) {
   87|  56.7M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 56.4M, False: 291k]
  ------------------
   88|  56.4M|      return false;
   89|  56.4M|    }
   90|   291k|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 62, False: 291k]
  ------------------
   91|   291k|        static_cast<uint32_t>(encoder_symbol_id)) {
   92|       |      // Something is wrong; if the desired source symbol is greater than the
   93|       |      // current encoder_symbol_id, we missed it, or the input was tampered
   94|       |      // (|encoder_symbol_id| keeps decreasing).
   95|       |      // Return invalid symbol id to notify the decoder that there was an
   96|       |      // error.
   97|     62|      *out_encoder_split_symbol_id = -1;
   98|     62|      return true;
   99|     62|    }
  100|   291k|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 289k, False: 1.55k]
  ------------------
  101|   289k|      return false;
  102|   289k|    }
  103|  1.55k|    *out_face_edge =
  104|  1.55k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  1.55k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  1.55k|    topology_split_data_.pop_back();
  108|  1.55k|    return true;
  109|   291k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  67.3M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  67.3M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  67.3M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  67.3M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE13AttributeDataC2Ev:
  210|  7.95k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}

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

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

_ZN5draco31MeshEdgebreakerTraversalDecoderC2Ev:
   33|  8.65k|      : attribute_connectivity_decoders_(nullptr),
   34|  8.65k|        num_attribute_data_(0),
   35|  8.65k|        decoder_impl_(nullptr) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder4InitEPNS_35MeshEdgebreakerDecoderImplInterfaceE:
   36|  7.91k|  void Init(MeshEdgebreakerDecoderImplInterface *decoder) {
   37|  7.91k|    decoder_impl_ = decoder;
   38|  7.91k|    buffer_.Init(decoder->GetDecoder()->buffer()->data_head(),
   39|  7.91k|                 decoder->GetDecoder()->buffer()->remaining_size(),
   40|  7.91k|                 decoder->GetDecoder()->buffer()->bitstream_version());
   41|  7.91k|  }
_ZNK5draco31MeshEdgebreakerTraversalDecoder16BitstreamVersionEv:
   44|  6.58k|  uint16_t BitstreamVersion() const {
   45|  6.58k|    return decoder_impl_->GetDecoder()->bitstream_version();
   46|  6.58k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder21SetNumEncodedVerticesEi:
   50|  3.34k|  void SetNumEncodedVertices(int /* num_vertices */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19SetNumAttributeDataEi:
   54|  7.91k|  void SetNumAttributeData(int num_data) { num_attribute_data_ = num_data; }
_ZN5draco31MeshEdgebreakerTraversalDecoder5StartEPNS_13DecoderBufferE:
   59|  5.28k|  bool Start(DecoderBuffer *out_buffer) {
   60|       |    // Decode symbols from the main buffer decoder and face configurations from
   61|       |    // the start_face_buffer decoder.
   62|  5.28k|    if (!DecodeTraversalSymbols()) {
  ------------------
  |  Branch (62:9): [True: 80, False: 5.20k]
  ------------------
   63|     80|      return false;
   64|     80|    }
   65|       |
   66|  5.20k|    if (!DecodeStartFaces()) {
  ------------------
  |  Branch (66:9): [True: 104, False: 5.10k]
  ------------------
   67|    104|      return false;
   68|    104|    }
   69|       |
   70|  5.10k|    if (!DecodeAttributeSeams()) {
  ------------------
  |  Branch (70:9): [True: 17, False: 5.08k]
  ------------------
   71|     17|      return false;
   72|     17|    }
   73|  5.08k|    *out_buffer = buffer_;
   74|  5.08k|    return true;
   75|  5.10k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder28DecodeStartFaceConfigurationEv:
   78|  4.19M|  inline bool DecodeStartFaceConfiguration() {
   79|  4.19M|    uint32_t face_configuration;
   80|  4.19M|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   81|  4.19M|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  4.19M|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (81:9): [True: 1.41k, False: 4.19M]
  ------------------
   82|  1.41k|      start_face_buffer_.DecodeLeastSignificantBits32(1, &face_configuration);
   83|       |
   84|  1.41k|    } else
   85|  4.19M|#endif
   86|  4.19M|    {
   87|  4.19M|      face_configuration = start_face_decoder_.DecodeNextBit();
   88|  4.19M|    }
   89|  4.19M|    return face_configuration;
   90|  4.19M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder12DecodeSymbolEv:
   93|  25.3M|  inline uint32_t DecodeSymbol() {
   94|  25.3M|    uint32_t symbol;
   95|  25.3M|    symbol_buffer_.DecodeLeastSignificantBits32(1, &symbol);
   96|  25.3M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (96:9): [True: 11.6M, False: 13.7M]
  ------------------
   97|  11.6M|      return symbol;
   98|  11.6M|    }
   99|       |    // Else decode two additional bits.
  100|  13.7M|    uint32_t symbol_suffix;
  101|  13.7M|    symbol_buffer_.DecodeLeastSignificantBits32(2, &symbol_suffix);
  102|  13.7M|    symbol |= (symbol_suffix << 1);
  103|  13.7M|    return symbol;
  104|  25.3M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder22NewActiveCornerReachedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  25.1M|  inline void NewActiveCornerReached(CornerIndex /* corner */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder13MergeVerticesENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_:
  111|  3.33M|  inline void MergeVertices(VertexIndex /* dest */, VertexIndex /* source */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19DecodeAttributeSeamEi:
  117|  22.0M|  inline bool DecodeAttributeSeam(int attribute) {
  118|  22.0M|    return attribute_connectivity_decoders_[attribute].DecodeNextBit();
  119|  22.0M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder4DoneEv:
  122|  4.87k|  void Done() {
  123|  4.87k|    if (symbol_buffer_.bit_decoder_active()) {
  ------------------
  |  Branch (123:9): [True: 4.54k, False: 332]
  ------------------
  124|  4.54k|      symbol_buffer_.EndBitDecoding();
  125|  4.54k|    }
  126|  4.87k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  127|  4.87k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  4.87k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (127:9): [True: 532, False: 4.34k]
  ------------------
  128|    532|      start_face_buffer_.EndBitDecoding();
  129|       |
  130|    532|    } else
  131|  4.34k|#endif
  132|  4.34k|    {
  133|  4.34k|      start_face_decoder_.EndDecoding();
  134|  4.34k|    }
  135|  4.87k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder6bufferEv:
  138|  2.44k|  DecoderBuffer *buffer() { return &buffer_; }
_ZN5draco31MeshEdgebreakerTraversalDecoder22DecodeTraversalSymbolsEv:
  140|  5.66k|  bool DecodeTraversalSymbols() {
  141|  5.66k|    uint64_t traversal_size;
  142|  5.66k|    symbol_buffer_ = buffer_;
  143|  5.66k|    if (!symbol_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (143:9): [True: 22, False: 5.64k]
  ------------------
  144|     22|      return false;
  145|     22|    }
  146|  5.64k|    buffer_ = symbol_buffer_;
  147|  5.64k|    if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (147:9): [True: 127, False: 5.51k]
  ------------------
  148|    127|      return false;
  149|    127|    }
  150|  5.51k|    buffer_.Advance(traversal_size);
  151|  5.51k|    return true;
  152|  5.64k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder16DecodeStartFacesEv:
  154|  7.77k|  bool DecodeStartFaces() {
  155|       |    // Create a decoder that is set to the end of the encoded traversal data.
  156|  7.77k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  157|  7.77k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  7.77k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (157:9): [True: 991, False: 6.77k]
  ------------------
  158|    991|      start_face_buffer_ = buffer_;
  159|    991|      uint64_t traversal_size;
  160|    991|      if (!start_face_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (160:11): [True: 3, False: 988]
  ------------------
  161|      3|        return false;
  162|      3|      }
  163|    988|      buffer_ = start_face_buffer_;
  164|    988|      if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (164:11): [True: 187, False: 801]
  ------------------
  165|    187|        return false;
  166|    187|      }
  167|    801|      buffer_.Advance(traversal_size);
  168|    801|      return true;
  169|    988|    }
  170|  6.77k|#endif
  171|  6.77k|    return start_face_decoder_.StartDecoding(&buffer_);
  172|  7.77k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder20DecodeAttributeSeamsEv:
  174|  7.56k|  bool DecodeAttributeSeams() {
  175|       |    // Prepare attribute decoding.
  176|  7.56k|    if (num_attribute_data_ > 0) {
  ------------------
  |  Branch (176:9): [True: 4.97k, False: 2.59k]
  ------------------
  177|  4.97k|      attribute_connectivity_decoders_ = std::unique_ptr<BinaryDecoder[]>(
  178|  4.97k|          new BinaryDecoder[num_attribute_data_]);
  179|  14.0k|      for (int i = 0; i < num_attribute_data_; ++i) {
  ------------------
  |  Branch (179:23): [True: 9.11k, False: 4.94k]
  ------------------
  180|  9.11k|        if (!attribute_connectivity_decoders_[i].StartDecoding(&buffer_)) {
  ------------------
  |  Branch (180:13): [True: 33, False: 9.08k]
  ------------------
  181|     33|          return false;
  182|     33|        }
  183|  9.11k|      }
  184|  4.97k|    }
  185|  7.53k|    return true;
  186|  7.56k|  }

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

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

_ZN5draco21MeshSequentialDecoderC2Ev:
   27|  3.77k|MeshSequentialDecoder::MeshSequentialDecoder() {}
_ZN5draco21MeshSequentialDecoder18DecodeConnectivityEv:
   29|  3.39k|bool MeshSequentialDecoder::DecodeConnectivity() {
   30|  3.39k|  uint32_t num_faces;
   31|  3.39k|  uint32_t num_points;
   32|  3.39k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   33|  3.39k|  if (bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.39k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (33:7): [True: 620, False: 2.77k]
  ------------------
   34|    620|    if (!buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (34:9): [True: 0, False: 620]
  ------------------
   35|      0|      return false;
   36|      0|    }
   37|    620|    if (!buffer()->Decode(&num_points)) {
  ------------------
  |  Branch (37:9): [True: 0, False: 620]
  ------------------
   38|      0|      return false;
   39|      0|    }
   40|       |
   41|    620|  } else
   42|  2.77k|#endif
   43|  2.77k|  {
   44|  2.77k|    if (!DecodeVarint(&num_faces, buffer())) {
  ------------------
  |  Branch (44:9): [True: 0, False: 2.77k]
  ------------------
   45|      0|      return false;
   46|      0|    }
   47|  2.77k|    if (!DecodeVarint(&num_points, buffer())) {
  ------------------
  |  Branch (47:9): [True: 0, False: 2.77k]
  ------------------
   48|      0|      return false;
   49|      0|    }
   50|  2.77k|  }
   51|       |
   52|       |  // Check that num_faces and num_points are valid values.
   53|  3.39k|  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.39k|  if (faces_64 > 0xffffffff / 3) {
  ------------------
  |  Branch (55:7): [True: 0, False: 3.39k]
  ------------------
   56|      0|    return false;
   57|      0|  }
   58|  3.39k|  if (faces_64 > buffer()->remaining_size() / 3) {
  ------------------
  |  Branch (58:7): [True: 1, False: 3.39k]
  ------------------
   59|       |    // The number of faces is unreasonably high, because face indices do not
   60|       |    // fit in the remaining size of the buffer.
   61|      1|    return false;
   62|      1|  }
   63|  3.39k|  uint8_t connectivity_method;
   64|  3.39k|  if (!buffer()->Decode(&connectivity_method)) {
  ------------------
  |  Branch (64:7): [True: 0, False: 3.39k]
  ------------------
   65|      0|    return false;
   66|      0|  }
   67|  3.39k|  if (connectivity_method == 0) {
  ------------------
  |  Branch (67:7): [True: 2.47k, False: 924]
  ------------------
   68|  2.47k|    if (!DecodeAndDecompressIndices(num_faces)) {
  ------------------
  |  Branch (68:9): [True: 2.28k, False: 184]
  ------------------
   69|  2.28k|      return false;
   70|  2.28k|    }
   71|  2.47k|  } else {
   72|    924|    if (num_points < 256) {
  ------------------
  |  Branch (72:9): [True: 630, False: 294]
  ------------------
   73|       |      // Decode indices as uint8_t.
   74|   100k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (74:28): [True: 99.5k, False: 626]
  ------------------
   75|  99.5k|        Mesh::Face face;
   76|   398k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (76:25): [True: 298k, False: 99.5k]
  ------------------
   77|   298k|          uint8_t val;
   78|   298k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (78:15): [True: 4, False: 298k]
  ------------------
   79|      4|            return false;
   80|      4|          }
   81|   298k|          face[j] = val;
   82|   298k|        }
   83|  99.5k|        mesh()->AddFace(face);
   84|  99.5k|      }
   85|    630|    } else if (num_points < (1 << 16)) {
  ------------------
  |  Branch (85:16): [True: 216, False: 78]
  ------------------
   86|       |      // Decode indices as uint16_t.
   87|   215k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (87:28): [True: 215k, False: 200]
  ------------------
   88|   215k|        Mesh::Face face;
   89|   862k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (89:25): [True: 646k, False: 215k]
  ------------------
   90|   646k|          uint16_t val;
   91|   646k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (91:15): [True: 16, False: 646k]
  ------------------
   92|     16|            return false;
   93|     16|          }
   94|   646k|          face[j] = val;
   95|   646k|        }
   96|   215k|        mesh()->AddFace(face);
   97|   215k|      }
   98|    216|    } else if (num_points < (1 << 21) &&
  ------------------
  |  Branch (98:16): [True: 26, False: 52]
  ------------------
   99|     26|               bitstream_version() >= DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|     26|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (99:16): [True: 18, False: 8]
  ------------------
  100|       |      // Decode indices as uint32_t.
  101|    738|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (101:28): [True: 730, False: 8]
  ------------------
  102|    730|        Mesh::Face face;
  103|  2.90k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (103:25): [True: 2.18k, False: 720]
  ------------------
  104|  2.18k|          uint32_t val;
  105|  2.18k|          if (!DecodeVarint(&val, buffer())) {
  ------------------
  |  Branch (105:15): [True: 10, False: 2.17k]
  ------------------
  106|     10|            return false;
  107|     10|          }
  108|  2.17k|          face[j] = val;
  109|  2.17k|        }
  110|    720|        mesh()->AddFace(face);
  111|    720|      }
  112|     60|    } else {
  113|       |      // Decode faces as uint32_t (default).
  114|  1.18k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (114:28): [True: 1.14k, False: 40]
  ------------------
  115|  1.14k|        Mesh::Face face;
  116|  4.52k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (116:25): [True: 3.40k, False: 1.12k]
  ------------------
  117|  3.40k|          uint32_t val;
  118|  3.40k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (118:15): [True: 20, False: 3.38k]
  ------------------
  119|     20|            return false;
  120|     20|          }
  121|  3.38k|          face[j] = val;
  122|  3.38k|        }
  123|  1.12k|        mesh()->AddFace(face);
  124|  1.12k|      }
  125|     60|    }
  126|    924|  }
  127|  1.05k|  point_cloud()->set_num_points(num_points);
  128|  1.05k|  return true;
  129|  3.39k|}
_ZN5draco21MeshSequentialDecoder23CreateAttributesDecoderEi:
  131|  28.6k|bool MeshSequentialDecoder::CreateAttributesDecoder(int32_t att_decoder_id) {
  132|       |  // Always create the basic attribute decoder.
  133|  28.6k|  return SetAttributesDecoder(
  134|  28.6k|      att_decoder_id,
  135|  28.6k|      std::unique_ptr<AttributesDecoder>(
  136|  28.6k|          new SequentialAttributeDecodersController(
  137|  28.6k|              std::unique_ptr<PointsSequencer>(
  138|  28.6k|                  new LinearSequencer(point_cloud()->num_points())))));
  139|  28.6k|}
_ZN5draco21MeshSequentialDecoder26DecodeAndDecompressIndicesEj:
  141|  2.47k|bool MeshSequentialDecoder::DecodeAndDecompressIndices(uint32_t num_faces) {
  142|       |  // Get decoded indices differences that were encoded with an entropy code.
  143|  2.47k|  std::vector<uint32_t> indices_buffer(num_faces * 3);
  144|  2.47k|  if (!DecodeSymbols(num_faces * 3, 1, buffer(), indices_buffer.data())) {
  ------------------
  |  Branch (144:7): [True: 2.17k, False: 294]
  ------------------
  145|  2.17k|    return false;
  146|  2.17k|  }
  147|       |  // Reconstruct the indices from the differences.
  148|       |  // See MeshSequentialEncoder::CompressAndEncodeIndices() for more details.
  149|    294|  int32_t last_index_value = 0;  // This will always be >= 0.
  150|    294|  int vertex_index = 0;
  151|  7.18k|  for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (151:24): [True: 7.00k, False: 184]
  ------------------
  152|  7.00k|    Mesh::Face face;
  153|  27.7k|    for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (153:21): [True: 20.8k, False: 6.89k]
  ------------------
  154|  20.8k|      const uint32_t encoded_val = indices_buffer[vertex_index++];
  155|  20.8k|      int32_t index_diff = (encoded_val >> 1);
  156|  20.8k|      if (encoded_val & 1) {
  ------------------
  |  Branch (156:11): [True: 1.55k, False: 19.2k]
  ------------------
  157|  1.55k|        if (index_diff > last_index_value) {
  ------------------
  |  Branch (157:13): [True: 61, False: 1.49k]
  ------------------
  158|       |          // Subtracting index_diff would result in a negative index.
  159|     61|          return false;
  160|     61|        }
  161|  1.49k|        index_diff = -index_diff;
  162|  19.2k|      } else {
  163|  19.2k|        if (index_diff >
  ------------------
  |  Branch (163:13): [True: 49, False: 19.2k]
  ------------------
  164|  19.2k|            (std::numeric_limits<int32_t>::max() - last_index_value)) {
  165|       |          // Adding index_diff to last_index_value would overflow.
  166|     49|          return false;
  167|     49|        }
  168|  19.2k|      }
  169|  20.7k|      const int32_t index_value = index_diff + last_index_value;
  170|  20.7k|      face[j] = index_value;
  171|  20.7k|      last_index_value = index_value;
  172|  20.7k|    }
  173|  6.89k|    mesh()->AddFace(face);
  174|  6.89k|  }
  175|    184|  return true;
  176|    294|}

_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  1.58k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  1.72M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  1.72M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 1.68M, False: 32.7k]
  ------------------
   61|  1.68M|      return true;  // Already traversed.
   62|  1.68M|    }
   63|       |
   64|  32.7k|    corner_traversal_stack_.clear();
   65|  32.7k|    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|  32.7k|    const VertexIndex next_vert =
   69|  32.7k|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  32.7k|    const VertexIndex prev_vert =
   71|  32.7k|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  32.7k|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 32.7k]
  |  Branch (72:45): [True: 0, False: 32.7k]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  32.7k|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 32.0k, False: 708]
  ------------------
   76|  32.0k|      this->MarkVertexVisited(next_vert);
   77|  32.0k|      this->traversal_observer().OnNewVertexVisited(
   78|  32.0k|          next_vert, this->corner_table()->Next(corner_id));
   79|  32.0k|    }
   80|  32.7k|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 4.06k, False: 28.6k]
  ------------------
   81|  4.06k|      this->MarkVertexVisited(prev_vert);
   82|  4.06k|      this->traversal_observer().OnNewVertexVisited(
   83|  4.06k|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  4.06k|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|  77.9k|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 45.2k, False: 32.7k]
  ------------------
   88|       |      // Currently processed corner.
   89|  45.2k|      corner_id = corner_traversal_stack_.back();
   90|  45.2k|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  45.2k|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 45.2k]
  |  Branch (92:47): [True: 791, False: 44.4k]
  ------------------
   93|       |        // This face has been already traversed.
   94|    791|        corner_traversal_stack_.pop_back();
   95|    791|        continue;
   96|    791|      }
   97|  1.72M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 1.72M, Folded]
  ------------------
   98|  1.72M|        this->MarkFaceVisited(face_id);
   99|  1.72M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  1.72M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  1.72M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 1.72M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  1.72M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 856k, False: 865k]
  ------------------
  105|   856k|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|   856k|          this->MarkVertexVisited(vert_id);
  107|   856k|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|   856k|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 833k, False: 22.8k]
  ------------------
  109|   833k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   833k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   833k|            continue;
  112|   833k|          }
  113|   856k|        }
  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|   888k|        const CornerIndex right_corner_id =
  118|   888k|            this->corner_table()->GetRightCorner(corner_id);
  119|   888k|        const CornerIndex left_corner_id =
  120|   888k|            this->corner_table()->GetLeftCorner(corner_id);
  121|   888k|        const FaceIndex right_face_id(
  122|   888k|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 16.9k, False: 871k]
  ------------------
  123|   888k|                 ? kInvalidFaceIndex
  124|   888k|                 : FaceIndex(right_corner_id.value() / 3)));
  125|   888k|        const FaceIndex left_face_id(
  126|   888k|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 37.3k, False: 850k]
  ------------------
  127|   888k|                 ? kInvalidFaceIndex
  128|   888k|                 : FaceIndex(left_corner_id.value() / 3)));
  129|   888k|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 852k, False: 35.5k]
  ------------------
  130|       |          // Right face has been already visited.
  131|   852k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 38.2k, False: 814k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  38.2k|            corner_traversal_stack_.pop_back();
  134|  38.2k|            break;  // Break from the while (true) loop.
  135|   814k|          } else {
  136|       |            // Go to the left face.
  137|   814k|            corner_id = left_corner_id;
  138|   814k|            face_id = left_face_id;
  139|   814k|          }
  140|   852k|        } else {
  141|       |          // Right face was not visited.
  142|  35.5k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 29.2k, False: 6.26k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  29.2k|            corner_id = right_corner_id;
  145|  29.2k|            face_id = right_face_id;
  146|  29.2k|          } else {
  147|       |            // Both neighboring faces are unvisited, we need to visit both of
  148|       |            // them.
  149|       |
  150|       |            // Split the traversal.
  151|       |            // First make the top of the current corner stack point to the left
  152|       |            // face (this one will be processed second).
  153|  6.26k|            corner_traversal_stack_.back() = left_corner_id;
  154|       |            // Add a new corner to the top of the stack (right face needs to
  155|       |            // be traversed first).
  156|  6.26k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  6.26k|            break;
  159|  6.26k|          }
  160|  35.5k|        }
  161|   888k|      }
  162|  44.4k|    }
  163|  32.7k|    return true;
  164|  32.7k|  }
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  1.58k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  3.40k|  DepthFirstTraverser() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  2.12k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  4.73M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  4.73M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 1.58M, False: 3.15M]
  ------------------
   61|  1.58M|      return true;  // Already traversed.
   62|  1.58M|    }
   63|       |
   64|  3.15M|    corner_traversal_stack_.clear();
   65|  3.15M|    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.15M|    const VertexIndex next_vert =
   69|  3.15M|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  3.15M|    const VertexIndex prev_vert =
   71|  3.15M|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  3.15M|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 3.15M]
  |  Branch (72:45): [True: 0, False: 3.15M]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  3.15M|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 3.14M, False: 1.61k]
  ------------------
   76|  3.14M|      this->MarkVertexVisited(next_vert);
   77|  3.14M|      this->traversal_observer().OnNewVertexVisited(
   78|  3.14M|          next_vert, this->corner_table()->Next(corner_id));
   79|  3.14M|    }
   80|  3.15M|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 3.09M, False: 56.5k]
  ------------------
   81|  3.09M|      this->MarkVertexVisited(prev_vert);
   82|  3.09M|      this->traversal_observer().OnNewVertexVisited(
   83|  3.09M|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  3.09M|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|  6.35M|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 3.20M, False: 3.15M]
  ------------------
   88|       |      // Currently processed corner.
   89|  3.20M|      corner_id = corner_traversal_stack_.back();
   90|  3.20M|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  3.20M|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 3.20M]
  |  Branch (92:47): [True: 5.53k, False: 3.19M]
  ------------------
   93|       |        // This face has been already traversed.
   94|  5.53k|        corner_traversal_stack_.pop_back();
   95|  5.53k|        continue;
   96|  5.53k|      }
   97|  4.73M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 4.73M, Folded]
  ------------------
   98|  4.73M|        this->MarkFaceVisited(face_id);
   99|  4.73M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  4.73M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  4.73M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 4.73M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  4.73M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 3.91M, False: 827k]
  ------------------
  105|  3.91M|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|  3.91M|          this->MarkVertexVisited(vert_id);
  107|  3.91M|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|  3.91M|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 756k, False: 3.15M]
  ------------------
  109|   756k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   756k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   756k|            continue;
  112|   756k|          }
  113|  3.91M|        }
  114|       |        // The current vertex has been already visited or it was on a boundary.
  115|       |        // We need to determine whether we can visit any of it's neighboring
  116|       |        // faces.
  117|  3.98M|        const CornerIndex right_corner_id =
  118|  3.98M|            this->corner_table()->GetRightCorner(corner_id);
  119|  3.98M|        const CornerIndex left_corner_id =
  120|  3.98M|            this->corner_table()->GetLeftCorner(corner_id);
  121|  3.98M|        const FaceIndex right_face_id(
  122|  3.98M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 3.12M, False: 851k]
  ------------------
  123|  3.98M|                 ? kInvalidFaceIndex
  124|  3.98M|                 : FaceIndex(right_corner_id.value() / 3)));
  125|  3.98M|        const FaceIndex left_face_id(
  126|  3.98M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 3.17M, False: 805k]
  ------------------
  127|  3.98M|                 ? kInvalidFaceIndex
  128|  3.98M|                 : FaceIndex(left_corner_id.value() / 3)));
  129|  3.98M|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 3.88M, False: 92.1k]
  ------------------
  130|       |          // Right face has been already visited.
  131|  3.88M|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 3.17M, False: 715k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  3.17M|            corner_traversal_stack_.pop_back();
  134|  3.17M|            break;  // Break from the while (true) loop.
  135|  3.17M|          } else {
  136|       |            // Go to the left face.
  137|   715k|            corner_id = left_corner_id;
  138|   715k|            face_id = left_face_id;
  139|   715k|          }
  140|  3.88M|        } else {
  141|       |          // Right face was not visited.
  142|  92.1k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 64.6k, False: 27.4k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  64.6k|            corner_id = right_corner_id;
  145|  64.6k|            face_id = right_face_id;
  146|  64.6k|          } 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|  27.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|  27.4k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  27.4k|            break;
  159|  27.4k|          }
  160|  92.1k|        }
  161|  3.98M|      }
  162|  3.19M|    }
  163|  3.15M|    return true;
  164|  3.15M|  }
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  2.12k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  4.43k|  DepthFirstTraverser() {}

_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   58|    481|  void OnTraversalStart() {
   59|    481|    prediction_degree_.resize(this->corner_table()->num_vertices(), 0);
   60|    481|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   65|  3.13M|  bool TraverseFromCorner(CornerIndex corner_id) {
   66|  3.13M|    if (prediction_degree_.size() == 0) {
  ------------------
  |  Branch (66:9): [True: 0, False: 3.13M]
  ------------------
   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.13M|    traversal_stacks_[0].push_back(corner_id);
   74|  3.13M|    best_priority_ = 0;
   75|       |    // For the first face, check the remaining corners as they may not be
   76|       |    // processed yet.
   77|  3.13M|    const VertexIndex next_vert =
   78|  3.13M|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   79|  3.13M|    const VertexIndex prev_vert =
   80|  3.13M|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   81|  3.13M|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (81:9): [True: 12.0k, False: 3.12M]
  ------------------
   82|  12.0k|      this->MarkVertexVisited(next_vert);
   83|  12.0k|      this->traversal_observer().OnNewVertexVisited(
   84|  12.0k|          next_vert, this->corner_table()->Next(corner_id));
   85|  12.0k|    }
   86|  3.13M|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (86:9): [True: 2.94k, False: 3.13M]
  ------------------
   87|  2.94k|      this->MarkVertexVisited(prev_vert);
   88|  2.94k|      this->traversal_observer().OnNewVertexVisited(
   89|  2.94k|          prev_vert, this->corner_table()->Previous(corner_id));
   90|  2.94k|    }
   91|  3.13M|    const VertexIndex tip_vertex = this->corner_table()->Vertex(corner_id);
   92|  3.13M|    if (!this->IsVertexVisited(tip_vertex)) {
  ------------------
  |  Branch (92:9): [True: 2.79k, False: 3.13M]
  ------------------
   93|  2.79k|      this->MarkVertexVisited(tip_vertex);
   94|  2.79k|      this->traversal_observer().OnNewVertexVisited(tip_vertex, corner_id);
   95|  2.79k|    }
   96|       |    // Start the actual traversal.
   97|  9.22M|    while ((corner_id = PopNextCornerToTraverse()) != kInvalidCornerIndex) {
  ------------------
  |  Branch (97:12): [True: 6.08M, False: 3.13M]
  ------------------
   98|  6.08M|      FaceIndex face_id(corner_id.value() / 3);
   99|       |      // Make sure the face hasn't been visited yet.
  100|  6.08M|      if (this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (100:11): [True: 4.66M, False: 1.41M]
  ------------------
  101|       |        // This face has been already traversed.
  102|  4.66M|        continue;
  103|  4.66M|      }
  104|       |
  105|  3.13M|      while (true) {
  ------------------
  |  Branch (105:14): [True: 3.13M, Folded]
  ------------------
  106|  3.13M|        face_id = FaceIndex(corner_id.value() / 3);
  107|  3.13M|        this->MarkFaceVisited(face_id);
  108|  3.13M|        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.13M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  113|  3.13M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (113:13): [True: 1.58M, False: 1.55M]
  ------------------
  114|  1.58M|          this->MarkVertexVisited(vert_id);
  115|  1.58M|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  116|  1.58M|        }
  117|       |
  118|       |        // Check whether we can traverse to the right and left neighboring
  119|       |        // faces.
  120|  3.13M|        const CornerIndex right_corner_id =
  121|  3.13M|            this->corner_table()->GetRightCorner(corner_id);
  122|  3.13M|        const CornerIndex left_corner_id =
  123|  3.13M|            this->corner_table()->GetLeftCorner(corner_id);
  124|  3.13M|        const FaceIndex right_face_id(
  125|  3.13M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (125:14): [True: 23.4k, False: 3.11M]
  ------------------
  126|  3.13M|                 ? kInvalidFaceIndex
  127|  3.13M|                 : FaceIndex(right_corner_id.value() / 3)));
  128|  3.13M|        const FaceIndex left_face_id(
  129|  3.13M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (129:14): [True: 32.8k, False: 3.10M]
  ------------------
  130|  3.13M|                 ? kInvalidFaceIndex
  131|  3.13M|                 : FaceIndex(left_corner_id.value() / 3)));
  132|  3.13M|        const bool is_right_face_visited = this->IsFaceVisited(right_face_id);
  133|  3.13M|        const bool is_left_face_visited = this->IsFaceVisited(left_face_id);
  134|       |
  135|  3.13M|        if (!is_left_face_visited) {
  ------------------
  |  Branch (135:13): [True: 2.40M, False: 736k]
  ------------------
  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: 854k, False: 1.54M]
  |  Branch (138:40): [True: 808k, False: 46.3k]
  ------------------
  139|       |            // Right face has been already visited and the priority is equal or
  140|       |            // better than the best priority. We are sure that the left face
  141|       |            // would be traversed next so there is no need to put it onto the
  142|       |            // stack.
  143|   808k|            corner_id = left_corner_id;
  144|   808k|            continue;
  145|  1.59M|          } else {
  146|  1.59M|            AddCornerToTraversalStack(left_corner_id, priority);
  147|  1.59M|          }
  148|  2.40M|        }
  149|  2.32M|        if (!is_right_face_visited) {
  ------------------
  |  Branch (149:13): [True: 2.26M, False: 64.4k]
  ------------------
  150|       |          // Go to the right face.
  151|  2.26M|          const int priority = ComputePriority(right_corner_id);
  152|  2.26M|          if (priority <= best_priority_) {
  ------------------
  |  Branch (152:15): [True: 911k, False: 1.35M]
  ------------------
  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|   911k|            corner_id = right_corner_id;
  156|   911k|            continue;
  157|  1.35M|          } else {
  158|  1.35M|            AddCornerToTraversalStack(right_corner_id, priority);
  159|  1.35M|          }
  160|  2.26M|        }
  161|       |
  162|       |        // Couldn't proceed directly to the next corner
  163|  1.41M|        break;
  164|  2.32M|      }
  165|  1.41M|    }
  166|  3.13M|    return true;
  167|  3.13M|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE23PopNextCornerToTraverseEv:
  173|  9.22M|  CornerIndex PopNextCornerToTraverse() {
  174|  19.3M|    for (int i = best_priority_; i < kMaxPriority; ++i) {
  ------------------
  |  Branch (174:34): [True: 16.2M, False: 3.13M]
  ------------------
  175|  16.2M|      if (!traversal_stacks_[i].empty()) {
  ------------------
  |  Branch (175:11): [True: 6.08M, False: 10.1M]
  ------------------
  176|  6.08M|        const CornerIndex ret = traversal_stacks_[i].back();
  177|  6.08M|        traversal_stacks_[i].pop_back();
  178|  6.08M|        best_priority_ = i;
  179|  6.08M|        return ret;
  180|  6.08M|      }
  181|  16.2M|    }
  182|  3.13M|    return kInvalidCornerIndex;
  183|  9.22M|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15ComputePriorityENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  194|  4.66M|  inline int ComputePriority(CornerIndex corner_id) {
  195|  4.66M|    const VertexIndex v_tip = this->corner_table()->Vertex(corner_id);
  196|       |    // Priority 0 when traversing to already visited vertices.
  197|  4.66M|    int priority = 0;
  198|  4.66M|    if (!this->IsVertexVisited(v_tip)) {
  ------------------
  |  Branch (198:9): [True: 3.09M, False: 1.57M]
  ------------------
  199|  3.09M|      const int degree = ++prediction_degree_[v_tip];
  200|       |      // Priority 1 when prediction degree > 1, otherwise 2.
  201|  3.09M|      priority = (degree > 1 ? 1 : 2);
  ------------------
  |  Branch (201:19): [True: 1.51M, False: 1.58M]
  ------------------
  202|  3.09M|    }
  203|       |    // Clamp the priority to the maximum number of buckets.
  204|  4.66M|    if (priority >= kMaxPriority) {
  ------------------
  |  Branch (204:9): [True: 0, False: 4.66M]
  ------------------
  205|      0|      priority = kMaxPriority - 1;
  206|      0|    }
  207|  4.66M|    return priority;
  208|  4.66M|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE25AddCornerToTraversalStackENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEi:
  185|  2.94M|  inline void AddCornerToTraversalStack(CornerIndex ci, int priority) {
  186|  2.94M|    traversal_stacks_[priority].push_back(ci);
  187|       |    // Make sure that the best available priority is up to date.
  188|  2.94M|    if (priority < best_priority_) {
  ------------------
  |  Branch (188:9): [True: 714k, False: 2.23M]
  ------------------
  189|   714k|      best_priority_ = priority;
  190|   714k|    }
  191|  2.94M|  }
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   63|    481|  void OnTraversalEnd() {}
_ZN5draco28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   55|  1.03k|  MaxPredictionDegreeTraverser() {}

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

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

_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  4.43k|  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.49M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  2.49M|    is_vertex_visited_[vert_id.value()] = true;
   68|  2.49M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  7.35M|  inline TraversalObserverT &traversal_observer() {
   75|  7.35M|    return traversal_observer_;
   76|  7.35M|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  14.1M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  14.1M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 110k, False: 14.0M]
  ------------------
   47|   110k|      return true;  // Invalid faces are always considered as visited.
   48|   110k|    }
   49|  14.0M|    return is_face_visited_[face_id.value()];
   50|  14.1M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  4.85M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  4.85M|    is_face_visited_[face_id.value()] = true;
   62|  4.85M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  4.44k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  4.44k|  virtual ~TraverserBase() = default;
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  2.22k|                    TraversalObserver traversal_observer) {
   37|  2.22k|    corner_table_ = corner_table;
   38|  2.22k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  2.22k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  2.22k|    traversal_observer_ = traversal_observer;
   41|  2.22k|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  1.72M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  1.72M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 1.72M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  1.72M|    return is_face_visited_[corner_id.value() / 3];
   58|  1.72M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  36.2M|  inline const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  4.73M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  4.73M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 4.73M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  4.73M|    return is_face_visited_[corner_id.value() / 3];
   58|  4.73M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  11.0M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  11.0M|    return is_vertex_visited_[vert_id.value()];
   65|  11.0M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  10.1M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  10.1M|    is_vertex_visited_[vert_id.value()] = true;
   68|  10.1M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  14.8M|  inline TraversalObserverT &traversal_observer() {
   75|  14.8M|    return traversal_observer_;
   76|  14.8M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  11.1M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  11.1M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 6.30M, False: 4.86M]
  ------------------
   47|  6.30M|      return true;  // Invalid faces are always considered as visited.
   48|  6.30M|    }
   49|  4.86M|    return is_face_visited_[face_id.value()];
   50|  11.1M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  4.73M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  4.73M|    is_face_visited_[face_id.value()] = true;
   62|  4.73M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  4.43k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  2.21k|                    TraversalObserver traversal_observer) {
   37|  2.21k|    corner_table_ = corner_table;
   38|  2.21k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  2.21k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  2.21k|    traversal_observer_ = traversal_observer;
   41|  2.21k|  }

_ZN5draco17PointCloudDecoderC2Ev:
   22|  12.7k|    : point_cloud_(nullptr),
   23|  12.7k|      buffer_(nullptr),
   24|  12.7k|      version_major_(0),
   25|  12.7k|      version_minor_(0),
   26|  12.7k|      options_(nullptr) {}
_ZN5draco17PointCloudDecoder12DecodeHeaderEPNS_13DecoderBufferEPNS_11DracoHeaderE:
   29|  25.5k|                                       DracoHeader *out_header) {
   30|  25.5k|  constexpr char kIoErrorMsg[] = "Failed to parse Draco header.";
   31|  25.5k|  if (!buffer->Decode(out_header->draco_string, 5)) {
  ------------------
  |  Branch (31:7): [True: 0, False: 25.5k]
  ------------------
   32|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   33|      0|  }
   34|  25.5k|  if (memcmp(out_header->draco_string, "DRACO", 5) != 0) {
  ------------------
  |  Branch (34:7): [True: 6, False: 25.5k]
  ------------------
   35|      6|    return Status(Status::DRACO_ERROR, "Not a Draco file.");
   36|      6|  }
   37|  25.5k|  if (!buffer->Decode(&(out_header->version_major))) {
  ------------------
  |  Branch (37:7): [True: 0, False: 25.5k]
  ------------------
   38|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   39|      0|  }
   40|  25.5k|  if (!buffer->Decode(&(out_header->version_minor))) {
  ------------------
  |  Branch (40:7): [True: 0, False: 25.5k]
  ------------------
   41|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   42|      0|  }
   43|  25.5k|  if (!buffer->Decode(&(out_header->encoder_type))) {
  ------------------
  |  Branch (43:7): [True: 0, False: 25.5k]
  ------------------
   44|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   45|      0|  }
   46|  25.5k|  if (!buffer->Decode(&(out_header->encoder_method))) {
  ------------------
  |  Branch (46:7): [True: 0, False: 25.5k]
  ------------------
   47|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   48|      0|  }
   49|  25.5k|  if (!buffer->Decode(&(out_header->flags))) {
  ------------------
  |  Branch (49:7): [True: 0, False: 25.5k]
  ------------------
   50|      0|    return Status(Status::IO_ERROR, kIoErrorMsg);
   51|      0|  }
   52|  25.5k|  return OkStatus();
   53|  25.5k|}
_ZN5draco17PointCloudDecoder14DecodeMetadataEv:
   55|    914|Status PointCloudDecoder::DecodeMetadata() {
   56|    914|  std::unique_ptr<GeometryMetadata> metadata =
   57|    914|      std::unique_ptr<GeometryMetadata>(new GeometryMetadata());
   58|    914|  MetadataDecoder metadata_decoder;
   59|    914|  if (!metadata_decoder.DecodeGeometryMetadata(buffer_, metadata.get())) {
  ------------------
  |  Branch (59:7): [True: 720, False: 194]
  ------------------
   60|    720|    return Status(Status::DRACO_ERROR, "Failed to decode metadata.");
   61|    720|  }
   62|    194|  point_cloud_->AddMetadata(std::move(metadata));
   63|    194|  return OkStatus();
   64|    914|}
_ZN5draco17PointCloudDecoder6DecodeERKNS_12DracoOptionsINS_17GeometryAttribute4TypeEEEPNS_13DecoderBufferEPNS_10PointCloudE:
   68|  12.7k|                                 PointCloud *out_point_cloud) {
   69|  12.7k|  options_ = &options;
   70|  12.7k|  buffer_ = in_buffer;
   71|  12.7k|  point_cloud_ = out_point_cloud;
   72|  12.7k|  DracoHeader header;
   73|  12.7k|  DRACO_RETURN_IF_ERROR(DecodeHeader(buffer_, &header))
  ------------------
  |  |   74|  12.7k|  {                                                   \
  |  |   75|  12.7k|    const draco::Status _local_status = (expression); \
  |  |   76|  12.7k|    if (!_local_status.ok()) {                        \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 0, False: 12.7k]
  |  |  ------------------
  |  |   77|      0|      return _local_status;                           \
  |  |   78|      0|    }                                                 \
  |  |   79|  12.7k|  }
  ------------------
   74|       |  // Sanity check that we are really using the right decoder (mostly for cases
   75|       |  // where the Decode method was called manually outside of our main API.
   76|  12.7k|  if (header.encoder_type != GetGeometryType()) {
  ------------------
  |  Branch (76:7): [True: 0, False: 12.7k]
  ------------------
   77|      0|    return Status(Status::DRACO_ERROR,
   78|      0|                  "Using incompatible decoder for the input geometry.");
   79|      0|  }
   80|       |  // TODO(ostava): We should check the method as well, but currently decoders
   81|       |  // don't expose the decoding method id.
   82|  12.7k|  version_major_ = header.version_major;
   83|  12.7k|  version_minor_ = header.version_minor;
   84|       |
   85|  12.7k|  const uint8_t max_supported_major_version =
   86|  12.7k|      header.encoder_type == POINT_CLOUD ? kDracoPointCloudBitstreamVersionMajor
  ------------------
  |  Branch (86:7): [True: 0, False: 12.7k]
  ------------------
   87|  12.7k|                                         : kDracoMeshBitstreamVersionMajor;
   88|  12.7k|  const uint8_t max_supported_minor_version =
   89|  12.7k|      header.encoder_type == POINT_CLOUD ? kDracoPointCloudBitstreamVersionMinor
  ------------------
  |  Branch (89:7): [True: 0, False: 12.7k]
  ------------------
   90|  12.7k|                                         : kDracoMeshBitstreamVersionMinor;
   91|       |
   92|       |  // Check for version compatibility.
   93|  12.7k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   94|  12.7k|  if (version_major_ < 1 || version_major_ > max_supported_major_version) {
  ------------------
  |  Branch (94:7): [True: 0, False: 12.7k]
  |  Branch (94:29): [True: 0, False: 12.7k]
  ------------------
   95|      0|    return Status(Status::UNKNOWN_VERSION, "Unknown major version.");
   96|      0|  }
   97|  12.7k|  if (version_major_ == max_supported_major_version &&
  ------------------
  |  Branch (97:7): [True: 11.3k, False: 1.42k]
  ------------------
   98|  11.3k|      version_minor_ > max_supported_minor_version) {
  ------------------
  |  Branch (98:7): [True: 0, False: 11.3k]
  ------------------
   99|      0|    return Status(Status::UNKNOWN_VERSION, "Unknown minor version.");
  100|      0|  }
  101|       |#else
  102|       |  if (version_major_ != max_supported_major_version) {
  103|       |    return Status(Status::UNKNOWN_VERSION, "Unsupported major version.");
  104|       |  }
  105|       |  if (version_minor_ != max_supported_minor_version) {
  106|       |    return Status(Status::UNKNOWN_VERSION, "Unsupported minor version.");
  107|       |  }
  108|       |#endif
  109|  12.7k|  buffer_->set_bitstream_version(
  110|  12.7k|      DRACO_BITSTREAM_VERSION(version_major_, version_minor_));
  ------------------
  |  |  115|  12.7k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  111|       |
  112|  12.7k|  if (bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 3) &&
  ------------------
  |  |  115|  25.5k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (112:7): [True: 12.2k, False: 545]
  ------------------
  113|  12.2k|      (header.flags & METADATA_FLAG_MASK)) {
  ------------------
  |  |  151|  12.2k|#define METADATA_FLAG_MASK 0x8000
  ------------------
  |  Branch (113:7): [True: 914, False: 11.3k]
  ------------------
  114|    914|    DRACO_RETURN_IF_ERROR(DecodeMetadata())
  ------------------
  |  |   74|    914|  {                                                   \
  |  |   75|    914|    const draco::Status _local_status = (expression); \
  |  |   76|    914|    if (!_local_status.ok()) {                        \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 720, False: 194]
  |  |  ------------------
  |  |   77|    720|      return _local_status;                           \
  |  |   78|    720|    }                                                 \
  |  |   79|    914|  }
  ------------------
  115|    914|  }
  116|  12.0k|  if (!InitializeDecoder()) {
  ------------------
  |  Branch (116:7): [True: 0, False: 12.0k]
  ------------------
  117|      0|    return Status(Status::DRACO_ERROR, "Failed to initialize the decoder.");
  118|      0|  }
  119|  12.0k|  if (!DecodeGeometryData()) {
  ------------------
  |  Branch (119:7): [True: 6.13k, False: 5.91k]
  ------------------
  120|  6.13k|    return Status(Status::DRACO_ERROR, "Failed to decode geometry data.");
  121|  6.13k|  }
  122|  5.91k|  if (!DecodePointAttributes()) {
  ------------------
  |  Branch (122:7): [True: 4.65k, False: 1.25k]
  ------------------
  123|  4.65k|    return Status(Status::DRACO_ERROR, "Failed to decode point attributes.");
  124|  4.65k|  }
  125|  1.25k|  return OkStatus();
  126|  5.91k|}
_ZN5draco17PointCloudDecoder21DecodePointAttributesEv:
  128|  5.91k|bool PointCloudDecoder::DecodePointAttributes() {
  129|  5.91k|  uint8_t num_attributes_decoders;
  130|  5.91k|  if (!buffer_->Decode(&num_attributes_decoders)) {
  ------------------
  |  Branch (130:7): [True: 181, False: 5.73k]
  ------------------
  131|    181|    return false;
  132|    181|  }
  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|  38.8k|  for (int i = 0; i < num_attributes_decoders; ++i) {
  ------------------
  |  Branch (136:19): [True: 33.5k, False: 5.29k]
  ------------------
  137|  33.5k|    if (!CreateAttributesDecoder(i)) {
  ------------------
  |  Branch (137:9): [True: 438, False: 33.0k]
  ------------------
  138|    438|      return false;
  139|    438|    }
  140|  33.5k|  }
  141|       |
  142|       |  // Initialize all attributes decoders. No data is decoded here.
  143|  32.9k|  for (auto &att_dec : attributes_decoders_) {
  ------------------
  |  Branch (143:22): [True: 32.9k, False: 5.29k]
  ------------------
  144|  32.9k|    if (!att_dec->Init(this, point_cloud_)) {
  ------------------
  |  Branch (144:9): [True: 0, False: 32.9k]
  ------------------
  145|      0|      return false;
  146|      0|    }
  147|  32.9k|  }
  148|       |
  149|       |  // Decode any data needed by the attribute decoders.
  150|  15.0k|  for (int i = 0; i < num_attributes_decoders; ++i) {
  ------------------
  |  Branch (150:19): [True: 10.0k, False: 5.03k]
  ------------------
  151|  10.0k|    if (!attributes_decoders_[i]->DecodeAttributesDecoderData(buffer_)) {
  ------------------
  |  Branch (151:9): [True: 260, False: 9.76k]
  ------------------
  152|    260|      return false;
  153|    260|    }
  154|  10.0k|  }
  155|       |
  156|       |  // Create map between attribute and decoder ids.
  157|  13.6k|  for (int i = 0; i < num_attributes_decoders; ++i) {
  ------------------
  |  Branch (157:19): [True: 8.61k, False: 5.03k]
  ------------------
  158|  8.61k|    const int32_t num_attributes = attributes_decoders_[i]->GetNumAttributes();
  159|  32.6k|    for (int j = 0; j < num_attributes; ++j) {
  ------------------
  |  Branch (159:21): [True: 24.0k, False: 8.61k]
  ------------------
  160|  24.0k|      int att_id = attributes_decoders_[i]->GetAttributeId(j);
  161|  24.0k|      if (att_id >= attribute_to_decoder_map_.size()) {
  ------------------
  |  Branch (161:11): [True: 24.0k, False: 0]
  ------------------
  162|  24.0k|        attribute_to_decoder_map_.resize(att_id + 1);
  163|  24.0k|      }
  164|  24.0k|      attribute_to_decoder_map_[att_id] = i;
  165|  24.0k|    }
  166|  8.61k|  }
  167|       |
  168|       |  // Decode the actual attributes using the created attribute decoders.
  169|  5.03k|  if (!DecodeAllAttributes()) {
  ------------------
  |  Branch (169:7): [True: 3.77k, False: 1.25k]
  ------------------
  170|  3.77k|    return false;
  171|  3.77k|  }
  172|       |
  173|  1.25k|  if (!OnAttributesDecoded()) {
  ------------------
  |  Branch (173:7): [True: 0, False: 1.25k]
  ------------------
  174|      0|    return false;
  175|      0|  }
  176|  1.25k|  return true;
  177|  1.25k|}
_ZN5draco17PointCloudDecoder19DecodeAllAttributesEv:
  179|  5.03k|bool PointCloudDecoder::DecodeAllAttributes() {
  180|  5.93k|  for (auto &att_dec : attributes_decoders_) {
  ------------------
  |  Branch (180:22): [True: 5.93k, False: 1.25k]
  ------------------
  181|  5.93k|    if (!att_dec->DecodeAttributes(buffer_)) {
  ------------------
  |  Branch (181:9): [True: 3.77k, False: 2.15k]
  ------------------
  182|  3.77k|      return false;
  183|  3.77k|    }
  184|  5.93k|  }
  185|  1.25k|  return true;
  186|  5.03k|}
_ZN5draco17PointCloudDecoder20GetPortableAttributeEi:
  189|  2.57k|    int32_t parent_att_id) {
  190|  2.57k|  if (parent_att_id < 0 || parent_att_id >= point_cloud_->num_attributes()) {
  ------------------
  |  Branch (190:7): [True: 0, False: 2.57k]
  |  Branch (190:28): [True: 0, False: 2.57k]
  ------------------
  191|      0|    return nullptr;
  192|      0|  }
  193|  2.57k|  const int32_t parent_att_decoder_id =
  194|  2.57k|      attribute_to_decoder_map_[parent_att_id];
  195|  2.57k|  return attributes_decoders_[parent_att_decoder_id]->GetPortableAttribute(
  196|  2.57k|      parent_att_id);
  197|  2.57k|}

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

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

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

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

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

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

_ZN5draco13DecoderBuffer28DecodeLeastSignificantBits32EjPj:
   57|  46.2M|  bool DecodeLeastSignificantBits32(uint32_t nbits, uint32_t *out_value) {
   58|  46.2M|    if (!bit_decoder_active()) {
  ------------------
  |  Branch (58:9): [True: 0, False: 46.2M]
  ------------------
   59|      0|      return false;
   60|      0|    }
   61|  46.2M|    return bit_decoder_.GetBits(nbits, out_value);
   62|  46.2M|  }
_ZN5draco13DecoderBuffer6DecodeEPvm:
   76|  1.13G|  bool Decode(void *out_data, size_t size_to_decode) {
   77|  1.13G|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (77:9): [True: 516, False: 1.13G]
  ------------------
   78|    516|      return false;  // Buffer overflow.
   79|    516|    }
   80|  1.13G|    memcpy(out_data, (data_ + pos_), size_to_decode);
   81|  1.13G|    pos_ += size_to_decode;
   82|  1.13G|    return true;
   83|  1.13G|  }
_ZN5draco13DecoderBuffer7AdvanceEl:
  105|  31.0k|  void Advance(int64_t bytes) { pos_ += bytes; }
_ZN5draco13DecoderBuffer21set_bitstream_versionEt:
  111|  12.7k|  void set_bitstream_version(uint16_t version) { bitstream_version_ = version; }
_ZNK5draco13DecoderBuffer9data_headEv:
  114|  48.1k|  const char *data_head() const { return data_ + pos_; }
_ZNK5draco13DecoderBuffer14remaining_sizeEv:
  115|   368k|  int64_t remaining_size() const { return data_size_ - pos_; }
_ZNK5draco13DecoderBuffer12decoded_sizeEv:
  116|  7.91k|  int64_t decoded_size() const { return pos_; }
_ZNK5draco13DecoderBuffer18bit_decoder_activeEv:
  117|  46.2M|  bool bit_decoder_active() const { return bit_mode_; }
_ZNK5draco13DecoderBuffer17bitstream_versionEv:
  120|  4.26M|  uint16_t bitstream_version() const { return bitstream_version_; }
_ZN5draco13DecoderBuffer10BitDecoder5resetEPKvm:
  130|  9.65k|    inline void reset(const void *b, size_t s) {
  131|  9.65k|      bit_offset_ = 0;
  132|  9.65k|      bit_buffer_ = static_cast<const uint8_t *>(b);
  133|  9.65k|      bit_buffer_end_ = bit_buffer_ + s;
  134|  9.65k|    }
_ZNK5draco13DecoderBuffer10BitDecoder11BitsDecodedEv:
  137|  8.08k|    inline uint64_t BitsDecoded() const {
  138|  8.08k|      return static_cast<uint64_t>(bit_offset_);
  139|  8.08k|    }
_ZN5draco13DecoderBuffer10BitDecoder7GetBitsEjPj:
  160|  46.2M|    inline bool GetBits(uint32_t nbits, uint32_t *x) {
  161|  46.2M|      if (nbits > 32) {
  ------------------
  |  Branch (161:11): [True: 15, False: 46.2M]
  ------------------
  162|     15|        return false;
  163|     15|      }
  164|  46.2M|      uint32_t value = 0;
  165|   102M|      for (uint32_t bit = 0; bit < nbits; ++bit) {
  ------------------
  |  Branch (165:30): [True: 56.0M, False: 46.2M]
  ------------------
  166|  56.0M|        value |= GetBit() << bit;
  167|  56.0M|      }
  168|  46.2M|      *x = value;
  169|  46.2M|      return true;
  170|  46.2M|    }
_ZN5draco13DecoderBuffer10BitDecoder6GetBitEv:
  175|  56.0M|    inline int GetBit() {
  176|  56.0M|      const size_t off = bit_offset_;
  177|  56.0M|      const size_t byte_offset = off >> 3;
  178|  56.0M|      const int bit_shift = static_cast<int>(off & 0x7);
  179|  56.0M|      if (bit_buffer_ + byte_offset < bit_buffer_end_) {
  ------------------
  |  Branch (179:11): [True: 50.3M, False: 5.67M]
  ------------------
  180|  50.3M|        const int bit = (bit_buffer_[byte_offset] >> bit_shift) & 1;
  181|  50.3M|        bit_offset_ = off + 1;
  182|  50.3M|        return bit;
  183|  50.3M|      }
  184|  5.67M|      return 0;
  185|  56.0M|    }
_ZN5draco13DecoderBuffer6DecodeIhEEbPT_:
   68|  17.7M|  bool Decode(T *out_val) {
   69|  17.7M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 3.88k, False: 17.7M]
  ------------------
   70|  3.88k|      return false;
   71|  3.88k|    }
   72|  17.7M|    pos_ += sizeof(T);
   73|  17.7M|    return true;
   74|  17.7M|  }
_ZN5draco13DecoderBuffer4PeekIhEEbPT_:
   87|  17.7M|  bool Peek(T *out_val) {
   88|  17.7M|    const size_t size_to_decode = sizeof(T);
   89|  17.7M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 3.88k, False: 17.7M]
  ------------------
   90|  3.88k|      return false;  // Buffer overflow.
   91|  3.88k|    }
   92|  17.7M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  17.7M|    return true;
   94|  17.7M|  }
_ZN5draco13DecoderBuffer6DecodeIiEEbPT_:
   68|  14.0k|  bool Decode(T *out_val) {
   69|  14.0k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 147, False: 13.8k]
  ------------------
   70|    147|      return false;
   71|    147|    }
   72|  13.8k|    pos_ += sizeof(T);
   73|  13.8k|    return true;
   74|  14.0k|  }
_ZN5draco13DecoderBuffer4PeekIiEEbPT_:
   87|  14.0k|  bool Peek(T *out_val) {
   88|  14.0k|    const size_t size_to_decode = sizeof(T);
   89|  14.0k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 147, False: 13.8k]
  ------------------
   90|    147|      return false;  // Buffer overflow.
   91|    147|    }
   92|  13.8k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  13.8k|    return true;
   94|  14.0k|  }
_ZN5draco13DecoderBuffer6DecodeIjEEbPT_:
   68|   831k|  bool Decode(T *out_val) {
   69|   831k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 198, False: 831k]
  ------------------
   70|    198|      return false;
   71|    198|    }
   72|   831k|    pos_ += sizeof(T);
   73|   831k|    return true;
   74|   831k|  }
_ZN5draco13DecoderBuffer4PeekIjEEbPT_:
   87|   831k|  bool Peek(T *out_val) {
   88|   831k|    const size_t size_to_decode = sizeof(T);
   89|   831k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 198, False: 831k]
  ------------------
   90|    198|      return false;  // Buffer overflow.
   91|    198|    }
   92|   831k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|   831k|    return true;
   94|   831k|  }
_ZN5draco13DecoderBuffer6DecodeIaEEbPT_:
   68|  26.8k|  bool Decode(T *out_val) {
   69|  26.8k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 325, False: 26.5k]
  ------------------
   70|    325|      return false;
   71|    325|    }
   72|  26.5k|    pos_ += sizeof(T);
   73|  26.5k|    return true;
   74|  26.8k|  }
_ZN5draco13DecoderBuffer4PeekIaEEbPT_:
   87|  26.8k|  bool Peek(T *out_val) {
   88|  26.8k|    const size_t size_to_decode = sizeof(T);
   89|  26.8k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 325, False: 26.5k]
  ------------------
   90|    325|      return false;  // Buffer overflow.
   91|    325|    }
   92|  26.5k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  26.5k|    return true;
   94|  26.8k|  }
_ZN5draco13DecoderBuffer6DecodeINS_13HoleEventDataEEEbPT_:
   68|  1.12M|  bool Decode(T *out_val) {
   69|  1.12M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 153, False: 1.12M]
  ------------------
   70|    153|      return false;
   71|    153|    }
   72|  1.12M|    pos_ += sizeof(T);
   73|  1.12M|    return true;
   74|  1.12M|  }
_ZN5draco13DecoderBuffer4PeekINS_13HoleEventDataEEEbPT_:
   87|  1.12M|  bool Peek(T *out_val) {
   88|  1.12M|    const size_t size_to_decode = sizeof(T);
   89|  1.12M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 153, False: 1.12M]
  ------------------
   90|    153|      return false;  // Buffer overflow.
   91|    153|    }
   92|  1.12M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.12M|    return true;
   94|  1.12M|  }
_ZN5draco13DecoderBuffer6DecodeItEEbPT_:
   68|   672k|  bool Decode(T *out_val) {
   69|   672k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 19, False: 672k]
  ------------------
   70|     19|      return false;
   71|     19|    }
   72|   672k|    pos_ += sizeof(T);
   73|   672k|    return true;
   74|   672k|  }
_ZN5draco13DecoderBuffer4PeekItEEbPT_:
   87|   672k|  bool Peek(T *out_val) {
   88|   672k|    const size_t size_to_decode = sizeof(T);
   89|   672k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 19, False: 672k]
  ------------------
   90|     19|      return false;  // Buffer overflow.
   91|     19|    }
   92|   672k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|   672k|    return true;
   94|   672k|  }
_ZN5draco13DecoderBuffer6DecodeImEEbPT_:
   68|  2.56k|  bool Decode(T *out_val) {
   69|  2.56k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 24, False: 2.54k]
  ------------------
   70|     24|      return false;
   71|     24|    }
   72|  2.54k|    pos_ += sizeof(T);
   73|  2.54k|    return true;
   74|  2.56k|  }
_ZN5draco13DecoderBuffer4PeekImEEbPT_:
   87|  2.56k|  bool Peek(T *out_val) {
   88|  2.56k|    const size_t size_to_decode = sizeof(T);
   89|  2.56k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 24, False: 2.54k]
  ------------------
   90|     24|      return false;  // Buffer overflow.
   91|     24|    }
   92|  2.54k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  2.54k|    return true;
   94|  2.56k|  }
_ZN5draco13DecoderBuffer6DecodeIfEEbPT_:
   68|    219|  bool Decode(T *out_val) {
   69|    219|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 20, False: 199]
  ------------------
   70|     20|      return false;
   71|     20|    }
   72|    199|    pos_ += sizeof(T);
   73|    199|    return true;
   74|    219|  }
_ZN5draco13DecoderBuffer4PeekIfEEbPT_:
   87|    219|  bool Peek(T *out_val) {
   88|    219|    const size_t size_to_decode = sizeof(T);
   89|    219|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 20, False: 199]
  ------------------
   90|     20|      return false;  // Buffer overflow.
   91|     20|    }
   92|    199|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|    199|    return true;
   94|    219|  }

_ZNK5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EE5valueEv:
   73|   112M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EE5valueEv:
   73|   121M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEgeERKj:
   98|  13.2M|  constexpr bool operator>=(const ValueTypeT &val) const {
   99|  13.2M|    return value_ >= val;
  100|  13.2M|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EE5valueEv:
   73|   325M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EE5valueEv:
   73|  4.15G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKj:
   90|  29.6M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEaSERKS2_:
  151|   109M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|   109M|    value_ = i.value_;
  153|   109M|    return *this;
  154|   109M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKS2_:
  151|   306M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|   306M|    value_ = i.value_;
  153|   306M|    return *this;
  154|   306M|  }
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEppEv:
  102|  29.5M|  inline ThisIndexType &operator++() {
  103|  29.5M|    ++value_;
  104|  29.5M|    return *this;
  105|  29.5M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEeqERKS2_:
   75|  3.05G|  constexpr bool operator==(const IndexType &i) const {
   76|  3.05G|    return value_ == i.value_;
   77|  3.05G|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EE5valueEv:
   73|  1.20G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKS2_:
   87|  11.9k|  constexpr bool operator<(const IndexType &i) const {
   88|  11.9k|    return value_ < i.value_;
   89|  11.9k|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEeqERKS2_:
   75|   173M|  constexpr bool operator==(const IndexType &i) const {
   76|   173M|    return value_ == i.value_;
   77|   173M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEmiERKj:
  131|   216M|  constexpr ThisIndexType operator-(const ValueTypeT &val) const {
  132|   216M|    return ThisIndexType(value_ - val);
  133|   216M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEplERKj:
  125|   966M|  constexpr ThisIndexType operator+(const ValueTypeT &val) const {
  126|   966M|    return ThisIndexType(value_ + val);
  127|   966M|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEeqERKS2_:
   75|  25.3M|  constexpr bool operator==(const IndexType &i) const {
   76|  25.3M|    return value_ == i.value_;
   77|  25.3M|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEneERKS2_:
   81|   321M|  constexpr bool operator!=(const IndexType &i) const {
   82|   321M|    return value_ != i.value_;
   83|   321M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEneERKS2_:
   81|   446M|  constexpr bool operator!=(const IndexType &i) const {
   82|   446M|    return value_ != i.value_;
   83|   446M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEppEv:
  102|   679M|  inline ThisIndexType &operator++() {
  103|   679M|    ++value_;
  104|   679M|    return *this;
  105|   679M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEaSERKS2_:
  151|   565M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|   565M|    value_ = i.value_;
  153|   565M|    return *this;
  154|   565M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEaSERKS2_:
  151|  1.39G|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  1.39G|    value_ = i.value_;
  153|  1.39G|    return *this;
  154|  1.39G|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEgeERKj:
   98|  49.1M|  constexpr bool operator>=(const ValueTypeT &val) const {
   99|  49.1M|    return value_ >= val;
  100|  49.1M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEltERKj:
   90|  11.1M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ej:
   71|  1.43G|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2ERKS2_:
   70|  30.2G|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2Ej:
   71|   248M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2ERKS2_:
   70|  23.8G|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ev:
   69|   315M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEplERKj:
  125|  16.5M|  constexpr ThisIndexType operator+(const ValueTypeT &val) const {
  126|  16.5M|    return ThisIndexType(value_ + val);
  127|  16.5M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2Ej:
   71|   191M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKS2_:
   87|  31.4M|  constexpr bool operator<(const IndexType &i) const {
   88|  31.4M|    return value_ < i.value_;
   89|  31.4M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2ERKS2_:
   70|   270M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ev:
   69|   307M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2ERKS2_:
   70|  80.5M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2Ej:
   71|  86.0M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2ERKS2_:
   70|   336M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEaSERKS2_:
  151|  6.35M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  6.35M|    value_ = i.value_;
  153|  6.35M|    return *this;
  154|  6.35M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEpLERKj:
  139|  11.1M|  inline ThisIndexType operator+=(const ValueTypeT &val) {
  140|  11.1M|    value_ += val;
  141|  11.1M|    return *this;
  142|  11.1M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKj:
  155|  40.5M|  inline ThisIndexType &operator=(const ValueTypeT &val) {
  156|  40.5M|    value_ = val;
  157|  40.5M|    return *this;
  158|  40.5M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ej:
   71|   267M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKj:
   90|  7.97M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEppEv:
  102|  7.96M|  inline ThisIndexType &operator++() {
  103|  7.96M|    ++value_;
  104|  7.96M|    return *this;
  105|  7.96M|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEltERKj:
   90|  26.2M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEppEv:
  102|  26.2M|  inline ThisIndexType &operator++() {
  103|  26.2M|    ++value_;
  104|  26.2M|    return *this;
  105|  26.2M|  }

_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   73|  45.6M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  45.6M|    return vector_[index.value()];
   75|  45.6M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE4sizeEv:
   59|  26.2M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE5clearEv:
   48|  13.1k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE6resizeEmRKS5_:
   51|  18.9k|  void resize(size_t size, const ValueTypeT &val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   70|  75.4M|  inline reference operator[](const IndexTypeT &index) {
   71|  75.4M|    return vector_[index.value()];
   72|  75.4M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE9push_backERKS8_:
   62|   323k|  void push_back(const ValueTypeT &val) { vector_.push_back(val); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE4sizeEv:
   59|  26.4M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE6resizeEmRKS8_:
   51|  4.87k|  void resize(size_t size, const ValueTypeT &val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEixERKS3_:
   70|  13.2M|  inline reference operator[](const IndexTypeT &index) {
   71|  13.2M|    return vector_[index.value()];
   72|  13.2M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEixERKS3_:
   73|  29.0M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  29.0M|    return vector_[index.value()];
   75|  29.0M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE4sizeEv:
   59|   247M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE4sizeEv:
   59|  13.4M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   73|   405M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|   405M|    return vector_[index.value()];
   75|   405M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   73|  1.07G|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  1.07G|    return vector_[index.value()];
   75|  1.07G|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   70|   521M|  inline reference operator[](const IndexTypeT &index) {
   71|   521M|    return vector_[index.value()];
   72|   521M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   73|  78.3M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  78.3M|    return vector_[index.value()];
   75|  78.3M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   70|   450M|  inline reference operator[](const IndexTypeT &index) {
   71|   450M|    return vector_[index.value()];
   72|   450M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE9push_backERKS5_:
   62|   125M|  void push_back(const ValueTypeT &val) { vector_.push_back(val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   70|   291M|  inline reference operator[](const IndexTypeT &index) {
   71|   291M|    return vector_[index.value()];
   72|   291M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE6resizeEmRKi:
   51|  2.90k|  void resize(size_t size, const ValueTypeT &val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEixERKS3_:
   70|   243M|  inline reference operator[](const IndexTypeT &index) {
   71|   243M|    return vector_[index.value()];
   72|   243M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEC2Ev:
   39|  62.3k|  IndexTypeVector() {}
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4sizeEv:
   59|  3.13M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaEC2Ev:
   39|  58.4k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEC2Ev:
   39|  8.51k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EC2Ev:
   39|  8.51k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEC2Ev:
   39|  8.51k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_EC2Ev:
   39|  8.51k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE5clearEv:
   48|  16.3k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4swapERS4_:
   55|  16.3k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT> &arg) {
   56|  16.3k|    vector_.swap(arg.vector_);
   57|  16.3k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE5clearEv:
   48|  16.3k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE4swapERS4_:
   55|  16.3k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT> &arg) {
   56|  16.3k|    vector_.swap(arg.vector_);
   57|  16.3k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE6assignEmRKS5_:
   52|  8.51k|  void assign(size_t size, const ValueTypeT &val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_E6assignEmRKS3_:
   52|  8.51k|  void assign(size_t size, const ValueTypeT &val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE7reserveEm:
   49|  8.51k|  void reserve(size_t size) { vector_.reserve(size); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEC2Ev:
   39|  12.7k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEC2Ev:
   39|  50.2k|  IndexTypeVector() {}

_ZN5draco14DataTypeLengthENS_8DataTypeE:
   19|  82.7k|int32_t DataTypeLength(DataType dt) {
   20|  82.7k|  switch (dt) {
   21|  38.8k|    case DT_INT8:
  ------------------
  |  Branch (21:5): [True: 38.8k, False: 43.9k]
  ------------------
   22|  41.1k|    case DT_UINT8:
  ------------------
  |  Branch (22:5): [True: 2.38k, False: 80.3k]
  ------------------
   23|  41.1k|      return 1;
   24|  2.19k|    case DT_INT16:
  ------------------
  |  Branch (24:5): [True: 2.19k, False: 80.5k]
  ------------------
   25|  2.55k|    case DT_UINT16:
  ------------------
  |  Branch (25:5): [True: 358, False: 82.3k]
  ------------------
   26|  2.55k|      return 2;
   27|  31.9k|    case DT_INT32:
  ------------------
  |  Branch (27:5): [True: 31.9k, False: 50.7k]
  ------------------
   28|  32.9k|    case DT_UINT32:
  ------------------
  |  Branch (28:5): [True: 929, False: 81.8k]
  ------------------
   29|  32.9k|      return 4;
   30|    475|    case DT_INT64:
  ------------------
  |  Branch (30:5): [True: 475, False: 82.2k]
  ------------------
   31|    908|    case DT_UINT64:
  ------------------
  |  Branch (31:5): [True: 433, False: 82.3k]
  ------------------
   32|    908|      return 8;
   33|  4.58k|    case DT_FLOAT32:
  ------------------
  |  Branch (33:5): [True: 4.58k, False: 78.1k]
  ------------------
   34|  4.58k|      return 4;
   35|    195|    case DT_FLOAT64:
  ------------------
  |  Branch (35:5): [True: 195, False: 82.5k]
  ------------------
   36|    195|      return 8;
   37|    418|    case DT_BOOL:
  ------------------
  |  Branch (37:5): [True: 418, False: 82.3k]
  ------------------
   38|    418|      return 1;
   39|      0|    default:
  ------------------
  |  Branch (39:5): [True: 0, False: 82.7k]
  ------------------
   40|      0|      return -1;
   41|  82.7k|  }
   42|  82.7k|}

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

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

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

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

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

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

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

_ZN5draco12DecodeVarintIjEEbPT_PNS_13DecoderBufferE:
   63|  1.10M|bool DecodeVarint(IntTypeT *out_val, DecoderBuffer *buffer) {
   64|  1.10M|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 1.10M, Folded]
  ------------------
   65|  1.10M|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 1.38k, False: 1.10M]
  ------------------
   66|  1.38k|      return false;
   67|  1.38k|    }
   68|  1.10M|  } else {
   69|       |    // IntTypeT is a signed value. Decode the symbol and convert to signed.
   70|      0|    typename std::make_unsigned<IntTypeT>::type symbol;
   71|      0|    if (!DecodeVarintUnsigned(1, &symbol, buffer)) {
  ------------------
  |  Branch (71:9): [True: 0, False: 0]
  ------------------
   72|      0|      return false;
   73|      0|    }
   74|      0|    *out_val = ConvertSymbolToSignedInt(symbol);
   75|      0|  }
   76|  1.10M|  return true;
   77|  1.10M|}
mesh_edgebreaker_decoder_impl.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   697k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|   697k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   697k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 114, False: 696k]
  ------------------
   33|    114|    return false;
   34|    114|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   696k|  uint8_t in;
   39|   696k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 869, False: 696k]
  ------------------
   40|    869|    return false;
   41|    869|  }
   42|   696k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 18.2k, False: 677k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  18.2k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 659, False: 17.6k]
  ------------------
   45|    659|      return false;
   46|    659|    }
   47|       |    // Append decoded info from this byte.
   48|  17.6k|    *out_val <<= 7;
   49|  17.6k|    *out_val |= in & ((1 << 7) - 1);
   50|   677k|  } else {
   51|       |    // Last byte reached
   52|   677k|    *out_val = in;
   53|   677k|  }
   54|   695k|  return true;
   55|   696k|}
mesh_sequential_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  8.29k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  8.29k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  8.29k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 0, False: 8.29k]
  ------------------
   33|      0|    return false;
   34|      0|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  8.29k|  uint8_t in;
   39|  8.29k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 10, False: 8.28k]
  ------------------
   40|     10|    return false;
   41|     10|  }
   42|  8.28k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 562, False: 7.72k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    562|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 5, False: 557]
  ------------------
   45|      5|      return false;
   46|      5|    }
   47|       |    // Append decoded info from this byte.
   48|    557|    *out_val <<= 7;
   49|    557|    *out_val |= in & ((1 << 7) - 1);
   50|  7.72k|  } else {
   51|       |    // Last byte reached
   52|  7.72k|    *out_val = in;
   53|  7.72k|  }
   54|  8.27k|  return true;
   55|  8.28k|}
_ZN5draco12DecodeVarintImEEbPT_PNS_13DecoderBufferE:
   63|  8.53k|bool DecodeVarint(IntTypeT *out_val, DecoderBuffer *buffer) {
   64|  8.53k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 8.53k, Folded]
  ------------------
   65|  8.53k|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 131, False: 8.40k]
  ------------------
   66|    131|      return false;
   67|    131|    }
   68|  8.53k|  } else {
   69|       |    // IntTypeT is a signed value. Decode the symbol and convert to signed.
   70|      0|    typename std::make_unsigned<IntTypeT>::type symbol;
   71|      0|    if (!DecodeVarintUnsigned(1, &symbol, buffer)) {
  ------------------
  |  Branch (71:9): [True: 0, False: 0]
  ------------------
   72|      0|      return false;
   73|      0|    }
   74|      0|    *out_val = ConvertSymbolToSignedInt(symbol);
   75|      0|  }
   76|  8.40k|  return true;
   77|  8.53k|}
decoder_buffer.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  4.70k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  4.70k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  4.70k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 0, False: 4.70k]
  ------------------
   33|      0|    return false;
   34|      0|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  4.70k|  uint8_t in;
   39|  4.70k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 22, False: 4.68k]
  ------------------
   40|     22|    return false;
   41|     22|  }
   42|  4.68k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 128, False: 4.55k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    128|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 0, False: 128]
  ------------------
   45|      0|      return false;
   46|      0|    }
   47|       |    // Append decoded info from this byte.
   48|    128|    *out_val <<= 7;
   49|    128|    *out_val |= in & ((1 << 7) - 1);
   50|  4.55k|  } else {
   51|       |    // Last byte reached
   52|  4.55k|    *out_val = in;
   53|  4.55k|  }
   54|  4.68k|  return true;
   55|  4.68k|}
metadata_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   343k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|   343k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   343k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 17, False: 343k]
  ------------------
   33|     17|    return false;
   34|     17|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   343k|  uint8_t in;
   39|   343k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 84, False: 343k]
  ------------------
   40|     84|    return false;
   41|     84|  }
   42|   343k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.53k, False: 342k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.53k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 98, False: 1.43k]
  ------------------
   45|     98|      return false;
   46|     98|    }
   47|       |    // Append decoded info from this byte.
   48|  1.43k|    *out_val <<= 7;
   49|  1.43k|    *out_val |= in & ((1 << 7) - 1);
   50|   342k|  } else {
   51|       |    // Last byte reached
   52|   342k|    *out_val = in;
   53|   342k|  }
   54|   343k|  return true;
   55|   343k|}
sequential_integer_attribute_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  4.39k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  4.39k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  4.39k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 3, False: 4.39k]
  ------------------
   33|      3|    return false;
   34|      3|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  4.39k|  uint8_t in;
   39|  4.39k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 31, False: 4.36k]
  ------------------
   40|     31|    return false;
   41|     31|  }
   42|  4.36k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 796, False: 3.56k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    796|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 35, False: 761]
  ------------------
   45|     35|      return false;
   46|     35|    }
   47|       |    // Append decoded info from this byte.
   48|    761|    *out_val <<= 7;
   49|    761|    *out_val |= in & ((1 << 7) - 1);
   50|  3.56k|  } else {
   51|       |    // Last byte reached
   52|  3.56k|    *out_val = in;
   53|  3.56k|  }
   54|  4.32k|  return true;
   55|  4.36k|}
rans_bit_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  20.1k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  20.1k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  20.1k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 6, False: 20.1k]
  ------------------
   33|      6|    return false;
   34|      6|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  20.1k|  uint8_t in;
   39|  20.1k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 23, False: 20.1k]
  ------------------
   40|     23|    return false;
   41|     23|  }
   42|  20.1k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 335, False: 19.8k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    335|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 32, False: 303]
  ------------------
   45|     32|      return false;
   46|     32|    }
   47|       |    // Append decoded info from this byte.
   48|    303|    *out_val <<= 7;
   49|    303|    *out_val |= in & ((1 << 7) - 1);
   50|  19.8k|  } else {
   51|       |    // Last byte reached
   52|  19.8k|    *out_val = in;
   53|  19.8k|  }
   54|  20.1k|  return true;
   55|  20.1k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  10.1k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  10.1k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  10.1k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 106, False: 10.0k]
  ------------------
   33|    106|    return false;
   34|    106|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  10.0k|  uint8_t in;
   39|  10.0k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 83, False: 9.99k]
  ------------------
   40|     83|    return false;
   41|     83|  }
   42|  9.99k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 2.62k, False: 7.37k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  2.62k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 567, False: 2.05k]
  ------------------
   45|    567|      return false;
   46|    567|    }
   47|       |    // Append decoded info from this byte.
   48|  2.05k|    *out_val <<= 7;
   49|  2.05k|    *out_val |= in & ((1 << 7) - 1);
   50|  7.37k|  } else {
   51|       |    // Last byte reached
   52|  7.37k|    *out_val = in;
   53|  7.37k|  }
   54|  9.43k|  return true;
   55|  9.99k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  8.23k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  8.23k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  8.23k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 60, False: 8.17k]
  ------------------
   33|     60|    return false;
   34|     60|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  8.17k|  uint8_t in;
   39|  8.17k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 49, False: 8.12k]
  ------------------
   40|     49|    return false;
   41|     49|  }
   42|  8.12k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 4.26k, False: 3.85k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  4.26k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 699, False: 3.56k]
  ------------------
   45|    699|      return false;
   46|    699|    }
   47|       |    // Append decoded info from this byte.
   48|  3.56k|    *out_val <<= 7;
   49|  3.56k|    *out_val |= in & ((1 << 7) - 1);
   50|  3.85k|  } else {
   51|       |    // Last byte reached
   52|  3.85k|    *out_val = in;
   53|  3.85k|  }
   54|  7.42k|  return true;
   55|  8.12k|}
attributes_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  51.0k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  51.0k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  51.0k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 9, False: 51.0k]
  ------------------
   33|      9|    return false;
   34|      9|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  51.0k|  uint8_t in;
   39|  51.0k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 29, False: 51.0k]
  ------------------
   40|     29|    return false;
   41|     29|  }
   42|  51.0k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.67k, False: 49.3k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.67k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 57, False: 1.61k]
  ------------------
   45|     57|      return false;
   46|     57|    }
   47|       |    // Append decoded info from this byte.
   48|  1.61k|    *out_val <<= 7;
   49|  1.61k|    *out_val |= in & ((1 << 7) - 1);
   50|  49.3k|  } else {
   51|       |    // Last byte reached
   52|  49.3k|    *out_val = in;
   53|  49.3k|  }
   54|  50.9k|  return true;
   55|  51.0k|}

_ZNK5draco7VectorDIfLi3EEixEi:
  113|   160k|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIfLi3EEixEi:
  112|   206k|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIfLi3EEmiERKS1_:
  137|  17.1k|  Self operator-(const Self &o) const {
  138|  17.1k|    Self ret;
  139|  68.6k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 51.5k, False: 17.1k]
  ------------------
  140|  51.5k|      ret[i] = (*this)[i] - o[i];
  141|  51.5k|    }
  142|  17.1k|    return ret;
  143|  17.1k|  }
_ZN5draco7VectorDIfLi3EEC2Ev:
   40|  42.6k|  VectorD() {
   41|   170k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 128k, False: 42.6k]
  ------------------
   42|   128k|      (*this)[i] = Scalar(0);
   43|   128k|    }
   44|  42.6k|  }
_ZNK5draco7VectorDIlLi3EEixEi:
  113|   193M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIlLi3EEmiERKS1_:
  137|  16.0M|  Self operator-(const Self &o) const {
  138|  16.0M|    Self ret;
  139|  64.2M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 48.1M, False: 16.0M]
  ------------------
  140|  48.1M|      ret[i] = (*this)[i] - o[i];
  141|  48.1M|    }
  142|  16.0M|    return ret;
  143|  16.0M|  }
_ZN5draco12CrossProductIlEENS_7VectorDIT_Li3EEERKS3_S5_:
  318|  8.00M|                                 const VectorD<ScalarT, 3> &v) {
  319|       |  // Preventing accidental use with uint32_t and the like.
  320|  8.00M|  static_assert(std::is_signed<ScalarT>::value,
  321|  8.00M|                "ScalarT must be a signed type. ");
  322|  8.00M|  VectorD<ScalarT, 3> r;
  323|  8.00M|  r[0] = (u[1] * v[2]) - (u[2] * v[1]);
  324|  8.00M|  r[1] = (u[2] * v[0]) - (u[0] * v[2]);
  325|  8.00M|  r[2] = (u[0] * v[1]) - (u[1] * v[0]);
  326|  8.00M|  return r;
  327|  8.00M|}
_ZN5draco7VectorDIlLi3EE4dataEv:
  282|  8.00M|  Scalar *data() { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE4dataEv:
  283|  8.00M|  const Scalar *data() const { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE6AbsSumEv:
  237|  3.26M|  Scalar AbsSum() const {
  238|  3.26M|    Scalar result(0);
  239|  13.0M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (239:21): [True: 9.78M, False: 3.25M]
  ------------------
  240|  9.78M|      Scalar next_value = std::abs(v_[i]);
  241|  9.78M|      if (result > std::numeric_limits<Scalar>::max() - next_value) {
  ------------------
  |  Branch (241:11): [True: 11.2k, False: 9.77M]
  ------------------
  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.77M|      result += next_value;
  246|  9.77M|    }
  247|  3.25M|    return result;
  248|  3.26M|  }
_ZNK5draco7VectorDIlLi3EEdvERKl:
  182|   210k|  Self operator/(const Scalar &o) const {
  183|   210k|    Self ret;
  184|   842k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (184:21): [True: 631k, False: 210k]
  ------------------
  185|   631k|      ret[i] = (*this)[i] / o;
  186|   631k|    }
  187|   210k|    return ret;
  188|   210k|  }
_ZN5draco7VectorDIlLi3EEixEi:
  112|   242M|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEixEi:
  112|  15.2M|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EE4dataEv:
  282|  9.79M|  Scalar *data() { return &(v_[0]); }
_ZNK5draco7VectorDIiLi3EEngEv:
  120|  2.53M|  Self operator-() const {
  121|  2.53M|    Self ret;
  122|  10.1M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (122:21): [True: 7.61M, False: 2.53M]
  ------------------
  123|  7.61M|      ret[i] = -(*this)[i];
  124|  7.61M|    }
  125|  2.53M|    return ret;
  126|  2.53M|  }
_ZNK5draco7VectorDIiLi3EEixEi:
  113|  7.61M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEmiERKS1_:
  137|  1.27M|  Self operator-(const Self &o) const {
  138|  1.27M|    Self ret;
  139|  3.82M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 2.54M, False: 1.27M]
  ------------------
  140|  2.54M|      ret[i] = (*this)[i] - o[i];
  141|  2.54M|    }
  142|  1.27M|    return ret;
  143|  1.27M|  }
_ZN5draco7VectorDIjLi2EEixEi:
  112|  15.2M|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEixEi:
  113|  22.9M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIiLi2EEixEi:
  112|  63.2M|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEplERKS1_:
  129|  2.54M|  Self operator+(const Self &o) const {
  130|  2.54M|    Self ret;
  131|  7.64M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 5.09M, False: 2.54M]
  ------------------
  132|  5.09M|      ret[i] = (*this)[i] + o[i];
  133|  5.09M|    }
  134|  2.54M|    return ret;
  135|  2.54M|  }
_ZNK5draco7VectorDIiLi2EEixEi:
  113|  55.9M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIiLi2EEmiERKS1_:
  137|  1.90M|  Self operator-(const Self &o) const {
  138|  1.90M|    Self ret;
  139|  5.70M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 3.80M, False: 1.90M]
  ------------------
  140|  3.80M|      ret[i] = (*this)[i] - o[i];
  141|  3.80M|    }
  142|  1.90M|    return ret;
  143|  1.90M|  }
_ZNK5draco7VectorDIiLi2EEplERKS1_:
  129|  1.90M|  Self operator+(const Self &o) const {
  130|  1.90M|    Self ret;
  131|  5.70M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 3.80M, False: 1.90M]
  ------------------
  132|  3.80M|      ret[i] = (*this)[i] + o[i];
  133|  3.80M|    }
  134|  1.90M|    return ret;
  135|  1.90M|  }
_ZNK5draco7VectorDIfLi2EEeqERKS1_:
  206|   331k|  bool operator==(const Self &o) const {
  207|   977k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (207:21): [True: 654k, False: 322k]
  ------------------
  208|   654k|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (208:11): [True: 8.33k, False: 646k]
  ------------------
  209|  8.33k|        return false;
  210|  8.33k|      }
  211|   654k|    }
  212|   322k|    return true;
  213|   331k|  }
_ZNK5draco7VectorDIfLi2EEixEi:
  113|  3.83M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIfLi3EE11SquaredNormEv:
  234|  8.83k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIfLi3EE3DotERKS1_:
  250|  9.32k|  Scalar Dot(const Self &o) const {
  251|  9.32k|    Scalar ret(0);
  252|  37.2k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (252:21): [True: 27.9k, False: 9.32k]
  ------------------
  253|  27.9k|      ret += (*this)[i] * o[i];
  254|  27.9k|    }
  255|  9.32k|    return ret;
  256|  9.32k|  }
_ZNK5draco7VectorDIfLi3EEmlERKf:
  174|    493|  Self operator*(const Scalar &o) const {
  175|    493|    Self ret;
  176|  1.97k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 1.47k, False: 493]
  ------------------
  177|  1.47k|      ret[i] = (*this)[i] * o;
  178|  1.47k|    }
  179|    493|    return ret;
  180|    493|  }
_ZNK5draco7VectorDIfLi2EEmiERKS1_:
  137|  8.33k|  Self operator-(const Self &o) const {
  138|  8.33k|    Self ret;
  139|  25.0k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 16.6k, False: 8.33k]
  ------------------
  140|  16.6k|      ret[i] = (*this)[i] - o[i];
  141|  16.6k|    }
  142|  8.33k|    return ret;
  143|  8.33k|  }
_ZN5draco7VectorDIfLi2EEC2Ev:
   40|  16.6k|  VectorD() {
   41|  50.0k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 33.3k, False: 16.6k]
  ------------------
   42|  33.3k|      (*this)[i] = Scalar(0);
   43|  33.3k|    }
   44|  16.6k|  }
_ZN5draco7VectorDIfLi2EEC2ERKfS3_:
   52|   670k|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|   670k|    DRACO_DCHECK_EQ(dimension, 2);
   54|   670k|    v_[0] = c0;
   55|   670k|    v_[1] = c1;
   56|   670k|  }
_ZN5draco7VectorDIfLi2EEixEi:
  112|  66.6k|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIlLi2EEeqERKS1_:
  206|   432k|  bool operator==(const Self &o) const {
  207|  1.23M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (207:21): [True: 836k, False: 402k]
  ------------------
  208|   836k|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (208:11): [True: 29.9k, False: 806k]
  ------------------
  209|  29.9k|        return false;
  210|  29.9k|      }
  211|   836k|    }
  212|   402k|    return true;
  213|   432k|  }
_ZNK5draco7VectorDIlLi2EEixEi:
  113|  2.54M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIlLi3EEC2Ev:
   40|  46.9M|  VectorD() {
   41|   187M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 140M, False: 46.9M]
  ------------------
   42|   140M|      (*this)[i] = Scalar(0);
   43|   140M|    }
   44|  46.9M|  }
_ZNK5draco7VectorDIlLi3EE11SquaredNormEv:
  234|  32.2k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIlLi3EE3DotERKS1_:
  250|  34.7k|  Scalar Dot(const Self &o) const {
  251|  34.7k|    Scalar ret(0);
  252|   139k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (252:21): [True: 104k, False: 34.7k]
  ------------------
  253|   104k|      ret += (*this)[i] * o[i];
  254|   104k|    }
  255|  34.7k|    return ret;
  256|  34.7k|  }
_ZNK5draco7VectorDIlLi2EEmiERKS1_:
  137|  2.48k|  Self operator-(const Self &o) const {
  138|  2.48k|    Self ret;
  139|  7.44k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 4.96k, False: 2.48k]
  ------------------
  140|  4.96k|      ret[i] = (*this)[i] - o[i];
  141|  4.96k|    }
  142|  2.48k|    return ret;
  143|  2.48k|  }
_ZNK5draco7VectorDIlLi2EEmlERKl:
  174|  7.01k|  Self operator*(const Scalar &o) const {
  175|  7.01k|    Self ret;
  176|  21.0k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 14.0k, False: 7.01k]
  ------------------
  177|  14.0k|      ret[i] = (*this)[i] * o;
  178|  14.0k|    }
  179|  7.01k|    return ret;
  180|  7.01k|  }
_ZNK5draco7VectorDIlLi2EEplERKS1_:
  129|  2.34k|  Self operator+(const Self &o) const {
  130|  2.34k|    Self ret;
  131|  7.04k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 4.69k, False: 2.34k]
  ------------------
  132|  4.69k|      ret[i] = (*this)[i] + o[i];
  133|  4.69k|    }
  134|  2.34k|    return ret;
  135|  2.34k|  }
_ZN5dracomlIlLi2EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  292|  2.34k|    const ScalarT &o, const VectorD<ScalarT, dimension_t> &v) {
  293|  2.34k|  return v * o;
  294|  2.34k|}
_ZNK5draco7VectorDIlLi3EEplERKS1_:
  129|  2.31k|  Self operator+(const Self &o) const {
  130|  2.31k|    Self ret;
  131|  9.27k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 6.95k, False: 2.31k]
  ------------------
  132|  6.95k|      ret[i] = (*this)[i] + o[i];
  133|  6.95k|    }
  134|  2.31k|    return ret;
  135|  2.31k|  }
_ZN5dracomlIlLi3EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  292|  2.31k|    const ScalarT &o, const VectorD<ScalarT, dimension_t> &v) {
  293|  2.31k|  return v * o;
  294|  2.31k|}
_ZNK5draco7VectorDIlLi3EEmlERKl:
  174|  2.31k|  Self operator*(const Scalar &o) const {
  175|  2.31k|    Self ret;
  176|  9.27k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 6.95k, False: 2.31k]
  ------------------
  177|  6.95k|      ret[i] = (*this)[i] * o;
  178|  6.95k|    }
  179|  2.31k|    return ret;
  180|  2.31k|  }
_ZN5draco7VectorDIlLi2EEC2ERKlS3_:
   52|   867k|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|   867k|    DRACO_DCHECK_EQ(dimension, 2);
   54|   867k|    v_[0] = c0;
   55|   867k|    v_[1] = c1;
   56|   867k|  }
_ZN5draco7VectorDIlLi2EEC2Ev:
   40|  16.4k|  VectorD() {
   41|  49.4k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 32.9k, False: 16.4k]
  ------------------
   42|  32.9k|      (*this)[i] = Scalar(0);
   43|  32.9k|    }
   44|  16.4k|  }
_ZN5draco7VectorDImLi2EEC2IlLi2EEERKNS0_IT_XT0_EEE:
  102|  4.61k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  13.8k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 9.23k, False: 4.61k]
  ------------------
  104|  9.23k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 9.23k, False: 0]
  ------------------
  105|  9.23k|        v_[i] = Scalar(src_vector[i]);
  106|  9.23k|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  9.23k|    }
  110|  4.61k|  }
_ZNK5draco7VectorDImLi2EEplERKS1_:
  129|    690|  Self operator+(const Self &o) const {
  130|    690|    Self ret;
  131|  2.07k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 1.38k, False: 690]
  ------------------
  132|  1.38k|      ret[i] = (*this)[i] + o[i];
  133|  1.38k|    }
  134|    690|    return ret;
  135|    690|  }
_ZN5draco7VectorDImLi2EEC2Ev:
   40|  2.30k|  VectorD() {
   41|  6.92k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 4.61k, False: 2.30k]
  ------------------
   42|  4.61k|      (*this)[i] = Scalar(0);
   43|  4.61k|    }
   44|  2.30k|  }
_ZNK5draco7VectorDImLi2EEixEi:
  113|  13.8k|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDImLi2EEixEi:
  112|  9.23k|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIlLi2EEC2ImLi2EEERKNS0_IT_XT0_EEE:
  102|  2.30k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  6.92k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 4.61k, False: 2.30k]
  ------------------
  104|  4.61k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 4.61k, False: 0]
  ------------------
  105|  4.61k|        v_[i] = Scalar(src_vector[i]);
  106|  4.61k|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  4.61k|    }
  110|  2.30k|  }
_ZNK5draco7VectorDIlLi2EEdvERKl:
  182|  2.30k|  Self operator/(const Scalar &o) const {
  183|  2.30k|    Self ret;
  184|  6.92k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (184:21): [True: 4.61k, False: 2.30k]
  ------------------
  185|  4.61k|      ret[i] = (*this)[i] / o;
  186|  4.61k|    }
  187|  2.30k|    return ret;
  188|  2.30k|  }
_ZNK5draco7VectorDImLi2EEmiERKS1_:
  137|  1.61k|  Self operator-(const Self &o) const {
  138|  1.61k|    Self ret;
  139|  4.85k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 3.23k, False: 1.61k]
  ------------------
  140|  3.23k|      ret[i] = (*this)[i] - o[i];
  141|  3.23k|    }
  142|  1.61k|    return ret;
  143|  1.61k|  }
_ZN5draco7VectorDIlLi2EEixEi:
  112|  65.8k|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEC2Ev:
   40|  2.54M|  VectorD() {
   41|  10.1M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 7.62M, False: 2.54M]
  ------------------
   42|  7.62M|      (*this)[i] = Scalar(0);
   43|  7.62M|    }
   44|  2.54M|  }
_ZN5draco7VectorDIiLi2EEC2ERKiS3_:
   52|  11.9M|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|  11.9M|    DRACO_DCHECK_EQ(dimension, 2);
   54|  11.9M|    v_[0] = c0;
   55|  11.9M|    v_[1] = c1;
   56|  11.9M|  }
_ZN5draco7VectorDIjLi2EEC2IiLi2EEERKNS0_IT_XT0_EEE:
  102|  7.64M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  22.9M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 15.2M, False: 7.64M]
  ------------------
  104|  15.2M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 15.2M, False: 0]
  ------------------
  105|  15.2M|        v_[i] = Scalar(src_vector[i]);
  106|  15.2M|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  15.2M|    }
  110|  7.64M|  }
_ZN5draco7VectorDIjLi2EEC2Ev:
   40|  3.82M|  VectorD() {
   41|  11.4M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 7.64M, False: 3.82M]
  ------------------
   42|  7.64M|      (*this)[i] = Scalar(0);
   43|  7.64M|    }
   44|  3.82M|  }
_ZN5draco7VectorDIiLi2EEC2IjLi2EEERKNS0_IT_XT0_EEE:
  102|  3.82M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  11.4M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 7.64M, False: 3.82M]
  ------------------
  104|  7.64M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 7.64M, False: 0]
  ------------------
  105|  7.64M|        v_[i] = Scalar(src_vector[i]);
  106|  7.64M|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  7.64M|    }
  110|  3.82M|  }
_ZN5draco7VectorDIiLi2EEC2ERKS1_:
   88|  7.51M|  VectorD(const Self &o) {
   89|  22.5M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (89:21): [True: 15.0M, False: 7.51M]
  ------------------
   90|  15.0M|      (*this)[i] = o[i];
   91|  15.0M|    }
   92|  7.51M|  }
_ZN5draco7VectorDIiLi2EEC2Ev:
   40|  3.80M|  VectorD() {
   41|  11.4M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 7.60M, False: 3.80M]
  ------------------
   42|  7.60M|      (*this)[i] = Scalar(0);
   43|  7.60M|    }
   44|  3.80M|  }

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

_ZNK5draco11CornerTable12num_verticesEv:
   73|   122M|  inline int num_vertices() const {
   74|   122M|    return static_cast<int>(vertex_corners_.size());
   75|   122M|  }
_ZNK5draco11CornerTable11num_cornersEv:
   76|  11.1M|  inline int num_corners() const {
   77|  11.1M|    return static_cast<int>(corner_to_vertex_map_.size());
   78|  11.1M|  }
_ZNK5draco11CornerTable9num_facesEv:
   79|  2.30M|  inline int num_faces() const {
   80|  2.30M|    return static_cast<int>(corner_to_vertex_map_.size() / 3);
   81|  2.30M|  }
_ZNK5draco11CornerTable8OppositeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   83|   405M|  inline CornerIndex Opposite(CornerIndex corner) const {
   84|   405M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (84:9): [True: 0, False: 405M]
  ------------------
   85|      0|      return corner;
   86|      0|    }
   87|   405M|    return opposite_corners_[corner];
   88|   405M|  }
_ZNK5draco11CornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   89|   696M|  inline CornerIndex Next(CornerIndex corner) const {
   90|   696M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (90:9): [True: 16.9M, False: 679M]
  ------------------
   91|  16.9M|      return corner;
   92|  16.9M|    }
   93|   679M|    return LocalIndex(++corner) ? corner : corner - 3;
  ------------------
  |  Branch (93:12): [True: 616M, False: 62.7M]
  ------------------
   94|   696M|  }
_ZNK5draco11CornerTable8PreviousENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   95|   574M|  inline CornerIndex Previous(CornerIndex corner) const {
   96|   574M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (96:9): [True: 6.67M, False: 568M]
  ------------------
   97|  6.67M|      return corner;
   98|  6.67M|    }
   99|   568M|    return LocalIndex(corner) ? corner - 1 : corner + 2;
  ------------------
  |  Branch (99:12): [True: 153M, False: 414M]
  ------------------
  100|   574M|  }
_ZNK5draco11CornerTable6VertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  1.07G|  inline VertexIndex Vertex(CornerIndex corner) const {
  102|  1.07G|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (102:9): [True: 0, False: 1.07G]
  ------------------
  103|      0|      return kInvalidVertexIndex;
  104|      0|    }
  105|  1.07G|    return ConfidentVertex(corner);
  106|  1.07G|  }
_ZNK5draco11CornerTable15ConfidentVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  1.07G|  inline VertexIndex ConfidentVertex(CornerIndex corner) const {
  108|  1.07G|    DRACO_DCHECK_GE(corner.value(), 0);
  109|  1.07G|    DRACO_DCHECK_LT(corner.value(), num_corners());
  110|  1.07G|    return corner_to_vertex_map_[corner];
  111|  1.07G|  }
_ZNK5draco11CornerTable4FaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  112|  42.1M|  inline FaceIndex Face(CornerIndex corner) const {
  113|  42.1M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (113:9): [True: 0, False: 42.1M]
  ------------------
  114|      0|      return kInvalidFaceIndex;
  115|      0|    }
  116|  42.1M|    return FaceIndex(corner.value() / 3);
  117|  42.1M|  }
_ZNK5draco11CornerTable10LocalIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  128|  1.24G|  inline int LocalIndex(CornerIndex corner) const { return corner.value() % 3; }
_ZNK5draco11CornerTable14LeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  150|  78.3M|  inline CornerIndex LeftMostCorner(VertexIndex v) const {
  151|  78.3M|    return vertex_corners_[v];
  152|  78.3M|  }
_ZNK5draco11CornerTable12IsOnBoundaryENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  185|   856k|  inline bool IsOnBoundary(VertexIndex vert) const {
  186|   856k|    const CornerIndex corner = LeftMostCorner(vert);
  187|   856k|    if (SwingLeft(corner) == kInvalidCornerIndex) {
  ------------------
  |  Branch (187:9): [True: 22.8k, False: 833k]
  ------------------
  188|  22.8k|      return true;
  189|  22.8k|    }
  190|   833k|    return false;
  191|   856k|  }
_ZNK5draco11CornerTable10SwingRightENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  200|  87.8M|  inline CornerIndex SwingRight(CornerIndex corner) const {
  201|  87.8M|    return Previous(Opposite(Previous(corner)));
  202|  87.8M|  }
_ZNK5draco11CornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  205|  17.9M|  inline CornerIndex SwingLeft(CornerIndex corner) const {
  206|  17.9M|    return Next(Opposite(Next(corner)));
  207|  17.9M|  }
_ZNK5draco11CornerTable13GetLeftCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  217|  4.02M|  inline CornerIndex GetLeftCorner(CornerIndex corner_id) const {
  218|  4.02M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (218:9): [True: 0, False: 4.02M]
  ------------------
  219|      0|      return kInvalidCornerIndex;
  220|      0|    }
  221|  4.02M|    return Opposite(Previous(corner_id));
  222|  4.02M|  }
_ZNK5draco11CornerTable14GetRightCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  223|  4.85M|  inline CornerIndex GetRightCorner(CornerIndex corner_id) const {
  224|  4.85M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (224:9): [True: 0, False: 4.85M]
  ------------------
  225|      0|      return kInvalidCornerIndex;
  226|      0|    }
  227|  4.85M|    return Opposite(Next(corner_id));
  228|  4.85M|  }
_ZN5draco11CornerTable17SetOppositeCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_:
  248|   450M|                                CornerIndex opp_corner_id) {
  249|   450M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  250|   450M|    opposite_corners_[corner_id] = opp_corner_id;
  251|   450M|  }
_ZN5draco11CornerTable17MapCornerToVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEE:
  265|   521M|  inline void MapCornerToVertex(CornerIndex corner_id, VertexIndex vert_id) {
  266|   521M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  267|   521M|    corner_to_vertex_map_[corner_id] = vert_id;
  268|   521M|  }
_ZN5draco11CornerTable12AddNewVertexEv:
  270|   125M|  VertexIndex AddNewVertex() {
  271|   125M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  272|       |    // Add a new invalid vertex.
  273|   125M|    vertex_corners_.push_back(kInvalidCornerIndex);
  274|   125M|    return VertexIndex(static_cast<uint32_t>(vertex_corners_.size() - 1));
  275|   125M|  }
_ZN5draco11CornerTable17SetLeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEE:
  292|   287M|  void SetLeftMostCorner(VertexIndex vert, CornerIndex corner) {
  293|   287M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  294|   287M|    if (vert != kInvalidVertexIndex) {
  ------------------
  |  Branch (294:9): [True: 287M, False: 0]
  ------------------
  295|   287M|      vertex_corners_[vert] = corner;
  296|   287M|    }
  297|   287M|  }
_ZN5draco11CornerTable18MakeVertexIsolatedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  328|  3.39M|  void MakeVertexIsolated(VertexIndex vert) {
  329|  3.39M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  330|  3.39M|    vertex_corners_[vert] = kInvalidCornerIndex;
  331|  3.39M|  }

_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  228|  10.1k|      : corner_table_(table),
  229|  10.1k|        start_corner_(table->LeftMostCorner(vert_id)),
  230|  10.1k|        corner_(start_corner_),
  231|  10.1k|        left_traversal_(true) {}
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE3EndEv:
  244|  5.22M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEppEv:
  267|  90.8k|  VertexCornersIterator &operator++() {
  268|  90.8k|    Next();
  269|  90.8k|    return *this;
  270|  90.8k|  }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEE4NextEv:
  247|  4.47M|  void Next() {
  248|  4.47M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 4.39M, False: 78.4k]
  ------------------
  249|  4.39M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  4.39M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 21.2k, False: 4.37M]
  ------------------
  251|       |        // Open boundary reached.
  252|  21.2k|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  21.2k|        left_traversal_ = false;
  254|  4.37M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 728k, False: 3.64M]
  ------------------
  255|       |        // End reached.
  256|   728k|        corner_ = kInvalidCornerIndex;
  257|   728k|      }
  258|  4.39M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  78.4k|      corner_ = corner_table_->SwingRight(corner_);
  262|  78.4k|    }
  263|  4.47M|  }
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE6CornerEv:
  241|  8.04M|  CornerIndex Corner() const { return corner_; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE3EndEv:
  244|  6.14M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE6CornerEv:
  241|  6.42M|  CornerIndex Corner() const { return corner_; }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE4NextEv:
  247|  3.62M|  void Next() {
  248|  3.62M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 3.58M, False: 32.7k]
  ------------------
  249|  3.58M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  3.58M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 2.31M, False: 1.27M]
  ------------------
  251|       |        // Open boundary reached.
  252|  2.31M|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  2.31M|        left_traversal_ = false;
  254|  2.31M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 208k, False: 1.06M]
  ------------------
  255|       |        // End reached.
  256|   208k|        corner_ = kInvalidCornerIndex;
  257|   208k|      }
  258|  3.58M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  32.7k|      corner_ = corner_table_->SwingRight(corner_);
  262|  32.7k|    }
  263|  3.62M|  }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|  2.52M|      : corner_table_(table),
  236|  2.52M|        start_corner_(corner_id),
  237|  2.52M|        corner_(start_corner_),
  238|  2.52M|        left_traversal_(true) {}
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|   740k|      : corner_table_(table),
  236|   740k|        start_corner_(corner_id),
  237|   740k|        corner_(start_corner_),
  238|   740k|        left_traversal_(true) {}

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

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

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

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

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

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

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

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

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

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

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

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

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

