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

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

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

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

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

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

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

_ZN5draco17GeometryAttributeC2Ev:
   20|   115k|    : buffer_(nullptr),
   21|   115k|      num_components_(1),
   22|   115k|      data_type_(DT_FLOAT32),
   23|   115k|      byte_stride_(0),
   24|   115k|      byte_offset_(0),
   25|   115k|      attribute_type_(INVALID),
   26|   115k|      unique_id_(0) {}
_ZN5draco17GeometryAttribute4InitENS0_4TypeEPNS_10DataBufferEhNS_8DataTypeEbll:
   31|   115k|                             int64_t byte_stride, int64_t byte_offset) {
   32|   115k|  buffer_ = buffer;
   33|   115k|  if (buffer) {
  ------------------
  |  Branch (33:7): [True: 0, False: 115k]
  ------------------
   34|      0|    buffer_descriptor_.buffer_id = buffer->buffer_id();
   35|      0|    buffer_descriptor_.buffer_update_count = buffer->update_count();
   36|      0|  }
   37|   115k|  num_components_ = num_components;
   38|   115k|  data_type_ = data_type;
   39|   115k|  normalized_ = normalized;
   40|   115k|  byte_stride_ = byte_stride;
   41|   115k|  byte_offset_ = byte_offset;
   42|   115k|  attribute_type_ = attribute_type;
   43|   115k|}
_ZN5draco17GeometryAttribute11ResetBufferEPNS_10DataBufferEll:
  102|  32.1k|                                    int64_t byte_offset) {
  103|  32.1k|  buffer_ = buffer;
  104|  32.1k|  buffer_descriptor_.buffer_id = buffer->buffer_id();
  105|  32.1k|  buffer_descriptor_.buffer_update_count = buffer->update_count();
  106|  32.1k|  byte_stride_ = byte_stride;
  107|  32.1k|  byte_offset_ = byte_offset;
  108|  32.1k|}

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

_ZN5draco14PointAttributeC2ERKNS_17GeometryAttributeE:
   32|   115k|    : GeometryAttribute(att),
   33|   115k|      num_unique_entries_(0),
   34|   115k|      identity_mapping_(false) {}
_ZN5draco14PointAttribute5ResetEm:
   67|  32.1k|bool PointAttribute::Reset(size_t num_attribute_values) {
   68|  32.1k|  if (attribute_buffer_ == nullptr) {
  ------------------
  |  Branch (68:7): [True: 32.1k, False: 0]
  ------------------
   69|  32.1k|    attribute_buffer_ = std::unique_ptr<DataBuffer>(new DataBuffer());
   70|  32.1k|  }
   71|  32.1k|  const int64_t entry_size = DataTypeLength(data_type()) * num_components();
   72|  32.1k|  if (!attribute_buffer_->Update(nullptr, num_attribute_values * entry_size)) {
  ------------------
  |  Branch (72:7): [True: 0, False: 32.1k]
  ------------------
   73|      0|    return false;
   74|      0|  }
   75|       |  // Assign the new buffer to the parent attribute.
   76|  32.1k|  ResetBuffer(attribute_buffer_.get(), entry_size, 0);
   77|  32.1k|  num_unique_entries_ = static_cast<uint32_t>(num_attribute_values);
   78|  32.1k|  return true;
   79|  32.1k|}

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

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

_ZNK5draco17AttributesDecoder14GetAttributeIdEi:
   44|   185k|  int32_t GetAttributeId(int i) const override {
   45|   185k|    return point_attribute_ids_[i];
   46|   185k|  }
_ZNK5draco17AttributesDecoder16GetNumAttributesEv:
   47|   117k|  int32_t GetNumAttributes() const override {
   48|   117k|    return static_cast<int32_t>(point_attribute_ids_.size());
   49|   117k|  }
_ZNK5draco17AttributesDecoder10GetDecoderEv:
   50|  80.1k|  PointCloudDecoder* GetDecoder() const override {
   51|  80.1k|    return point_cloud_decoder_;
   52|  80.1k|  }
_ZN5draco17AttributesDecoder16DecodeAttributesEPNS_13DecoderBufferE:
   55|  6.58k|  bool DecodeAttributes(DecoderBuffer* in_buffer) override {
   56|  6.58k|    if (!DecodePortableAttributes(in_buffer)) {
  ------------------
  |  Branch (56:9): [True: 3.24k, False: 3.33k]
  ------------------
   57|  3.24k|      return false;
   58|  3.24k|    }
   59|  3.33k|    if (!DecodeDataNeededByPortableTransforms(in_buffer)) {
  ------------------
  |  Branch (59:9): [True: 774, False: 2.56k]
  ------------------
   60|    774|      return false;
   61|    774|    }
   62|  2.56k|    if (!TransformAttributesToOriginalFormat()) {
  ------------------
  |  Branch (62:9): [True: 879, False: 1.68k]
  ------------------
   63|    879|      return false;
   64|    879|    }
   65|  1.68k|    return true;
   66|  2.56k|  }
_ZNK5draco17AttributesDecoder27GetLocalIdForPointAttributeEi:
   69|  3.88k|  int32_t GetLocalIdForPointAttribute(int32_t point_attribute_id) const {
   70|  3.88k|    const int id_map_size =
   71|  3.88k|        static_cast<int>(point_attribute_to_local_id_map_.size());
   72|  3.88k|    if (point_attribute_id >= id_map_size) {
  ------------------
  |  Branch (72:9): [True: 0, False: 3.88k]
  ------------------
   73|      0|      return -1;
   74|      0|    }
   75|  3.88k|    return point_attribute_to_local_id_map_[point_attribute_id];
   76|  3.88k|  }
_ZN5draco17AttributesDecoderD2Ev:
   35|  31.3k|  virtual ~AttributesDecoder() = default;

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

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

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

_ZN5draco17OctahedronToolBoxC2Ev:
   53|  4.02k|      : quantization_bits_(-1),
   54|  4.02k|        max_quantized_value_(-1),
   55|  4.02k|        max_value_(-1),
   56|  4.02k|        dequantization_scale_(1.f),
   57|  4.02k|        center_value_(-1) {}
_ZN5draco17OctahedronToolBox19SetQuantizationBitsEi:
   59|  3.67k|  bool SetQuantizationBits(int32_t q) {
   60|  3.67k|    if (q < 2 || q > 30) {
  ------------------
  |  Branch (60:9): [True: 1.44k, False: 2.23k]
  |  Branch (60:18): [True: 140, False: 2.09k]
  ------------------
   61|  1.58k|      return false;
   62|  1.58k|    }
   63|  2.09k|    quantization_bits_ = q;
   64|  2.09k|    max_quantized_value_ = (1u << quantization_bits_) - 1;
   65|  2.09k|    max_value_ = max_quantized_value_ - 1;
   66|  2.09k|    dequantization_scale_ = 2.f / max_value_;
   67|  2.09k|    center_value_ = max_value_ / 2;
   68|  2.09k|    return true;
   69|  3.67k|  }
_ZNK5draco17OctahedronToolBox28CanonicalizeOctahedralCoordsEiiPiS1_:
   76|  4.36M|                                           int32_t* out_t) const {
   77|  4.36M|    if ((s == 0 && t == 0) || (s == 0 && t == max_value_) ||
  ------------------
  |  Branch (77:10): [True: 3.01k, False: 4.36M]
  |  Branch (77:20): [True: 0, False: 3.01k]
  |  Branch (77:32): [True: 3.01k, False: 4.36M]
  |  Branch (77:42): [True: 0, False: 3.01k]
  ------------------
   78|  4.36M|        (s == max_value_ && t == 0)) {
  ------------------
  |  Branch (78:10): [True: 3.60M, False: 759k]
  |  Branch (78:29): [True: 6.05k, False: 3.59M]
  ------------------
   79|  6.05k|      s = max_value_;
   80|  6.05k|      t = max_value_;
   81|  4.35M|    } else if (s == 0 && t > center_value_) {
  ------------------
  |  Branch (81:16): [True: 3.01k, False: 4.35M]
  |  Branch (81:26): [True: 960, False: 2.05k]
  ------------------
   82|    960|      t = center_value_ - (t - center_value_);
   83|  4.35M|    } else if (s == max_value_ && t < center_value_) {
  ------------------
  |  Branch (83:16): [True: 3.59M, False: 758k]
  |  Branch (83:35): [True: 6.44k, False: 3.59M]
  ------------------
   84|  6.44k|      t = center_value_ + (center_value_ - t);
   85|  4.35M|    } else if (t == max_value_ && s < center_value_) {
  ------------------
  |  Branch (85:16): [True: 3.59M, False: 756k]
  |  Branch (85:35): [True: 299, False: 3.59M]
  ------------------
   86|    299|      s = center_value_ + (center_value_ - s);
   87|  4.34M|    } else if (t == 0 && s > center_value_) {
  ------------------
  |  Branch (87:16): [True: 4.38k, False: 4.34M]
  |  Branch (87:26): [True: 1.66k, False: 2.71k]
  ------------------
   88|  1.66k|      s = center_value_ - (s - center_value_);
   89|  1.66k|    }
   90|       |
   91|  4.36M|    *out_s = s;
   92|  4.36M|    *out_t = t;
   93|  4.36M|  }
_ZNK5draco17OctahedronToolBox40IntegerVectorToQuantizedOctahedralCoordsEPKiPiS3_:
   99|  4.36M|                                                       int32_t* out_t) const {
  100|  4.36M|    DRACO_DCHECK_EQ(
  101|  4.36M|        std::abs(int_vec[0]) + std::abs(int_vec[1]) + std::abs(int_vec[2]),
  102|  4.36M|        center_value_);
  103|  4.36M|    int32_t s, t;
  104|  4.36M|    if (int_vec[0] >= 0) {
  ------------------
  |  Branch (104:9): [True: 2.28M, False: 2.07M]
  ------------------
  105|       |      // Right hemisphere.
  106|  2.28M|      s = (int_vec[1] + center_value_);
  107|  2.28M|      t = (int_vec[2] + center_value_);
  108|  2.28M|    } else {
  109|       |      // Left hemisphere.
  110|  2.07M|      if (int_vec[1] < 0) {
  ------------------
  |  Branch (110:11): [True: 29.7k, False: 2.04M]
  ------------------
  111|  29.7k|        s = std::abs(int_vec[2]);
  112|  2.04M|      } else {
  113|  2.04M|        s = (max_value_ - std::abs(int_vec[2]));
  114|  2.04M|      }
  115|  2.07M|      if (int_vec[2] < 0) {
  ------------------
  |  Branch (115:11): [True: 32.5k, False: 2.04M]
  ------------------
  116|  32.5k|        t = std::abs(int_vec[1]);
  117|  2.04M|      } else {
  118|  2.04M|        t = (max_value_ - std::abs(int_vec[1]));
  119|  2.04M|      }
  120|  2.07M|    }
  121|  4.36M|    CanonicalizeOctahedralCoords(s, t, out_s, out_t);
  122|  4.36M|  }
_ZNK5draco17OctahedronToolBox37QuantizedOctahedralCoordsToUnitVectorEiiPf:
  198|  12.8M|                                                    float* out_vector) const {
  199|  12.8M|    OctahedralCoordsToUnitVector(in_s * dequantization_scale_ - 1.f,
  200|  12.8M|                                 in_t * dequantization_scale_ - 1.f,
  201|  12.8M|                                 out_vector);
  202|  12.8M|  }
_ZNK5draco17OctahedronToolBox11IsInDiamondERKiS2_:
  205|  17.6M|  inline bool IsInDiamond(const int32_t& s, const int32_t& t) const {
  206|       |    // Expect center already at origin.
  207|  17.6M|    DRACO_DCHECK_LE(s, center_value_);
  208|  17.6M|    DRACO_DCHECK_LE(t, center_value_);
  209|  17.6M|    DRACO_DCHECK_GE(s, -center_value_);
  210|  17.6M|    DRACO_DCHECK_GE(t, -center_value_);
  211|  17.6M|    const uint32_t st =
  212|  17.6M|        static_cast<uint32_t>(std::abs(s)) + static_cast<uint32_t>(std::abs(t));
  213|  17.6M|    return st <= center_value_;
  214|  17.6M|  }
_ZNK5draco17OctahedronToolBox13InvertDiamondEPiS1_:
  216|  33.9M|  void InvertDiamond(int32_t* s, int32_t* t) const {
  217|       |    // Expect center already at origin.
  218|  33.9M|    DRACO_DCHECK_LE(*s, center_value_);
  219|  33.9M|    DRACO_DCHECK_LE(*t, center_value_);
  220|  33.9M|    DRACO_DCHECK_GE(*s, -center_value_);
  221|  33.9M|    DRACO_DCHECK_GE(*t, -center_value_);
  222|  33.9M|    int32_t sign_s = 0;
  223|  33.9M|    int32_t sign_t = 0;
  224|  33.9M|    if (*s >= 0 && *t >= 0) {
  ------------------
  |  Branch (224:9): [True: 33.9M, False: 67.1k]
  |  Branch (224:20): [True: 33.8M, False: 41.6k]
  ------------------
  225|  33.8M|      sign_s = 1;
  226|  33.8M|      sign_t = 1;
  227|  33.8M|    } else if (*s <= 0 && *t <= 0) {
  ------------------
  |  Branch (227:16): [True: 69.3k, False: 39.4k]
  |  Branch (227:27): [True: 32.9k, False: 36.3k]
  ------------------
  228|  32.9k|      sign_s = -1;
  229|  32.9k|      sign_t = -1;
  230|  75.8k|    } else {
  231|  75.8k|      sign_s = (*s > 0) ? 1 : -1;
  ------------------
  |  Branch (231:16): [True: 39.4k, False: 36.3k]
  ------------------
  232|  75.8k|      sign_t = (*t > 0) ? 1 : -1;
  ------------------
  |  Branch (232:16): [True: 36.3k, False: 39.4k]
  ------------------
  233|  75.8k|    }
  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|  33.9M|    const uint32_t corner_point_s = sign_s * center_value_;
  239|  33.9M|    const uint32_t corner_point_t = sign_t * center_value_;
  240|  33.9M|    uint32_t us = *s;
  241|  33.9M|    uint32_t ut = *t;
  242|  33.9M|    us = us + us - corner_point_s;
  243|  33.9M|    ut = ut + ut - corner_point_t;
  244|  33.9M|    if (sign_s * sign_t >= 0) {
  ------------------
  |  Branch (244:9): [True: 33.8M, False: 75.8k]
  ------------------
  245|  33.8M|      uint32_t temp = us;
  246|  33.8M|      us = -ut;
  247|  33.8M|      ut = -temp;
  248|  33.8M|    } else {
  249|  75.8k|      std::swap(us, ut);
  250|  75.8k|    }
  251|  33.9M|    us = us + corner_point_s;
  252|  33.9M|    ut = ut + corner_point_t;
  253|       |
  254|  33.9M|    *s = us;
  255|  33.9M|    *t = ut;
  256|  33.9M|    *s /= 2;
  257|  33.9M|    *t /= 2;
  258|  33.9M|  }
_ZNK5draco17OctahedronToolBox6ModMaxEi:
  272|  35.3M|  int32_t ModMax(int32_t x) const {
  273|  35.3M|    if (x > this->center_value()) {
  ------------------
  |  Branch (273:9): [True: 3.30k, False: 35.3M]
  ------------------
  274|  3.30k|      return x - this->max_quantized_value();
  275|  3.30k|    }
  276|  35.3M|    if (x < -this->center_value()) {
  ------------------
  |  Branch (276:9): [True: 1.94k, False: 35.3M]
  ------------------
  277|  1.94k|      return x + this->max_quantized_value();
  278|  1.94k|    }
  279|  35.3M|    return x;
  280|  35.3M|  }
_ZNK5draco17OctahedronToolBox17quantization_bitsEv:
  291|  2.00k|  int32_t quantization_bits() const { return quantization_bits_; }
_ZNK5draco17OctahedronToolBox19max_quantized_valueEv:
  292|  5.25k|  int32_t max_quantized_value() const { return max_quantized_value_; }
_ZNK5draco17OctahedronToolBox12center_valueEv:
  294|   106M|  int32_t center_value() const { return center_value_; }
_ZNK5draco17OctahedronToolBox28OctahedralCoordsToUnitVectorEffPf:
  298|  12.8M|                                           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|  12.8M|    float y = in_s_scaled;
  329|  12.8M|    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|  12.8M|    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|  12.8M|    float x_offset = -x;
  342|  12.8M|    x_offset = x_offset < 0 ? 0 : x_offset;
  ------------------
  |  Branch (342:16): [True: 27, False: 12.8M]
  ------------------
  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|  12.8M|    y += y < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (347:10): [True: 37.7k, False: 12.8M]
  ------------------
  348|  12.8M|    z += z < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (348:10): [True: 38.0k, False: 12.8M]
  ------------------
  349|       |
  350|       |    // Normalize the computed vector.
  351|  12.8M|    const float norm_squared = x * x + y * y + z * z;
  352|  12.8M|    if (norm_squared < 1e-6) {
  ------------------
  |  Branch (352:9): [True: 0, False: 12.8M]
  ------------------
  353|      0|      out_vector[0] = 0;
  354|      0|      out_vector[1] = 0;
  355|      0|      out_vector[2] = 0;
  356|  12.8M|    } else {
  357|  12.8M|      const float d = 1.0f / std::sqrt(norm_squared);
  358|  12.8M|      out_vector[0] = x * d;
  359|  12.8M|      out_vector[1] = y * d;
  360|  12.8M|      out_vector[2] = z * d;
  361|  12.8M|    }
  362|  12.8M|  }
_ZNK5draco17OctahedronToolBox25CanonicalizeIntegerVectorIiEEvPT_:
  173|  4.36M|  void CanonicalizeIntegerVector(T* vec) const {
  174|  4.36M|    static_assert(std::is_integral<T>::value, "T must be an integral type.");
  175|  4.36M|    static_assert(std::is_signed<T>::value, "T must be a signed type.");
  176|  4.36M|    const int64_t abs_sum = static_cast<int64_t>(std::abs(vec[0])) +
  177|  4.36M|                            static_cast<int64_t>(std::abs(vec[1])) +
  178|  4.36M|                            static_cast<int64_t>(std::abs(vec[2]));
  179|       |
  180|  4.36M|    if (abs_sum == 0) {
  ------------------
  |  Branch (180:9): [True: 4.18M, False: 173k]
  ------------------
  181|  4.18M|      vec[0] = center_value_;  // vec[1] == v[2] == 0
  182|  4.18M|    } else {
  183|   173k|      vec[0] =
  184|   173k|          (static_cast<int64_t>(vec[0]) * static_cast<int64_t>(center_value_)) /
  185|   173k|          abs_sum;
  186|   173k|      vec[1] =
  187|   173k|          (static_cast<int64_t>(vec[1]) * static_cast<int64_t>(center_value_)) /
  188|   173k|          abs_sum;
  189|   173k|      if (vec[2] >= 0) {
  ------------------
  |  Branch (189:11): [True: 94.2k, False: 79.5k]
  ------------------
  190|  94.2k|        vec[2] = center_value_ - std::abs(vec[0]) - std::abs(vec[1]);
  191|  94.2k|      } else {
  192|  79.5k|        vec[2] = -(center_value_ - std::abs(vec[0]) - std::abs(vec[1]));
  193|  79.5k|      }
  194|   173k|    }
  195|  4.36M|  }

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

_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    802|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    802|            attribute, transform, mesh_data),
   52|    802|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  196|    792|                                                                buffer) {
  197|    792|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  198|    792|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    792|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (198:7): [True: 18, False: 774]
  ------------------
  199|       |    // Decode prediction mode.
  200|     18|    uint8_t mode;
  201|     18|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (201:9): [True: 1, False: 17]
  ------------------
  202|      1|      return false;
  203|      1|    }
  204|       |
  205|     17|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (205:9): [True: 2, False: 15]
  ------------------
  206|       |      // Unsupported mode.
  207|      2|      return false;
  208|      2|    }
  209|     17|  }
  210|    789|#endif
  211|       |
  212|       |  // Encode selected edges using separate rans bit coder for each context.
  213|  3.66k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (213:19): [True: 2.98k, False: 675]
  ------------------
  214|  2.98k|    uint32_t num_flags;
  215|  2.98k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (215:9): [True: 21, False: 2.96k]
  ------------------
  216|     21|      return false;
  217|     21|    }
  218|  2.96k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (218:9): [True: 55, False: 2.91k]
  ------------------
  219|     55|      return false;
  220|     55|    }
  221|  2.91k|    if (num_flags > 0) {
  ------------------
  |  Branch (221:9): [True: 655, False: 2.25k]
  ------------------
  222|    655|      is_crease_edge_[i].resize(num_flags);
  223|    655|      RAnsBitDecoder decoder;
  224|    655|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (224:11): [True: 38, False: 617]
  ------------------
  225|     38|        return false;
  226|     38|      }
  227|  1.05M|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (227:28): [True: 1.05M, False: 617]
  ------------------
  228|  1.05M|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  229|  1.05M|      }
  230|    617|      decoder.EndDecoding();
  231|    617|    }
  232|  2.91k|  }
  233|    675|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  234|    675|                                     MeshDataT>::DecodePredictionData(buffer);
  235|    789|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    648|                          const PointIndex* /* entry_to_point_id_map */) {
   87|    648|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    648|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  3.24k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 2.59k, False: 648]
  ------------------
   93|  2.59k|    pred_vals[i].resize(num_components, 0);
   94|  2.59k|  }
   95|    648|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    648|                                         out_data);
   97|       |
   98|    648|  const CornerTable* const table = this->mesh_data().corner_table();
   99|    648|  const std::vector<int32_t>* const vertex_to_data_map =
  100|    648|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    648|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    648|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    648|  const int corner_map_size =
  109|    648|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|    648|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (110:7): [True: 0, False: 648]
  ------------------
  111|      0|    return false;
  112|      0|  }
  113|   909k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (113:19): [True: 908k, False: 470]
  ------------------
  114|   908k|    const CornerIndex start_corner_id =
  115|   908k|        this->mesh_data().data_to_corner_map()->at(p);
  116|       |
  117|   908k|    CornerIndex corner_id(start_corner_id);
  118|   908k|    int num_parallelograms = 0;
  119|   908k|    bool first_pass = true;
  120|  1.92M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (120:12): [True: 1.04M, False: 884k]
  ------------------
  121|  1.04M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (121:11): [True: 51.4k, False: 989k]
  ------------------
  122|  1.04M|              p, corner_id, table, *vertex_to_data_map, out_data,
  123|  1.04M|              num_components, &(pred_vals[num_parallelograms][0]))) {
  124|       |        // Parallelogram prediction applied and stored in
  125|       |        // |pred_vals[num_parallelograms]|
  126|  51.4k|        ++num_parallelograms;
  127|       |        // Stop processing when we reach the maximum number of allowed
  128|       |        // parallelograms.
  129|  51.4k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (129:13): [True: 329, False: 51.1k]
  ------------------
  130|    329|          break;
  131|    329|        }
  132|  51.4k|      }
  133|       |
  134|       |      // Proceed to the next corner attached to the vertex. First swing left
  135|       |      // and if we reach a boundary, swing right from the start corner.
  136|  1.04M|      if (first_pass) {
  ------------------
  |  Branch (136:11): [True: 1.03M, False: 7.98k]
  ------------------
  137|  1.03M|        corner_id = table->SwingLeft(corner_id);
  138|  1.03M|      } else {
  139|  7.98k|        corner_id = table->SwingRight(corner_id);
  140|  7.98k|      }
  141|  1.04M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (141:11): [True: 23.5k, False: 1.01M]
  ------------------
  142|  23.5k|        break;
  143|  23.5k|      }
  144|  1.01M|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (144:11): [True: 888k, False: 129k]
  |  Branch (144:47): [True: 884k, False: 3.50k]
  ------------------
  145|   884k|        first_pass = false;
  146|   884k|        corner_id = table->SwingRight(start_corner_id);
  147|   884k|      }
  148|  1.01M|    }
  149|       |
  150|       |    // Check which of the available parallelograms are actually used and compute
  151|       |    // the final predicted value.
  152|   908k|    int num_used_parallelograms = 0;
  153|   908k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (153:9): [True: 28.7k, False: 879k]
  ------------------
  154|  1.09M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (154:23): [True: 1.06M, False: 28.7k]
  ------------------
  155|  1.06M|        multi_pred_vals[i] = 0;
  156|  1.06M|      }
  157|       |      // Check which parallelograms are actually used.
  158|  79.9k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (158:23): [True: 51.3k, False: 28.5k]
  ------------------
  159|  51.3k|        const int context = num_parallelograms - 1;
  160|  51.3k|        const int pos = is_crease_edge_pos[context]++;
  161|  51.3k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (161:13): [True: 178, False: 51.1k]
  ------------------
  162|    178|          return false;
  163|    178|        }
  164|  51.1k|        const bool is_crease = is_crease_edge_[context][pos];
  165|  51.1k|        if (!is_crease) {
  ------------------
  |  Branch (165:13): [True: 28.0k, False: 23.1k]
  ------------------
  166|  28.0k|          ++num_used_parallelograms;
  167|  1.25M|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (167:27): [True: 1.22M, False: 28.0k]
  ------------------
  168|  1.22M|            multi_pred_vals[j] =
  169|  1.22M|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  170|  1.22M|          }
  171|  28.0k|        }
  172|  51.1k|      }
  173|  28.7k|    }
  174|   908k|    const int dst_offset = p * num_components;
  175|   908k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (175:9): [True: 893k, False: 14.6k]
  ------------------
  176|       |      // No parallelogram was valid.
  177|       |      // We use the last decoded point as a reference.
  178|   893k|      const int src_offset = (p - 1) * num_components;
  179|   893k|      this->transform().ComputeOriginalValue(
  180|   893k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  181|   893k|    } else {
  182|       |      // Compute the correction from the predicted value.
  183|   661k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (183:23): [True: 647k, False: 14.6k]
  ------------------
  184|   647k|        multi_pred_vals[c] /= num_used_parallelograms;
  185|   647k|      }
  186|  14.6k|      this->transform().ComputeOriginalValue(
  187|  14.6k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  188|  14.6k|    }
  189|   908k|  }
  190|    470|  return true;
  191|    648|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    812|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    812|            attribute, transform, mesh_data),
   52|    812|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  196|    805|                                                                buffer) {
  197|    805|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  198|    805|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    805|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (198:7): [True: 13, False: 792]
  ------------------
  199|       |    // Decode prediction mode.
  200|     13|    uint8_t mode;
  201|     13|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (201:9): [True: 1, False: 12]
  ------------------
  202|      1|      return false;
  203|      1|    }
  204|       |
  205|     12|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (205:9): [True: 5, False: 7]
  ------------------
  206|       |      // Unsupported mode.
  207|      5|      return false;
  208|      5|    }
  209|     12|  }
  210|    799|#endif
  211|       |
  212|       |  // Encode selected edges using separate rans bit coder for each context.
  213|  3.63k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (213:19): [True: 2.99k, False: 645]
  ------------------
  214|  2.99k|    uint32_t num_flags;
  215|  2.99k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (215:9): [True: 23, False: 2.96k]
  ------------------
  216|     23|      return false;
  217|     23|    }
  218|  2.96k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (218:9): [True: 89, False: 2.87k]
  ------------------
  219|     89|      return false;
  220|     89|    }
  221|  2.87k|    if (num_flags > 0) {
  ------------------
  |  Branch (221:9): [True: 954, False: 1.92k]
  ------------------
  222|    954|      is_crease_edge_[i].resize(num_flags);
  223|    954|      RAnsBitDecoder decoder;
  224|    954|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (224:11): [True: 42, False: 912]
  ------------------
  225|     42|        return false;
  226|     42|      }
  227|  1.47M|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (227:28): [True: 1.47M, False: 912]
  ------------------
  228|  1.47M|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  229|  1.47M|      }
  230|    912|      decoder.EndDecoding();
  231|    912|    }
  232|  2.87k|  }
  233|    645|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  234|    645|                                     MeshDataT>::DecodePredictionData(buffer);
  235|    799|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    597|                          const PointIndex* /* entry_to_point_id_map */) {
   87|    597|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    597|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  2.98k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 2.38k, False: 597]
  ------------------
   93|  2.38k|    pred_vals[i].resize(num_components, 0);
   94|  2.38k|  }
   95|    597|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    597|                                         out_data);
   97|       |
   98|    597|  const CornerTable* const table = this->mesh_data().corner_table();
   99|    597|  const std::vector<int32_t>* const vertex_to_data_map =
  100|    597|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    597|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    597|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    597|  const int corner_map_size =
  109|    597|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|    597|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (110:7): [True: 0, False: 597]
  ------------------
  111|      0|    return false;
  112|      0|  }
  113|   136k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (113:19): [True: 136k, False: 293]
  ------------------
  114|   136k|    const CornerIndex start_corner_id =
  115|   136k|        this->mesh_data().data_to_corner_map()->at(p);
  116|       |
  117|   136k|    CornerIndex corner_id(start_corner_id);
  118|   136k|    int num_parallelograms = 0;
  119|   136k|    bool first_pass = true;
  120|   786k|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (120:12): [True: 777k, False: 8.83k]
  ------------------
  121|   777k|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (121:11): [True: 250k, False: 527k]
  ------------------
  122|   777k|              p, corner_id, table, *vertex_to_data_map, out_data,
  123|   777k|              num_components, &(pred_vals[num_parallelograms][0]))) {
  124|       |        // Parallelogram prediction applied and stored in
  125|       |        // |pred_vals[num_parallelograms]|
  126|   250k|        ++num_parallelograms;
  127|       |        // Stop processing when we reach the maximum number of allowed
  128|       |        // parallelograms.
  129|   250k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (129:13): [True: 323, False: 249k]
  ------------------
  130|    323|          break;
  131|    323|        }
  132|   250k|      }
  133|       |
  134|       |      // Proceed to the next corner attached to the vertex. First swing left
  135|       |      // and if we reach a boundary, swing right from the start corner.
  136|   777k|      if (first_pass) {
  ------------------
  |  Branch (136:11): [True: 770k, False: 7.46k]
  ------------------
  137|   770k|        corner_id = table->SwingLeft(corner_id);
  138|   770k|      } else {
  139|  7.46k|        corner_id = table->SwingRight(corner_id);
  140|  7.46k|      }
  141|   777k|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (141:11): [True: 127k, False: 650k]
  ------------------
  142|   127k|        break;
  143|   127k|      }
  144|   650k|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (144:11): [True: 12.7k, False: 637k]
  |  Branch (144:47): [True: 8.83k, False: 3.87k]
  ------------------
  145|  8.83k|        first_pass = false;
  146|  8.83k|        corner_id = table->SwingRight(start_corner_id);
  147|  8.83k|      }
  148|   650k|    }
  149|       |
  150|       |    // Check which of the available parallelograms are actually used and compute
  151|       |    // the final predicted value.
  152|   136k|    int num_used_parallelograms = 0;
  153|   136k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (153:9): [True: 128k, False: 7.45k]
  ------------------
  154|  8.94M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (154:23): [True: 8.81M, False: 128k]
  ------------------
  155|  8.81M|        multi_pred_vals[i] = 0;
  156|  8.81M|      }
  157|       |      // Check which parallelograms are actually used.
  158|   378k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (158:23): [True: 250k, False: 128k]
  ------------------
  159|   250k|        const int context = num_parallelograms - 1;
  160|   250k|        const int pos = is_crease_edge_pos[context]++;
  161|   250k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (161:13): [True: 304, False: 249k]
  ------------------
  162|    304|          return false;
  163|    304|        }
  164|   249k|        const bool is_crease = is_crease_edge_[context][pos];
  165|   249k|        if (!is_crease) {
  ------------------
  |  Branch (165:13): [True: 110k, False: 138k]
  ------------------
  166|   110k|          ++num_used_parallelograms;
  167|  7.76M|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (167:27): [True: 7.64M, False: 110k]
  ------------------
  168|  7.64M|            multi_pred_vals[j] =
  169|  7.64M|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  170|  7.64M|          }
  171|   110k|        }
  172|   249k|      }
  173|   128k|    }
  174|   136k|    const int dst_offset = p * num_components;
  175|   136k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (175:9): [True: 79.5k, False: 56.4k]
  ------------------
  176|       |      // No parallelogram was valid.
  177|       |      // We use the last decoded point as a reference.
  178|  79.5k|      const int src_offset = (p - 1) * num_components;
  179|  79.5k|      this->transform().ComputeOriginalValue(
  180|  79.5k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  181|  79.5k|    } else {
  182|       |      // Compute the correction from the predicted value.
  183|  3.92M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (183:23): [True: 3.87M, False: 56.4k]
  ------------------
  184|  3.87M|        multi_pred_vals[c] /= num_used_parallelograms;
  185|  3.87M|      }
  186|  56.4k|      this->transform().ComputeOriginalValue(
  187|  56.4k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  188|  56.4k|    }
  189|   136k|  }
  190|    293|  return true;
  191|    597|}

_ZN5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE3SetEPKNS_4MeshEPKS1_PKNSt3__16vectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS8_9allocatorISC_EEEEPKNS9_IiNSD_IiEEEE:
   37|  4.41k|           const std::vector<int32_t>* vertex_to_data_map) {
   38|  4.41k|    mesh_ = mesh;
   39|  4.41k|    corner_table_ = table;
   40|  4.41k|    data_to_corner_map_ = data_to_corner_map;
   41|  4.41k|    vertex_to_data_map_ = vertex_to_data_map;
   42|  4.41k|  }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE12corner_tableEv:
   45|  17.7M|  const CornerTable* corner_table() const { return corner_table_; }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE18vertex_to_data_mapEv:
   46|  12.8M|  const std::vector<int32_t>* vertex_to_data_map() const {
   47|  12.8M|    return vertex_to_data_map_;
   48|  12.8M|  }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE18data_to_corner_mapEv:
   49|  12.6M|  const std::vector<CornerIndex>* data_to_corner_map() const {
   50|  12.6M|    return data_to_corner_map_;
   51|  12.6M|  }
_ZN5draco24MeshPredictionSchemeDataINS_11CornerTableEE3SetEPKNS_4MeshEPKS1_PKNSt3__16vectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS8_9allocatorISC_EEEEPKNS9_IiNSD_IiEEEE:
   37|  4.66k|           const std::vector<int32_t>* vertex_to_data_map) {
   38|  4.66k|    mesh_ = mesh;
   39|  4.66k|    corner_table_ = table;
   40|  4.66k|    data_to_corner_map_ = data_to_corner_map;
   41|  4.66k|    vertex_to_data_map_ = vertex_to_data_map;
   42|  4.66k|  }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE12corner_tableEv:
   45|  9.26M|  const CornerTable* corner_table() const { return corner_table_; }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE18vertex_to_data_mapEv:
   46|  7.88M|  const std::vector<int32_t>* vertex_to_data_map() const {
   47|  7.88M|    return vertex_to_data_map_;
   48|  7.88M|  }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE18data_to_corner_mapEv:
   49|  2.90M|  const std::vector<CornerIndex>* data_to_corner_map() const {
   50|  2.90M|    return data_to_corner_map_;
   51|  2.90M|  }
_ZN5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEC2Ev:
   30|  4.41k|      : mesh_(nullptr),
   31|  4.41k|        corner_table_(nullptr),
   32|  4.41k|        vertex_to_data_map_(nullptr),
   33|  4.41k|        data_to_corner_map_(nullptr) {}
_ZN5draco24MeshPredictionSchemeDataINS_11CornerTableEEC2Ev:
   30|  4.66k|      : mesh_(nullptr),
   31|  4.66k|        corner_table_(nullptr),
   32|  4.66k|        vertex_to_data_map_(nullptr),
   33|  4.66k|        data_to_corner_map_(nullptr) {}

_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|  1.20M|  const MeshData& mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   189k|  const MeshData& mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|  1.04M|  const MeshData& mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   203k|  const MeshData& mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  4.02k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  4.02k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|  11.9M|  const MeshData& mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  4.13k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  4.13k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|  3.88M|  const MeshData& mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    166|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    166|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    251|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    251|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    199|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    199|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    271|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    271|        mesh_data_(mesh_data) {}

_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    330|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    166|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    166|    DRACO_DCHECK_EQ(i, 0);
   70|    166|    (void)i;
   71|    166|    return GeometryAttribute::POSITION;
   72|    166|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    165|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    165|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 165]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    165|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 164]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    164|    predictor_.SetPositionAttribute(*att);
   82|    164|    return true;
   83|    165|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    164|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    164|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 7, False: 157]
  ------------------
  148|      7|    return false;
  149|      7|  }
  150|       |
  151|    157|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    157|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    157|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 51, False: 106]
  ------------------
  153|     51|    uint8_t prediction_mode;
  154|     51|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 50]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     50|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 2, False: 48]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      2|      return false;
  160|      2|    }
  161|       |
  162|     48|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 48]
  ------------------
  163|     48|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     48|  }
  167|    154|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    154|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 15, False: 139]
  ------------------
  171|     15|    return false;
  172|     15|  }
  173|       |
  174|    139|  return true;
  175|    154|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    139|                                      const PointIndex* entry_to_point_id_map) {
  103|    139|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    139|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    139|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    139|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    139|  const int corner_map_size =
  111|    139|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    139|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 139]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    139|  VectorD<int32_t, 3> pred_normal_3d;
  117|    139|  int32_t pred_normal_oct[2];
  118|       |
  119|  1.20M|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 1.20M, False: 139]
  ------------------
  120|  1.20M|    const CornerIndex corner_id =
  121|  1.20M|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|  1.20M|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|  1.20M|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|  1.20M|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|  1.20M|                    octahedron_tool_box_.center_value());
  128|  1.20M|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 1.00M, False: 193k]
  ------------------
  129|  1.00M|      pred_normal_3d = -pred_normal_3d;
  130|  1.00M|    }
  131|  1.20M|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|  1.20M|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|  1.20M|    const int data_offset = data_id * 2;
  135|  1.20M|    this->transform().ComputeOriginalValue(
  136|  1.20M|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|  1.20M|  }
  138|    139|  flip_normal_bit_decoder_.EndDecoding();
  139|    139|  return true;
  140|    139|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    139|  void SetQuantizationBits(int q) {
   85|    139|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    139|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    500|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    251|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    251|    DRACO_DCHECK_EQ(i, 0);
   70|    251|    (void)i;
   71|    251|    return GeometryAttribute::POSITION;
   72|    251|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    250|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    250|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 250]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    250|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 249]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    249|    predictor_.SetPositionAttribute(*att);
   82|    249|    return true;
   83|    250|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    249|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    249|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 9, False: 240]
  ------------------
  148|      9|    return false;
  149|      9|  }
  150|       |
  151|    240|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    240|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    240|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 51, False: 189]
  ------------------
  153|     51|    uint8_t prediction_mode;
  154|     51|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 50]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     50|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 2, False: 48]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      2|      return false;
  160|      2|    }
  161|       |
  162|     48|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 48]
  ------------------
  163|     48|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     48|  }
  167|    237|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    237|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 7, False: 230]
  ------------------
  171|      7|    return false;
  172|      7|  }
  173|       |
  174|    230|  return true;
  175|    237|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    230|                                      const PointIndex* entry_to_point_id_map) {
  103|    230|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    230|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    230|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    230|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    230|  const int corner_map_size =
  111|    230|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    230|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 230]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    230|  VectorD<int32_t, 3> pred_normal_3d;
  117|    230|  int32_t pred_normal_oct[2];
  118|       |
  119|   189k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 188k, False: 230]
  ------------------
  120|   188k|    const CornerIndex corner_id =
  121|   188k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   188k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   188k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   188k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   188k|                    octahedron_tool_box_.center_value());
  128|   188k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 132k, False: 56.2k]
  ------------------
  129|   132k|      pred_normal_3d = -pred_normal_3d;
  130|   132k|    }
  131|   188k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   188k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   188k|    const int data_offset = data_id * 2;
  135|   188k|    this->transform().ComputeOriginalValue(
  136|   188k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   188k|  }
  138|    230|  flip_normal_bit_decoder_.EndDecoding();
  139|    230|  return true;
  140|    230|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    230|  void SetQuantizationBits(int q) {
   85|    230|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    230|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    397|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    199|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    199|    DRACO_DCHECK_EQ(i, 0);
   70|    199|    (void)i;
   71|    199|    return GeometryAttribute::POSITION;
   72|    199|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    199|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    199|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 199]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    199|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 198]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    198|    predictor_.SetPositionAttribute(*att);
   82|    198|    return true;
   83|    199|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    198|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    198|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 10, False: 188]
  ------------------
  148|     10|    return false;
  149|     10|  }
  150|       |
  151|    188|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    188|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    188|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 59, False: 129]
  ------------------
  153|     59|    uint8_t prediction_mode;
  154|     59|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 58]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     58|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 1, False: 57]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      1|      return false;
  160|      1|    }
  161|       |
  162|     57|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 57]
  ------------------
  163|     57|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     57|  }
  167|    186|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    186|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 18, False: 168]
  ------------------
  171|     18|    return false;
  172|     18|  }
  173|       |
  174|    168|  return true;
  175|    186|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    168|                                      const PointIndex* entry_to_point_id_map) {
  103|    168|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    168|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    168|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    168|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    168|  const int corner_map_size =
  111|    168|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    168|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 168]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    168|  VectorD<int32_t, 3> pred_normal_3d;
  117|    168|  int32_t pred_normal_oct[2];
  118|       |
  119|  1.04M|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 1.04M, False: 168]
  ------------------
  120|  1.04M|    const CornerIndex corner_id =
  121|  1.04M|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|  1.04M|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|  1.04M|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|  1.04M|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|  1.04M|                    octahedron_tool_box_.center_value());
  128|  1.04M|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 749k, False: 297k]
  ------------------
  129|   749k|      pred_normal_3d = -pred_normal_3d;
  130|   749k|    }
  131|  1.04M|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|  1.04M|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|  1.04M|    const int data_offset = data_id * 2;
  135|  1.04M|    this->transform().ComputeOriginalValue(
  136|  1.04M|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|  1.04M|  }
  138|    168|  flip_normal_bit_decoder_.EndDecoding();
  139|    168|  return true;
  140|    168|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    168|  void SetQuantizationBits(int q) {
   85|    168|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    168|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    541|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    271|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    271|    DRACO_DCHECK_EQ(i, 0);
   70|    271|    (void)i;
   71|    271|    return GeometryAttribute::POSITION;
   72|    271|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    271|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    271|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 271]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    271|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 270]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    270|    predictor_.SetPositionAttribute(*att);
   82|    270|    return true;
   83|    271|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    270|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    270|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 6, False: 264]
  ------------------
  148|      6|    return false;
  149|      6|  }
  150|       |
  151|    264|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    264|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    264|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 62, False: 202]
  ------------------
  153|     62|    uint8_t prediction_mode;
  154|     62|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 61]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|     61|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 6, False: 55]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      6|      return false;
  160|      6|    }
  161|       |
  162|     55|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 55]
  ------------------
  163|     55|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|     55|  }
  167|    257|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    257|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 8, False: 249]
  ------------------
  171|      8|    return false;
  172|      8|  }
  173|       |
  174|    249|  return true;
  175|    257|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    249|                                      const PointIndex* entry_to_point_id_map) {
  103|    249|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    249|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    249|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    249|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    249|  const int corner_map_size =
  111|    249|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    249|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 249]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    249|  VectorD<int32_t, 3> pred_normal_3d;
  117|    249|  int32_t pred_normal_oct[2];
  118|       |
  119|   203k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 203k, False: 249]
  ------------------
  120|   203k|    const CornerIndex corner_id =
  121|   203k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   203k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   203k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   203k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   203k|                    octahedron_tool_box_.center_value());
  128|   203k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 143k, False: 59.6k]
  ------------------
  129|   143k|      pred_normal_3d = -pred_normal_3d;
  130|   143k|    }
  131|   203k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   203k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   203k|    const int data_offset = data_id * 2;
  135|   203k|    this->transform().ComputeOriginalValue(
  136|   203k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   203k|  }
  138|    249|  flip_normal_bit_decoder_.EndDecoding();
  139|    249|  return true;
  140|    249|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    249|  void SetQuantizationBits(int q) {
   85|    249|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    249|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    638|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    638|            attribute, transform, mesh_data),
   37|    638|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|  1.27k|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    638|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    638|    DRACO_DCHECK_EQ(i, 0);
   70|    638|    (void)i;
   71|    638|    return GeometryAttribute::POSITION;
   72|    638|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    637|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    637|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 637]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    637|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 3, False: 634]
  ------------------
   79|      3|      return false;  // Currently works only for 3 component positions.
   80|      3|    }
   81|    634|    predictor_.SetPositionAttribute(*att);
   82|    634|    return true;
   83|    637|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    633|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    633|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 39, False: 594]
  ------------------
  148|     39|    return false;
  149|     39|  }
  150|       |
  151|    594|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    594|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    594|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 294, False: 300]
  ------------------
  153|    294|    uint8_t prediction_mode;
  154|    294|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 293]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|    293|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 4, False: 289]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      4|      return false;
  160|      4|    }
  161|       |
  162|    289|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 289]
  ------------------
  163|    289|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|    289|  }
  167|    589|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    589|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 31, False: 558]
  ------------------
  171|     31|    return false;
  172|     31|  }
  173|       |
  174|    558|  return true;
  175|    589|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    558|                                      const PointIndex* entry_to_point_id_map) {
  103|    558|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    558|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    558|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    558|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    558|  const int corner_map_size =
  111|    558|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    558|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 558]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    558|  VectorD<int32_t, 3> pred_normal_3d;
  117|    558|  int32_t pred_normal_oct[2];
  118|       |
  119|  1.55M|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 1.55M, False: 558]
  ------------------
  120|  1.55M|    const CornerIndex corner_id =
  121|  1.55M|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|  1.55M|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|  1.55M|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|  1.55M|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|  1.55M|                    octahedron_tool_box_.center_value());
  128|  1.55M|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 1.46M, False: 90.0k]
  ------------------
  129|  1.46M|      pred_normal_3d = -pred_normal_3d;
  130|  1.46M|    }
  131|  1.55M|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|  1.55M|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|  1.55M|    const int data_offset = data_id * 2;
  135|  1.55M|    this->transform().ComputeOriginalValue(
  136|  1.55M|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|  1.55M|  }
  138|    558|  flip_normal_bit_decoder_.EndDecoding();
  139|    558|  return true;
  140|    558|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    558|  void SetQuantizationBits(int q) {
   85|    558|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    558|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    762|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    762|            attribute, transform, mesh_data),
   37|    762|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|  1.52k|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    762|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    762|    DRACO_DCHECK_EQ(i, 0);
   70|    762|    (void)i;
   71|    762|    return GeometryAttribute::POSITION;
   72|    762|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    761|  bool SetParentAttribute(const PointAttribute* att) override {
   75|    761|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 761]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    761|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 760]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    760|    predictor_.SetPositionAttribute(*att);
   82|    760|    return true;
   83|    761|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  145|    757|                                                                buffer) {
  146|       |  // Get data needed for transform
  147|    757|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (147:7): [True: 47, False: 710]
  ------------------
  148|     47|    return false;
  149|     47|  }
  150|       |
  151|    710|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  152|    710|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    710|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (152:7): [True: 280, False: 430]
  ------------------
  153|    280|    uint8_t prediction_mode;
  154|    280|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (154:9): [True: 1, False: 279]
  ------------------
  155|      1|      return false;
  156|      1|    }
  157|    279|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (157:9): [True: 3, False: 276]
  ------------------
  158|       |      // Invalid prediction mode.
  159|      3|      return false;
  160|      3|    }
  161|       |
  162|    276|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (162:9): [True: 0, False: 276]
  ------------------
  163|    276|            NormalPredictionMode(prediction_mode))) {
  164|      0|      return false;
  165|      0|    }
  166|    276|  }
  167|    706|#endif
  168|       |
  169|       |  // Init normal flips.
  170|    706|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (170:7): [True: 53, False: 653]
  ------------------
  171|     53|    return false;
  172|     53|  }
  173|       |
  174|    653|  return true;
  175|    706|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    653|                                      const PointIndex* entry_to_point_id_map) {
  103|    653|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    653|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    653|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    653|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    653|  const int corner_map_size =
  111|    653|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|    653|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (112:7): [True: 0, False: 653]
  ------------------
  113|      0|    return false;
  114|      0|  }
  115|       |
  116|    653|  VectorD<int32_t, 3> pred_normal_3d;
  117|    653|  int32_t pred_normal_oct[2];
  118|       |
  119|   173k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (119:25): [True: 172k, False: 653]
  ------------------
  120|   172k|    const CornerIndex corner_id =
  121|   172k|        this->mesh_data().data_to_corner_map()->at(data_id);
  122|   172k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  123|       |
  124|       |    // Compute predicted octahedral coordinates.
  125|   172k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  126|   172k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  127|   172k|                    octahedron_tool_box_.center_value());
  128|   172k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (128:9): [True: 134k, False: 38.3k]
  ------------------
  129|   134k|      pred_normal_3d = -pred_normal_3d;
  130|   134k|    }
  131|   172k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  132|   172k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  133|       |
  134|   172k|    const int data_offset = data_id * 2;
  135|   172k|    this->transform().ComputeOriginalValue(
  136|   172k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  137|   172k|  }
  138|    653|  flip_normal_bit_decoder_.EndDecoding();
  139|    653|  return true;
  140|    653|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    653|  void SetQuantizationBits(int q) {
   85|    653|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    653|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    166|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    166|            attribute, transform, mesh_data),
   37|    166|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    251|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    251|            attribute, transform, mesh_data),
   37|    251|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    199|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    199|            attribute, transform, mesh_data),
   37|    199|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    271|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    271|            attribute, transform, mesh_data),
   37|    271|        predictor_(mesh_data) {}

_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    214|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    214|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 45, False: 169]
  ------------------
  105|     45|      this->normal_prediction_mode_ = mode;
  106|     45|      return true;
  107|    169|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 169, False: 0]
  ------------------
  108|    169|      this->normal_prediction_mode_ = mode;
  109|    169|      return true;
  110|    169|    }
  111|      0|    return false;
  112|    214|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|  1.20M|                             DataTypeT* prediction) override {
   42|  1.20M|    DRACO_DCHECK(this->IsInitialized());
   43|  1.20M|    typedef typename MeshDataT::CornerTable CornerTable;
   44|  1.20M|    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.20M|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|  1.20M|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|  1.20M|    VectorD<int64_t, 3> normal;
   53|  1.20M|    CornerIndex c_next, c_prev;
   54|  2.41M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.21M, False: 1.20M]
  ------------------
   55|       |      // Getting corners.
   56|  1.21M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 210, False: 1.21M]
  ------------------
   57|    210|        c_next = corner_table->Next(corner_id);
   58|    210|        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.20M|    constexpr int64_t upper_bound = 1 << 29;
   85|  1.20M|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 142, False: 1.20M]
  ------------------
   86|    142|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    142|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 55, False: 87]
  ------------------
   88|     55|        const int64_t quotient = abs_sum / upper_bound;
   89|     55|        normal = normal / quotient;
   90|     55|      }
   91|  1.20M|    } else {
   92|  1.20M|      const int64_t abs_sum = normal.AbsSum();
   93|  1.20M|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 1.58k, False: 1.19M]
  ------------------
   94|  1.58k|        const int64_t quotient = abs_sum / upper_bound;
   95|  1.58k|        normal = normal / quotient;
   96|  1.58k|      }
   97|  1.20M|    }
   98|  1.20M|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|  1.20M|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|  1.20M|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|  1.20M|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|  1.20M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    299|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    299|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 46, False: 253]
  ------------------
  105|     46|      this->normal_prediction_mode_ = mode;
  106|     46|      return true;
  107|    253|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 253, False: 0]
  ------------------
  108|    253|      this->normal_prediction_mode_ = mode;
  109|    253|      return true;
  110|    253|    }
  111|      0|    return false;
  112|    299|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   188k|                             DataTypeT* prediction) override {
   42|   188k|    DRACO_DCHECK(this->IsInitialized());
   43|   188k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   188k|    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|   188k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   188k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   188k|    VectorD<int64_t, 3> normal;
   53|   188k|    CornerIndex c_next, c_prev;
   54|  1.31M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.12M, False: 188k]
  ------------------
   55|       |      // Getting corners.
   56|  1.12M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 270, False: 1.12M]
  ------------------
   57|    270|        c_next = corner_table->Next(corner_id);
   58|    270|        c_prev = corner_table->Previous(corner_id);
   59|  1.12M|      } else {
   60|  1.12M|        c_next = corner_table->Next(cit.Corner());
   61|  1.12M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.12M|      }
   63|  1.12M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.12M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.12M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.12M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.12M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.12M|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|  1.12M|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|  1.12M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.12M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.12M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.12M|      cit.Next();
   81|  1.12M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   188k|    constexpr int64_t upper_bound = 1 << 29;
   85|   188k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 180, False: 188k]
  ------------------
   86|    180|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    180|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 31, False: 149]
  ------------------
   88|     31|        const int64_t quotient = abs_sum / upper_bound;
   89|     31|        normal = normal / quotient;
   90|     31|      }
   91|   188k|    } else {
   92|   188k|      const int64_t abs_sum = normal.AbsSum();
   93|   188k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 80.6k, False: 108k]
  ------------------
   94|  80.6k|        const int64_t quotient = abs_sum / upper_bound;
   95|  80.6k|        normal = normal / quotient;
   96|  80.6k|      }
   97|   188k|    }
   98|   188k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   188k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   188k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   188k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   188k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    256|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    256|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 55, False: 201]
  ------------------
  105|     55|      this->normal_prediction_mode_ = mode;
  106|     55|      return true;
  107|    201|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 201, False: 0]
  ------------------
  108|    201|      this->normal_prediction_mode_ = mode;
  109|    201|      return true;
  110|    201|    }
  111|      0|    return false;
  112|    256|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|  1.04M|                             DataTypeT* prediction) override {
   42|  1.04M|    DRACO_DCHECK(this->IsInitialized());
   43|  1.04M|    typedef typename MeshDataT::CornerTable CornerTable;
   44|  1.04M|    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.04M|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|  1.04M|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|  1.04M|    VectorD<int64_t, 3> normal;
   53|  1.04M|    CornerIndex c_next, c_prev;
   54|  2.26M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.21M, False: 1.04M]
  ------------------
   55|       |      // Getting corners.
   56|  1.21M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 264, False: 1.21M]
  ------------------
   57|    264|        c_next = corner_table->Next(corner_id);
   58|    264|        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.04M|    constexpr int64_t upper_bound = 1 << 29;
   85|  1.04M|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 176, False: 1.04M]
  ------------------
   86|    176|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    176|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 59, False: 117]
  ------------------
   88|     59|        const int64_t quotient = abs_sum / upper_bound;
   89|     59|        normal = normal / quotient;
   90|     59|      }
   91|  1.04M|    } else {
   92|  1.04M|      const int64_t abs_sum = normal.AbsSum();
   93|  1.04M|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 1.48k, False: 1.04M]
  ------------------
   94|  1.48k|        const int64_t quotient = abs_sum / upper_bound;
   95|  1.48k|        normal = normal / quotient;
   96|  1.48k|      }
   97|  1.04M|    }
   98|  1.04M|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|  1.04M|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|  1.04M|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|  1.04M|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|  1.04M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    326|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    326|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 53, False: 273]
  ------------------
  105|     53|      this->normal_prediction_mode_ = mode;
  106|     53|      return true;
  107|    273|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 273, False: 0]
  ------------------
  108|    273|      this->normal_prediction_mode_ = mode;
  109|    273|      return true;
  110|    273|    }
  111|      0|    return false;
  112|    326|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   203k|                             DataTypeT* prediction) override {
   42|   203k|    DRACO_DCHECK(this->IsInitialized());
   43|   203k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   203k|    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|   203k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   203k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   203k|    VectorD<int64_t, 3> normal;
   53|   203k|    CornerIndex c_next, c_prev;
   54|  1.41M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.21M, False: 203k]
  ------------------
   55|       |      // Getting corners.
   56|  1.21M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 312, False: 1.21M]
  ------------------
   57|    312|        c_next = corner_table->Next(corner_id);
   58|    312|        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|   203k|    constexpr int64_t upper_bound = 1 << 29;
   85|   203k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 208, False: 203k]
  ------------------
   86|    208|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    208|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 63, False: 145]
  ------------------
   88|     63|        const int64_t quotient = abs_sum / upper_bound;
   89|     63|        normal = normal / quotient;
   90|     63|      }
   91|   203k|    } else {
   92|   203k|      const int64_t abs_sum = normal.AbsSum();
   93|   203k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 61.8k, False: 141k]
  ------------------
   94|  61.8k|        const int64_t quotient = abs_sum / upper_bound;
   95|  61.8k|        normal = normal / quotient;
   96|  61.8k|      }
   97|   203k|    }
   98|   203k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   203k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   203k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   203k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   203k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    638|      : Base(md) {
   35|    638|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    638|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    927|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    927|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 270, False: 657]
  ------------------
  105|    270|      this->normal_prediction_mode_ = mode;
  106|    270|      return true;
  107|    657|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 657, False: 0]
  ------------------
  108|    657|      this->normal_prediction_mode_ = mode;
  109|    657|      return true;
  110|    657|    }
  111|      0|    return false;
  112|    927|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|  1.55M|                             DataTypeT* prediction) override {
   42|  1.55M|    DRACO_DCHECK(this->IsInitialized());
   43|  1.55M|    typedef typename MeshDataT::CornerTable CornerTable;
   44|  1.55M|    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.55M|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|  1.55M|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|  1.55M|    VectorD<int64_t, 3> normal;
   53|  1.55M|    CornerIndex c_next, c_prev;
   54|  3.13M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.58M, False: 1.55M]
  ------------------
   55|       |      // Getting corners.
   56|  1.58M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 1.54k, False: 1.58M]
  ------------------
   57|  1.54k|        c_next = corner_table->Next(corner_id);
   58|  1.54k|        c_prev = corner_table->Previous(corner_id);
   59|  1.58M|      } else {
   60|  1.58M|        c_next = corner_table->Next(cit.Corner());
   61|  1.58M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.58M|      }
   63|  1.58M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.58M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.58M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.58M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.58M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.58M|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|  1.58M|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|  1.58M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.58M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.58M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.58M|      cit.Next();
   81|  1.58M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|  1.55M|    constexpr int64_t upper_bound = 1 << 29;
   85|  1.55M|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 1.02k, False: 1.54M]
  ------------------
   86|  1.02k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  1.02k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 217, False: 811]
  ------------------
   88|    217|        const int64_t quotient = abs_sum / upper_bound;
   89|    217|        normal = normal / quotient;
   90|    217|      }
   91|  1.54M|    } else {
   92|  1.54M|      const int64_t abs_sum = normal.AbsSum();
   93|  1.54M|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 6.03k, False: 1.54M]
  ------------------
   94|  6.03k|        const int64_t quotient = abs_sum / upper_bound;
   95|  6.03k|        normal = normal / quotient;
   96|  6.03k|      }
   97|  1.54M|    }
   98|  1.55M|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|  1.55M|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|  1.55M|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|  1.55M|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|  1.55M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    762|      : Base(md) {
   35|    762|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    762|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|  1.03k|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|  1.03k|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 266, False: 772]
  ------------------
  105|    266|      this->normal_prediction_mode_ = mode;
  106|    266|      return true;
  107|    772|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 772, False: 0]
  ------------------
  108|    772|      this->normal_prediction_mode_ = mode;
  109|    772|      return true;
  110|    772|    }
  111|      0|    return false;
  112|  1.03k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   172k|                             DataTypeT* prediction) override {
   42|   172k|    DRACO_DCHECK(this->IsInitialized());
   43|   172k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   172k|    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|   172k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   172k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   172k|    VectorD<int64_t, 3> normal;
   53|   172k|    CornerIndex c_next, c_prev;
   54|  1.09M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 919k, False: 172k]
  ------------------
   55|       |      // Getting corners.
   56|   919k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 1.53k, False: 917k]
  ------------------
   57|  1.53k|        c_next = corner_table->Next(corner_id);
   58|  1.53k|        c_prev = corner_table->Previous(corner_id);
   59|   917k|      } else {
   60|   917k|        c_next = corner_table->Next(cit.Corner());
   61|   917k|        c_prev = corner_table->Previous(cit.Corner());
   62|   917k|      }
   63|   919k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   919k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   919k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   919k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   919k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   919k|      auto normal_data = reinterpret_cast<uint64_t*>(normal.data());
   75|   919k|      auto cross_data = reinterpret_cast<const uint64_t*>(cross.data());
   76|   919k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   919k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   919k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   919k|      cit.Next();
   81|   919k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   172k|    constexpr int64_t upper_bound = 1 << 29;
   85|   172k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 1.01k, False: 171k]
  ------------------
   86|  1.01k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  1.01k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 204, False: 815]
  ------------------
   88|    204|        const int64_t quotient = abs_sum / upper_bound;
   89|    204|        normal = normal / quotient;
   90|    204|      }
   91|   171k|    } else {
   92|   171k|      const int64_t abs_sum = normal.AbsSum();
   93|   171k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 2.30k, False: 169k]
  ------------------
   94|  2.30k|        const int64_t quotient = abs_sum / upper_bound;
   95|  2.30k|        normal = normal / quotient;
   96|  2.30k|      }
   97|   171k|    }
   98|   172k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   172k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   172k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   172k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   172k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    166|      : Base(md) {
   35|    166|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    166|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    251|      : Base(md) {
   35|    251|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    251|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    199|      : Base(md) {
   35|    199|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    199|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    271|      : Base(md) {
   35|    271|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    271|  };

_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.63M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.63M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.63M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.63M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.63M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.63M|    return GetPositionForDataId(data_id);
   77|  3.63M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  3.63M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.63M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.63M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.63M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.63M|    VectorD<int64_t, 3> pos;
   68|  3.63M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.63M|    return pos;
   70|  3.63M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    164|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    164|    pos_attribute_ = &position_attribute;
   43|    164|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    139|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    139|    entry_to_point_id_map_ = map;
   46|    139|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.43M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.43M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.43M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.43M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.43M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.43M|    return GetPositionForDataId(data_id);
   77|  2.43M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  2.43M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.43M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.43M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.43M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.43M|    VectorD<int64_t, 3> pos;
   68|  2.43M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.43M|    return pos;
   70|  2.43M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    249|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    249|    pos_attribute_ = &position_attribute;
   43|    249|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    230|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    230|    entry_to_point_id_map_ = map;
   46|    230|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.48M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.48M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.48M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.48M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.48M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.48M|    return GetPositionForDataId(data_id);
   77|  3.48M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  3.48M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.48M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.48M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.48M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.48M|    VectorD<int64_t, 3> pos;
   68|  3.48M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.48M|    return pos;
   70|  3.48M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    198|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    198|    pos_attribute_ = &position_attribute;
   43|    198|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    168|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    168|    entry_to_point_id_map_ = map;
   46|    168|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.62M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.62M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.62M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.62M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.62M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.62M|    return GetPositionForDataId(data_id);
   77|  2.62M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  2.62M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.62M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.62M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.62M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.62M|    VectorD<int64_t, 3> pos;
   68|  2.62M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.62M|    return pos;
   70|  2.62M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    270|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    270|    pos_attribute_ = &position_attribute;
   43|    270|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    249|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    249|    entry_to_point_id_map_ = map;
   46|    249|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    638|      : pos_attribute_(nullptr),
   36|    638|        entry_to_point_id_map_(nullptr),
   37|    638|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    638|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  4.72M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  4.72M|    DRACO_DCHECK(this->IsInitialized());
   73|  4.72M|    const auto corner_table = mesh_data_.corner_table();
   74|  4.72M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  4.72M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  4.72M|    return GetPositionForDataId(data_id);
   77|  4.72M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  4.72M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  4.72M|    DRACO_DCHECK(this->IsInitialized());
   65|  4.72M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  4.72M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  4.72M|    VectorD<int64_t, 3> pos;
   68|  4.72M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  4.72M|    return pos;
   70|  4.72M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    634|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    634|    pos_attribute_ = &position_attribute;
   43|    634|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    558|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    558|    entry_to_point_id_map_ = map;
   46|    558|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    762|      : pos_attribute_(nullptr),
   36|    762|        entry_to_point_id_map_(nullptr),
   37|    762|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    762|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.01M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.01M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.01M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.01M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.01M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.01M|    return GetPositionForDataId(data_id);
   77|  2.01M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  2.01M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.01M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.01M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.01M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.01M|    VectorD<int64_t, 3> pos;
   68|  2.01M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.01M|    return pos;
   70|  2.01M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    760|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    760|    pos_attribute_ = &position_attribute;
   43|    760|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    653|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    653|    entry_to_point_id_map_ = map;
   46|    653|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    166|      : pos_attribute_(nullptr),
   36|    166|        entry_to_point_id_map_(nullptr),
   37|    166|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    166|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    251|      : pos_attribute_(nullptr),
   36|    251|        entry_to_point_id_map_(nullptr),
   37|    251|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    251|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    199|      : pos_attribute_(nullptr),
   36|    199|        entry_to_point_id_map_(nullptr),
   37|    199|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    199|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    271|      : pos_attribute_(nullptr),
   36|    271|        entry_to_point_id_map_(nullptr),
   37|    271|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    271|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}

_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    560|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    560|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    545|                          const PointIndex* /* entry_to_point_id_map */) {
   64|    545|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    545|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    545|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    545|      new DataTypeT[num_components]());
   70|       |
   71|    545|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    545|  const CornerTable* const table = this->mesh_data().corner_table();
   74|    545|  const std::vector<int32_t>* const vertex_to_data_map =
   75|    545|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    545|  const int corner_map_size =
   78|    545|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|    545|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (79:7): [True: 0, False: 545]
  ------------------
   80|      0|    return false;
   81|      0|  }
   82|  2.75M|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (82:19): [True: 2.74M, False: 545]
  ------------------
   83|  2.74M|    const CornerIndex start_corner_id =
   84|  2.74M|        this->mesh_data().data_to_corner_map()->at(p);
   85|       |
   86|  2.74M|    CornerIndex corner_id(start_corner_id);
   87|  2.74M|    int num_parallelograms = 0;
   88|  67.0M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (88:21): [True: 64.3M, False: 2.74M]
  ------------------
   89|  64.3M|      pred_vals[i] = static_cast<DataTypeT>(0);
   90|  64.3M|    }
   91|  6.00M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (91:12): [True: 3.25M, False: 2.74M]
  ------------------
   92|  3.25M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (92:11): [True: 208k, False: 3.04M]
  ------------------
   93|  3.25M|              p, corner_id, table, *vertex_to_data_map, out_data,
   94|  3.25M|              num_components, parallelogram_pred_vals.get())) {
   95|  11.6M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (95:25): [True: 11.4M, False: 208k]
  ------------------
   96|  11.4M|          pred_vals[c] =
   97|  11.4M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   98|  11.4M|        }
   99|   208k|        ++num_parallelograms;
  100|   208k|      }
  101|       |
  102|       |      // Proceed to the next corner attached to the vertex.
  103|  3.25M|      corner_id = table->SwingRight(corner_id);
  104|  3.25M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (104:11): [True: 96.0k, False: 3.15M]
  ------------------
  105|  96.0k|        corner_id = kInvalidCornerIndex;
  106|  96.0k|      }
  107|  3.25M|    }
  108|       |
  109|  2.74M|    const int dst_offset = p * num_components;
  110|  2.74M|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (110:9): [True: 2.63M, False: 114k]
  ------------------
  111|       |      // No parallelogram was valid.
  112|       |      // We use the last decoded point as a reference.
  113|  2.63M|      const int src_offset = (p - 1) * num_components;
  114|  2.63M|      this->transform().ComputeOriginalValue(
  115|  2.63M|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  116|  2.63M|    } else {
  117|       |      // Compute the correction from the predicted value.
  118|  6.18M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (118:23): [True: 6.06M, False: 114k]
  ------------------
  119|  6.06M|        pred_vals[c] /= num_parallelograms;
  120|  6.06M|      }
  121|   114k|      this->transform().ComputeOriginalValue(
  122|   114k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  123|   114k|    }
  124|  2.74M|  }
  125|    545|  return true;
  126|    545|}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    670|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    670|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    641|                          const PointIndex* /* entry_to_point_id_map */) {
   64|    641|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    641|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    641|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    641|      new DataTypeT[num_components]());
   70|       |
   71|    641|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    641|  const CornerTable* const table = this->mesh_data().corner_table();
   74|    641|  const std::vector<int32_t>* const vertex_to_data_map =
   75|    641|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    641|  const int corner_map_size =
   78|    641|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|    641|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (79:7): [True: 0, False: 641]
  ------------------
   80|      0|    return false;
   81|      0|  }
   82|  1.22M|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (82:19): [True: 1.22M, False: 641]
  ------------------
   83|  1.22M|    const CornerIndex start_corner_id =
   84|  1.22M|        this->mesh_data().data_to_corner_map()->at(p);
   85|       |
   86|  1.22M|    CornerIndex corner_id(start_corner_id);
   87|  1.22M|    int num_parallelograms = 0;
   88|  67.7M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (88:21): [True: 66.5M, False: 1.22M]
  ------------------
   89|  66.5M|      pred_vals[i] = static_cast<DataTypeT>(0);
   90|  66.5M|    }
   91|  8.38M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (91:12): [True: 7.15M, False: 1.22M]
  ------------------
   92|  7.15M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (92:11): [True: 2.36M, False: 4.79M]
  ------------------
   93|  7.15M|              p, corner_id, table, *vertex_to_data_map, out_data,
   94|  7.15M|              num_components, parallelogram_pred_vals.get())) {
   95|   125M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (95:25): [True: 122M, False: 2.36M]
  ------------------
   96|   122M|          pred_vals[c] =
   97|   122M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   98|   122M|        }
   99|  2.36M|        ++num_parallelograms;
  100|  2.36M|      }
  101|       |
  102|       |      // Proceed to the next corner attached to the vertex.
  103|  7.15M|      corner_id = table->SwingRight(corner_id);
  104|  7.15M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (104:11): [True: 1.18M, False: 5.97M]
  ------------------
  105|  1.18M|        corner_id = kInvalidCornerIndex;
  106|  1.18M|      }
  107|  7.15M|    }
  108|       |
  109|  1.22M|    const int dst_offset = p * num_components;
  110|  1.22M|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (110:9): [True: 19.0k, False: 1.20M]
  ------------------
  111|       |      // No parallelogram was valid.
  112|       |      // We use the last decoded point as a reference.
  113|  19.0k|      const int src_offset = (p - 1) * num_components;
  114|  19.0k|      this->transform().ComputeOriginalValue(
  115|  19.0k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  116|  1.20M|    } else {
  117|       |      // Compute the correction from the predicted value.
  118|  64.3M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (118:23): [True: 63.1M, False: 1.20M]
  ------------------
  119|  63.1M|        pred_vals[c] /= num_parallelograms;
  120|  63.1M|      }
  121|  1.20M|      this->transform().ComputeOriginalValue(
  122|  1.20M|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  123|  1.20M|    }
  124|  1.22M|  }
  125|    641|  return true;
  126|    641|}

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

_ZN5draco30ComputeParallelogramPredictionINS_24MeshAttributeCornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  8.96M|    int num_components, DataTypeT* out_prediction) {
   49|  8.96M|  const CornerIndex oci = table->Opposite(ci);
   50|  8.96M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 8.12M, False: 845k]
  ------------------
   51|  8.12M|    return false;
   52|  8.12M|  }
   53|   845k|  int vert_opp, vert_next, vert_prev;
   54|   845k|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|   845k|                                        &vert_opp, &vert_next, &vert_prev);
   56|   845k|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 444k, False: 401k]
  |  Branch (56:35): [True: 354k, False: 90.0k]
  ------------------
   57|   354k|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 335k, False: 18.6k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|   335k|    const int v_opp_off = vert_opp * num_components;
   60|   335k|    const int v_next_off = vert_next * num_components;
   61|   335k|    const int v_prev_off = vert_prev * num_components;
   62|  17.3M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 17.0M, False: 335k]
  ------------------
   63|  17.0M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  17.0M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  17.0M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  17.0M|      const int64_t result =
   67|  17.0M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  17.0M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  17.0M|    }
   71|   335k|    return true;
   72|   335k|  }
   73|   510k|  return false;  // Not all data is available for prediction
   74|   845k|}
_ZN5draco23GetParallelogramEntriesINS_24MeshAttributeCornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|   845k|    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|   845k|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|   845k|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|   845k|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|   845k|}
_ZN5draco30ComputeParallelogramPredictionINS_11CornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  8.50M|    int num_components, DataTypeT* out_prediction) {
   49|  8.50M|  const CornerIndex oci = table->Opposite(ci);
   50|  8.50M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 48.7k, False: 8.46M]
  ------------------
   51|  48.7k|    return false;
   52|  48.7k|  }
   53|  8.46M|  int vert_opp, vert_next, vert_prev;
   54|  8.46M|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  8.46M|                                        &vert_opp, &vert_next, &vert_prev);
   56|  8.46M|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 4.48M, False: 3.97M]
  |  Branch (56:35): [True: 3.53M, False: 945k]
  ------------------
   57|  3.53M|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 3.17M, False: 357k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|  3.17M|    const int v_opp_off = vert_opp * num_components;
   60|  3.17M|    const int v_next_off = vert_next * num_components;
   61|  3.17M|    const int v_prev_off = vert_prev * num_components;
   62|   207M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 204M, False: 3.17M]
  ------------------
   63|   204M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|   204M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|   204M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|   204M|      const int64_t result =
   67|   204M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|   204M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|   204M|    }
   71|  3.17M|    return true;
   72|  3.17M|  }
   73|  5.28M|  return false;  // Not all data is available for prediction
   74|  8.46M|}
_ZN5draco23GetParallelogramEntriesINS_11CornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  8.46M|    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|  8.46M|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  8.46M|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  8.46M|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  8.46M|}

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

_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   38|    487|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   39|    487|            attribute, transform, mesh_data),
   40|    487|        predictor_(mesh_data) {}
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   62|    972|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   64|    487|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   65|    487|    DRACO_DCHECK_EQ(i, 0);
   66|    487|    (void)i;
   67|    487|    return GeometryAttribute::POSITION;
   68|    487|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   70|    486|  bool SetParentAttribute(const PointAttribute* att) override {
   71|    486|    if (!att || att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (71:9): [True: 0, False: 486]
  |  Branch (71:17): [True: 0, False: 486]
  ------------------
   72|      0|      return false;  // Invalid attribute type.
   73|      0|    }
   74|    486|    if (att->num_components() != 3) {
  ------------------
  |  Branch (74:9): [True: 1, False: 485]
  ------------------
   75|      1|      return false;  // Currently works only for 3 component positions.
   76|      1|    }
   77|    485|    predictor_.SetPositionAttribute(*att);
   78|    485|    return true;
   79|    486|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  128|    478|                                                                buffer) {
  129|       |  // Decode the delta coded orientations.
  130|    478|  int32_t num_orientations = 0;
  131|    478|  if (!buffer->Decode(&num_orientations) || num_orientations < 0) {
  ------------------
  |  Branch (131:7): [True: 1, False: 477]
  |  Branch (131:45): [True: 11, False: 466]
  ------------------
  132|     12|    return false;
  133|     12|  }
  134|       |
  135|       |  // Check that the decoded number of orientations is not unreasonably high.
  136|    466|  const int32_t max_num_orientations = max_num_predicted_values_;
  137|    466|  if (max_num_orientations != -1 && num_orientations > max_num_orientations) {
  ------------------
  |  Branch (137:7): [True: 466, False: 0]
  |  Branch (137:37): [True: 23, False: 443]
  ------------------
  138|     23|    return false;
  139|     23|  }
  140|       |
  141|    443|  predictor_.ResizeOrientations(num_orientations);
  142|    443|  bool last_orientation = true;
  143|    443|  RAnsBitDecoder decoder;
  144|    443|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (144:7): [True: 9, False: 434]
  ------------------
  145|      9|    return false;
  146|      9|  }
  147|   367k|  for (int i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (147:19): [True: 367k, False: 434]
  ------------------
  148|   367k|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (148:9): [True: 105k, False: 261k]
  ------------------
  149|   105k|      last_orientation = !last_orientation;
  150|   105k|    }
  151|   367k|    predictor_.set_orientation(i, last_orientation);
  152|   367k|  }
  153|    434|  decoder.EndDecoding();
  154|    434|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  155|    434|                                     MeshDataT>::DecodePredictionData(buffer);
  156|    443|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE24SetMaxNumPredictedValuesEi:
   81|    478|  virtual void SetMaxNumPredictedValues(int32_t num) {
   82|    478|    max_num_predicted_values_ = num;
   83|    478|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   97|    393|                                      const PointIndex* entry_to_point_id_map) {
   98|    393|  if (num_components != MeshPredictionSchemeTexCoordsPortablePredictor<
  ------------------
  |  Branch (98:7): [True: 15, False: 378]
  ------------------
   99|    393|                            DataTypeT, MeshDataT>::kNumComponents) {
  100|     15|    return false;
  101|     15|  }
  102|    378|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  103|    378|  this->transform().Init(num_components);
  104|       |
  105|    378|  const int corner_map_size =
  106|    378|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  107|    378|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (107:7): [True: 0, False: 378]
  ------------------
  108|      0|    return false;
  109|      0|  }
  110|   269k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 268k, False: 132]
  ------------------
  111|   268k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  112|   268k|    if (!predictor_.template ComputePredictedValue<false>(corner_id, out_data,
  ------------------
  |  Branch (112:9): [True: 246, False: 268k]
  ------------------
  113|   268k|                                                          p)) {
  114|    246|      return false;
  115|    246|    }
  116|       |
  117|   268k|    const int dst_offset = p * num_components;
  118|   268k|    this->transform().ComputeOriginalValue(predictor_.predicted_value(),
  119|   268k|                                           in_corr + dst_offset,
  120|   268k|                                           out_data + dst_offset);
  121|   268k|  }
  122|    132|  return true;
  123|    378|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   38|    475|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   39|    475|            attribute, transform, mesh_data),
   40|    475|        predictor_(mesh_data) {}
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   62|    949|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   64|    475|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   65|    475|    DRACO_DCHECK_EQ(i, 0);
   66|    475|    (void)i;
   67|    475|    return GeometryAttribute::POSITION;
   68|    475|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   70|    475|  bool SetParentAttribute(const PointAttribute* att) override {
   71|    475|    if (!att || att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (71:9): [True: 0, False: 475]
  |  Branch (71:17): [True: 0, False: 475]
  ------------------
   72|      0|      return false;  // Invalid attribute type.
   73|      0|    }
   74|    475|    if (att->num_components() != 3) {
  ------------------
  |  Branch (74:9): [True: 1, False: 474]
  ------------------
   75|      1|      return false;  // Currently works only for 3 component positions.
   76|      1|    }
   77|    474|    predictor_.SetPositionAttribute(*att);
   78|    474|    return true;
   79|    475|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  128|    466|                                                                buffer) {
  129|       |  // Decode the delta coded orientations.
  130|    466|  int32_t num_orientations = 0;
  131|    466|  if (!buffer->Decode(&num_orientations) || num_orientations < 0) {
  ------------------
  |  Branch (131:7): [True: 1, False: 465]
  |  Branch (131:45): [True: 29, False: 436]
  ------------------
  132|     30|    return false;
  133|     30|  }
  134|       |
  135|       |  // Check that the decoded number of orientations is not unreasonably high.
  136|    436|  const int32_t max_num_orientations = max_num_predicted_values_;
  137|    436|  if (max_num_orientations != -1 && num_orientations > max_num_orientations) {
  ------------------
  |  Branch (137:7): [True: 436, False: 0]
  |  Branch (137:37): [True: 66, False: 370]
  ------------------
  138|     66|    return false;
  139|     66|  }
  140|       |
  141|    370|  predictor_.ResizeOrientations(num_orientations);
  142|    370|  bool last_orientation = true;
  143|    370|  RAnsBitDecoder decoder;
  144|    370|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (144:7): [True: 4, False: 366]
  ------------------
  145|      4|    return false;
  146|      4|  }
  147|  41.9k|  for (int i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (147:19): [True: 41.5k, False: 366]
  ------------------
  148|  41.5k|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (148:9): [True: 2.51k, False: 39.0k]
  ------------------
  149|  2.51k|      last_orientation = !last_orientation;
  150|  2.51k|    }
  151|  41.5k|    predictor_.set_orientation(i, last_orientation);
  152|  41.5k|  }
  153|    366|  decoder.EndDecoding();
  154|    366|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  155|    366|                                     MeshDataT>::DecodePredictionData(buffer);
  156|    370|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE24SetMaxNumPredictedValuesEi:
   81|    466|  virtual void SetMaxNumPredictedValues(int32_t num) {
   82|    466|    max_num_predicted_values_ = num;
   83|    466|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   97|    324|                                      const PointIndex* entry_to_point_id_map) {
   98|    324|  if (num_components != MeshPredictionSchemeTexCoordsPortablePredictor<
  ------------------
  |  Branch (98:7): [True: 10, False: 314]
  ------------------
   99|    324|                            DataTypeT, MeshDataT>::kNumComponents) {
  100|     10|    return false;
  101|     10|  }
  102|    314|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  103|    314|  this->transform().Init(num_components);
  104|       |
  105|    314|  const int corner_map_size =
  106|    314|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  107|    314|  if (corner_map_size * num_components > size) {
  ------------------
  |  Branch (107:7): [True: 0, False: 314]
  ------------------
  108|      0|    return false;
  109|      0|  }
  110|   176k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 175k, False: 147]
  ------------------
  111|   175k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  112|   175k|    if (!predictor_.template ComputePredictedValue<false>(corner_id, out_data,
  ------------------
  |  Branch (112:9): [True: 167, False: 175k]
  ------------------
  113|   175k|                                                          p)) {
  114|    167|      return false;
  115|    167|    }
  116|       |
  117|   175k|    const int dst_offset = p * num_components;
  118|   175k|    this->transform().ComputeOriginalValue(predictor_.predicted_value(),
  119|   175k|                                           in_corr + dst_offset,
  120|   175k|                                           out_data + dst_offset);
  121|   175k|  }
  122|    147|  return true;
  123|    314|}

_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS3_:
   38|    487|      : pos_attribute_(nullptr),
   39|    487|        entry_to_point_id_map_(nullptr),
   40|    487|        mesh_data_(md) {}
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    485|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    485|    pos_attribute_ = &position_attribute;
   43|    485|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18ResizeOrientationsEi:
   73|    443|  void ResizeOrientations(int num_orientations) {
   74|    443|    orientations_.resize(num_orientations);
   75|    443|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE15set_orientationEib:
   71|   367k|  void set_orientation(int i, bool v) { orientations_[i] = v; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    378|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    378|    entry_to_point_id_map_ = map;
   46|    378|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueILb0EEEbNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
   93|   268k|                                                 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|   268k|  const CornerIndex next_corner_id = mesh_data_.corner_table()->Next(corner_id);
   98|   268k|  const CornerIndex prev_corner_id =
   99|   268k|      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|   268k|  int next_data_id, prev_data_id;
  103|       |
  104|   268k|  int next_vert_id, prev_vert_id;
  105|   268k|  next_vert_id = mesh_data_.corner_table()->Vertex(next_corner_id).value();
  106|   268k|  prev_vert_id = mesh_data_.corner_table()->Vertex(prev_corner_id).value();
  107|       |
  108|   268k|  next_data_id = mesh_data_.vertex_to_data_map()->at(next_vert_id);
  109|   268k|  prev_data_id = mesh_data_.vertex_to_data_map()->at(prev_vert_id);
  110|       |
  111|   268k|  typedef VectorD<int64_t, 2> Vec2;
  112|   268k|  typedef VectorD<int64_t, 3> Vec3;
  113|   268k|  typedef VectorD<uint64_t, 2> Vec2u;
  114|       |
  115|   268k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (115:7): [True: 180k, False: 88.2k]
  |  Branch (115:33): [True: 92.4k, False: 88.2k]
  ------------------
  116|       |    // Both other corners have available UV coordinates for prediction.
  117|  92.4k|    const Vec2 n_uv = GetTexCoordForEntryId(next_data_id, data);
  118|  92.4k|    const Vec2 p_uv = GetTexCoordForEntryId(prev_data_id, data);
  119|  92.4k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (119:9): [True: 88.6k, False: 3.88k]
  ------------------
  120|       |      // We cannot do a reliable prediction on degenerated UV triangles.
  121|  88.6k|      predicted_value_[0] = p_uv[0];
  122|  88.6k|      predicted_value_[1] = p_uv[1];
  123|  88.6k|      return true;
  124|  88.6k|    }
  125|       |
  126|       |    // Get positions at all corners.
  127|  3.88k|    const Vec3 tip_pos = GetPositionForEntryId(data_id);
  128|  3.88k|    const Vec3 next_pos = GetPositionForEntryId(next_data_id);
  129|  3.88k|    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|  3.88k|    const Vec3 pn = prev_pos - next_pos;
  146|  3.88k|    const uint64_t pn_norm2_squared = pn.SquaredNorm();
  147|  3.88k|    if (pn_norm2_squared != 0) {
  ------------------
  |  Branch (147:9): [True: 907, False: 2.97k]
  ------------------
  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|    907|      const Vec3 cn = tip_pos - next_pos;
  153|    907|      const int64_t cn_dot_pn = pn.Dot(cn);
  154|       |
  155|    907|      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|    907|      const int64_t n_uv_absmax_element =
  164|    907|          std::max(std::abs(n_uv[0]), std::abs(n_uv[1]));
  165|    907|      if (n_uv_absmax_element >
  ------------------
  |  Branch (165:11): [True: 110, False: 797]
  ------------------
  166|    907|          std::numeric_limits<int64_t>::max() / pn_norm2_squared) {
  167|       |        // Return false if the below multiplication would overflow.
  168|    110|        return false;
  169|    110|      }
  170|    797|      const int64_t pn_uv_absmax_element =
  171|    797|          std::max(std::abs(pn_uv[0]), std::abs(pn_uv[1]));
  172|    797|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (172:11): [True: 47, False: 750]
  ------------------
  173|    797|          std::numeric_limits<int64_t>::max() / pn_uv_absmax_element) {
  174|       |        // Return false if squared length calculation would overflow.
  175|     47|        return false;
  176|     47|      }
  177|       |      // Keep the scaled prediction arithmetic in the unsigned domain.
  178|    750|      const Vec2 x_uv = Vec2(Vec2u(n_uv) * pn_norm2_squared +
  179|    750|                             Vec2u(pn_uv) * static_cast<uint64_t>(cn_dot_pn));
  180|    750|      const int64_t pn_absmax_element =
  181|    750|          std::max(std::max(std::abs(pn[0]), std::abs(pn[1])), std::abs(pn[2]));
  182|    750|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (182:11): [True: 30, False: 720]
  ------------------
  183|    750|          std::numeric_limits<int64_t>::max() / pn_absmax_element) {
  184|       |        // Return false if squared length calculation would overflow.
  185|     30|        return false;
  186|     30|      }
  187|       |
  188|       |      // Compute squared length of vector CX in position coordinate system:
  189|    720|      const Vec3 x_pos = next_pos + (cn_dot_pn * pn) / pn_norm2_squared;
  190|    720|      const uint64_t cx_norm2_squared = (tip_pos - x_pos).SquaredNorm();
  191|       |
  192|       |      // Compute vector CX_UV in the uv space by rotating vector PN_UV by 90
  193|       |      // degrees and scaling it with factor CX.Norm2() / PN.Norm2():
  194|       |      //
  195|       |      //     CX_UV = (CX.Norm2() / PN.Norm2()) * Rot(PN_UV)
  196|       |      //
  197|       |      // To preserve precision, we perform all operations in scaled space as
  198|       |      // explained above, so we want the final vector to be:
  199|       |      //
  200|       |      //     cx_uv = CX_UV * PN.Norm2Squared()
  201|       |      //
  202|       |      // We can then rewrite the formula as:
  203|       |      //
  204|       |      //     cx_uv = CX.Norm2() * PN.Norm2() * Rot(PN_UV)
  205|       |      //
  206|    720|      Vec2 cx_uv(pn_uv[1], -pn_uv[0]);  // Rotated PN_UV.
  207|       |      // Compute CX.Norm2() * PN.Norm2()
  208|    720|      const uint64_t norm_squared =
  209|    720|          IntSqrt(cx_norm2_squared * pn_norm2_squared);
  210|       |      // Final cx_uv in the scaled coordinate space.
  211|    720|      cx_uv = cx_uv * norm_squared;
  212|       |
  213|       |      // Predicted uv coordinate is then computed by either adding or
  214|       |      // subtracting CX_UV to/from X_UV.
  215|    720|      Vec2 predicted_uv;
  216|    720|      if (is_encoder_t) {
  ------------------
  |  Branch (216:11): [Folded, False: 720]
  ------------------
  217|       |        // When encoding, compute both possible vectors and determine which one
  218|       |        // results in a better prediction.
  219|       |        // Both vectors need to be transformed back from the scaled space to
  220|       |        // the real UV coordinate space.
  221|      0|        const Vec2 predicted_uv_0((x_uv + cx_uv) / pn_norm2_squared);
  222|      0|        const Vec2 predicted_uv_1((x_uv - cx_uv) / pn_norm2_squared);
  223|      0|        const Vec2 c_uv = GetTexCoordForEntryId(data_id, data);
  224|      0|        if ((c_uv - predicted_uv_0).SquaredNorm() <
  ------------------
  |  Branch (224:13): [True: 0, False: 0]
  ------------------
  225|      0|            (c_uv - predicted_uv_1).SquaredNorm()) {
  226|      0|          predicted_uv = predicted_uv_0;
  227|      0|          orientations_.push_back(true);
  228|      0|        } else {
  229|      0|          predicted_uv = predicted_uv_1;
  230|      0|          orientations_.push_back(false);
  231|      0|        }
  232|    720|      } else {
  233|       |        // When decoding the data, we already know which orientation to use.
  234|    720|        if (orientations_.empty()) {
  ------------------
  |  Branch (234:13): [True: 59, False: 661]
  ------------------
  235|     59|          return false;
  236|     59|        }
  237|    661|        const bool orientation = orientations_.back();
  238|    661|        orientations_.pop_back();
  239|       |        // Perform operations in unsigned type to avoid signed integer overflow.
  240|       |        // Note that the result will be the same (for non-overflowing values).
  241|    661|        if (orientation) {
  ------------------
  |  Branch (241:13): [True: 404, False: 257]
  ------------------
  242|    404|          predicted_uv = Vec2(Vec2u(x_uv) + Vec2u(cx_uv)) / pn_norm2_squared;
  243|    404|        } else {
  244|    257|          predicted_uv = Vec2(Vec2u(x_uv) - Vec2u(cx_uv)) / pn_norm2_squared;
  245|    257|        }
  246|    661|      }
  247|    661|      predicted_value_[0] = static_cast<int>(predicted_uv[0]);
  248|    661|      predicted_value_[1] = static_cast<int>(predicted_uv[1]);
  249|    661|      return true;
  250|    720|    }
  251|  3.88k|  }
  252|       |  // Else we don't have available textures on both corners or the position data
  253|       |  // is invalid. For such cases we can't use positions for predicting the uv
  254|       |  // value and we resort to delta coding.
  255|   179k|  int data_offset = 0;
  256|   179k|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (256:7): [True: 91.2k, False: 88.2k]
  ------------------
  257|       |    // Use the value on the previous corner as the prediction.
  258|  91.2k|    data_offset = prev_data_id * kNumComponents;
  259|  91.2k|  }
  260|   179k|  if (next_data_id < data_id) {
  ------------------
  |  Branch (260:7): [True: 2.97k, False: 176k]
  ------------------
  261|       |    // Use the value on the next corner as the prediction.
  262|  2.97k|    data_offset = next_data_id * kNumComponents;
  263|   176k|  } else {
  264|       |    // None of the other corners have a valid value. Use the last encoded value
  265|       |    // as the prediction if possible.
  266|   176k|    if (data_id > 0) {
  ------------------
  |  Branch (266:9): [True: 176k, False: 378]
  ------------------
  267|   176k|      data_offset = (data_id - 1) * kNumComponents;
  268|   176k|    } else {
  269|       |      // We are encoding the first value. Predict 0.
  270|  1.13k|      for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (270:23): [True: 756, False: 378]
  ------------------
  271|    756|        predicted_value_[i] = 0;
  272|    756|      }
  273|    378|      return true;
  274|    378|    }
  275|   176k|  }
  276|   537k|  for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (276:19): [True: 358k, False: 179k]
  ------------------
  277|   358k|    predicted_value_[i] = data[data_offset + i];
  278|   358k|  }
  279|   179k|  return true;
  280|   179k|}
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetTexCoordForEntryIdEiPKi:
   58|   184k|                                            const DataTypeT* data) const {
   59|   184k|    const int data_offset = entry_id * kNumComponents;
   60|   184k|    return VectorD<int64_t, 2>(data[data_offset], data[data_offset + 1]);
   61|   184k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetPositionForEntryIdEi:
   49|  11.6k|  VectorD<int64_t, 3> GetPositionForEntryId(int entry_id) const {
   50|  11.6k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   51|  11.6k|    VectorD<int64_t, 3> pos;
   52|  11.6k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   53|  11.6k|                                 &pos[0]);
   54|  11.6k|    return pos;
   55|  11.6k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE15predicted_valueEv:
   69|   268k|  const DataTypeT* predicted_value() const { return predicted_value_; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS3_:
   38|    475|      : pos_attribute_(nullptr),
   39|    475|        entry_to_point_id_map_(nullptr),
   40|    475|        mesh_data_(md) {}
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    474|  void SetPositionAttribute(const PointAttribute& position_attribute) {
   42|    474|    pos_attribute_ = &position_attribute;
   43|    474|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18ResizeOrientationsEi:
   73|    370|  void ResizeOrientations(int num_orientations) {
   74|    370|    orientations_.resize(num_orientations);
   75|    370|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE15set_orientationEib:
   71|  41.5k|  void set_orientation(int i, bool v) { orientations_[i] = v; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    314|  void SetEntryToPointIdMap(const PointIndex* map) {
   45|    314|    entry_to_point_id_map_ = map;
   46|    314|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueILb0EEEbNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
   93|   175k|                                                 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|   175k|  const CornerIndex next_corner_id = mesh_data_.corner_table()->Next(corner_id);
   98|   175k|  const CornerIndex prev_corner_id =
   99|   175k|      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|   175k|  int next_data_id, prev_data_id;
  103|       |
  104|   175k|  int next_vert_id, prev_vert_id;
  105|   175k|  next_vert_id = mesh_data_.corner_table()->Vertex(next_corner_id).value();
  106|   175k|  prev_vert_id = mesh_data_.corner_table()->Vertex(prev_corner_id).value();
  107|       |
  108|   175k|  next_data_id = mesh_data_.vertex_to_data_map()->at(next_vert_id);
  109|   175k|  prev_data_id = mesh_data_.vertex_to_data_map()->at(prev_vert_id);
  110|       |
  111|   175k|  typedef VectorD<int64_t, 2> Vec2;
  112|   175k|  typedef VectorD<int64_t, 3> Vec3;
  113|   175k|  typedef VectorD<uint64_t, 2> Vec2u;
  114|       |
  115|   175k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (115:7): [True: 175k, False: 413]
  |  Branch (115:33): [True: 174k, False: 489]
  ------------------
  116|       |    // Both other corners have available UV coordinates for prediction.
  117|   174k|    const Vec2 n_uv = GetTexCoordForEntryId(next_data_id, data);
  118|   174k|    const Vec2 p_uv = GetTexCoordForEntryId(prev_data_id, data);
  119|   174k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (119:9): [True: 173k, False: 1.10k]
  ------------------
  120|       |      // We cannot do a reliable prediction on degenerated UV triangles.
  121|   173k|      predicted_value_[0] = p_uv[0];
  122|   173k|      predicted_value_[1] = p_uv[1];
  123|   173k|      return true;
  124|   173k|    }
  125|       |
  126|       |    // Get positions at all corners.
  127|  1.10k|    const Vec3 tip_pos = GetPositionForEntryId(data_id);
  128|  1.10k|    const Vec3 next_pos = GetPositionForEntryId(next_data_id);
  129|  1.10k|    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|  1.10k|    const Vec3 pn = prev_pos - next_pos;
  146|  1.10k|    const uint64_t pn_norm2_squared = pn.SquaredNorm();
  147|  1.10k|    if (pn_norm2_squared != 0) {
  ------------------
  |  Branch (147:9): [True: 609, False: 498]
  ------------------
  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|    609|      const Vec3 cn = tip_pos - next_pos;
  153|    609|      const int64_t cn_dot_pn = pn.Dot(cn);
  154|       |
  155|    609|      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|    609|      const int64_t n_uv_absmax_element =
  164|    609|          std::max(std::abs(n_uv[0]), std::abs(n_uv[1]));
  165|    609|      if (n_uv_absmax_element >
  ------------------
  |  Branch (165:11): [True: 25, False: 584]
  ------------------
  166|    609|          std::numeric_limits<int64_t>::max() / pn_norm2_squared) {
  167|       |        // Return false if the below multiplication would overflow.
  168|     25|        return false;
  169|     25|      }
  170|    584|      const int64_t pn_uv_absmax_element =
  171|    584|          std::max(std::abs(pn_uv[0]), std::abs(pn_uv[1]));
  172|    584|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (172:11): [True: 38, False: 546]
  ------------------
  173|    584|          std::numeric_limits<int64_t>::max() / pn_uv_absmax_element) {
  174|       |        // Return false if squared length calculation would overflow.
  175|     38|        return false;
  176|     38|      }
  177|       |      // Keep the scaled prediction arithmetic in the unsigned domain.
  178|    546|      const Vec2 x_uv = Vec2(Vec2u(n_uv) * pn_norm2_squared +
  179|    546|                             Vec2u(pn_uv) * static_cast<uint64_t>(cn_dot_pn));
  180|    546|      const int64_t pn_absmax_element =
  181|    546|          std::max(std::max(std::abs(pn[0]), std::abs(pn[1])), std::abs(pn[2]));
  182|    546|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (182:11): [True: 25, False: 521]
  ------------------
  183|    546|          std::numeric_limits<int64_t>::max() / pn_absmax_element) {
  184|       |        // Return false if squared length calculation would overflow.
  185|     25|        return false;
  186|     25|      }
  187|       |
  188|       |      // Compute squared length of vector CX in position coordinate system:
  189|    521|      const Vec3 x_pos = next_pos + (cn_dot_pn * pn) / pn_norm2_squared;
  190|    521|      const uint64_t cx_norm2_squared = (tip_pos - x_pos).SquaredNorm();
  191|       |
  192|       |      // Compute vector CX_UV in the uv space by rotating vector PN_UV by 90
  193|       |      // degrees and scaling it with factor CX.Norm2() / PN.Norm2():
  194|       |      //
  195|       |      //     CX_UV = (CX.Norm2() / PN.Norm2()) * Rot(PN_UV)
  196|       |      //
  197|       |      // To preserve precision, we perform all operations in scaled space as
  198|       |      // explained above, so we want the final vector to be:
  199|       |      //
  200|       |      //     cx_uv = CX_UV * PN.Norm2Squared()
  201|       |      //
  202|       |      // We can then rewrite the formula as:
  203|       |      //
  204|       |      //     cx_uv = CX.Norm2() * PN.Norm2() * Rot(PN_UV)
  205|       |      //
  206|    521|      Vec2 cx_uv(pn_uv[1], -pn_uv[0]);  // Rotated PN_UV.
  207|       |      // Compute CX.Norm2() * PN.Norm2()
  208|    521|      const uint64_t norm_squared =
  209|    521|          IntSqrt(cx_norm2_squared * pn_norm2_squared);
  210|       |      // Final cx_uv in the scaled coordinate space.
  211|    521|      cx_uv = cx_uv * norm_squared;
  212|       |
  213|       |      // Predicted uv coordinate is then computed by either adding or
  214|       |      // subtracting CX_UV to/from X_UV.
  215|    521|      Vec2 predicted_uv;
  216|    521|      if (is_encoder_t) {
  ------------------
  |  Branch (216:11): [Folded, False: 521]
  ------------------
  217|       |        // When encoding, compute both possible vectors and determine which one
  218|       |        // results in a better prediction.
  219|       |        // Both vectors need to be transformed back from the scaled space to
  220|       |        // the real UV coordinate space.
  221|      0|        const Vec2 predicted_uv_0((x_uv + cx_uv) / pn_norm2_squared);
  222|      0|        const Vec2 predicted_uv_1((x_uv - cx_uv) / pn_norm2_squared);
  223|      0|        const Vec2 c_uv = GetTexCoordForEntryId(data_id, data);
  224|      0|        if ((c_uv - predicted_uv_0).SquaredNorm() <
  ------------------
  |  Branch (224:13): [True: 0, False: 0]
  ------------------
  225|      0|            (c_uv - predicted_uv_1).SquaredNorm()) {
  226|      0|          predicted_uv = predicted_uv_0;
  227|      0|          orientations_.push_back(true);
  228|      0|        } else {
  229|      0|          predicted_uv = predicted_uv_1;
  230|      0|          orientations_.push_back(false);
  231|      0|        }
  232|    521|      } else {
  233|       |        // When decoding the data, we already know which orientation to use.
  234|    521|        if (orientations_.empty()) {
  ------------------
  |  Branch (234:13): [True: 79, False: 442]
  ------------------
  235|     79|          return false;
  236|     79|        }
  237|    442|        const bool orientation = orientations_.back();
  238|    442|        orientations_.pop_back();
  239|       |        // Perform operations in unsigned type to avoid signed integer overflow.
  240|       |        // Note that the result will be the same (for non-overflowing values).
  241|    442|        if (orientation) {
  ------------------
  |  Branch (241:13): [True: 208, False: 234]
  ------------------
  242|    208|          predicted_uv = Vec2(Vec2u(x_uv) + Vec2u(cx_uv)) / pn_norm2_squared;
  243|    234|        } else {
  244|    234|          predicted_uv = Vec2(Vec2u(x_uv) - Vec2u(cx_uv)) / pn_norm2_squared;
  245|    234|        }
  246|    442|      }
  247|    442|      predicted_value_[0] = static_cast<int>(predicted_uv[0]);
  248|    442|      predicted_value_[1] = static_cast<int>(predicted_uv[1]);
  249|    442|      return true;
  250|    521|    }
  251|  1.10k|  }
  252|       |  // Else we don't have available textures on both corners or the position data
  253|       |  // is invalid. For such cases we can't use positions for predicting the uv
  254|       |  // value and we resort to delta coding.
  255|  1.40k|  int data_offset = 0;
  256|  1.40k|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (256:7): [True: 987, False: 413]
  ------------------
  257|       |    // Use the value on the previous corner as the prediction.
  258|    987|    data_offset = prev_data_id * kNumComponents;
  259|    987|  }
  260|  1.40k|  if (next_data_id < data_id) {
  ------------------
  |  Branch (260:7): [True: 508, False: 892]
  ------------------
  261|       |    // Use the value on the next corner as the prediction.
  262|    508|    data_offset = next_data_id * kNumComponents;
  263|    892|  } else {
  264|       |    // None of the other corners have a valid value. Use the last encoded value
  265|       |    // as the prediction if possible.
  266|    892|    if (data_id > 0) {
  ------------------
  |  Branch (266:9): [True: 578, False: 314]
  ------------------
  267|    578|      data_offset = (data_id - 1) * kNumComponents;
  268|    578|    } else {
  269|       |      // We are encoding the first value. Predict 0.
  270|    942|      for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (270:23): [True: 628, False: 314]
  ------------------
  271|    628|        predicted_value_[i] = 0;
  272|    628|      }
  273|    314|      return true;
  274|    314|    }
  275|    892|  }
  276|  3.25k|  for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (276:19): [True: 2.17k, False: 1.08k]
  ------------------
  277|  2.17k|    predicted_value_[i] = data[data_offset + i];
  278|  2.17k|  }
  279|  1.08k|  return true;
  280|  1.40k|}
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetTexCoordForEntryIdEiPKi:
   58|   349k|                                            const DataTypeT* data) const {
   59|   349k|    const int data_offset = entry_id * kNumComponents;
   60|   349k|    return VectorD<int64_t, 2>(data[data_offset], data[data_offset + 1]);
   61|   349k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetPositionForEntryIdEi:
   49|  3.32k|  VectorD<int64_t, 3> GetPositionForEntryId(int entry_id) const {
   50|  3.32k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   51|  3.32k|    VectorD<int64_t, 3> pos;
   52|  3.32k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   53|  3.32k|                                 &pos[0]);
   54|  3.32k|    return pos;
   55|  3.32k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE15predicted_valueEv:
   69|   175k|  const DataTypeT* predicted_value() const { return predicted_value_; }

_ZNK5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|    198|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    602|  bool AreCorrectionsPositive() override {
   71|    602|    return transform_.AreCorrectionsPositive();
   72|    602|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    189|  bool DecodePredictionData(DecoderBuffer* buffer) override {
   49|    189|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 16, False: 173]
  ------------------
   50|     16|      return false;
   51|     16|    }
   52|    173|    return true;
   53|    189|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE9transformEv:
   81|  1.44M|  inline Transform& transform() { return transform_; }
_ZNK5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|    179|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    646|  bool AreCorrectionsPositive() override {
   71|    646|    return transform_.AreCorrectionsPositive();
   72|    646|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    178|  bool DecodePredictionData(DecoderBuffer* buffer) override {
   49|    178|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 20, False: 158]
  ------------------
   50|     20|      return false;
   51|     20|    }
   52|    158|    return true;
   53|    178|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE9transformEv:
   81|  16.2M|  inline Transform& transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   46|  8.54k|      : attribute_(attribute), transform_(transform) {}
_ZNK5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22GetNumParentAttributesEv:
   58|  5.53k|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22AreCorrectionsPositiveEv:
   70|  8.33k|  bool AreCorrectionsPositive() override {
   71|  8.33k|    return transform_.AreCorrectionsPositive();
   72|  8.33k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|  6.42k|  bool DecodePredictionData(DecoderBuffer* buffer) override {
   49|  6.42k|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 342, False: 6.08k]
  ------------------
   50|    342|      return false;
   51|    342|    }
   52|  6.08k|    return true;
   53|  6.42k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE9transformEv:
   81|  42.3M|  inline Transform& transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    615|      : attribute_(attribute), transform_(transform) {}
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    649|      : attribute_(attribute), transform_(transform) {}

_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    615|                                 const PointCloudDecoder* decoder) {
  188|    615|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    615|      method, att_id, decoder, TransformT());
  190|    615|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    615|                                 const TransformT& transform) {
  156|    615|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 615]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    615|  const PointAttribute* const att = decoder->point_cloud()->attribute(att_id);
  160|    615|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 615, 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|    615|    const MeshDecoder* const mesh_decoder =
  167|    615|        static_cast<const MeshDecoder*>(decoder);
  168|       |
  169|    615|    auto ret = CreateMeshPredictionScheme<
  170|    615|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    615|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    615|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    615|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 417, False: 198]
  ------------------
  174|    417|      return ret;
  175|    417|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    615|  }
  178|       |  // Create delta decoder.
  179|    198|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    198|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    615|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    182|      uint16_t bitstream_version) {
  143|    182|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    182|        method, attribute, transform, mesh_data, bitstream_version);
  145|    182|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    182|        uint16_t bitstream_version) {
  127|    182|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 166, False: 16]
  ------------------
  128|    166|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    166|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    166|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    166|                                                  mesh_data));
  132|    166|      }
  133|     16|      return nullptr;
  134|    182|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    257|      uint16_t bitstream_version) {
  143|    257|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    257|        method, attribute, transform, mesh_data, bitstream_version);
  145|    257|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    257|        uint16_t bitstream_version) {
  127|    257|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 251, False: 6]
  ------------------
  128|    251|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    251|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    251|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    251|                                                  mesh_data));
  132|    251|      }
  133|      6|      return nullptr;
  134|    257|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    649|                                 const PointCloudDecoder* decoder) {
  188|    649|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    649|      method, att_id, decoder, TransformT());
  190|    649|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    649|                                 const TransformT& transform) {
  156|    649|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 649]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    649|  const PointAttribute* const att = decoder->point_cloud()->attribute(att_id);
  160|    649|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 649, 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|    649|    const MeshDecoder* const mesh_decoder =
  167|    649|        static_cast<const MeshDecoder*>(decoder);
  168|       |
  169|    649|    auto ret = CreateMeshPredictionScheme<
  170|    649|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    649|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    649|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    649|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 470, False: 179]
  ------------------
  174|    470|      return ret;
  175|    470|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    649|  }
  178|       |  // Create delta decoder.
  179|    179|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    179|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    649|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    212|      uint16_t bitstream_version) {
  143|    212|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    212|        method, attribute, transform, mesh_data, bitstream_version);
  145|    212|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    212|        uint16_t bitstream_version) {
  111|    212|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 199, False: 13]
  ------------------
  112|    199|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    199|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    199|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    199|                                                  mesh_data));
  116|    199|      }
  117|     13|      return nullptr;
  118|    212|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    276|      uint16_t bitstream_version) {
  143|    276|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    276|        method, attribute, transform, mesh_data, bitstream_version);
  145|    276|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    276|        uint16_t bitstream_version) {
  111|    276|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 271, False: 5]
  ------------------
  112|    271|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    271|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    271|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    271|                                                  mesh_data));
  116|    271|      }
  117|      5|      return nullptr;
  118|    276|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|  8.54k|                                 const PointCloudDecoder* decoder) {
  188|  8.54k|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|  8.54k|      method, att_id, decoder, TransformT());
  190|  8.54k|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|  8.54k|                                 const TransformT& transform) {
  156|  8.54k|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 8.54k]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|  8.54k|  const PointAttribute* const att = decoder->point_cloud()->attribute(att_id);
  160|  8.54k|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 8.54k, False: 0]
  ------------------
  161|       |    // Cast the decoder to mesh decoder. This is not necessarily safe if there
  162|       |    // is some other decoder decides to use TRIANGULAR_MESH as the return type,
  163|       |    // but unfortunately there is not nice work around for this without using
  164|       |    // RTTI (double dispatch and similar concepts will not work because of the
  165|       |    // template nature of the prediction schemes).
  166|  8.54k|    const MeshDecoder* const mesh_decoder =
  167|  8.54k|        static_cast<const MeshDecoder*>(decoder);
  168|       |
  169|  8.54k|    auto ret = CreateMeshPredictionScheme<
  170|  8.54k|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|  8.54k|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|  8.54k|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|  8.54k|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 8.15k, False: 382]
  ------------------
  174|  8.15k|      return ret;
  175|  8.15k|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|  8.54k|  }
  178|       |  // Create delta decoder.
  179|    382|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    382|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|  8.54k|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  4.02k|      uint16_t bitstream_version) {
  143|  4.02k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  4.02k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  4.02k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  4.02k|        uint16_t bitstream_version) {
   53|  4.02k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 1.24k, False: 2.77k]
  ------------------
   54|  1.24k|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|  1.24k|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|  1.24k|                                                         MeshDataT>(
   57|  1.24k|                attribute, transform, mesh_data));
   58|  1.24k|      }
   59|  2.77k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  2.77k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 560, False: 2.21k]
  ------------------
   61|    560|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    560|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    560|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    560|                                                  mesh_data));
   65|    560|      }
   66|  2.21k|#endif
   67|  2.21k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 802, False: 1.41k]
  ------------------
   68|    802|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    802|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    802|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    802|                                                  mesh_data));
   72|    802|      }
   73|  1.41k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|  1.41k|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 290, False: 1.12k]
  ------------------
   75|    290|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    290|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    290|                                                     MeshDataT>(
   78|    290|                attribute, transform, mesh_data, bitstream_version));
   79|    290|      }
   80|  1.12k|#endif
   81|  1.12k|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 487, False: 638]
  ------------------
   82|    487|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    487|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    487|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    487|                                                  mesh_data));
   86|    487|      }
   87|    638|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    638|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 638, False: 0]
  ------------------
   89|    638|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    638|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    638|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    638|                                                  mesh_data));
   93|    638|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  4.02k|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  4.13k|      uint16_t bitstream_version) {
  143|  4.13k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  4.13k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  4.13k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  4.13k|        uint16_t bitstream_version) {
   53|  4.13k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 1.06k, False: 3.07k]
  ------------------
   54|  1.06k|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|  1.06k|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|  1.06k|                                                         MeshDataT>(
   57|  1.06k|                attribute, transform, mesh_data));
   58|  1.06k|      }
   59|  3.07k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  3.07k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 670, False: 2.40k]
  ------------------
   61|    670|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    670|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    670|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    670|                                                  mesh_data));
   65|    670|      }
   66|  2.40k|#endif
   67|  2.40k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 812, False: 1.59k]
  ------------------
   68|    812|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    812|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    812|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    812|                                                  mesh_data));
   72|    812|      }
   73|  1.59k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|  1.59k|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 354, False: 1.23k]
  ------------------
   75|    354|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    354|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    354|                                                     MeshDataT>(
   78|    354|                attribute, transform, mesh_data, bitstream_version));
   79|    354|      }
   80|  1.23k|#endif
   81|  1.23k|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 475, False: 762]
  ------------------
   82|    475|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    475|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    475|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    475|                                                  mesh_data));
   86|    475|      }
   87|    762|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    762|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 762, False: 0]
  ------------------
   89|    762|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    762|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    762|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    762|                                                  mesh_data));
   93|    762|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  4.13k|    }

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

_ZN5draco28PredictionSchemeDeltaDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    173|    const PointIndex*) {
   50|    173|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    173|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    173|  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|  53.7k|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 53.6k, False: 173]
  ------------------
   57|  53.6k|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|  53.6k|                                           in_corr + i, out_data + i);
   59|  53.6k|  }
   60|    173|  return true;
   61|    173|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    158|    const PointIndex*) {
   50|    158|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    158|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    158|  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|  14.9M|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 14.9M, False: 158]
  ------------------
   57|  14.9M|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|  14.9M|                                           in_corr + i, out_data + i);
   59|  14.9M|  }
   60|    158|  return true;
   61|    158|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    382|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    282|    const PointIndex*) {
   50|    282|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    282|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    282|  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|  29.4M|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 29.4M, False: 282]
  ------------------
   57|  29.4M|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|  29.4M|                                           in_corr + i, out_data + i);
   59|  29.4M|  }
   60|    282|  return true;
   61|    282|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    198|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    179|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}

_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    615|    uint16_t bitstream_version) {
   38|    615|  const PointAttribute* const att = source->point_cloud()->attribute(att_id);
   39|    615|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 615, False: 0]
  ------------------
   40|    615|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 20, False: 595]
  ------------------
   41|    595|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 14, False: 581]
  ------------------
   42|    581|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 123, False: 458]
  ------------------
   43|    458|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 1, False: 457]
  ------------------
   44|    457|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 418, False: 39]
  ------------------
   45|    592|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 16, False: 23]
  ------------------
   46|    592|    const CornerTable* const ct = source->GetCornerTable();
   47|    592|    const MeshAttributeIndicesEncodingData* const encoding_data =
   48|    592|        source->GetAttributeEncodingData(att_id);
   49|    592|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 153, False: 439]
  |  Branch (49:26): [True: 0, False: 439]
  ------------------
   50|       |      // No connectivity data found.
   51|    153|      return nullptr;
   52|    153|    }
   53|       |    // Connectivity data exists.
   54|    439|    const MeshAttributeCornerTable* const att_ct =
   55|    439|        source->GetAttributeCornerTable(att_id);
   56|    439|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 182, False: 257]
  ------------------
   57|    182|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    182|      MeshData md;
   59|    182|      md.Set(source->mesh(), att_ct,
   60|    182|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    182|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    182|      MeshPredictionSchemeFactoryT factory;
   63|    182|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    182|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 166, False: 16]
  ------------------
   65|    166|        return ret;
   66|    166|      }
   67|    257|    } else {
   68|    257|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    257|      MeshData md;
   70|    257|      md.Set(source->mesh(), ct,
   71|    257|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    257|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    257|      MeshPredictionSchemeFactoryT factory;
   74|    257|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    257|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 251, False: 6]
  ------------------
   76|    251|        return ret;
   77|    251|      }
   78|    257|    }
   79|    439|  }
   80|     45|  return nullptr;
   81|    615|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    649|    uint16_t bitstream_version) {
   38|    649|  const PointAttribute* const att = source->point_cloud()->attribute(att_id);
   39|    649|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 649, False: 0]
  ------------------
   40|    649|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 4, False: 645]
  ------------------
   41|    645|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 2, False: 643]
  ------------------
   42|    643|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 140, False: 503]
  ------------------
   43|    503|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 1, False: 502]
  ------------------
   44|    502|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 470, False: 32]
  ------------------
   45|    623|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 6, False: 26]
  ------------------
   46|    623|    const CornerTable* const ct = source->GetCornerTable();
   47|    623|    const MeshAttributeIndicesEncodingData* const encoding_data =
   48|    623|        source->GetAttributeEncodingData(att_id);
   49|    623|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 135, False: 488]
  |  Branch (49:26): [True: 0, False: 488]
  ------------------
   50|       |      // No connectivity data found.
   51|    135|      return nullptr;
   52|    135|    }
   53|       |    // Connectivity data exists.
   54|    488|    const MeshAttributeCornerTable* const att_ct =
   55|    488|        source->GetAttributeCornerTable(att_id);
   56|    488|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 212, False: 276]
  ------------------
   57|    212|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    212|      MeshData md;
   59|    212|      md.Set(source->mesh(), att_ct,
   60|    212|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    212|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    212|      MeshPredictionSchemeFactoryT factory;
   63|    212|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    212|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 199, False: 13]
  ------------------
   65|    199|        return ret;
   66|    199|      }
   67|    276|    } else {
   68|    276|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    276|      MeshData md;
   70|    276|      md.Set(source->mesh(), ct,
   71|    276|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    276|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    276|      MeshPredictionSchemeFactoryT factory;
   74|    276|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    276|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 271, False: 5]
  ------------------
   76|    271|        return ret;
   77|    271|      }
   78|    276|    }
   79|    488|  }
   80|     44|  return nullptr;
   81|    649|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|  8.54k|    uint16_t bitstream_version) {
   38|  8.54k|  const PointAttribute* const att = source->point_cloud()->attribute(att_id);
   39|  8.54k|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 8.54k, False: 0]
  ------------------
   40|  8.54k|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 2.37k, False: 6.16k]
  ------------------
   41|  6.16k|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 1.23k, False: 4.93k]
  ------------------
   42|  4.93k|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 1.66k, False: 3.26k]
  ------------------
   43|  3.26k|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 964, False: 2.30k]
  ------------------
   44|  2.30k|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 1.40k, False: 900]
  ------------------
   45|  8.28k|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 647, False: 253]
  ------------------
   46|  8.28k|    const CornerTable* const ct = source->GetCornerTable();
   47|  8.28k|    const MeshAttributeIndicesEncodingData* const encoding_data =
   48|  8.28k|        source->GetAttributeEncodingData(att_id);
   49|  8.28k|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 129, False: 8.15k]
  |  Branch (49:26): [True: 0, False: 8.15k]
  ------------------
   50|       |      // No connectivity data found.
   51|    129|      return nullptr;
   52|    129|    }
   53|       |    // Connectivity data exists.
   54|  8.15k|    const MeshAttributeCornerTable* const att_ct =
   55|  8.15k|        source->GetAttributeCornerTable(att_id);
   56|  8.15k|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 4.02k, False: 4.13k]
  ------------------
   57|  4.02k|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|  4.02k|      MeshData md;
   59|  4.02k|      md.Set(source->mesh(), att_ct,
   60|  4.02k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|  4.02k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|  4.02k|      MeshPredictionSchemeFactoryT factory;
   63|  4.02k|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|  4.02k|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 4.02k, False: 0]
  ------------------
   65|  4.02k|        return ret;
   66|  4.02k|      }
   67|  4.13k|    } else {
   68|  4.13k|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|  4.13k|      MeshData md;
   70|  4.13k|      md.Set(source->mesh(), ct,
   71|  4.13k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|  4.13k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|  4.13k|      MeshPredictionSchemeFactoryT factory;
   74|  4.13k|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|  4.13k|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 4.13k, False: 0]
  ------------------
   76|  4.13k|        return ret;
   77|  4.13k|      }
   78|  4.13k|    }
   79|  8.15k|  }
   80|    253|  return nullptr;
   81|  8.54k|}

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

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

_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE14IsInBottomLeftERKNS_7VectorDIiLi2EEE:
   92|  16.2M|  bool IsInBottomLeft(const Point2& p) const {
   93|  16.2M|    if (p[0] == 0 && p[1] == 0) {
  ------------------
  |  Branch (93:9): [True: 16.1M, False: 66.5k]
  |  Branch (93:22): [True: 16.1M, False: 6.47k]
  ------------------
   94|  16.1M|      return true;
   95|  16.1M|    }
   96|  73.0k|    return (p[0] < 0 && p[1] <= 0);
  ------------------
  |  Branch (96:13): [True: 32.5k, False: 40.4k]
  |  Branch (96:25): [True: 15.8k, False: 16.7k]
  ------------------
   97|  16.2M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE16GetRotationCountENS_7VectorDIiLi2EEE:
   50|  16.2M|  int32_t GetRotationCount(Point2 pred) const {
   51|  16.2M|    const DataType sign_x = pred[0];
   52|  16.2M|    const DataType sign_y = pred[1];
   53|       |
   54|  16.2M|    int32_t rotation_count = 0;
   55|  16.2M|    if (sign_x == 0) {
  ------------------
  |  Branch (55:9): [True: 16.1M, False: 66.5k]
  ------------------
   56|  16.1M|      if (sign_y == 0) {
  ------------------
  |  Branch (56:11): [True: 16.1M, False: 6.47k]
  ------------------
   57|  16.1M|        rotation_count = 0;
   58|  16.1M|      } else if (sign_y > 0) {
  ------------------
  |  Branch (58:18): [True: 3.27k, False: 3.19k]
  ------------------
   59|  3.27k|        rotation_count = 3;
   60|  3.27k|      } else {
   61|  3.19k|        rotation_count = 1;
   62|  3.19k|      }
   63|  16.1M|    } else if (sign_x > 0) {
  ------------------
  |  Branch (63:16): [True: 34.0k, False: 32.5k]
  ------------------
   64|  34.0k|      if (sign_y >= 0) {
  ------------------
  |  Branch (64:11): [True: 16.6k, False: 17.3k]
  ------------------
   65|  16.6k|        rotation_count = 2;
   66|  17.3k|      } else {
   67|  17.3k|        rotation_count = 1;
   68|  17.3k|      }
   69|  34.0k|    } else {
   70|  32.5k|      if (sign_y <= 0) {
  ------------------
  |  Branch (70:11): [True: 15.8k, False: 16.7k]
  ------------------
   71|  15.8k|        rotation_count = 0;
   72|  16.7k|      } else {
   73|  16.7k|        rotation_count = 3;
   74|  16.7k|      }
   75|  32.5k|    }
   76|  16.2M|    return rotation_count;
   77|  16.2M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE11RotatePointENS_7VectorDIiLi2EEEi:
   79|   114k|  Point2 RotatePoint(Point2 p, int32_t rotation_count) const {
   80|   114k|    switch (rotation_count) {
   81|  40.5k|      case 1:
  ------------------
  |  Branch (81:7): [True: 40.5k, False: 73.9k]
  ------------------
   82|  40.5k|        return Point2(p[1], -p[0]);
   83|  33.3k|      case 2:
  ------------------
  |  Branch (83:7): [True: 33.3k, False: 81.0k]
  ------------------
   84|  33.3k|        return Point2(-p[0], -p[1]);
   85|  40.5k|      case 3:
  ------------------
  |  Branch (85:7): [True: 40.5k, False: 73.9k]
  ------------------
   86|  40.5k|        return Point2(-p[1], p[0]);
   87|      0|      default:
  ------------------
  |  Branch (87:7): [True: 0, False: 114k]
  ------------------
   88|      0|        return p;
   89|   114k|    }
   90|   114k|  }
_ZN5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiEC2Ev:
   40|    649|  PredictionSchemeNormalOctahedronCanonicalizedTransformBase() : Base() {}

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

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

_ZN5draco37PredictionSchemeWrapDecodingTransformIiiE19DecodeTransformDataEPNS_13DecoderBufferE:
   65|  7.81k|  bool DecodeTransformData(DecoderBuffer* buffer) {
   66|  7.81k|    DataTypeT min_value, max_value;
   67|  7.81k|    if (!buffer->Decode(&min_value)) {
  ------------------
  |  Branch (67:9): [True: 94, False: 7.72k]
  ------------------
   68|     94|      return false;
   69|     94|    }
   70|  7.72k|    if (!buffer->Decode(&max_value)) {
  ------------------
  |  Branch (70:9): [True: 66, False: 7.65k]
  ------------------
   71|     66|      return false;
   72|     66|    }
   73|  7.65k|    if (min_value > max_value) {
  ------------------
  |  Branch (73:9): [True: 235, False: 7.42k]
  ------------------
   74|    235|      return false;
   75|    235|    }
   76|  7.42k|    this->set_min_value(min_value);
   77|  7.42k|    this->set_max_value(max_value);
   78|  7.42k|    if (!this->InitCorrectionBounds()) {
  ------------------
  |  Branch (78:9): [True: 33, False: 7.38k]
  ------------------
   79|     33|      return false;
   80|     33|    }
   81|  7.38k|    return true;
   82|  7.42k|  }
_ZNK5draco37PredictionSchemeWrapDecodingTransformIiiE20ComputeOriginalValueEPKiS3_Pi:
   38|  42.3M|                                   DataTypeT* out_original_vals) const {
   39|       |    // For now we assume both |DataTypeT| and |CorrTypeT| are equal.
   40|  42.3M|    static_assert(std::is_same<DataTypeT, CorrTypeT>::value,
   41|  42.3M|                  "Predictions and corrections must have the same type.");
   42|       |
   43|       |    // The only valid implementation right now is for int32_t.
   44|  42.3M|    static_assert(std::is_same<DataTypeT, int32_t>::value,
   45|  42.3M|                  "Only int32_t is supported for predicted values.");
   46|       |
   47|  42.3M|    predicted_vals = this->ClampPredictedValue(predicted_vals);
   48|       |
   49|       |    // The sum is computed in int64_t, where it is exact. The encoder keeps each
   50|       |    // correction within half of the span, so the sum lies at most one span
   51|       |    // outside [min, max] and a single wrap gives the original value. Malformed
   52|       |    // corrections cannot overflow int64_t either.
   53|   558M|    for (int i = 0; i < this->num_components(); ++i) {
  ------------------
  |  Branch (53:21): [True: 516M, False: 42.3M]
  ------------------
   54|   516M|      int64_t value = static_cast<int64_t>(predicted_vals[i]) +
   55|   516M|                      static_cast<int64_t>(corr_vals[i]);
   56|   516M|      if (value > this->max_value()) {
  ------------------
  |  Branch (56:11): [True: 34.2M, False: 481M]
  ------------------
   57|  34.2M|        value -= this->max_dif();
   58|   481M|      } else if (value < this->min_value()) {
  ------------------
  |  Branch (58:18): [True: 569k, False: 481M]
  ------------------
   59|   569k|        value += this->max_dif();
   60|   569k|      }
   61|   516M|      out_original_vals[i] = static_cast<DataTypeT>(value);
   62|   516M|    }
   63|  42.3M|  }
_ZN5draco37PredictionSchemeWrapDecodingTransformIiiEC2Ev:
   32|  8.54k|  PredictionSchemeWrapDecodingTransform() {}

_ZNK5draco33PredictionSchemeWrapTransformBaseIiE22AreCorrectionsPositiveEv:
   60|  8.33k|  bool AreCorrectionsPositive() const { return false; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE13set_min_valueERKi:
  100|  7.42k|  inline void set_min_value(const DataTypeT& v) { min_value_ = v; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE13set_max_valueERKi:
  102|  7.42k|  inline void set_max_value(const DataTypeT& v) { max_value_ = v; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE20InitCorrectionBoundsEv:
   83|  7.42k|  bool InitCorrectionBounds() {
   84|  7.42k|    const int64_t dif =
   85|  7.42k|        static_cast<int64_t>(max_value_) - static_cast<int64_t>(min_value_);
   86|  7.42k|    if (dif < 0 || dif >= std::numeric_limits<DataTypeT>::max()) {
  ------------------
  |  Branch (86:9): [True: 0, False: 7.42k]
  |  Branch (86:20): [True: 33, False: 7.38k]
  ------------------
   87|     33|      return false;
   88|     33|    }
   89|  7.38k|    max_dif_ = 1 + static_cast<DataTypeT>(dif);
   90|  7.38k|    max_correction_ = max_dif_ / 2;
   91|  7.38k|    min_correction_ = -max_correction_;
   92|  7.38k|    if ((max_dif_ & 1) == 0) {
  ------------------
  |  Branch (92:9): [True: 2.78k, False: 4.60k]
  ------------------
   93|  2.78k|      max_correction_ -= 1;
   94|  2.78k|    }
   95|  7.38k|    return true;
   96|  7.42k|  }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE4InitEi:
   55|  6.03k|  void Init(int num_components) {
   56|  6.03k|    num_components_ = num_components;
   57|  6.03k|    clamped_value_.resize(num_components);
   58|  6.03k|  }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE19ClampPredictedValueEPKi:
   63|  42.3M|      const DataTypeT* predicted_val) const {
   64|   558M|    for (int i = 0; i < this->num_components(); ++i) {
  ------------------
  |  Branch (64:21): [True: 516M, False: 42.3M]
  ------------------
   65|   516M|      if (predicted_val[i] > max_value_) {
  ------------------
  |  Branch (65:11): [True: 159k, False: 515M]
  ------------------
   66|   159k|        clamped_value_[i] = max_value_;
   67|   515M|      } else if (predicted_val[i] < min_value_) {
  ------------------
  |  Branch (67:18): [True: 7.09M, False: 508M]
  ------------------
   68|  7.09M|        clamped_value_[i] = min_value_;
   69|   508M|      } else {
   70|   508M|        clamped_value_[i] = predicted_val[i];
   71|   508M|      }
   72|   516M|    }
   73|  42.3M|    return clamped_value_.data();
   74|  42.3M|  }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE14num_componentsEv:
   98|  1.11G|  inline int num_components() const { return num_components_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE9max_valueEv:
  101|   516M|  inline DataTypeT max_value() const { return max_value_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE7max_difEv:
  103|  34.8M|  inline DataTypeT max_dif() const { return max_dif_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE9min_valueEv:
   99|   481M|  inline DataTypeT min_value() const { return min_value_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE17quantization_bitsEv:
   77|  1.21k|  int quantization_bits() const {
   78|  1.21k|    DRACO_DCHECK(false);
   79|  1.21k|    return -1;
   80|  1.21k|  }
_ZN5draco33PredictionSchemeWrapTransformBaseIiEC2Ev:
   44|  8.54k|      : num_components_(0),
   45|  8.54k|        min_value_(0),
   46|  8.54k|        max_value_(0),
   47|  8.54k|        max_dif_(0),
   48|  8.54k|        max_correction_(0),
   49|  8.54k|        min_correction_(0) {}

_ZN5draco26SequentialAttributeDecoderC2Ev:
   20|  38.6k|    : decoder_(nullptr), attribute_(nullptr), attribute_id_(-1) {}
_ZN5draco26SequentialAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   23|  38.6k|                                      int attribute_id) {
   24|  38.6k|  decoder_ = decoder;
   25|  38.6k|  attribute_ = decoder->point_cloud()->attribute(attribute_id);
   26|  38.6k|  attribute_id_ = attribute_id;
   27|  38.6k|  return true;
   28|  38.6k|}
_ZN5draco26SequentialAttributeDecoder23DecodePortableAttributeERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   38|  16.6k|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
   39|  16.6k|  if (attribute_->num_components() <= 0 ||
  ------------------
  |  Branch (39:7): [True: 0, False: 16.6k]
  ------------------
   40|  16.6k|      !attribute_->Reset(point_ids.size())) {
  ------------------
  |  Branch (40:7): [True: 0, False: 16.6k]
  ------------------
   41|      0|    return false;
   42|      0|  }
   43|  16.6k|  if (!DecodeValues(point_ids, in_buffer)) {
  ------------------
  |  Branch (43:7): [True: 3.24k, False: 13.4k]
  ------------------
   44|  3.24k|    return false;
   45|  3.24k|  }
   46|  13.4k|  return true;
   47|  16.6k|}
_ZN5draco26SequentialAttributeDecoder35DecodeDataNeededByPortableTransformERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   50|  4.83k|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
   51|       |  // Default implementation does not apply any transform.
   52|  4.83k|  return true;
   53|  4.83k|}
_ZN5draco26SequentialAttributeDecoder34TransformAttributeToOriginalFormatERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEE:
   56|    256|    const std::vector<PointIndex>& point_ids) {
   57|       |  // Default implementation does not apply any transform.
   58|    256|  return true;
   59|    256|}
_ZN5draco26SequentialAttributeDecoder20GetPortableAttributeEv:
   61|  10.3k|const PointAttribute* SequentialAttributeDecoder::GetPortableAttribute() {
   62|       |  // If needed, copy point to attribute value index mapping from the final
   63|       |  // attribute to the portable attribute.
   64|  10.3k|  if (!attribute_->is_mapping_identity() && portable_attribute_ &&
  ------------------
  |  Branch (64:7): [True: 9.10k, False: 1.27k]
  |  Branch (64:45): [True: 8.88k, False: 220]
  ------------------
   65|  8.88k|      portable_attribute_->is_mapping_identity()) {
  ------------------
  |  Branch (65:7): [True: 6.78k, False: 2.09k]
  ------------------
   66|  6.78k|    portable_attribute_->SetExplicitMapping(attribute_->indices_map_size());
   67|  6.78k|    for (PointIndex i(0);
   68|  33.0M|         i < static_cast<uint32_t>(attribute_->indices_map_size()); ++i) {
  ------------------
  |  Branch (68:10): [True: 33.0M, False: 6.78k]
  ------------------
   69|  33.0M|      portable_attribute_->SetPointMapEntry(i, attribute_->mapped_index(i));
   70|  33.0M|    }
   71|  6.78k|  }
   72|  10.3k|  return portable_attribute_.get();
   73|  10.3k|}
_ZN5draco26SequentialAttributeDecoder20InitPredictionSchemeEPNS_25PredictionSchemeInterfaceE:
   76|  9.80k|    PredictionSchemeInterface* ps) {
   77|  13.6k|  for (int i = 0; i < ps->GetNumParentAttributes(); ++i) {
  ------------------
  |  Branch (77:19): [True: 3.89k, False: 9.78k]
  ------------------
   78|  3.89k|    const int att_id = decoder_->point_cloud()->GetNamedAttributeId(
   79|  3.89k|        ps->GetParentAttributeType(i));
   80|  3.89k|    if (att_id == -1) {
  ------------------
  |  Branch (80:9): [True: 4, False: 3.88k]
  ------------------
   81|      4|      return false;  // Requested attribute does not exist.
   82|      4|    }
   83|  3.88k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   84|  3.88k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.88k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (84:9): [True: 0, False: 3.88k]
  ------------------
   85|      0|      if (!ps->SetParentAttribute(decoder_->point_cloud()->attribute(att_id))) {
  ------------------
  |  Branch (85:11): [True: 0, False: 0]
  ------------------
   86|      0|        return false;
   87|      0|      }
   88|      0|    } else
   89|  3.88k|#endif
   90|  3.88k|    {
   91|  3.88k|      const PointAttribute* const pa = decoder_->GetPortableAttribute(att_id);
   92|  3.88k|      if (pa == nullptr || !ps->SetParentAttribute(pa)) {
  ------------------
  |  Branch (92:11): [True: 4, False: 3.88k]
  |  Branch (92:28): [True: 12, False: 3.87k]
  ------------------
   93|     16|        return false;
   94|     16|      }
   95|  3.88k|    }
   96|  3.88k|  }
   97|  9.78k|  return true;
   98|  9.80k|}
_ZN5draco26SequentialAttributeDecoder12DecodeValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
  101|    628|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
  102|    628|  const int32_t num_values = static_cast<uint32_t>(point_ids.size());
  103|    628|  const int entry_size = static_cast<int>(attribute_->byte_stride());
  104|    628|  std::unique_ptr<uint8_t[]> value_data_ptr(new uint8_t[entry_size]);
  105|    628|  uint8_t* const value_data = value_data_ptr.get();
  106|    628|  int out_byte_pos = 0;
  107|       |  // Decode raw attribute values in their original format.
  108|  2.69k|  for (int i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (108:19): [True: 2.12k, False: 567]
  ------------------
  109|  2.12k|    if (!in_buffer->Decode(value_data, entry_size)) {
  ------------------
  |  Branch (109:9): [True: 61, False: 2.06k]
  ------------------
  110|     61|      return false;
  111|     61|    }
  112|  2.06k|    attribute_->buffer()->Write(out_byte_pos, value_data, entry_size);
  113|  2.06k|    out_byte_pos += entry_size;
  114|  2.06k|  }
  115|    567|  return true;
  116|    628|}

_ZNK5draco26SequentialAttributeDecoder9attributeEv:
   53|  14.1k|  const PointAttribute* attribute() const { return attribute_; }
_ZN5draco26SequentialAttributeDecoder9attributeEv:
   54|   202M|  PointAttribute* attribute() { return attribute_; }
_ZNK5draco26SequentialAttributeDecoder12attribute_idEv:
   55|  9.80k|  int attribute_id() const { return attribute_id_; }
_ZNK5draco26SequentialAttributeDecoder7decoderEv:
   56|  47.4k|  PointCloudDecoder* decoder() const { return decoder_; }
_ZN5draco26SequentialAttributeDecoder20SetPortableAttributeENSt3__110unique_ptrINS_14PointAttributeENS1_14default_deleteIS3_EEEE:
   69|  15.4k|  void SetPortableAttribute(std::unique_ptr<PointAttribute> att) {
   70|  15.4k|    portable_attribute_ = std::move(att);
   71|  15.4k|  }
_ZN5draco26SequentialAttributeDecoder18portable_attributeEv:
   73|  52.5k|  PointAttribute* portable_attribute() { return portable_attribute_.get(); }
_ZN5draco26SequentialAttributeDecoderD2Ev:
   29|  38.6k|  virtual ~SequentialAttributeDecoder() = default;

_ZN5draco37SequentialAttributeDecodersControllerC2ENSt3__110unique_ptrINS_15PointsSequencerENS1_14default_deleteIS3_EEEE:
   26|  31.3k|    : sequencer_(std::move(sequencer)) {}
_ZN5draco37SequentialAttributeDecodersController27DecodeAttributesDecoderDataEPNS_13DecoderBufferE:
   29|  10.5k|    DecoderBuffer* buffer) {
   30|  10.5k|  if (!AttributesDecoder::DecodeAttributesDecoderData(buffer)) {
  ------------------
  |  Branch (30:7): [True: 216, False: 10.3k]
  ------------------
   31|    216|    return false;
   32|    216|  }
   33|       |  // Decode unique ids of all sequential encoders and create them.
   34|  10.3k|  const int32_t num_attributes = GetNumAttributes();
   35|  10.3k|  sequential_decoders_.resize(num_attributes);
   36|  48.9k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (36:19): [True: 38.6k, False: 10.2k]
  ------------------
   37|  38.6k|    uint8_t decoder_type;
   38|  38.6k|    if (!buffer->Decode(&decoder_type)) {
  ------------------
  |  Branch (38:9): [True: 13, False: 38.6k]
  ------------------
   39|     13|      return false;
   40|     13|    }
   41|       |    // Create the decoder from the id.
   42|  38.6k|    sequential_decoders_[i] = CreateSequentialDecoder(decoder_type);
   43|  38.6k|    if (!sequential_decoders_[i]) {
  ------------------
  |  Branch (43:9): [True: 7, False: 38.6k]
  ------------------
   44|      7|      return false;
   45|      7|    }
   46|  38.6k|    if (!sequential_decoders_[i]->Init(GetDecoder(), GetAttributeId(i))) {
  ------------------
  |  Branch (46:9): [True: 2, False: 38.6k]
  ------------------
   47|      2|      return false;
   48|      2|    }
   49|  38.6k|  }
   50|  10.2k|  return true;
   51|  10.3k|}
_ZN5draco37SequentialAttributeDecodersController16DecodeAttributesEPNS_13DecoderBufferE:
   54|  6.58k|    DecoderBuffer* buffer) {
   55|  6.58k|  if (!sequencer_ || !sequencer_->GenerateSequence(&point_ids_)) {
  ------------------
  |  Branch (55:7): [True: 0, False: 6.58k]
  |  Branch (55:22): [True: 1, False: 6.58k]
  ------------------
   56|      1|    return false;
   57|      1|  }
   58|       |  // Initialize point to attribute value mapping for all decoded attributes.
   59|  6.58k|  const int32_t num_attributes = GetNumAttributes();
   60|  39.4k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (60:19): [True: 32.8k, False: 6.58k]
  ------------------
   61|  32.8k|    PointAttribute* const pa =
   62|  32.8k|        GetDecoder()->point_cloud()->attribute(GetAttributeId(i));
   63|  32.8k|    if (!sequencer_->UpdatePointToAttributeIndexMapping(pa)) {
  ------------------
  |  Branch (63:9): [True: 3, False: 32.8k]
  ------------------
   64|      3|      return false;
   65|      3|    }
   66|  32.8k|  }
   67|  6.58k|  return AttributesDecoder::DecodeAttributes(buffer);
   68|  6.58k|}
_ZN5draco37SequentialAttributeDecodersController24DecodePortableAttributesEPNS_13DecoderBufferE:
   71|  6.58k|    DecoderBuffer* in_buffer) {
   72|  6.58k|  const int32_t num_attributes = GetNumAttributes();
   73|  20.0k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (73:19): [True: 16.6k, False: 3.33k]
  ------------------
   74|  16.6k|    if (!sequential_decoders_[i]->DecodePortableAttribute(point_ids_,
  ------------------
  |  Branch (74:9): [True: 3.24k, False: 13.4k]
  ------------------
   75|  16.6k|                                                          in_buffer)) {
   76|  3.24k|      return false;
   77|  3.24k|    }
   78|  16.6k|  }
   79|  3.33k|  return true;
   80|  6.58k|}
_ZN5draco37SequentialAttributeDecodersController36DecodeDataNeededByPortableTransformsEPNS_13DecoderBufferE:
   83|  3.33k|    DecodeDataNeededByPortableTransforms(DecoderBuffer* in_buffer) {
   84|  3.33k|  const int32_t num_attributes = GetNumAttributes();
   85|  8.85k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (85:19): [True: 6.28k, False: 2.56k]
  ------------------
   86|  6.28k|    if (!sequential_decoders_[i]->DecodeDataNeededByPortableTransform(
  ------------------
  |  Branch (86:9): [True: 774, False: 5.51k]
  ------------------
   87|  6.28k|            point_ids_, in_buffer)) {
   88|    774|      return false;
   89|    774|    }
   90|  6.28k|  }
   91|  2.56k|  return true;
   92|  3.33k|}
_ZN5draco37SequentialAttributeDecodersController35TransformAttributesToOriginalFormatEv:
   95|  2.56k|    TransformAttributesToOriginalFormat() {
   96|  2.56k|  const int32_t num_attributes = GetNumAttributes();
   97|  6.14k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (97:19): [True: 4.45k, False: 1.68k]
  ------------------
   98|       |    // Check whether the attribute transform should be skipped.
   99|  4.45k|    if (GetDecoder()->options()) {
  ------------------
  |  Branch (99:9): [True: 4.45k, False: 0]
  ------------------
  100|  4.45k|      const PointAttribute* const attribute =
  101|  4.45k|          sequential_decoders_[i]->attribute();
  102|  4.45k|      const PointAttribute* const portable_attribute =
  103|  4.45k|          sequential_decoders_[i]->GetPortableAttribute();
  104|  4.45k|      if (portable_attribute &&
  ------------------
  |  Branch (104:11): [True: 4.20k, False: 256]
  |  Branch (104:11): [True: 0, False: 4.45k]
  ------------------
  105|  4.20k|          GetDecoder()->options()->GetAttributeBool(
  ------------------
  |  Branch (105:11): [True: 0, False: 4.20k]
  ------------------
  106|  4.20k|              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|      0|        sequential_decoders_[i]->attribute()->CopyFrom(*portable_attribute);
  113|      0|        continue;
  114|      0|      }
  115|  4.45k|    }
  116|  4.45k|    if (!sequential_decoders_[i]->TransformAttributeToOriginalFormat(
  ------------------
  |  Branch (116:9): [True: 879, False: 3.58k]
  ------------------
  117|  4.45k|            point_ids_)) {
  118|    879|      return false;
  119|    879|    }
  120|  4.45k|  }
  121|  1.68k|  return true;
  122|  2.56k|}
_ZN5draco37SequentialAttributeDecodersController23CreateSequentialDecoderEh:
  126|  38.6k|    uint8_t decoder_type) {
  127|  38.6k|  switch (decoder_type) {
  128|  3.29k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_GENERIC:
  ------------------
  |  Branch (128:5): [True: 3.29k, False: 35.3k]
  ------------------
  129|  3.29k|      return std::unique_ptr<SequentialAttributeDecoder>(
  130|  3.29k|          new SequentialAttributeDecoder());
  131|  33.4k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_INTEGER:
  ------------------
  |  Branch (131:5): [True: 33.4k, False: 5.17k]
  ------------------
  132|  33.4k|      return std::unique_ptr<SequentialAttributeDecoder>(
  133|  33.4k|          new SequentialIntegerAttributeDecoder());
  134|    497|    case SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION:
  ------------------
  |  Branch (134:5): [True: 497, False: 38.1k]
  ------------------
  135|    497|      return std::unique_ptr<SequentialAttributeDecoder>(
  136|    497|          new SequentialQuantizationAttributeDecoder());
  137|      0|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
  138|  1.37k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS:
  ------------------
  |  Branch (138:5): [True: 1.37k, False: 37.2k]
  ------------------
  139|  1.37k|      return std::unique_ptr<SequentialNormalAttributeDecoder>(
  140|  1.37k|          new SequentialNormalAttributeDecoder());
  141|      0|#endif
  142|      7|    default:
  ------------------
  |  Branch (142:5): [True: 7, False: 38.6k]
  ------------------
  143|      7|      break;
  144|  38.6k|  }
  145|       |  // Unknown or unsupported decoder type.
  146|      7|  return nullptr;
  147|  38.6k|}

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

_ZN5draco33SequentialIntegerAttributeDecoderC2Ev:
   23|  35.3k|SequentialIntegerAttributeDecoder::SequentialIntegerAttributeDecoder() =
_ZN5draco33SequentialIntegerAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   27|  35.3k|                                             int attribute_id) {
   28|  35.3k|  if (!SequentialAttributeDecoder::Init(decoder, attribute_id)) {
  ------------------
  |  Branch (28:7): [True: 0, False: 35.3k]
  ------------------
   29|      0|    return false;
   30|      0|  }
   31|  35.3k|  return true;
   32|  35.3k|}
_ZN5draco33SequentialIntegerAttributeDecoder34TransformAttributeToOriginalFormatERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEE:
   35|  4.20k|    const std::vector<PointIndex>& point_ids) {
   36|  4.20k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   37|  4.20k|  if (decoder() &&
  ------------------
  |  Branch (37:7): [True: 4.20k, False: 0]
  ------------------
   38|  4.20k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  4.20k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (38:7): [True: 7, False: 4.19k]
  ------------------
   39|      7|    return true;  // Don't revert the transform here for older files.
   40|      7|  }
   41|  4.19k|#endif
   42|  4.19k|  return StoreValues(static_cast<uint32_t>(point_ids.size()));
   43|  4.20k|}
_ZN5draco33SequentialIntegerAttributeDecoder12DecodeValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   46|  16.0k|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
   47|       |  // Decode prediction scheme.
   48|  16.0k|  int8_t prediction_scheme_method;
   49|  16.0k|  if (!in_buffer->Decode(&prediction_scheme_method)) {
  ------------------
  |  Branch (49:7): [True: 78, False: 15.9k]
  ------------------
   50|     78|    return false;
   51|     78|  }
   52|       |  // Check that decoded prediction scheme method type is valid.
   53|  15.9k|  if (prediction_scheme_method < PREDICTION_NONE ||
  ------------------
  |  Branch (53:7): [True: 52, False: 15.9k]
  ------------------
   54|  15.9k|      prediction_scheme_method >= NUM_PREDICTION_SCHEMES) {
  ------------------
  |  Branch (54:7): [True: 190, False: 15.7k]
  ------------------
   55|    242|    return false;
   56|    242|  }
   57|  15.7k|  if (prediction_scheme_method != PREDICTION_NONE) {
  ------------------
  |  Branch (57:7): [True: 15.7k, False: 30]
  ------------------
   58|  15.7k|    int8_t prediction_transform_type;
   59|  15.7k|    if (!in_buffer->Decode(&prediction_transform_type)) {
  ------------------
  |  Branch (59:9): [True: 68, False: 15.6k]
  ------------------
   60|     68|      return false;
   61|     68|    }
   62|       |    // Check that decoded prediction scheme transform type is valid.
   63|  15.6k|    if (prediction_transform_type < PREDICTION_TRANSFORM_NONE ||
  ------------------
  |  Branch (63:9): [True: 13, False: 15.6k]
  ------------------
   64|  15.6k|        prediction_transform_type >= NUM_PREDICTION_SCHEME_TRANSFORM_TYPES) {
  ------------------
  |  Branch (64:9): [True: 157, False: 15.4k]
  ------------------
   65|    170|      return false;
   66|    170|    }
   67|  15.4k|    prediction_scheme_ = CreateIntPredictionScheme(
   68|  15.4k|        static_cast<PredictionSchemeMethod>(prediction_scheme_method),
   69|  15.4k|        static_cast<PredictionSchemeTransformType>(prediction_transform_type));
   70|  15.4k|  }
   71|       |
   72|  15.5k|  if (prediction_scheme_) {
  ------------------
  |  Branch (72:7): [True: 9.80k, False: 5.69k]
  ------------------
   73|  9.80k|    if (!InitPredictionScheme(prediction_scheme_.get())) {
  ------------------
  |  Branch (73:9): [True: 20, False: 9.78k]
  ------------------
   74|     20|      return false;
   75|     20|    }
   76|  9.80k|  }
   77|       |
   78|  15.4k|  if (!DecodeIntegerValues(point_ids, in_buffer)) {
  ------------------
  |  Branch (78:7): [True: 2.60k, False: 12.8k]
  ------------------
   79|  2.60k|    return false;
   80|  2.60k|  }
   81|       |
   82|  12.8k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   83|  12.8k|  const int32_t num_values = static_cast<uint32_t>(point_ids.size());
   84|  12.8k|  if (decoder() &&
  ------------------
  |  Branch (84:7): [True: 12.8k, False: 0]
  ------------------
   85|  12.8k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  12.8k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (85:7): [True: 13, False: 12.8k]
  ------------------
   86|       |    // For older files, revert the transform right after we decode the data.
   87|     13|    if (!StoreValues(num_values)) {
  ------------------
  |  Branch (87:9): [True: 1, False: 12]
  ------------------
   88|      1|      return false;
   89|      1|    }
   90|     13|  }
   91|  12.8k|#endif
   92|  12.8k|  return true;
   93|  12.8k|}
_ZN5draco33SequentialIntegerAttributeDecoder25CreateIntPredictionSchemeENS_22PredictionSchemeMethodENS_29PredictionSchemeTransformTypeE:
   98|  14.1k|    PredictionSchemeTransformType transform_type) {
   99|  14.1k|  if (transform_type != PREDICTION_TRANSFORM_WRAP) {
  ------------------
  |  Branch (99:7): [True: 5.62k, False: 8.54k]
  ------------------
  100|  5.62k|    return nullptr;  // For now we support only wrap transform.
  101|  5.62k|  }
  102|  8.54k|  return CreatePredictionSchemeForDecoder<
  103|  8.54k|      int32_t, PredictionSchemeWrapDecodingTransform<int32_t>>(
  104|  8.54k|      method, attribute_id(), decoder());
  105|  14.1k|}
_ZN5draco33SequentialIntegerAttributeDecoder19DecodeIntegerValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
  108|  15.4k|    const std::vector<PointIndex>& point_ids, DecoderBuffer* in_buffer) {
  109|  15.4k|  const int num_components = GetNumValueComponents();
  110|  15.4k|  if (num_components <= 0) {
  ------------------
  |  Branch (110:7): [True: 0, False: 15.4k]
  ------------------
  111|      0|    return false;
  112|      0|  }
  113|  15.4k|  const size_t num_entries = point_ids.size();
  114|  15.4k|  const size_t num_values = num_entries * num_components;
  115|  15.4k|  PreparePortableAttribute(static_cast<int>(num_entries), num_components);
  116|  15.4k|  int32_t* const portable_attribute_data = GetPortableAttributeData();
  117|  15.4k|  if (portable_attribute_data == nullptr) {
  ------------------
  |  Branch (117:7): [True: 16, False: 15.4k]
  ------------------
  118|     16|    return false;
  119|     16|  }
  120|  15.4k|  uint8_t compressed;
  121|  15.4k|  if (!in_buffer->Decode(&compressed)) {
  ------------------
  |  Branch (121:7): [True: 27, False: 15.4k]
  ------------------
  122|     27|    return false;
  123|     27|  }
  124|  15.4k|  if (compressed > 0) {
  ------------------
  |  Branch (124:7): [True: 726, False: 14.7k]
  ------------------
  125|       |    // Decode compressed values.
  126|    726|    if (!DecodeSymbols(static_cast<uint32_t>(num_values), num_components,
  ------------------
  |  Branch (126:9): [True: 261, False: 465]
  ------------------
  127|    726|                       in_buffer,
  128|    726|                       reinterpret_cast<uint32_t*>(portable_attribute_data))) {
  129|    261|      return false;
  130|    261|    }
  131|  14.7k|  } else {
  132|       |    // Decode the integer data directly.
  133|       |    // Get the number of bytes for a given entry.
  134|  14.7k|    uint8_t num_bytes;
  135|  14.7k|    if (!in_buffer->Decode(&num_bytes)) {
  ------------------
  |  Branch (135:9): [True: 13, False: 14.6k]
  ------------------
  136|     13|      return false;
  137|     13|    }
  138|  14.6k|    if (num_bytes == DataTypeLength(DT_INT32)) {
  ------------------
  |  Branch (138:9): [True: 910, False: 13.7k]
  ------------------
  139|    910|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (139:11): [True: 0, False: 910]
  ------------------
  140|    910|          sizeof(int32_t) * num_values) {
  141|      0|        return false;
  142|      0|      }
  143|    910|      if (!in_buffer->Decode(portable_attribute_data,
  ------------------
  |  Branch (143:11): [True: 5, False: 905]
  ------------------
  144|    910|                             sizeof(int32_t) * num_values)) {
  145|      5|        return false;
  146|      5|      }
  147|  13.7k|    } else {
  148|  13.7k|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (148:11): [True: 66, False: 13.7k]
  ------------------
  149|  13.7k|          num_bytes * num_values) {
  150|     66|        return false;
  151|     66|      }
  152|  13.7k|      if (in_buffer->remaining_size() <
  ------------------
  |  Branch (152:11): [True: 20, False: 13.7k]
  ------------------
  153|  13.7k|          static_cast<int64_t>(num_bytes) * static_cast<int64_t>(num_values)) {
  154|     20|        return false;
  155|     20|      }
  156|  1.38G|      for (size_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (156:26): [True: 1.38G, False: 13.7k]
  ------------------
  157|  1.38G|        if (!in_buffer->Decode(portable_attribute_data + i, num_bytes)) {
  ------------------
  |  Branch (157:13): [True: 0, False: 1.38G]
  ------------------
  158|      0|          return false;
  159|      0|        }
  160|  1.38G|      }
  161|  13.7k|    }
  162|  14.6k|  }
  163|       |
  164|  15.0k|  if (num_values > 0 && (prediction_scheme_ == nullptr ||
  ------------------
  |  Branch (164:7): [True: 15.0k, False: 0]
  |  Branch (164:26): [True: 5.49k, False: 9.57k]
  ------------------
  165|  13.8k|                         !prediction_scheme_->AreCorrectionsPositive())) {
  ------------------
  |  Branch (165:26): [True: 8.33k, False: 1.24k]
  ------------------
  166|       |    // Convert the values back to the original signed format.
  167|  13.8k|    ConvertSymbolsToSignedInts(
  168|  13.8k|        reinterpret_cast<const uint32_t*>(portable_attribute_data),
  169|  13.8k|        static_cast<int>(num_values), portable_attribute_data);
  170|  13.8k|  }
  171|       |
  172|       |  // If the data was encoded with a prediction scheme, we must revert it.
  173|  15.0k|  if (prediction_scheme_) {
  ------------------
  |  Branch (173:7): [True: 9.57k, False: 5.49k]
  ------------------
  174|  9.57k|    prediction_scheme_->SetMaxNumPredictedValues(num_values);
  175|  9.57k|    if (!prediction_scheme_->DecodePredictionData(in_buffer)) {
  ------------------
  |  Branch (175:9): [True: 1.16k, False: 8.41k]
  ------------------
  176|  1.16k|      return false;
  177|  1.16k|    }
  178|       |
  179|  8.41k|    if (num_values > 0) {
  ------------------
  |  Branch (179:9): [True: 8.41k, False: 0]
  ------------------
  180|  8.41k|      if (!prediction_scheme_->ComputeOriginalValues(
  ------------------
  |  Branch (180:11): [True: 1.02k, False: 7.38k]
  ------------------
  181|  8.41k|              portable_attribute_data, portable_attribute_data,
  182|  8.41k|              static_cast<int>(num_values), num_components, point_ids.data())) {
  183|  1.02k|        return false;
  184|  1.02k|      }
  185|  8.41k|    }
  186|  8.41k|  }
  187|  12.8k|  return true;
  188|  15.0k|}
_ZN5draco33SequentialIntegerAttributeDecoder11StoreValuesEj:
  190|  3.64k|bool SequentialIntegerAttributeDecoder::StoreValues(uint32_t num_values) {
  191|  3.64k|  switch (attribute()->data_type()) {
  192|    508|    case DT_UINT8:
  ------------------
  |  Branch (192:5): [True: 508, False: 3.13k]
  ------------------
  193|    508|      StoreTypedValues<uint8_t>(num_values);
  194|    508|      break;
  195|  1.55k|    case DT_INT8:
  ------------------
  |  Branch (195:5): [True: 1.55k, False: 2.08k]
  ------------------
  196|  1.55k|      StoreTypedValues<int8_t>(num_values);
  197|  1.55k|      break;
  198|     99|    case DT_UINT16:
  ------------------
  |  Branch (198:5): [True: 99, False: 3.54k]
  ------------------
  199|     99|      StoreTypedValues<uint16_t>(num_values);
  200|     99|      break;
  201|    178|    case DT_INT16:
  ------------------
  |  Branch (201:5): [True: 178, False: 3.46k]
  ------------------
  202|    178|      StoreTypedValues<int16_t>(num_values);
  203|    178|      break;
  204|    264|    case DT_UINT32:
  ------------------
  |  Branch (204:5): [True: 264, False: 3.38k]
  ------------------
  205|    264|      StoreTypedValues<uint32_t>(num_values);
  206|    264|      break;
  207|    501|    case DT_INT32:
  ------------------
  |  Branch (207:5): [True: 501, False: 3.14k]
  ------------------
  208|    501|      StoreTypedValues<int32_t>(num_values);
  209|    501|      break;
  210|    536|    default:
  ------------------
  |  Branch (210:5): [True: 536, False: 3.10k]
  ------------------
  211|    536|      return false;
  212|  3.64k|  }
  213|  3.10k|  return true;
  214|  3.64k|}
_ZN5draco33SequentialIntegerAttributeDecoder24PreparePortableAttributeEii:
  238|  15.4k|    int num_entries, int num_components) {
  239|  15.4k|  GeometryAttribute ga;
  240|  15.4k|  ga.Init(attribute()->attribute_type(), nullptr, num_components, DT_INT32,
  241|  15.4k|          false, num_components * DataTypeLength(DT_INT32), 0);
  242|  15.4k|  std::unique_ptr<PointAttribute> port_att(new PointAttribute(ga));
  243|  15.4k|  port_att->SetIdentityMapping();
  244|  15.4k|  port_att->Reset(num_entries);
  245|  15.4k|  port_att->set_unique_id(attribute()->unique_id());
  246|  15.4k|  SetPortableAttribute(std::move(port_att));
  247|  15.4k|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIhEEvj:
  217|    508|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|    508|  const int num_components = attribute()->num_components();
  219|    508|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|    508|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|    508|      new AttributeTypeT[num_components]);
  222|    508|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|    508|  int val_id = 0;
  224|    508|  int out_byte_pos = 0;
  225|  30.9M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 30.9M, False: 508]
  ------------------
  226|   180M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 150M, False: 30.9M]
  ------------------
  227|   150M|      const AttributeTypeT value =
  228|   150M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|   150M|      att_val[c] = value;
  230|   150M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|  30.9M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|  30.9M|    out_byte_pos += entry_size;
  234|  30.9M|  }
  235|    508|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIaEEvj:
  217|  1.55k|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|  1.55k|  const int num_components = attribute()->num_components();
  219|  1.55k|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|  1.55k|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|  1.55k|      new AttributeTypeT[num_components]);
  222|  1.55k|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|  1.55k|  int val_id = 0;
  224|  1.55k|  int out_byte_pos = 0;
  225|   154M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 154M, False: 1.55k]
  ------------------
  226|   612M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 457M, False: 154M]
  ------------------
  227|   457M|      const AttributeTypeT value =
  228|   457M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|   457M|      att_val[c] = value;
  230|   457M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|   154M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|   154M|    out_byte_pos += entry_size;
  234|   154M|  }
  235|  1.55k|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesItEEvj:
  217|     99|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|     99|  const int num_components = attribute()->num_components();
  219|     99|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|     99|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|     99|      new AttributeTypeT[num_components]);
  222|     99|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|     99|  int val_id = 0;
  224|     99|  int out_byte_pos = 0;
  225|  1.13M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 1.13M, False: 99]
  ------------------
  226|  24.5M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 23.3M, False: 1.13M]
  ------------------
  227|  23.3M|      const AttributeTypeT value =
  228|  23.3M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|  23.3M|      att_val[c] = value;
  230|  23.3M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|  1.13M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|  1.13M|    out_byte_pos += entry_size;
  234|  1.13M|  }
  235|     99|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIsEEvj:
  217|    178|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|    178|  const int num_components = attribute()->num_components();
  219|    178|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|    178|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|    178|      new AttributeTypeT[num_components]);
  222|    178|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|    178|  int val_id = 0;
  224|    178|  int out_byte_pos = 0;
  225|  3.16M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 3.16M, False: 178]
  ------------------
  226|  40.2M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 37.1M, False: 3.16M]
  ------------------
  227|  37.1M|      const AttributeTypeT value =
  228|  37.1M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|  37.1M|      att_val[c] = value;
  230|  37.1M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|  3.16M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|  3.16M|    out_byte_pos += entry_size;
  234|  3.16M|  }
  235|    178|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIjEEvj:
  217|    264|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|    264|  const int num_components = attribute()->num_components();
  219|    264|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|    264|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|    264|      new AttributeTypeT[num_components]);
  222|    264|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|    264|  int val_id = 0;
  224|    264|  int out_byte_pos = 0;
  225|   806k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 805k, False: 264]
  ------------------
  226|  58.6M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 57.8M, False: 805k]
  ------------------
  227|  57.8M|      const AttributeTypeT value =
  228|  57.8M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|  57.8M|      att_val[c] = value;
  230|  57.8M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|   805k|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|   805k|    out_byte_pos += entry_size;
  234|   805k|  }
  235|    264|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIiEEvj:
  217|    501|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  218|    501|  const int num_components = attribute()->num_components();
  219|    501|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  220|    501|  const std::unique_ptr<AttributeTypeT[]> att_val(
  221|    501|      new AttributeTypeT[num_components]);
  222|    501|  const int32_t* const portable_attribute_data = GetPortableAttributeData();
  223|    501|  int val_id = 0;
  224|    501|  int out_byte_pos = 0;
  225|  11.2M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (225:24): [True: 11.2M, False: 501]
  ------------------
  226|   164M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (226:21): [True: 152M, False: 11.2M]
  ------------------
  227|   152M|      const AttributeTypeT value =
  228|   152M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  229|   152M|      att_val[c] = value;
  230|   152M|    }
  231|       |    // Store the integer value into the attribute buffer.
  232|  11.2M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  233|  11.2M|    out_byte_pos += entry_size;
  234|  11.2M|  }
  235|    501|}

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

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

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

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

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

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

_ZNK5draco12DracoOptionsINS_17GeometryAttribute4TypeEE16GetAttributeBoolERKS2_RKNSt3__112basic_stringIcNS6_11char_traitsIcEENS6_9allocatorIcEEEEb:
  195|  4.20k|                                                   bool default_val) const {
  196|  4.20k|  const Options* const att_options = FindAttributeOptions(att_key);
  197|  4.20k|  if (att_options && att_options->IsOptionSet(name)) {
  ------------------
  |  Branch (197:7): [True: 0, False: 4.20k]
  |  Branch (197:22): [True: 0, False: 0]
  ------------------
  198|      0|    return att_options->GetBool(name, default_val);
  199|      0|  }
  200|  4.20k|  return global_options_.GetBool(name, default_val);
  201|  4.20k|}
_ZNK5draco12DracoOptionsINS_17GeometryAttribute4TypeEE20FindAttributeOptionsERKS2_:
  137|  4.20k|    const AttributeKeyT& att_key) const {
  138|  4.20k|  auto it = attribute_options_.find(att_key);
  139|  4.20k|  if (it == attribute_options_.end()) {
  ------------------
  |  Branch (139:7): [True: 4.20k, False: 0]
  ------------------
  140|  4.20k|    return nullptr;
  141|  4.20k|  }
  142|      0|  return &it->second;
  143|  4.20k|}

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

_ZN5draco10AnsDecoderC2Ev:
   56|  44.1k|  AnsDecoder() : buf(nullptr), buf_offset(0), state(0) {}
rans_bit_decoder.cc:_ZN5dracoL13ans_read_initEPNS_10AnsDecoderEPKhi:
  300|  32.0k|                                const uint8_t* const buf, int offset) {
  301|  32.0k|  unsigned x;
  302|  32.0k|  if (offset < 1) {
  ------------------
  |  Branch (302:7): [True: 52, False: 31.9k]
  ------------------
  303|     52|    return 1;
  304|     52|  }
  305|  31.9k|  ans->buf = buf;
  306|  31.9k|  x = buf[offset - 1] >> 6;
  307|  31.9k|  if (x == 0) {
  ------------------
  |  Branch (307:7): [True: 26.0k, False: 5.90k]
  ------------------
  308|  26.0k|    ans->buf_offset = offset - 1;
  309|  26.0k|    ans->state = buf[offset - 1] & 0x3F;
  310|  26.0k|  } else if (x == 1) {
  ------------------
  |  Branch (310:14): [True: 5.34k, False: 559]
  ------------------
  311|  5.34k|    if (offset < 2) {
  ------------------
  |  Branch (311:9): [True: 2, False: 5.34k]
  ------------------
  312|      2|      return 1;
  313|      2|    }
  314|  5.34k|    ans->buf_offset = offset - 2;
  315|  5.34k|    ans->state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  316|  5.34k|  } else if (x == 2) {
  ------------------
  |  Branch (316:14): [True: 541, False: 18]
  ------------------
  317|    541|    if (offset < 3) {
  ------------------
  |  Branch (317:9): [True: 1, False: 540]
  ------------------
  318|      1|      return 1;
  319|      1|    }
  320|    540|    ans->buf_offset = offset - 3;
  321|    540|    ans->state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  322|    540|  } else {
  323|     18|    return 1;
  324|     18|  }
  325|  31.9k|  ans->state += DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  31.9k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  326|  31.9k|  if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   64|  31.9k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
                if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  31.9k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (326:7): [True: 3, False: 31.9k]
  ------------------
  327|      3|    return 1;
  328|      3|  }
  329|  31.9k|  return 0;
  330|  31.9k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|  5.34k|static uint32_t mem_get_le16(const void* vmem) {
   68|  5.34k|  uint32_t val;
   69|  5.34k|  const uint8_t* mem = (const uint8_t*)vmem;
   70|       |
   71|  5.34k|  val = mem[1] << 8;
   72|  5.34k|  val |= mem[0];
   73|  5.34k|  return val;
   74|  5.34k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    540|static uint32_t mem_get_le24(const void* vmem) {
   77|    540|  uint32_t val;
   78|    540|  const uint8_t* mem = (const uint8_t*)vmem;
   79|       |
   80|    540|  val = mem[2] << 16;
   81|    540|  val |= mem[1] << 8;
   82|    540|  val |= mem[0];
   83|    540|  return val;
   84|    540|}
rans_bit_decoder.cc:_ZN5dracoL14rabs_desc_readEPNS_10AnsDecoderEh:
  166|   121M|static inline int rabs_desc_read(struct AnsDecoder* ans, AnsP8 p0) {
  167|   121M|  int val;
  168|       |#if DRACO_ANS_IMPL1
  169|       |  unsigned l_s;
  170|       |#else
  171|   121M|  unsigned quot, rem, x, xn;
  172|   121M|#endif
  173|   121M|  const AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
  ------------------
  |  |   63|   121M|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  174|   121M|  if (ans->state < DRACO_ANS_L_BASE && ans->buf_offset > 0) {
  ------------------
  |  |   64|   243M|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  |  Branch (174:7): [True: 80.5M, False: 41.0M]
  |  Branch (174:40): [True: 294k, False: 80.2M]
  ------------------
  175|   294k|    ans->state = ans->state * DRACO_ANS_IO_BASE + ans->buf[--ans->buf_offset];
  ------------------
  |  |   65|   294k|#define DRACO_ANS_IO_BASE 256
  ------------------
  176|   294k|  }
  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|   121M|  x = ans->state;
  184|   121M|  quot = x / DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|   121M|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  185|   121M|  rem = x % DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|   121M|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  186|   121M|  xn = quot * p;
  187|   121M|  val = rem < p;
  188|   121M|  if (UNPREDICTABLE(val)) {
  ------------------
  |  |  165|   243M|#define UNPREDICTABLE(x) x
  |  |  ------------------
  |  |  |  Branch (165:26): [True: 114M, False: 6.94M]
  |  |  ------------------
  ------------------
  189|   114M|    ans->state = xn + rem;
  190|   114M|  } else {
  191|       |    // ans->state = quot * p0 + rem - p;
  192|  6.94M|    ans->state = x - xn - p;
  193|  6.94M|  }
  194|   121M|#endif
  195|   121M|  return val;
  196|   121M|}
rans_bit_decoder.cc:_ZN5dracoL12ans_read_endEPNS_10AnsDecoderE:
  332|  70.3k|static inline int ans_read_end(struct AnsDecoder* const ans) {
  333|  70.3k|  return ans->state == DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  70.3k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  334|  70.3k|}
_ZN5draco11RAnsDecoderILi12EEC2Ev:
  416|  3.46k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi12EE24rans_build_look_up_tableEPKjj:
  484|  2.21k|                                       uint32_t num_symbols) {
  485|  2.21k|    lut_table_.resize(rans_precision);
  486|  2.21k|    probability_table_.resize(num_symbols);
  487|  2.21k|    uint32_t cum_prob = 0;
  488|  2.21k|    uint32_t act_prob = 0;
  489|  20.6k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 18.6k, False: 2.04k]
  ------------------
  490|  18.6k|      probability_table_[i].prob = token_probs[i];
  491|  18.6k|      probability_table_[i].cum_prob = cum_prob;
  492|  18.6k|      cum_prob += token_probs[i];
  493|  18.6k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 164, False: 18.4k]
  ------------------
  494|    164|        return false;
  495|    164|      }
  496|  7.49M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 7.47M, False: 18.4k]
  ------------------
  497|  7.47M|        lut_table_[j] = i;
  498|  7.47M|      }
  499|  18.4k|      act_prob = cum_prob;
  500|  18.4k|    }
  501|  2.04k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 248, False: 1.79k]
  ------------------
  502|    248|      return false;
  503|    248|    }
  504|  1.79k|    return true;
  505|  2.04k|  }
_ZN5draco11RAnsDecoderILi12EE9read_initEPKhi:
  421|  1.74k|  inline int read_init(const uint8_t* const buf, int offset) {
  422|  1.74k|    unsigned x;
  423|  1.74k|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 137, False: 1.60k]
  ------------------
  424|    137|      return 1;
  425|    137|    }
  426|  1.60k|    ans_.buf = buf;
  427|  1.60k|    x = buf[offset - 1] >> 6;
  428|  1.60k|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 978, False: 631]
  ------------------
  429|    978|      ans_.buf_offset = offset - 1;
  430|    978|      ans_.state = buf[offset - 1] & 0x3F;
  431|    978|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 247, False: 384]
  ------------------
  432|    247|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 42, False: 205]
  ------------------
  433|     42|        return 1;
  434|     42|      }
  435|    205|      ans_.buf_offset = offset - 2;
  436|    205|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    384|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 256, False: 128]
  ------------------
  438|    256|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 39, False: 217]
  ------------------
  439|     39|        return 1;
  440|     39|      }
  441|    217|      ans_.buf_offset = offset - 3;
  442|    217|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    217|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 128, False: 0]
  ------------------
  444|    128|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 37, False: 91]
  ------------------
  445|     37|        return 1;
  446|     37|      }
  447|     91|      ans_.buf_offset = offset - 4;
  448|     91|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     91|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|  1.49k|    ans_.state += l_rans_base;
  453|  1.49k|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  1.49k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 98, False: 1.39k]
  ------------------
  454|     98|      return 1;
  455|     98|    }
  456|  1.39k|    return 0;
  457|  1.49k|  }
symbol_decoding.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|    346|static uint32_t mem_get_le16(const void* vmem) {
   68|    346|  uint32_t val;
   69|    346|  const uint8_t* mem = (const uint8_t*)vmem;
   70|       |
   71|    346|  val = mem[1] << 8;
   72|    346|  val |= mem[0];
   73|    346|  return val;
   74|    346|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    348|static uint32_t mem_get_le24(const void* vmem) {
   77|    348|  uint32_t val;
   78|    348|  const uint8_t* mem = (const uint8_t*)vmem;
   79|       |
   80|    348|  val = mem[2] << 16;
   81|    348|  val |= mem[1] << 8;
   82|    348|  val |= mem[0];
   83|    348|  return val;
   84|    348|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le32EPKv:
   86|    368|static inline uint32_t mem_get_le32(const void* vmem) {
   87|    368|  uint32_t val;
   88|    368|  const uint8_t* mem = (const uint8_t*)vmem;
   89|       |
   90|    368|  val = mem[3] << 24;
   91|    368|  val |= mem[2] << 16;
   92|    368|  val |= mem[1] << 8;
   93|    368|  val |= mem[0];
   94|    368|  return val;
   95|    368|}
_ZN5draco11RAnsDecoderILi12EE9rans_readEv:
  465|   346M|  inline int rans_read() {
  466|   346M|    unsigned rem;
  467|   346M|    unsigned quo;
  468|   346M|    struct rans_dec_sym sym;
  469|   346M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 327M, False: 19.4M]
  |  Branch (469:40): [True: 21.6k, False: 327M]
  ------------------
  470|  21.6k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  21.6k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  21.6k|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|   346M|    quo = ans_.state / rans_precision;
  475|   346M|    rem = ans_.state % rans_precision;
  476|   346M|    fetch_sym(&sym, rem);
  477|   346M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   346M|    return sym.val;
  479|   346M|  }
_ZN5draco11RAnsDecoderILi12EE9fetch_symEPNS_12rans_dec_symEj:
  508|   346M|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   346M|    uint32_t symbol = lut_table_[rem];
  510|   346M|    out->val = symbol;
  511|   346M|    out->prob = probability_table_[symbol].prob;
  512|   346M|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   346M|  }
_ZN5draco11RAnsDecoderILi12EE8read_endEv:
  459|  1.33k|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi13EEC2Ev:
  416|    245|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi13EE24rans_build_look_up_tableEPKjj:
  484|    170|                                       uint32_t num_symbols) {
  485|    170|    lut_table_.resize(rans_precision);
  486|    170|    probability_table_.resize(num_symbols);
  487|    170|    uint32_t cum_prob = 0;
  488|    170|    uint32_t act_prob = 0;
  489|  11.0k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 10.8k, False: 148]
  ------------------
  490|  10.8k|      probability_table_[i].prob = token_probs[i];
  491|  10.8k|      probability_table_[i].cum_prob = cum_prob;
  492|  10.8k|      cum_prob += token_probs[i];
  493|  10.8k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 22, False: 10.8k]
  ------------------
  494|     22|        return false;
  495|     22|      }
  496|  1.21M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 1.20M, False: 10.8k]
  ------------------
  497|  1.20M|        lut_table_[j] = i;
  498|  1.20M|      }
  499|  10.8k|      act_prob = cum_prob;
  500|  10.8k|    }
  501|    148|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 8, False: 140]
  ------------------
  502|      8|      return false;
  503|      8|    }
  504|    140|    return true;
  505|    148|  }
_ZN5draco11RAnsDecoderILi13EE9read_initEPKhi:
  421|    123|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    123|    unsigned x;
  423|    123|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 3, False: 120]
  ------------------
  424|      3|      return 1;
  425|      3|    }
  426|    120|    ans_.buf = buf;
  427|    120|    x = buf[offset - 1] >> 6;
  428|    120|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 36, False: 84]
  ------------------
  429|     36|      ans_.buf_offset = offset - 1;
  430|     36|      ans_.state = buf[offset - 1] & 0x3F;
  431|     84|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 47, False: 37]
  ------------------
  432|     47|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 8, False: 39]
  ------------------
  433|      8|        return 1;
  434|      8|      }
  435|     39|      ans_.buf_offset = offset - 2;
  436|     39|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     39|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 15, False: 22]
  ------------------
  438|     15|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 9, False: 6]
  ------------------
  439|      9|        return 1;
  440|      9|      }
  441|      6|      ans_.buf_offset = offset - 3;
  442|      6|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     22|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 22, False: 0]
  ------------------
  444|     22|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 8, False: 14]
  ------------------
  445|      8|        return 1;
  446|      8|      }
  447|     14|      ans_.buf_offset = offset - 4;
  448|     14|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     14|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     95|    ans_.state += l_rans_base;
  453|     95|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     95|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 13, False: 82]
  ------------------
  454|     13|      return 1;
  455|     13|    }
  456|     82|    return 0;
  457|     95|  }
_ZN5draco11RAnsDecoderILi13EE9rans_readEv:
  465|   522k|  inline int rans_read() {
  466|   522k|    unsigned rem;
  467|   522k|    unsigned quo;
  468|   522k|    struct rans_dec_sym sym;
  469|   525k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 286k, False: 238k]
  |  Branch (469:40): [True: 2.34k, False: 283k]
  ------------------
  470|  2.34k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  2.34k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  2.34k|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|   522k|    quo = ans_.state / rans_precision;
  475|   522k|    rem = ans_.state % rans_precision;
  476|   522k|    fetch_sym(&sym, rem);
  477|   522k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   522k|    return sym.val;
  479|   522k|  }
_ZN5draco11RAnsDecoderILi13EE9fetch_symEPNS_12rans_dec_symEj:
  508|   522k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   522k|    uint32_t symbol = lut_table_[rem];
  510|   522k|    out->val = symbol;
  511|   522k|    out->prob = probability_table_[symbol].prob;
  512|   522k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   522k|  }
_ZN5draco11RAnsDecoderILi13EE8read_endEv:
  459|     82|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi15EEC2Ev:
  416|    199|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi15EE24rans_build_look_up_tableEPKjj:
  484|    120|                                       uint32_t num_symbols) {
  485|    120|    lut_table_.resize(rans_precision);
  486|    120|    probability_table_.resize(num_symbols);
  487|    120|    uint32_t cum_prob = 0;
  488|    120|    uint32_t act_prob = 0;
  489|  2.10k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 1.99k, False: 102]
  ------------------
  490|  1.99k|      probability_table_[i].prob = token_probs[i];
  491|  1.99k|      probability_table_[i].cum_prob = cum_prob;
  492|  1.99k|      cum_prob += token_probs[i];
  493|  1.99k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 18, False: 1.98k]
  ------------------
  494|     18|        return false;
  495|     18|      }
  496|  3.14M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 3.13M, False: 1.98k]
  ------------------
  497|  3.13M|        lut_table_[j] = i;
  498|  3.13M|      }
  499|  1.98k|      act_prob = cum_prob;
  500|  1.98k|    }
  501|    102|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 11, False: 91]
  ------------------
  502|     11|      return false;
  503|     11|    }
  504|     91|    return true;
  505|    102|  }
_ZN5draco11RAnsDecoderILi15EE9read_initEPKhi:
  421|     84|  inline int read_init(const uint8_t* const buf, int offset) {
  422|     84|    unsigned x;
  423|     84|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 9, False: 75]
  ------------------
  424|      9|      return 1;
  425|      9|    }
  426|     75|    ans_.buf = buf;
  427|     75|    x = buf[offset - 1] >> 6;
  428|     75|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 24, False: 51]
  ------------------
  429|     24|      ans_.buf_offset = offset - 1;
  430|     24|      ans_.state = buf[offset - 1] & 0x3F;
  431|     51|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 19, False: 32]
  ------------------
  432|     19|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 7, False: 12]
  ------------------
  433|      7|        return 1;
  434|      7|      }
  435|     12|      ans_.buf_offset = offset - 2;
  436|     12|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     32|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 14, False: 18]
  ------------------
  438|     14|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 2, False: 12]
  ------------------
  439|      2|        return 1;
  440|      2|      }
  441|     12|      ans_.buf_offset = offset - 3;
  442|     12|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     18|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 18, False: 0]
  ------------------
  444|     18|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 7, False: 11]
  ------------------
  445|      7|        return 1;
  446|      7|      }
  447|     11|      ans_.buf_offset = offset - 4;
  448|     11|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     11|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     59|    ans_.state += l_rans_base;
  453|     59|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     59|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 9, False: 50]
  ------------------
  454|      9|      return 1;
  455|      9|    }
  456|     50|    return 0;
  457|     59|  }
_ZN5draco11RAnsDecoderILi15EE9rans_readEv:
  465|   302k|  inline int rans_read() {
  466|   302k|    unsigned rem;
  467|   302k|    unsigned quo;
  468|   302k|    struct rans_dec_sym sym;
  469|   303k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 119k, False: 184k]
  |  Branch (469:40): [True: 705, False: 118k]
  ------------------
  470|    705|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    705|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|    705|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|   302k|    quo = ans_.state / rans_precision;
  475|   302k|    rem = ans_.state % rans_precision;
  476|   302k|    fetch_sym(&sym, rem);
  477|   302k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   302k|    return sym.val;
  479|   302k|  }
_ZN5draco11RAnsDecoderILi15EE9fetch_symEPNS_12rans_dec_symEj:
  508|   302k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   302k|    uint32_t symbol = lut_table_[rem];
  510|   302k|    out->val = symbol;
  511|   302k|    out->prob = probability_table_[symbol].prob;
  512|   302k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   302k|  }
_ZN5draco11RAnsDecoderILi15EE8read_endEv:
  459|     50|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi16EEC2Ev:
  416|    261|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi16EE24rans_build_look_up_tableEPKjj:
  484|    165|                                       uint32_t num_symbols) {
  485|    165|    lut_table_.resize(rans_precision);
  486|    165|    probability_table_.resize(num_symbols);
  487|    165|    uint32_t cum_prob = 0;
  488|    165|    uint32_t act_prob = 0;
  489|  17.3k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 17.2k, False: 146]
  ------------------
  490|  17.2k|      probability_table_[i].prob = token_probs[i];
  491|  17.2k|      probability_table_[i].cum_prob = cum_prob;
  492|  17.2k|      cum_prob += token_probs[i];
  493|  17.2k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 19, False: 17.2k]
  ------------------
  494|     19|        return false;
  495|     19|      }
  496|  9.28M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 9.27M, False: 17.2k]
  ------------------
  497|  9.27M|        lut_table_[j] = i;
  498|  9.27M|      }
  499|  17.2k|      act_prob = cum_prob;
  500|  17.2k|    }
  501|    146|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 18, False: 128]
  ------------------
  502|     18|      return false;
  503|     18|    }
  504|    128|    return true;
  505|    146|  }
_ZN5draco11RAnsDecoderILi16EE9read_initEPKhi:
  421|    100|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    100|    unsigned x;
  423|    100|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 8, False: 92]
  ------------------
  424|      8|      return 1;
  425|      8|    }
  426|     92|    ans_.buf = buf;
  427|     92|    x = buf[offset - 1] >> 6;
  428|     92|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 20, False: 72]
  ------------------
  429|     20|      ans_.buf_offset = offset - 1;
  430|     20|      ans_.state = buf[offset - 1] & 0x3F;
  431|     72|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 18, False: 54]
  ------------------
  432|     18|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 7, False: 11]
  ------------------
  433|      7|        return 1;
  434|      7|      }
  435|     11|      ans_.buf_offset = offset - 2;
  436|     11|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     54|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 19, False: 35]
  ------------------
  438|     19|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 9, False: 10]
  ------------------
  439|      9|        return 1;
  440|      9|      }
  441|     10|      ans_.buf_offset = offset - 3;
  442|     10|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     35|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 35, False: 0]
  ------------------
  444|     35|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 2, False: 33]
  ------------------
  445|      2|        return 1;
  446|      2|      }
  447|     33|      ans_.buf_offset = offset - 4;
  448|     33|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     33|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     74|    ans_.state += l_rans_base;
  453|     74|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     74|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 14, False: 60]
  ------------------
  454|     14|      return 1;
  455|     14|    }
  456|     60|    return 0;
  457|     74|  }
_ZN5draco11RAnsDecoderILi16EE9rans_readEv:
  465|   233k|  inline int rans_read() {
  466|   233k|    unsigned rem;
  467|   233k|    unsigned quo;
  468|   233k|    struct rans_dec_sym sym;
  469|   234k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 168k, False: 65.7k]
  |  Branch (469:40): [True: 947, False: 167k]
  ------------------
  470|    947|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    947|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|    947|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|   233k|    quo = ans_.state / rans_precision;
  475|   233k|    rem = ans_.state % rans_precision;
  476|   233k|    fetch_sym(&sym, rem);
  477|   233k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   233k|    return sym.val;
  479|   233k|  }
_ZN5draco11RAnsDecoderILi16EE9fetch_symEPNS_12rans_dec_symEj:
  508|   233k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   233k|    uint32_t symbol = lut_table_[rem];
  510|   233k|    out->val = symbol;
  511|   233k|    out->prob = probability_table_[symbol].prob;
  512|   233k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   233k|  }
_ZN5draco11RAnsDecoderILi16EE8read_endEv:
  459|     60|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi18EEC2Ev:
  416|    241|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi18EE24rans_build_look_up_tableEPKjj:
  484|    169|                                       uint32_t num_symbols) {
  485|    169|    lut_table_.resize(rans_precision);
  486|    169|    probability_table_.resize(num_symbols);
  487|    169|    uint32_t cum_prob = 0;
  488|    169|    uint32_t act_prob = 0;
  489|  11.5k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 11.3k, False: 161]
  ------------------
  490|  11.3k|      probability_table_[i].prob = token_probs[i];
  491|  11.3k|      probability_table_[i].cum_prob = cum_prob;
  492|  11.3k|      cum_prob += token_probs[i];
  493|  11.3k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 8, False: 11.3k]
  ------------------
  494|      8|        return false;
  495|      8|      }
  496|  39.6M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 39.6M, False: 11.3k]
  ------------------
  497|  39.6M|        lut_table_[j] = i;
  498|  39.6M|      }
  499|  11.3k|      act_prob = cum_prob;
  500|  11.3k|    }
  501|    161|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 19, False: 142]
  ------------------
  502|     19|      return false;
  503|     19|    }
  504|    142|    return true;
  505|    161|  }
_ZN5draco11RAnsDecoderILi18EE9read_initEPKhi:
  421|    108|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    108|    unsigned x;
  423|    108|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 9, False: 99]
  ------------------
  424|      9|      return 1;
  425|      9|    }
  426|     99|    ans_.buf = buf;
  427|     99|    x = buf[offset - 1] >> 6;
  428|     99|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 20, False: 79]
  ------------------
  429|     20|      ans_.buf_offset = offset - 1;
  430|     20|      ans_.state = buf[offset - 1] & 0x3F;
  431|     79|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 16, False: 63]
  ------------------
  432|     16|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 4, False: 12]
  ------------------
  433|      4|        return 1;
  434|      4|      }
  435|     12|      ans_.buf_offset = offset - 2;
  436|     12|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     63|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 20, False: 43]
  ------------------
  438|     20|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 7, False: 13]
  ------------------
  439|      7|        return 1;
  440|      7|      }
  441|     13|      ans_.buf_offset = offset - 3;
  442|     13|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     43|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 43, False: 0]
  ------------------
  444|     43|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 9, False: 34]
  ------------------
  445|      9|        return 1;
  446|      9|      }
  447|     34|      ans_.buf_offset = offset - 4;
  448|     34|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     34|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     79|    ans_.state += l_rans_base;
  453|     79|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     79|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 17, False: 62]
  ------------------
  454|     17|      return 1;
  455|     17|    }
  456|     62|    return 0;
  457|     79|  }
_ZN5draco11RAnsDecoderILi18EE9rans_readEv:
  465|   300k|  inline int rans_read() {
  466|   300k|    unsigned rem;
  467|   300k|    unsigned quo;
  468|   300k|    struct rans_dec_sym sym;
  469|   301k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 225k, False: 75.7k]
  |  Branch (469:40): [True: 671, False: 224k]
  ------------------
  470|    671|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    671|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|    671|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|   300k|    quo = ans_.state / rans_precision;
  475|   300k|    rem = ans_.state % rans_precision;
  476|   300k|    fetch_sym(&sym, rem);
  477|   300k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   300k|    return sym.val;
  479|   300k|  }
_ZN5draco11RAnsDecoderILi18EE9fetch_symEPNS_12rans_dec_symEj:
  508|   300k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   300k|    uint32_t symbol = lut_table_[rem];
  510|   300k|    out->val = symbol;
  511|   300k|    out->prob = probability_table_[symbol].prob;
  512|   300k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   300k|  }
_ZN5draco11RAnsDecoderILi18EE8read_endEv:
  459|     62|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi19EEC2Ev:
  416|    334|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi19EE24rans_build_look_up_tableEPKjj:
  484|    193|                                       uint32_t num_symbols) {
  485|    193|    lut_table_.resize(rans_precision);
  486|    193|    probability_table_.resize(num_symbols);
  487|    193|    uint32_t cum_prob = 0;
  488|    193|    uint32_t act_prob = 0;
  489|  3.96k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 3.79k, False: 172]
  ------------------
  490|  3.79k|      probability_table_[i].prob = token_probs[i];
  491|  3.79k|      probability_table_[i].cum_prob = cum_prob;
  492|  3.79k|      cum_prob += token_probs[i];
  493|  3.79k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 21, False: 3.77k]
  ------------------
  494|     21|        return false;
  495|     21|      }
  496|  76.7M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 76.7M, False: 3.77k]
  ------------------
  497|  76.7M|        lut_table_[j] = i;
  498|  76.7M|      }
  499|  3.77k|      act_prob = cum_prob;
  500|  3.77k|    }
  501|    172|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 35, False: 137]
  ------------------
  502|     35|      return false;
  503|     35|    }
  504|    137|    return true;
  505|    172|  }
_ZN5draco11RAnsDecoderILi19EE9read_initEPKhi:
  421|    102|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    102|    unsigned x;
  423|    102|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 10, False: 92]
  ------------------
  424|     10|      return 1;
  425|     10|    }
  426|     92|    ans_.buf = buf;
  427|     92|    x = buf[offset - 1] >> 6;
  428|     92|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 21, False: 71]
  ------------------
  429|     21|      ans_.buf_offset = offset - 1;
  430|     21|      ans_.state = buf[offset - 1] & 0x3F;
  431|     71|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 16, False: 55]
  ------------------
  432|     16|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 7, False: 9]
  ------------------
  433|      7|        return 1;
  434|      7|      }
  435|      9|      ans_.buf_offset = offset - 2;
  436|      9|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     55|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 15, False: 40]
  ------------------
  438|     15|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 9, False: 6]
  ------------------
  439|      9|        return 1;
  440|      9|      }
  441|      6|      ans_.buf_offset = offset - 3;
  442|      6|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     40|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 40, False: 0]
  ------------------
  444|     40|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 9, False: 31]
  ------------------
  445|      9|        return 1;
  446|      9|      }
  447|     31|      ans_.buf_offset = offset - 4;
  448|     31|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|     31|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|     67|    ans_.state += l_rans_base;
  453|     67|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     67|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 14, False: 53]
  ------------------
  454|     14|      return 1;
  455|     14|    }
  456|     53|    return 0;
  457|     67|  }
_ZN5draco11RAnsDecoderILi19EE9rans_readEv:
  465|   440k|  inline int rans_read() {
  466|   440k|    unsigned rem;
  467|   440k|    unsigned quo;
  468|   440k|    struct rans_dec_sym sym;
  469|   441k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 131k, False: 310k]
  |  Branch (469:40): [True: 808, False: 130k]
  ------------------
  470|    808|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    808|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|    808|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|   440k|    quo = ans_.state / rans_precision;
  475|   440k|    rem = ans_.state % rans_precision;
  476|   440k|    fetch_sym(&sym, rem);
  477|   440k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|   440k|    return sym.val;
  479|   440k|  }
_ZN5draco11RAnsDecoderILi19EE9fetch_symEPNS_12rans_dec_symEj:
  508|   440k|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|   440k|    uint32_t symbol = lut_table_[rem];
  510|   440k|    out->val = symbol;
  511|   440k|    out->prob = probability_table_[symbol].prob;
  512|   440k|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|   440k|  }
_ZN5draco11RAnsDecoderILi19EE8read_endEv:
  459|     53|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi20EEC2Ev:
  416|  1.30k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi20EE24rans_build_look_up_tableEPKjj:
  484|    793|                                       uint32_t num_symbols) {
  485|    793|    lut_table_.resize(rans_precision);
  486|    793|    probability_table_.resize(num_symbols);
  487|    793|    uint32_t cum_prob = 0;
  488|    793|    uint32_t act_prob = 0;
  489|  11.9k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (489:26): [True: 11.1k, False: 755]
  ------------------
  490|  11.1k|      probability_table_[i].prob = token_probs[i];
  491|  11.1k|      probability_table_[i].cum_prob = cum_prob;
  492|  11.1k|      cum_prob += token_probs[i];
  493|  11.1k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (493:11): [True: 38, False: 11.1k]
  ------------------
  494|     38|        return false;
  495|     38|      }
  496|   757M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (496:35): [True: 757M, False: 11.1k]
  ------------------
  497|   757M|        lut_table_[j] = i;
  498|   757M|      }
  499|  11.1k|      act_prob = cum_prob;
  500|  11.1k|    }
  501|    755|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (501:9): [True: 42, False: 713]
  ------------------
  502|     42|      return false;
  503|     42|    }
  504|    713|    return true;
  505|    755|  }
_ZN5draco11RAnsDecoderILi20EE9read_initEPKhi:
  421|    536|  inline int read_init(const uint8_t* const buf, int offset) {
  422|    536|    unsigned x;
  423|    536|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 31, False: 505]
  ------------------
  424|     31|      return 1;
  425|     31|    }
  426|    505|    ans_.buf = buf;
  427|    505|    x = buf[offset - 1] >> 6;
  428|    505|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 98, False: 407]
  ------------------
  429|     98|      ans_.buf_offset = offset - 1;
  430|     98|      ans_.state = buf[offset - 1] & 0x3F;
  431|    407|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 83, False: 324]
  ------------------
  432|     83|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 25, False: 58]
  ------------------
  433|     25|        return 1;
  434|     25|      }
  435|     58|      ans_.buf_offset = offset - 2;
  436|     58|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    324|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 133, False: 191]
  ------------------
  438|    133|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 49, False: 84]
  ------------------
  439|     49|        return 1;
  440|     49|      }
  441|     84|      ans_.buf_offset = offset - 3;
  442|     84|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    191|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 191, False: 0]
  ------------------
  444|    191|      if (offset < 4) {
  ------------------
  |  Branch (444:11): [True: 37, False: 154]
  ------------------
  445|     37|        return 1;
  446|     37|      }
  447|    154|      ans_.buf_offset = offset - 4;
  448|    154|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  449|    154|    } else {
  450|      0|      return 1;
  451|      0|    }
  452|    394|    ans_.state += l_rans_base;
  453|    394|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    394|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (453:9): [True: 42, False: 352]
  ------------------
  454|     42|      return 1;
  455|     42|    }
  456|    352|    return 0;
  457|    394|  }
_ZN5draco11RAnsDecoderILi20EE9rans_readEv:
  465|  45.5M|  inline int rans_read() {
  466|  45.5M|    unsigned rem;
  467|  45.5M|    unsigned quo;
  468|  45.5M|    struct rans_dec_sym sym;
  469|  45.5M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (469:12): [True: 32.8M, False: 12.7M]
  |  Branch (469:40): [True: 8.65k, False: 32.8M]
  ------------------
  470|  8.65k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  8.65k|#define DRACO_ANS_IO_BASE 256
  ------------------
  471|  8.65k|    }
  472|       |    // |rans_precision| is a power of two compile time constant, and the below
  473|       |    // division and modulo are going to be optimized by the compiler.
  474|  45.5M|    quo = ans_.state / rans_precision;
  475|  45.5M|    rem = ans_.state % rans_precision;
  476|  45.5M|    fetch_sym(&sym, rem);
  477|  45.5M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  478|  45.5M|    return sym.val;
  479|  45.5M|  }
_ZN5draco11RAnsDecoderILi20EE9fetch_symEPNS_12rans_dec_symEj:
  508|  45.5M|  inline void fetch_sym(struct rans_dec_sym* out, uint32_t rem) {
  509|  45.5M|    uint32_t symbol = lut_table_[rem];
  510|  45.5M|    out->val = symbol;
  511|  45.5M|    out->prob = probability_table_[symbol].prob;
  512|  45.5M|    out->cum_prob = probability_table_[symbol].cum_prob;
  513|  45.5M|  }
_ZN5draco11RAnsDecoderILi20EE8read_endEv:
  459|    352|  inline int read_end() { return ans_.state == l_rans_base; }

_ZN5draco17RAnsSymbolDecoderILi5EEC2Ev:
   33|  1.29k|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi5EE6CreateEPNS_13DecoderBufferE:
   59|  1.29k|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|  1.29k|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 1.29k]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|  1.29k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|  1.29k|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.29k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 167, False: 1.12k]
  ------------------
   67|    167|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 6, False: 161]
  ------------------
   68|      6|      return false;
   69|      6|    }
   70|       |
   71|    167|  } else
   72|  1.12k|#endif
   73|  1.12k|  {
   74|  1.12k|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 30, False: 1.09k]
  ------------------
   75|     30|      return false;
   76|     30|    }
   77|  1.12k|  }
   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.25k|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 88, False: 1.16k]
  ------------------
   83|     88|    return false;
   84|     88|  }
   85|  1.16k|  probability_table_.resize(num_symbols_);
   86|  1.16k|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 411, False: 757]
  ------------------
   87|    411|    return true;
   88|    411|  }
   89|       |  // Decode the table.
   90|  6.40M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 6.40M, False: 593]
  ------------------
   91|  6.40M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  6.40M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 65, False: 6.40M]
  ------------------
   95|     65|      return false;
   96|     65|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  6.40M|    const int token = prob_data & 3;
  102|  6.40M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 4.44M, False: 1.95M]
  ------------------
  103|  4.44M|      const uint32_t offset = prob_data >> 2;
  104|  4.44M|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 78, False: 4.44M]
  ------------------
  105|     78|        return false;
  106|     78|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   240M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 236M, False: 4.44M]
  ------------------
  109|   236M|        probability_table_[i + j] = 0;
  110|   236M|      }
  111|  4.44M|      i += offset;
  112|  4.44M|    } else {
  113|  1.95M|      const int extra_bytes = token;
  114|  1.95M|      uint32_t prob = prob_data >> 2;
  115|  5.10M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 3.14M, False: 1.95M]
  ------------------
  116|  3.14M|        uint8_t eb;
  117|  3.14M|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 21, False: 3.14M]
  ------------------
  118|     21|          return false;
  119|     21|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  3.14M|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  3.14M|      }
  124|  1.95M|      probability_table_[i] = prob;
  125|  1.95M|    }
  126|  6.40M|  }
  127|    593|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 179, False: 414]
  ------------------
  128|    179|    return false;
  129|    179|  }
  130|    414|  return true;
  131|    593|}
_ZN5draco17RAnsSymbolDecoderILi5EE13StartDecodingEPNS_13DecoderBufferE:
  135|    692|    DecoderBuffer* buffer) {
  136|    692|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    692|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    692|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    692|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 55, False: 637]
  ------------------
  140|     55|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 3, False: 52]
  ------------------
  141|      3|      return false;
  142|      3|    }
  143|       |
  144|     55|  } else
  145|    637|#endif
  146|    637|  {
  147|    637|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 23, False: 614]
  ------------------
  148|     23|      return false;
  149|     23|    }
  150|    637|  }
  151|    666|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 77, False: 589]
  ------------------
  152|     77|    return false;
  153|     77|  }
  154|    589|  const uint8_t* const data_head =
  155|    589|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    589|  buffer->Advance(bytes_encoded);
  158|    589|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 131, False: 458]
  ------------------
  159|    131|    return false;
  160|    131|  }
  161|    458|  return true;
  162|    589|}
_ZNK5draco17RAnsSymbolDecoderILi5EE11num_symbolsEv:
   38|    598|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi5EE12DecodeSymbolEv:
   43|  6.85M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi5EE11EndDecodingEv:
  165|    401|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    401|  ans_.read_end();
  167|    401|}
_ZN5draco17RAnsSymbolDecoderILi1EEC2Ev:
   33|    415|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi1EE6CreateEPNS_13DecoderBufferE:
   59|    415|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    415|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 415]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    415|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    415|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    415|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 28, False: 387]
  ------------------
   67|     28|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 4, False: 24]
  ------------------
   68|      4|      return false;
   69|      4|    }
   70|       |
   71|     28|  } else
   72|    387|#endif
   73|    387|  {
   74|    387|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 10, False: 377]
  ------------------
   75|     10|      return false;
   76|     10|    }
   77|    387|  }
   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|    401|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 21, False: 380]
  ------------------
   83|     21|    return false;
   84|     21|  }
   85|    380|  probability_table_.resize(num_symbols_);
   86|    380|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 8, False: 372]
  ------------------
   87|      8|    return true;
   88|      8|  }
   89|       |  // Decode the table.
   90|  1.25M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.24M, False: 303]
  ------------------
   91|  1.24M|    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.24M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 27, False: 1.24M]
  ------------------
   95|     27|      return false;
   96|     27|    }
   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.24M|    const int token = prob_data & 3;
  102|  1.24M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 404k, False: 845k]
  ------------------
  103|   404k|      const uint32_t offset = prob_data >> 2;
  104|   404k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 26, False: 404k]
  ------------------
  105|     26|        return false;
  106|     26|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  13.4M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 13.0M, False: 404k]
  ------------------
  109|  13.0M|        probability_table_[i + j] = 0;
  110|  13.0M|      }
  111|   404k|      i += offset;
  112|   845k|    } else {
  113|   845k|      const int extra_bytes = token;
  114|   845k|      uint32_t prob = prob_data >> 2;
  115|  1.50M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 660k, False: 845k]
  ------------------
  116|   660k|        uint8_t eb;
  117|   660k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 16, False: 660k]
  ------------------
  118|     16|          return false;
  119|     16|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   660k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   660k|      }
  124|   845k|      probability_table_[i] = prob;
  125|   845k|    }
  126|  1.24M|  }
  127|    303|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 148, False: 155]
  ------------------
  128|    148|    return false;
  129|    148|  }
  130|    155|  return true;
  131|    303|}
_ZNK5draco17RAnsSymbolDecoderILi1EE11num_symbolsEv:
   38|    163|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi1EE13StartDecodingEPNS_13DecoderBufferE:
  135|    155|    DecoderBuffer* buffer) {
  136|    155|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    155|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    155|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    155|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 4, False: 151]
  ------------------
  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|    151|#endif
  146|    151|  {
  147|    151|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 9, False: 142]
  ------------------
  148|      9|      return false;
  149|      9|    }
  150|    151|  }
  151|    146|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 3, False: 143]
  ------------------
  152|      3|    return false;
  153|      3|  }
  154|    143|  const uint8_t* const data_head =
  155|    143|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    143|  buffer->Advance(bytes_encoded);
  158|    143|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 33, False: 110]
  ------------------
  159|     33|    return false;
  160|     33|  }
  161|    110|  return true;
  162|    143|}
_ZN5draco17RAnsSymbolDecoderILi1EE12DecodeSymbolEv:
   43|  2.31M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi1EE11EndDecodingEv:
  165|    110|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    110|  ans_.read_end();
  167|    110|}
_ZN5draco17RAnsSymbolDecoderILi2EEC2Ev:
   33|    324|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi2EE6CreateEPNS_13DecoderBufferE:
   59|    324|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    324|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 324]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    324|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    324|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    324|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 34, False: 290]
  ------------------
   67|     34|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 33]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     34|  } else
   72|    290|#endif
   73|    290|  {
   74|    290|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 5, False: 285]
  ------------------
   75|      5|      return false;
   76|      5|    }
   77|    290|  }
   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|    318|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 15, False: 303]
  ------------------
   83|     15|    return false;
   84|     15|  }
   85|    303|  probability_table_.resize(num_symbols_);
   86|    303|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 5, False: 298]
  ------------------
   87|      5|    return true;
   88|      5|  }
   89|       |  // Decode the table.
   90|  61.4k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 61.1k, False: 245]
  ------------------
   91|  61.1k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  61.1k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 19, False: 61.1k]
  ------------------
   95|     19|      return false;
   96|     19|    }
   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|  61.1k|    const int token = prob_data & 3;
  102|  61.1k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 28.6k, False: 32.4k]
  ------------------
  103|  28.6k|      const uint32_t offset = prob_data >> 2;
  104|  28.6k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 23, False: 28.6k]
  ------------------
  105|     23|        return false;
  106|     23|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  1.48M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 1.45M, False: 28.6k]
  ------------------
  109|  1.45M|        probability_table_[i + j] = 0;
  110|  1.45M|      }
  111|  28.6k|      i += offset;
  112|  32.4k|    } else {
  113|  32.4k|      const int extra_bytes = token;
  114|  32.4k|      uint32_t prob = prob_data >> 2;
  115|  61.0k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 28.5k, False: 32.4k]
  ------------------
  116|  28.5k|        uint8_t eb;
  117|  28.5k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 11, False: 28.5k]
  ------------------
  118|     11|          return false;
  119|     11|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  28.5k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  28.5k|      }
  124|  32.4k|      probability_table_[i] = prob;
  125|  32.4k|    }
  126|  61.1k|  }
  127|    245|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 26, False: 219]
  ------------------
  128|     26|    return false;
  129|     26|  }
  130|    219|  return true;
  131|    245|}
_ZNK5draco17RAnsSymbolDecoderILi2EE11num_symbolsEv:
   38|    224|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi2EE13StartDecodingEPNS_13DecoderBufferE:
  135|    219|    DecoderBuffer* buffer) {
  136|    219|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    219|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    219|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    219|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 20, False: 199]
  ------------------
  140|     20|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 18]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     20|  } else
  145|    199|#endif
  146|    199|  {
  147|    199|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 9, False: 190]
  ------------------
  148|      9|      return false;
  149|      9|    }
  150|    199|  }
  151|    208|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 22, False: 186]
  ------------------
  152|     22|    return false;
  153|     22|  }
  154|    186|  const uint8_t* const data_head =
  155|    186|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    186|  buffer->Advance(bytes_encoded);
  158|    186|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 29, False: 157]
  ------------------
  159|     29|    return false;
  160|     29|  }
  161|    157|  return true;
  162|    186|}
_ZN5draco17RAnsSymbolDecoderILi2EE12DecodeSymbolEv:
   43|  20.8M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi2EE11EndDecodingEv:
  165|    157|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    157|  ans_.read_end();
  167|    157|}
_ZN5draco17RAnsSymbolDecoderILi3EEC2Ev:
   33|    334|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi3EE6CreateEPNS_13DecoderBufferE:
   59|    334|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    334|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 334]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    334|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    334|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    334|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 42, False: 292]
  ------------------
   67|     42|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 41]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     42|  } else
   72|    292|#endif
   73|    292|  {
   74|    292|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 12, False: 280]
  ------------------
   75|     12|      return false;
   76|     12|    }
   77|    292|  }
   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|    321|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 4, False: 317]
  ------------------
   83|      4|    return false;
   84|      4|  }
   85|    317|  probability_table_.resize(num_symbols_);
   86|    317|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 3, False: 314]
  ------------------
   87|      3|    return true;
   88|      3|  }
   89|       |  // Decode the table.
   90|   308k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 307k, False: 256]
  ------------------
   91|   307k|    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|   307k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 32, False: 307k]
  ------------------
   95|     32|      return false;
   96|     32|    }
   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|   307k|    const int token = prob_data & 3;
  102|   307k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 14.6k, False: 293k]
  ------------------
  103|  14.6k|      const uint32_t offset = prob_data >> 2;
  104|  14.6k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 18, False: 14.6k]
  ------------------
  105|     18|        return false;
  106|     18|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   528k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 513k, False: 14.6k]
  ------------------
  109|   513k|        probability_table_[i + j] = 0;
  110|   513k|      }
  111|  14.6k|      i += offset;
  112|   293k|    } else {
  113|   293k|      const int extra_bytes = token;
  114|   293k|      uint32_t prob = prob_data >> 2;
  115|   511k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 217k, False: 293k]
  ------------------
  116|   217k|        uint8_t eb;
  117|   217k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 8, False: 217k]
  ------------------
  118|      8|          return false;
  119|      8|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   217k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   217k|      }
  124|   293k|      probability_table_[i] = prob;
  125|   293k|    }
  126|   307k|  }
  127|    256|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 20, False: 236]
  ------------------
  128|     20|    return false;
  129|     20|  }
  130|    236|  return true;
  131|    256|}
_ZNK5draco17RAnsSymbolDecoderILi3EE11num_symbolsEv:
   38|    239|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi3EE13StartDecodingEPNS_13DecoderBufferE:
  135|    236|    DecoderBuffer* buffer) {
  136|    236|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    236|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    236|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    236|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 29, False: 207]
  ------------------
  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|    207|#endif
  146|    207|  {
  147|    207|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 9, False: 198]
  ------------------
  148|      9|      return false;
  149|      9|    }
  150|    207|  }
  151|    226|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 35, False: 191]
  ------------------
  152|     35|    return false;
  153|     35|  }
  154|    191|  const uint8_t* const data_head =
  155|    191|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    191|  buffer->Advance(bytes_encoded);
  158|    191|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 37, False: 154]
  ------------------
  159|     37|    return false;
  160|     37|  }
  161|    154|  return true;
  162|    191|}
_ZN5draco17RAnsSymbolDecoderILi3EE12DecodeSymbolEv:
   43|  15.8M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi3EE11EndDecodingEv:
  165|    154|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    154|  ans_.read_end();
  167|    154|}
_ZN5draco17RAnsSymbolDecoderILi4EEC2Ev:
   33|    180|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi4EE6CreateEPNS_13DecoderBufferE:
   59|    180|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    180|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 180]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    180|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    180|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    180|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 21, False: 159]
  ------------------
   67|     21|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 21]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     21|  } else
   72|    159|#endif
   73|    159|  {
   74|    159|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 7, False: 152]
  ------------------
   75|      7|      return false;
   76|      7|    }
   77|    159|  }
   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|    173|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 8, False: 165]
  ------------------
   83|      8|    return false;
   84|      8|  }
   85|    165|  probability_table_.resize(num_symbols_);
   86|    165|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 1, False: 164]
  ------------------
   87|      1|    return true;
   88|      1|  }
   89|       |  // Decode the table.
   90|  77.0k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 76.9k, False: 122]
  ------------------
   91|  76.9k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  76.9k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 19, False: 76.9k]
  ------------------
   95|     19|      return false;
   96|     19|    }
   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|  76.9k|    const int token = prob_data & 3;
  102|  76.9k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 31.9k, False: 44.9k]
  ------------------
  103|  31.9k|      const uint32_t offset = prob_data >> 2;
  104|  31.9k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 13, False: 31.9k]
  ------------------
  105|     13|        return false;
  106|     13|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   943k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 911k, False: 31.9k]
  ------------------
  109|   911k|        probability_table_[i + j] = 0;
  110|   911k|      }
  111|  31.9k|      i += offset;
  112|  44.9k|    } else {
  113|  44.9k|      const int extra_bytes = token;
  114|  44.9k|      uint32_t prob = prob_data >> 2;
  115|  77.0k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 32.1k, False: 44.9k]
  ------------------
  116|  32.1k|        uint8_t eb;
  117|  32.1k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 10, False: 32.1k]
  ------------------
  118|     10|          return false;
  119|     10|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  32.1k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  32.1k|      }
  124|  44.9k|      probability_table_[i] = prob;
  125|  44.9k|    }
  126|  76.9k|  }
  127|    122|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 5, False: 117]
  ------------------
  128|      5|    return false;
  129|      5|  }
  130|    117|  return true;
  131|    122|}
_ZNK5draco17RAnsSymbolDecoderILi4EE11num_symbolsEv:
   38|    118|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi4EE13StartDecodingEPNS_13DecoderBufferE:
  135|    117|    DecoderBuffer* buffer) {
  136|    117|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    117|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    117|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    117|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 14, False: 103]
  ------------------
  140|     14|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 14]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     14|  } else
  145|    103|#endif
  146|    103|  {
  147|    103|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 2, False: 101]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|    103|  }
  151|    115|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 20, False: 95]
  ------------------
  152|     20|    return false;
  153|     20|  }
  154|     95|  const uint8_t* const data_head =
  155|     95|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     95|  buffer->Advance(bytes_encoded);
  158|     95|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 37, False: 58]
  ------------------
  159|     37|    return false;
  160|     37|  }
  161|     58|  return true;
  162|     95|}
_ZN5draco17RAnsSymbolDecoderILi4EE12DecodeSymbolEv:
   43|  2.20M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi4EE11EndDecodingEv:
  165|     58|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     58|  ans_.read_end();
  167|     58|}
_ZN5draco17RAnsSymbolDecoderILi6EEC2Ev:
   33|    298|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi6EE6CreateEPNS_13DecoderBufferE:
   59|    298|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    298|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 298]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    298|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    298|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    298|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 29, False: 269]
  ------------------
   67|     29|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 29]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     29|  } else
   72|    269|#endif
   73|    269|  {
   74|    269|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 1, False: 268]
  ------------------
   75|      1|      return false;
   76|      1|    }
   77|    269|  }
   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|    297|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 6, False: 291]
  ------------------
   83|      6|    return false;
   84|      6|  }
   85|    291|  probability_table_.resize(num_symbols_);
   86|    291|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 1, False: 290]
  ------------------
   87|      1|    return true;
   88|      1|  }
   89|       |  // Decode the table.
   90|   118k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 117k, False: 231]
  ------------------
   91|   117k|    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|   117k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 34, False: 117k]
  ------------------
   95|     34|      return false;
   96|     34|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   117k|    const int token = prob_data & 3;
  102|   117k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 51.1k, False: 66.7k]
  ------------------
  103|  51.1k|      const uint32_t offset = prob_data >> 2;
  104|  51.1k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 14, False: 51.1k]
  ------------------
  105|     14|        return false;
  106|     14|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  1.96M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 1.91M, False: 51.1k]
  ------------------
  109|  1.91M|        probability_table_[i + j] = 0;
  110|  1.91M|      }
  111|  51.1k|      i += offset;
  112|  66.7k|    } else {
  113|  66.7k|      const int extra_bytes = token;
  114|  66.7k|      uint32_t prob = prob_data >> 2;
  115|   109k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 42.8k, False: 66.7k]
  ------------------
  116|  42.8k|        uint8_t eb;
  117|  42.8k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 11, False: 42.8k]
  ------------------
  118|     11|          return false;
  119|     11|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  42.8k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  42.8k|      }
  124|  66.7k|      probability_table_[i] = prob;
  125|  66.7k|    }
  126|   117k|  }
  127|    231|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 14, False: 217]
  ------------------
  128|     14|    return false;
  129|     14|  }
  130|    217|  return true;
  131|    231|}
_ZNK5draco17RAnsSymbolDecoderILi6EE11num_symbolsEv:
   38|    218|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi6EE13StartDecodingEPNS_13DecoderBufferE:
  135|    217|    DecoderBuffer* buffer) {
  136|    217|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    217|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    217|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    217|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 17, False: 200]
  ------------------
  140|     17|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 17]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     17|  } else
  145|    200|#endif
  146|    200|  {
  147|    200|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 10, False: 190]
  ------------------
  148|     10|      return false;
  149|     10|    }
  150|    200|  }
  151|    207|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 25, False: 182]
  ------------------
  152|     25|    return false;
  153|     25|  }
  154|    182|  const uint8_t* const data_head =
  155|    182|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    182|  buffer->Advance(bytes_encoded);
  158|    182|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 28, False: 154]
  ------------------
  159|     28|    return false;
  160|     28|  }
  161|    154|  return true;
  162|    182|}
_ZN5draco17RAnsSymbolDecoderILi6EE12DecodeSymbolEv:
   43|  3.86M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi6EE11EndDecodingEv:
  165|    154|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    154|  ans_.read_end();
  167|    154|}
_ZN5draco17RAnsSymbolDecoderILi7EEC2Ev:
   33|    386|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi7EE6CreateEPNS_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: 41, False: 345]
  ------------------
   67|     41|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 39]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     41|  } else
   72|    345|#endif
   73|    345|  {
   74|    345|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 7, False: 338]
  ------------------
   75|      7|      return false;
   76|      7|    }
   77|    345|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    377|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 2, False: 375]
  ------------------
   83|      2|    return false;
   84|      2|  }
   85|    375|  probability_table_.resize(num_symbols_);
   86|    375|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 5, False: 370]
  ------------------
   87|      5|    return true;
   88|      5|  }
   89|       |  // Decode the table.
   90|   181k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 181k, False: 296]
  ------------------
   91|   181k|    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|   181k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 22, False: 181k]
  ------------------
   95|     22|      return false;
   96|     22|    }
   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|   181k|    const int token = prob_data & 3;
  102|   181k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 74.8k, False: 106k]
  ------------------
  103|  74.8k|      const uint32_t offset = prob_data >> 2;
  104|  74.8k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 42, False: 74.8k]
  ------------------
  105|     42|        return false;
  106|     42|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  2.10M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 2.02M, False: 74.8k]
  ------------------
  109|  2.02M|        probability_table_[i + j] = 0;
  110|  2.02M|      }
  111|  74.8k|      i += offset;
  112|   106k|    } else {
  113|   106k|      const int extra_bytes = token;
  114|   106k|      uint32_t prob = prob_data >> 2;
  115|   198k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 91.6k, False: 106k]
  ------------------
  116|  91.6k|        uint8_t eb;
  117|  91.6k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 10, False: 91.6k]
  ------------------
  118|     10|          return false;
  119|     10|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  91.6k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  91.6k|      }
  124|   106k|      probability_table_[i] = prob;
  125|   106k|    }
  126|   181k|  }
  127|    296|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 16, False: 280]
  ------------------
  128|     16|    return false;
  129|     16|  }
  130|    280|  return true;
  131|    296|}
_ZNK5draco17RAnsSymbolDecoderILi7EE11num_symbolsEv:
   38|    285|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi7EE13StartDecodingEPNS_13DecoderBufferE:
  135|    280|    DecoderBuffer* buffer) {
  136|    280|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    280|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    280|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    280|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 14, False: 266]
  ------------------
  140|     14|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 13]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     14|  } else
  145|    266|#endif
  146|    266|  {
  147|    266|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 7, False: 259]
  ------------------
  148|      7|      return false;
  149|      7|    }
  150|    266|  }
  151|    272|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 30, False: 242]
  ------------------
  152|     30|    return false;
  153|     30|  }
  154|    242|  const uint8_t* const data_head =
  155|    242|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    242|  buffer->Advance(bytes_encoded);
  158|    242|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 26, False: 216]
  ------------------
  159|     26|    return false;
  160|     26|  }
  161|    216|  return true;
  162|    242|}
_ZN5draco17RAnsSymbolDecoderILi7EE12DecodeSymbolEv:
   43|   126M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi7EE11EndDecodingEv:
  165|    216|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    216|  ans_.read_end();
  167|    216|}
_ZN5draco17RAnsSymbolDecoderILi8EEC2Ev:
   33|    237|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi8EE6CreateEPNS_13DecoderBufferE:
   59|    237|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    237|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 237]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    237|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    237|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    237|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 44, False: 193]
  ------------------
   67|     44|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 3, False: 41]
  ------------------
   68|      3|      return false;
   69|      3|    }
   70|       |
   71|     44|  } else
   72|    193|#endif
   73|    193|  {
   74|    193|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 185]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    193|  }
   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|    226|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 9, False: 217]
  ------------------
   83|      9|    return false;
   84|      9|  }
   85|    217|  probability_table_.resize(num_symbols_);
   86|    217|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 217]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|  1.44M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.44M, False: 164]
  ------------------
   91|  1.44M|    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.44M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 32, False: 1.44M]
  ------------------
   95|     32|      return false;
   96|     32|    }
   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.44M|    const int token = prob_data & 3;
  102|  1.44M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 1.34M, False: 99.3k]
  ------------------
  103|  1.34M|      const uint32_t offset = prob_data >> 2;
  104|  1.34M|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 16, False: 1.34M]
  ------------------
  105|     16|        return false;
  106|     16|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  71.0M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 69.6M, False: 1.34M]
  ------------------
  109|  69.6M|        probability_table_[i + j] = 0;
  110|  69.6M|      }
  111|  1.34M|      i += offset;
  112|  1.34M|    } else {
  113|  99.3k|      const int extra_bytes = token;
  114|  99.3k|      uint32_t prob = prob_data >> 2;
  115|   180k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 80.8k, False: 99.3k]
  ------------------
  116|  80.8k|        uint8_t eb;
  117|  80.8k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 5, False: 80.7k]
  ------------------
  118|      5|          return false;
  119|      5|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  80.7k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  80.7k|      }
  124|  99.3k|      probability_table_[i] = prob;
  125|  99.3k|    }
  126|  1.44M|  }
  127|    164|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 4, False: 160]
  ------------------
  128|      4|    return false;
  129|      4|  }
  130|    160|  return true;
  131|    164|}
_ZNK5draco17RAnsSymbolDecoderILi8EE11num_symbolsEv:
   38|    160|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi8EE13StartDecodingEPNS_13DecoderBufferE:
  135|    160|    DecoderBuffer* buffer) {
  136|    160|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    160|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    160|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    160|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 34, False: 126]
  ------------------
  140|     34|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 33]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     34|  } else
  145|    126|#endif
  146|    126|  {
  147|    126|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 126]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    126|  }
  151|    159|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 41, False: 118]
  ------------------
  152|     41|    return false;
  153|     41|  }
  154|    118|  const uint8_t* const data_head =
  155|    118|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    118|  buffer->Advance(bytes_encoded);
  158|    118|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 32, False: 86]
  ------------------
  159|     32|    return false;
  160|     32|  }
  161|     86|  return true;
  162|    118|}
_ZN5draco17RAnsSymbolDecoderILi8EE12DecodeSymbolEv:
   43|   167M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi8EE11EndDecodingEv:
  165|     86|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     86|  ans_.read_end();
  167|     86|}
_ZN5draco17RAnsSymbolDecoderILi9EEC2Ev:
   33|    245|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi9EE6CreateEPNS_13DecoderBufferE:
   59|    245|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    245|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 245]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    245|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    245|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    245|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 17, False: 228]
  ------------------
   67|     17|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 3, False: 14]
  ------------------
   68|      3|      return false;
   69|      3|    }
   70|       |
   71|     17|  } else
   72|    228|#endif
   73|    228|  {
   74|    228|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 220]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    228|  }
   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|    234|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 12, False: 222]
  ------------------
   83|     12|    return false;
   84|     12|  }
   85|    222|  probability_table_.resize(num_symbols_);
   86|    222|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 5, False: 217]
  ------------------
   87|      5|    return true;
   88|      5|  }
   89|       |  // Decode the table.
   90|  1.10M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.10M, False: 170]
  ------------------
   91|  1.10M|    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.10M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 17, False: 1.10M]
  ------------------
   95|     17|      return false;
   96|     17|    }
   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.10M|    const int token = prob_data & 3;
  102|  1.10M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 291k, False: 813k]
  ------------------
  103|   291k|      const uint32_t offset = prob_data >> 2;
  104|   291k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 14, False: 291k]
  ------------------
  105|     14|        return false;
  106|     14|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  10.7M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 10.4M, False: 291k]
  ------------------
  109|  10.4M|        probability_table_[i + j] = 0;
  110|  10.4M|      }
  111|   291k|      i += offset;
  112|   813k|    } else {
  113|   813k|      const int extra_bytes = token;
  114|   813k|      uint32_t prob = prob_data >> 2;
  115|  1.30M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 491k, False: 813k]
  ------------------
  116|   491k|        uint8_t eb;
  117|   491k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 16, False: 491k]
  ------------------
  118|     16|          return false;
  119|     16|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   491k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   491k|      }
  124|   813k|      probability_table_[i] = prob;
  125|   813k|    }
  126|  1.10M|  }
  127|    170|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 30, False: 140]
  ------------------
  128|     30|    return false;
  129|     30|  }
  130|    140|  return true;
  131|    170|}
_ZNK5draco17RAnsSymbolDecoderILi9EE11num_symbolsEv:
   38|    145|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi9EE13StartDecodingEPNS_13DecoderBufferE:
  135|    140|    DecoderBuffer* buffer) {
  136|    140|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    140|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    140|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    140|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 2, False: 138]
  ------------------
  140|      2|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 2]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      2|  } else
  145|    138|#endif
  146|    138|  {
  147|    138|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 10, False: 128]
  ------------------
  148|     10|      return false;
  149|     10|    }
  150|    138|  }
  151|    130|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 7, False: 123]
  ------------------
  152|      7|    return false;
  153|      7|  }
  154|    123|  const uint8_t* const data_head =
  155|    123|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    123|  buffer->Advance(bytes_encoded);
  158|    123|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 41, False: 82]
  ------------------
  159|     41|    return false;
  160|     41|  }
  161|     82|  return true;
  162|    123|}
_ZN5draco17RAnsSymbolDecoderILi9EE12DecodeSymbolEv:
   43|   522k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi9EE11EndDecodingEv:
  165|     82|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     82|  ans_.read_end();
  167|     82|}
_ZN5draco17RAnsSymbolDecoderILi10EEC2Ev:
   33|    199|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi10EE6CreateEPNS_13DecoderBufferE:
   59|    199|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    199|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 199]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    199|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    199|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    199|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 12, False: 187]
  ------------------
   67|     12|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 11]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     12|  } else
   72|    187|#endif
   73|    187|  {
   74|    187|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 1, False: 186]
  ------------------
   75|      1|      return false;
   76|      1|    }
   77|    187|  }
   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|    197|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 16, False: 181]
  ------------------
   83|     16|    return false;
   84|     16|  }
   85|    181|  probability_table_.resize(num_symbols_);
   86|    181|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 1, False: 180]
  ------------------
   87|      1|    return true;
   88|      1|  }
   89|       |  // Decode the table.
   90|  27.3k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 27.2k, False: 120]
  ------------------
   91|  27.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|  27.2k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 27, False: 27.1k]
  ------------------
   95|     27|      return false;
   96|     27|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  27.1k|    const int token = prob_data & 3;
  102|  27.1k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 16.8k, False: 10.3k]
  ------------------
  103|  16.8k|      const uint32_t offset = prob_data >> 2;
  104|  16.8k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 17, False: 16.8k]
  ------------------
  105|     17|        return false;
  106|     17|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   882k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 866k, False: 16.8k]
  ------------------
  109|   866k|        probability_table_[i + j] = 0;
  110|   866k|      }
  111|  16.8k|      i += offset;
  112|  16.8k|    } else {
  113|  10.3k|      const int extra_bytes = token;
  114|  10.3k|      uint32_t prob = prob_data >> 2;
  115|  17.2k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 6.91k, False: 10.3k]
  ------------------
  116|  6.91k|        uint8_t eb;
  117|  6.91k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 16, False: 6.90k]
  ------------------
  118|     16|          return false;
  119|     16|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  6.90k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  6.90k|      }
  124|  10.3k|      probability_table_[i] = prob;
  125|  10.3k|    }
  126|  27.1k|  }
  127|    120|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 29, False: 91]
  ------------------
  128|     29|    return false;
  129|     29|  }
  130|     91|  return true;
  131|    120|}
_ZNK5draco17RAnsSymbolDecoderILi10EE11num_symbolsEv:
   38|     92|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi10EE13StartDecodingEPNS_13DecoderBufferE:
  135|     91|    DecoderBuffer* buffer) {
  136|     91|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     91|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     91|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     91|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 91]
  ------------------
  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|     91|#endif
  146|     91|  {
  147|     91|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 1, False: 90]
  ------------------
  148|      1|      return false;
  149|      1|    }
  150|     91|  }
  151|     90|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 6, False: 84]
  ------------------
  152|      6|    return false;
  153|      6|  }
  154|     84|  const uint8_t* const data_head =
  155|     84|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     84|  buffer->Advance(bytes_encoded);
  158|     84|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 34, False: 50]
  ------------------
  159|     34|    return false;
  160|     34|  }
  161|     50|  return true;
  162|     84|}
_ZN5draco17RAnsSymbolDecoderILi10EE12DecodeSymbolEv:
   43|   302k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi10EE11EndDecodingEv:
  165|     50|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     50|  ans_.read_end();
  167|     50|}
_ZN5draco17RAnsSymbolDecoderILi11EEC2Ev:
   33|    261|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi11EE6CreateEPNS_13DecoderBufferE:
   59|    261|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    261|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 261]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    261|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    261|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    261|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 49, False: 212]
  ------------------
   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|    212|#endif
   73|    212|  {
   74|    212|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 204]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    212|  }
   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|    250|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 20, False: 230]
  ------------------
   83|     20|    return false;
   84|     20|  }
   85|    230|  probability_table_.resize(num_symbols_);
   86|    230|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 2, False: 228]
  ------------------
   87|      2|    return true;
   88|      2|  }
   89|       |  // Decode the table.
   90|  42.8k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 42.7k, False: 165]
  ------------------
   91|  42.7k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  42.7k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 30, False: 42.6k]
  ------------------
   95|     30|      return false;
   96|     30|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  42.6k|    const int token = prob_data & 3;
  102|  42.6k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 12.3k, False: 30.3k]
  ------------------
  103|  12.3k|      const uint32_t offset = prob_data >> 2;
  104|  12.3k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 14, False: 12.3k]
  ------------------
  105|     14|        return false;
  106|     14|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   402k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 390k, False: 12.3k]
  ------------------
  109|   390k|        probability_table_[i + j] = 0;
  110|   390k|      }
  111|  12.3k|      i += offset;
  112|  30.3k|    } else {
  113|  30.3k|      const int extra_bytes = token;
  114|  30.3k|      uint32_t prob = prob_data >> 2;
  115|  54.9k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 24.6k, False: 30.2k]
  ------------------
  116|  24.6k|        uint8_t eb;
  117|  24.6k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 19, False: 24.6k]
  ------------------
  118|     19|          return false;
  119|     19|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  24.6k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  24.6k|      }
  124|  30.2k|      probability_table_[i] = prob;
  125|  30.2k|    }
  126|  42.6k|  }
  127|    165|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 37, False: 128]
  ------------------
  128|     37|    return false;
  129|     37|  }
  130|    128|  return true;
  131|    165|}
_ZNK5draco17RAnsSymbolDecoderILi11EE11num_symbolsEv:
   38|    130|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi11EE13StartDecodingEPNS_13DecoderBufferE:
  135|    128|    DecoderBuffer* buffer) {
  136|    128|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    128|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    128|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    128|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 9, False: 119]
  ------------------
  140|      9|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 9]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      9|  } 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|    128|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 28, False: 100]
  ------------------
  152|     28|    return false;
  153|     28|  }
  154|    100|  const uint8_t* const data_head =
  155|    100|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    100|  buffer->Advance(bytes_encoded);
  158|    100|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 40, False: 60]
  ------------------
  159|     40|    return false;
  160|     40|  }
  161|     60|  return true;
  162|    100|}
_ZN5draco17RAnsSymbolDecoderILi11EE12DecodeSymbolEv:
   43|   233k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi11EE11EndDecodingEv:
  165|     60|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     60|  ans_.read_end();
  167|     60|}
_ZN5draco17RAnsSymbolDecoderILi12EEC2Ev:
   33|    241|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi12EE6CreateEPNS_13DecoderBufferE:
   59|    241|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    241|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 241]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    241|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    241|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    241|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 22, False: 219]
  ------------------
   67|     22|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 20]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     22|  } else
   72|    219|#endif
   73|    219|  {
   74|    219|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 219]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    219|  }
   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|    239|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 10, False: 229]
  ------------------
   83|     10|    return false;
   84|     10|  }
   85|    229|  probability_table_.resize(num_symbols_);
   86|    229|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 1, False: 228]
  ------------------
   87|      1|    return true;
   88|      1|  }
   89|       |  // Decode the table.
   90|   168k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 168k, False: 169]
  ------------------
   91|   168k|    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|   168k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 28, False: 168k]
  ------------------
   95|     28|      return false;
   96|     28|    }
   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|   168k|    const int token = prob_data & 3;
  102|   168k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 77.0k, False: 91.2k]
  ------------------
  103|  77.0k|      const uint32_t offset = prob_data >> 2;
  104|  77.0k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 24, False: 77.0k]
  ------------------
  105|     24|        return false;
  106|     24|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  2.24M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 2.16M, False: 77.0k]
  ------------------
  109|  2.16M|        probability_table_[i + j] = 0;
  110|  2.16M|      }
  111|  77.0k|      i += offset;
  112|  91.2k|    } else {
  113|  91.2k|      const int extra_bytes = token;
  114|  91.2k|      uint32_t prob = prob_data >> 2;
  115|   175k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 84.0k, False: 91.2k]
  ------------------
  116|  84.0k|        uint8_t eb;
  117|  84.0k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 7, False: 84.0k]
  ------------------
  118|      7|          return false;
  119|      7|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  84.0k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  84.0k|      }
  124|  91.2k|      probability_table_[i] = prob;
  125|  91.2k|    }
  126|   168k|  }
  127|    169|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 27, False: 142]
  ------------------
  128|     27|    return false;
  129|     27|  }
  130|    142|  return true;
  131|    169|}
_ZNK5draco17RAnsSymbolDecoderILi12EE11num_symbolsEv:
   38|    143|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi12EE13StartDecodingEPNS_13DecoderBufferE:
  135|    142|    DecoderBuffer* buffer) {
  136|    142|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    142|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    142|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    142|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 8, False: 134]
  ------------------
  140|      8|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 8]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      8|  } else
  145|    134|#endif
  146|    134|  {
  147|    134|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 9, False: 125]
  ------------------
  148|      9|      return false;
  149|      9|    }
  150|    134|  }
  151|    133|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 25, False: 108]
  ------------------
  152|     25|    return false;
  153|     25|  }
  154|    108|  const uint8_t* const data_head =
  155|    108|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    108|  buffer->Advance(bytes_encoded);
  158|    108|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 46, False: 62]
  ------------------
  159|     46|    return false;
  160|     46|  }
  161|     62|  return true;
  162|    108|}
_ZN5draco17RAnsSymbolDecoderILi12EE12DecodeSymbolEv:
   43|   300k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi12EE11EndDecodingEv:
  165|     62|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     62|  ans_.read_end();
  167|     62|}
_ZN5draco17RAnsSymbolDecoderILi13EEC2Ev:
   33|    334|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi13EE6CreateEPNS_13DecoderBufferE:
   59|    334|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    334|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 334]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    334|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    334|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    334|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 30, False: 304]
  ------------------
   67|     30|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 30]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     30|  } else
   72|    304|#endif
   73|    304|  {
   74|    304|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 7, False: 297]
  ------------------
   75|      7|      return false;
   76|      7|    }
   77|    304|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    327|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 8, False: 319]
  ------------------
   83|      8|    return false;
   84|      8|  }
   85|    319|  probability_table_.resize(num_symbols_);
   86|    319|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 39, False: 280]
  ------------------
   87|     39|    return true;
   88|     39|  }
   89|       |  // Decode the table.
   90|  2.28M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 2.28M, False: 193]
  ------------------
   91|  2.28M|    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.28M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 41, False: 2.28M]
  ------------------
   95|     41|      return false;
   96|     41|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  2.28M|    const int token = prob_data & 3;
  102|  2.28M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 744k, False: 1.54M]
  ------------------
  103|   744k|      const uint32_t offset = prob_data >> 2;
  104|   744k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 34, False: 744k]
  ------------------
  105|     34|        return false;
  106|     34|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  26.1M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 25.4M, False: 744k]
  ------------------
  109|  25.4M|        probability_table_[i + j] = 0;
  110|  25.4M|      }
  111|   744k|      i += offset;
  112|  1.54M|    } else {
  113|  1.54M|      const int extra_bytes = token;
  114|  1.54M|      uint32_t prob = prob_data >> 2;
  115|  3.07M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 1.53M, False: 1.54M]
  ------------------
  116|  1.53M|        uint8_t eb;
  117|  1.53M|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 12, False: 1.53M]
  ------------------
  118|     12|          return false;
  119|     12|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  1.53M|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  1.53M|      }
  124|  1.54M|      probability_table_[i] = prob;
  125|  1.54M|    }
  126|  2.28M|  }
  127|    193|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 56, False: 137]
  ------------------
  128|     56|    return false;
  129|     56|  }
  130|    137|  return true;
  131|    193|}
_ZNK5draco17RAnsSymbolDecoderILi13EE11num_symbolsEv:
   38|    176|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi13EE13StartDecodingEPNS_13DecoderBufferE:
  135|    137|    DecoderBuffer* buffer) {
  136|    137|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    137|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    137|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    137|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 13, False: 124]
  ------------------
  140|     13|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 13]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     13|  } else
  145|    124|#endif
  146|    124|  {
  147|    124|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 10, False: 114]
  ------------------
  148|     10|      return false;
  149|     10|    }
  150|    124|  }
  151|    127|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 25, False: 102]
  ------------------
  152|     25|    return false;
  153|     25|  }
  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: 49, False: 53]
  ------------------
  159|     49|    return false;
  160|     49|  }
  161|     53|  return true;
  162|    102|}
_ZN5draco17RAnsSymbolDecoderILi13EE12DecodeSymbolEv:
   43|   440k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi13EE11EndDecodingEv:
  165|     53|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     53|  ans_.read_end();
  167|     53|}
_ZN5draco17RAnsSymbolDecoderILi14EEC2Ev:
   33|    299|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi14EE6CreateEPNS_13DecoderBufferE:
   59|    299|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    299|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 299]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    299|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    299|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    299|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 63, False: 236]
  ------------------
   67|     63|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 63]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     63|  } else
   72|    236|#endif
   73|    236|  {
   74|    236|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 6, False: 230]
  ------------------
   75|      6|      return false;
   76|      6|    }
   77|    236|  }
   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|    293|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 38, False: 255]
  ------------------
   83|     38|    return false;
   84|     38|  }
   85|    255|  probability_table_.resize(num_symbols_);
   86|    255|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 1, False: 254]
  ------------------
   87|      1|    return true;
   88|      1|  }
   89|       |  // Decode the table.
   90|  1.53M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.53M, False: 161]
  ------------------
   91|  1.53M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  1.53M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 38, False: 1.53M]
  ------------------
   95|     38|      return false;
   96|     38|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  1.53M|    const int token = prob_data & 3;
  102|  1.53M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 997k, False: 535k]
  ------------------
  103|   997k|      const uint32_t offset = prob_data >> 2;
  104|   997k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 33, False: 997k]
  ------------------
  105|     33|        return false;
  106|     33|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  28.9M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 27.9M, False: 997k]
  ------------------
  109|  27.9M|        probability_table_[i + j] = 0;
  110|  27.9M|      }
  111|   997k|      i += offset;
  112|   997k|    } else {
  113|   535k|      const int extra_bytes = token;
  114|   535k|      uint32_t prob = prob_data >> 2;
  115|  1.25M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 719k, False: 535k]
  ------------------
  116|   719k|        uint8_t eb;
  117|   719k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 22, False: 719k]
  ------------------
  118|     22|          return false;
  119|     22|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   719k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   719k|      }
  124|   535k|      probability_table_[i] = prob;
  125|   535k|    }
  126|  1.53M|  }
  127|    161|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 13, False: 148]
  ------------------
  128|     13|    return false;
  129|     13|  }
  130|    148|  return true;
  131|    161|}
_ZNK5draco17RAnsSymbolDecoderILi14EE11num_symbolsEv:
   38|    149|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi14EE13StartDecodingEPNS_13DecoderBufferE:
  135|    148|    DecoderBuffer* buffer) {
  136|    148|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    148|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    148|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    148|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 8, False: 140]
  ------------------
  140|      8|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 8]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      8|  } else
  145|    140|#endif
  146|    140|  {
  147|    140|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 9, False: 131]
  ------------------
  148|      9|      return false;
  149|      9|    }
  150|    140|  }
  151|    139|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 16, False: 123]
  ------------------
  152|     16|    return false;
  153|     16|  }
  154|    123|  const uint8_t* const data_head =
  155|    123|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    123|  buffer->Advance(bytes_encoded);
  158|    123|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 41, False: 82]
  ------------------
  159|     41|    return false;
  160|     41|  }
  161|     82|  return true;
  162|    123|}
_ZN5draco17RAnsSymbolDecoderILi14EE12DecodeSymbolEv:
   43|  5.02M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi14EE11EndDecodingEv:
  165|     82|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     82|  ans_.read_end();
  167|     82|}
_ZN5draco17RAnsSymbolDecoderILi15EEC2Ev:
   33|    317|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi15EE6CreateEPNS_13DecoderBufferE:
   59|    317|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    317|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 317]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    317|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    317|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    317|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 68, False: 249]
  ------------------
   67|     68|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 67]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     68|  } else
   72|    249|#endif
   73|    249|  {
   74|    249|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 249]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|    249|  }
   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|    316|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 15, False: 301]
  ------------------
   83|     15|    return false;
   84|     15|  }
   85|    301|  probability_table_.resize(num_symbols_);
   86|    301|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 4, False: 297]
  ------------------
   87|      4|    return true;
   88|      4|  }
   89|       |  // Decode the table.
   90|   888k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 887k, False: 206]
  ------------------
   91|   887k|    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|   887k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 51, False: 887k]
  ------------------
   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|   887k|    const int token = prob_data & 3;
  102|   887k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 413k, False: 473k]
  ------------------
  103|   413k|      const uint32_t offset = prob_data >> 2;
  104|   413k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 28, False: 413k]
  ------------------
  105|     28|        return false;
  106|     28|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  15.2M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 14.8M, False: 413k]
  ------------------
  109|  14.8M|        probability_table_[i + j] = 0;
  110|  14.8M|      }
  111|   413k|      i += offset;
  112|   473k|    } else {
  113|   473k|      const int extra_bytes = token;
  114|   473k|      uint32_t prob = prob_data >> 2;
  115|   872k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 398k, False: 473k]
  ------------------
  116|   398k|        uint8_t eb;
  117|   398k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 12, False: 398k]
  ------------------
  118|     12|          return false;
  119|     12|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   398k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   398k|      }
  124|   473k|      probability_table_[i] = prob;
  125|   473k|    }
  126|   887k|  }
  127|    206|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 27, False: 179]
  ------------------
  128|     27|    return false;
  129|     27|  }
  130|    179|  return true;
  131|    206|}
_ZNK5draco17RAnsSymbolDecoderILi15EE11num_symbolsEv:
   38|    183|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi15EE13StartDecodingEPNS_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: 34, False: 145]
  ------------------
  140|     34|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 34]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     34|  } else
  145|    145|#endif
  146|    145|  {
  147|    145|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 10, False: 135]
  ------------------
  148|     10|      return false;
  149|     10|    }
  150|    145|  }
  151|    169|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 53, False: 116]
  ------------------
  152|     53|    return false;
  153|     53|  }
  154|    116|  const uint8_t* const data_head =
  155|    116|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    116|  buffer->Advance(bytes_encoded);
  158|    116|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 44, False: 72]
  ------------------
  159|     44|    return false;
  160|     44|  }
  161|     72|  return true;
  162|    116|}
_ZN5draco17RAnsSymbolDecoderILi15EE12DecodeSymbolEv:
   43|  8.56M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi15EE11EndDecodingEv:
  165|     72|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     72|  ans_.read_end();
  167|     72|}
_ZN5draco17RAnsSymbolDecoderILi16EEC2Ev:
   33|    210|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi16EE6CreateEPNS_13DecoderBufferE:
   59|    210|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    210|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 210]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    210|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    210|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    210|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 30, False: 180]
  ------------------
   67|     30|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 30]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     30|  } else
   72|    180|#endif
   73|    180|  {
   74|    180|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 6, False: 174]
  ------------------
   75|      6|      return false;
   76|      6|    }
   77|    180|  }
   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|    204|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 4, False: 200]
  ------------------
   83|      4|    return false;
   84|      4|  }
   85|    200|  probability_table_.resize(num_symbols_);
   86|    200|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 3, False: 197]
  ------------------
   87|      3|    return true;
   88|      3|  }
   89|       |  // Decode the table.
   90|   114k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 114k, False: 140]
  ------------------
   91|   114k|    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|   114k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 31, False: 114k]
  ------------------
   95|     31|      return false;
   96|     31|    }
   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|   114k|    const int token = prob_data & 3;
  102|   114k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 35.7k, False: 78.4k]
  ------------------
  103|  35.7k|      const uint32_t offset = prob_data >> 2;
  104|  35.7k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 18, False: 35.6k]
  ------------------
  105|     18|        return false;
  106|     18|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   970k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 934k, False: 35.6k]
  ------------------
  109|   934k|        probability_table_[i + j] = 0;
  110|   934k|      }
  111|  35.6k|      i += offset;
  112|  78.4k|    } else {
  113|  78.4k|      const int extra_bytes = token;
  114|  78.4k|      uint32_t prob = prob_data >> 2;
  115|   157k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 79.4k, False: 78.4k]
  ------------------
  116|  79.4k|        uint8_t eb;
  117|  79.4k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 8, False: 79.4k]
  ------------------
  118|      8|          return false;
  119|      8|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  79.4k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  79.4k|      }
  124|  78.4k|      probability_table_[i] = prob;
  125|  78.4k|    }
  126|   114k|  }
  127|    140|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 20, False: 120]
  ------------------
  128|     20|    return false;
  129|     20|  }
  130|    120|  return true;
  131|    140|}
_ZNK5draco17RAnsSymbolDecoderILi16EE11num_symbolsEv:
   38|    123|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi16EE13StartDecodingEPNS_13DecoderBufferE:
  135|    120|    DecoderBuffer* buffer) {
  136|    120|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    120|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    120|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    120|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 10, False: 110]
  ------------------
  140|     10|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 10]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     10|  } else
  145|    110|#endif
  146|    110|  {
  147|    110|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 1, False: 109]
  ------------------
  148|      1|      return false;
  149|      1|    }
  150|    110|  }
  151|    119|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 21, False: 98]
  ------------------
  152|     21|    return false;
  153|     21|  }
  154|     98|  const uint8_t* const data_head =
  155|     98|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     98|  buffer->Advance(bytes_encoded);
  158|     98|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 40, False: 58]
  ------------------
  159|     40|    return false;
  160|     40|  }
  161|     58|  return true;
  162|     98|}
_ZN5draco17RAnsSymbolDecoderILi16EE12DecodeSymbolEv:
   43|  17.2M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi16EE11EndDecodingEv:
  165|     58|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     58|  ans_.read_end();
  167|     58|}
_ZN5draco17RAnsSymbolDecoderILi17EEC2Ev:
   33|    243|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi17EE6CreateEPNS_13DecoderBufferE:
   59|    243|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    243|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 243]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    243|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    243|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    243|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 43, False: 200]
  ------------------
   67|     43|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 43]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     43|  } else
   72|    200|#endif
   73|    200|  {
   74|    200|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 192]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    200|  }
   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|    235|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 3, False: 232]
  ------------------
   83|      3|    return false;
   84|      3|  }
   85|    232|  probability_table_.resize(num_symbols_);
   86|    232|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 1, False: 231]
  ------------------
   87|      1|    return true;
   88|      1|  }
   89|       |  // Decode the table.
   90|  2.26M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 2.26M, False: 137]
  ------------------
   91|  2.26M|    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.26M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 45, False: 2.26M]
  ------------------
   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|  2.26M|    const int token = prob_data & 3;
  102|  2.26M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 1.34M, False: 920k]
  ------------------
  103|  1.34M|      const uint32_t offset = prob_data >> 2;
  104|  1.34M|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 29, False: 1.34M]
  ------------------
  105|     29|        return false;
  106|     29|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  49.4M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 48.0M, False: 1.34M]
  ------------------
  109|  48.0M|        probability_table_[i + j] = 0;
  110|  48.0M|      }
  111|  1.34M|      i += offset;
  112|  1.34M|    } else {
  113|   920k|      const int extra_bytes = token;
  114|   920k|      uint32_t prob = prob_data >> 2;
  115|  1.50M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 580k, False: 920k]
  ------------------
  116|   580k|        uint8_t eb;
  117|   580k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 20, False: 580k]
  ------------------
  118|     20|          return false;
  119|     20|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   580k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   580k|      }
  124|   920k|      probability_table_[i] = prob;
  125|   920k|    }
  126|  2.26M|  }
  127|    137|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 6, False: 131]
  ------------------
  128|      6|    return false;
  129|      6|  }
  130|    131|  return true;
  131|    137|}
_ZNK5draco17RAnsSymbolDecoderILi17EE11num_symbolsEv:
   38|    132|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi17EE13StartDecodingEPNS_13DecoderBufferE:
  135|    131|    DecoderBuffer* buffer) {
  136|    131|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    131|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    131|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    131|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 18, False: 113]
  ------------------
  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|    113|#endif
  146|    113|  {
  147|    113|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 113]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    113|  }
  151|    131|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 24, False: 107]
  ------------------
  152|     24|    return false;
  153|     24|  }
  154|    107|  const uint8_t* const data_head =
  155|    107|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    107|  buffer->Advance(bytes_encoded);
  158|    107|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 38, False: 69]
  ------------------
  159|     38|    return false;
  160|     38|  }
  161|     69|  return true;
  162|    107|}
_ZN5draco17RAnsSymbolDecoderILi17EE12DecodeSymbolEv:
   43|  6.82M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi17EE11EndDecodingEv:
  165|     69|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     69|  ans_.read_end();
  167|     69|}
_ZN5draco17RAnsSymbolDecoderILi18EEC2Ev:
   33|    233|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi18EE6CreateEPNS_13DecoderBufferE:
   59|    233|    DecoderBuffer* buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    233|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 233]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    233|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    233|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    233|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 59, False: 174]
  ------------------
   67|     59|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 59]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     59|  } else
   72|    174|#endif
   73|    174|  {
   74|    174|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 4, False: 170]
  ------------------
   75|      4|      return false;
   76|      4|    }
   77|    174|  }
   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|    229|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 6, False: 223]
  ------------------
   83|      6|    return false;
   84|      6|  }
   85|    223|  probability_table_.resize(num_symbols_);
   86|    223|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 7, False: 216]
  ------------------
   87|      7|    return true;
   88|      7|  }
   89|       |  // Decode the table.
   90|  1.06M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.06M, False: 149]
  ------------------
   91|  1.06M|    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.06M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 34, False: 1.06M]
  ------------------
   95|     34|      return false;
   96|     34|    }
   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.06M|    const int token = prob_data & 3;
  102|  1.06M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 581k, False: 484k]
  ------------------
  103|   581k|      const uint32_t offset = prob_data >> 2;
  104|   581k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 15, False: 581k]
  ------------------
  105|     15|        return false;
  106|     15|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  16.6M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 16.0M, False: 581k]
  ------------------
  109|  16.0M|        probability_table_[i + j] = 0;
  110|  16.0M|      }
  111|   581k|      i += offset;
  112|   581k|    } else {
  113|   484k|      const int extra_bytes = token;
  114|   484k|      uint32_t prob = prob_data >> 2;
  115|   854k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 369k, False: 484k]
  ------------------
  116|   369k|        uint8_t eb;
  117|   369k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 18, False: 369k]
  ------------------
  118|     18|          return false;
  119|     18|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   369k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   369k|      }
  124|   484k|      probability_table_[i] = prob;
  125|   484k|    }
  126|  1.06M|  }
  127|    149|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 14, False: 135]
  ------------------
  128|     14|    return false;
  129|     14|  }
  130|    135|  return true;
  131|    149|}
_ZNK5draco17RAnsSymbolDecoderILi18EE11num_symbolsEv:
   38|    142|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi18EE13StartDecodingEPNS_13DecoderBufferE:
  135|    135|    DecoderBuffer* buffer) {
  136|    135|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    135|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    135|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    135|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 39, False: 96]
  ------------------
  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|     96|#endif
  146|     96|  {
  147|     96|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 9, False: 87]
  ------------------
  148|      9|      return false;
  149|      9|    }
  150|     96|  }
  151|    126|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 34, False: 92]
  ------------------
  152|     34|    return false;
  153|     34|  }
  154|     92|  const uint8_t* const data_head =
  155|     92|      reinterpret_cast<const uint8_t*>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     92|  buffer->Advance(bytes_encoded);
  158|     92|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 21, False: 71]
  ------------------
  159|     21|    return false;
  160|     21|  }
  161|     71|  return true;
  162|     92|}
_ZN5draco17RAnsSymbolDecoderILi18EE12DecodeSymbolEv:
   43|  7.93M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi18EE11EndDecodingEv:
  165|     71|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     71|  ans_.read_end();
  167|     71|}

_ZN5draco13DecodeSymbolsEjiPNS_13DecoderBufferEPj:
   33|  10.8k|                   DecoderBuffer* src_buffer, uint32_t* out_values) {
   34|  10.8k|  if (num_values == 0) {
  ------------------
  |  Branch (34:7): [True: 31, False: 10.7k]
  ------------------
   35|     31|    return true;
   36|     31|  }
   37|       |  // Decode which scheme to use.
   38|  10.7k|  uint8_t scheme;
   39|  10.7k|  if (!src_buffer->Decode(&scheme)) {
  ------------------
  |  Branch (39:7): [True: 205, False: 10.5k]
  ------------------
   40|    205|    return false;
   41|    205|  }
   42|  10.5k|  if (scheme == SYMBOL_CODING_TAGGED) {
  ------------------
  |  Branch (42:7): [True: 1.04k, False: 9.53k]
  ------------------
   43|  1.04k|    return DecodeTaggedSymbols<RAnsSymbolDecoder>(num_values, num_components,
   44|  1.04k|                                                  src_buffer, out_values);
   45|  9.53k|  } else if (scheme == SYMBOL_CODING_RAW) {
  ------------------
  |  Branch (45:14): [True: 5.30k, False: 4.23k]
  ------------------
   46|  5.30k|    return DecodeRawSymbols<RAnsSymbolDecoder>(num_values, src_buffer,
   47|  5.30k|                                               out_values);
   48|  5.30k|  }
   49|  4.23k|  return false;
   50|  10.5k|}
_ZN5draco19DecodeTaggedSymbolsINS_17RAnsSymbolDecoderEEEbjiPNS_13DecoderBufferEPj:
   54|  1.04k|                         DecoderBuffer* src_buffer, uint32_t* out_values) {
   55|       |  // Decode the encoded data.
   56|  1.04k|  SymbolDecoderT<5> tag_decoder;
   57|  1.04k|  if (!tag_decoder.Create(src_buffer)) {
  ------------------
  |  Branch (57:7): [True: 435, False: 607]
  ------------------
   58|    435|    return false;
   59|    435|  }
   60|       |
   61|    607|  if (!tag_decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (61:7): [True: 227, False: 380]
  ------------------
   62|    227|    return false;
   63|    227|  }
   64|       |
   65|    380|  if (num_values > 0 && tag_decoder.num_symbols() == 0) {
  ------------------
  |  Branch (65:7): [True: 380, False: 0]
  |  Branch (65:25): [True: 54, False: 326]
  ------------------
   66|     54|    return false;  // Wrong number of symbols.
   67|     54|  }
   68|       |
   69|       |  // src_buffer now points behind the encoded tag data (to the place where the
   70|       |  // values are encoded).
   71|    326|  src_buffer->StartBitDecoding(false, nullptr);
   72|    326|  int value_id = 0;
   73|  4.83M|  for (uint32_t i = 0; i < num_values; i += num_components) {
  ------------------
  |  Branch (73:24): [True: 4.83M, False: 323]
  ------------------
   74|       |    // Decode the tag.
   75|  4.83M|    const uint32_t bit_length = tag_decoder.DecodeSymbol();
   76|       |    // Decode the actual value.
   77|  10.1M|    for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (77:21): [True: 5.30M, False: 4.83M]
  ------------------
   78|  5.30M|      uint32_t val;
   79|  5.30M|      if (!src_buffer->DecodeLeastSignificantBits32(bit_length, &val)) {
  ------------------
  |  Branch (79:11): [True: 3, False: 5.30M]
  ------------------
   80|      3|        return false;
   81|      3|      }
   82|  5.30M|      out_values[value_id++] = val;
   83|  5.30M|    }
   84|  4.83M|  }
   85|    323|  tag_decoder.EndDecoding();
   86|    323|  src_buffer->EndBitDecoding();
   87|    323|  return true;
   88|    326|}
_ZN5draco16DecodeRawSymbolsINS_17RAnsSymbolDecoderEEEbjPNS_13DecoderBufferEPj:
  116|  5.30k|                      uint32_t* out_values) {
  117|  5.30k|  uint8_t max_bit_length;
  118|  5.30k|  if (!src_buffer->Decode(&max_bit_length)) {
  ------------------
  |  Branch (118:7): [True: 32, False: 5.26k]
  ------------------
  119|     32|    return false;
  120|     32|  }
  121|  5.26k|  switch (max_bit_length) {
  122|    415|    case 1:
  ------------------
  |  Branch (122:5): [True: 415, False: 4.85k]
  ------------------
  123|    415|      return DecodeRawSymbolsInternal<SymbolDecoderT<1>>(num_values, src_buffer,
  124|    415|                                                         out_values);
  125|    324|    case 2:
  ------------------
  |  Branch (125:5): [True: 324, False: 4.94k]
  ------------------
  126|    324|      return DecodeRawSymbolsInternal<SymbolDecoderT<2>>(num_values, src_buffer,
  127|    324|                                                         out_values);
  128|    334|    case 3:
  ------------------
  |  Branch (128:5): [True: 334, False: 4.93k]
  ------------------
  129|    334|      return DecodeRawSymbolsInternal<SymbolDecoderT<3>>(num_values, src_buffer,
  130|    334|                                                         out_values);
  131|    180|    case 4:
  ------------------
  |  Branch (131:5): [True: 180, False: 5.08k]
  ------------------
  132|    180|      return DecodeRawSymbolsInternal<SymbolDecoderT<4>>(num_values, src_buffer,
  133|    180|                                                         out_values);
  134|    250|    case 5:
  ------------------
  |  Branch (134:5): [True: 250, False: 5.01k]
  ------------------
  135|    250|      return DecodeRawSymbolsInternal<SymbolDecoderT<5>>(num_values, src_buffer,
  136|    250|                                                         out_values);
  137|    298|    case 6:
  ------------------
  |  Branch (137:5): [True: 298, False: 4.97k]
  ------------------
  138|    298|      return DecodeRawSymbolsInternal<SymbolDecoderT<6>>(num_values, src_buffer,
  139|    298|                                                         out_values);
  140|    386|    case 7:
  ------------------
  |  Branch (140:5): [True: 386, False: 4.88k]
  ------------------
  141|    386|      return DecodeRawSymbolsInternal<SymbolDecoderT<7>>(num_values, src_buffer,
  142|    386|                                                         out_values);
  143|    237|    case 8:
  ------------------
  |  Branch (143:5): [True: 237, False: 5.03k]
  ------------------
  144|    237|      return DecodeRawSymbolsInternal<SymbolDecoderT<8>>(num_values, src_buffer,
  145|    237|                                                         out_values);
  146|    245|    case 9:
  ------------------
  |  Branch (146:5): [True: 245, False: 5.02k]
  ------------------
  147|    245|      return DecodeRawSymbolsInternal<SymbolDecoderT<9>>(num_values, src_buffer,
  148|    245|                                                         out_values);
  149|    199|    case 10:
  ------------------
  |  Branch (149:5): [True: 199, False: 5.06k]
  ------------------
  150|    199|      return DecodeRawSymbolsInternal<SymbolDecoderT<10>>(
  151|    199|          num_values, src_buffer, out_values);
  152|    261|    case 11:
  ------------------
  |  Branch (152:5): [True: 261, False: 5.00k]
  ------------------
  153|    261|      return DecodeRawSymbolsInternal<SymbolDecoderT<11>>(
  154|    261|          num_values, src_buffer, out_values);
  155|    241|    case 12:
  ------------------
  |  Branch (155:5): [True: 241, False: 5.02k]
  ------------------
  156|    241|      return DecodeRawSymbolsInternal<SymbolDecoderT<12>>(
  157|    241|          num_values, src_buffer, out_values);
  158|    334|    case 13:
  ------------------
  |  Branch (158:5): [True: 334, False: 4.93k]
  ------------------
  159|    334|      return DecodeRawSymbolsInternal<SymbolDecoderT<13>>(
  160|    334|          num_values, src_buffer, out_values);
  161|    299|    case 14:
  ------------------
  |  Branch (161:5): [True: 299, False: 4.96k]
  ------------------
  162|    299|      return DecodeRawSymbolsInternal<SymbolDecoderT<14>>(
  163|    299|          num_values, src_buffer, out_values);
  164|    317|    case 15:
  ------------------
  |  Branch (164:5): [True: 317, False: 4.95k]
  ------------------
  165|    317|      return DecodeRawSymbolsInternal<SymbolDecoderT<15>>(
  166|    317|          num_values, src_buffer, out_values);
  167|    210|    case 16:
  ------------------
  |  Branch (167:5): [True: 210, False: 5.05k]
  ------------------
  168|    210|      return DecodeRawSymbolsInternal<SymbolDecoderT<16>>(
  169|    210|          num_values, src_buffer, out_values);
  170|    243|    case 17:
  ------------------
  |  Branch (170:5): [True: 243, False: 5.02k]
  ------------------
  171|    243|      return DecodeRawSymbolsInternal<SymbolDecoderT<17>>(
  172|    243|          num_values, src_buffer, out_values);
  173|    233|    case 18:
  ------------------
  |  Branch (173:5): [True: 233, False: 5.03k]
  ------------------
  174|    233|      return DecodeRawSymbolsInternal<SymbolDecoderT<18>>(
  175|    233|          num_values, src_buffer, out_values);
  176|    262|    default:
  ------------------
  |  Branch (176:5): [True: 262, False: 5.00k]
  ------------------
  177|    262|      return false;
  178|  5.26k|  }
  179|  5.26k|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi1EEEEEbjPNS_13DecoderBufferEPj:
   92|    415|                              uint32_t* out_values) {
   93|    415|  SymbolDecoderT decoder;
   94|    415|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 252, False: 163]
  ------------------
   95|    252|    return false;
   96|    252|  }
   97|       |
   98|    163|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 163, False: 0]
  |  Branch (98:25): [True: 8, False: 155]
  ------------------
   99|      8|    return false;  // Wrong number of symbols.
  100|      8|  }
  101|       |
  102|    155|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 45, False: 110]
  ------------------
  103|     45|    return false;
  104|     45|  }
  105|  2.31M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 2.31M, False: 110]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  2.31M|    const uint32_t value = decoder.DecodeSymbol();
  108|  2.31M|    out_values[i] = value;
  109|  2.31M|  }
  110|    110|  decoder.EndDecoding();
  111|    110|  return true;
  112|    155|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi2EEEEEbjPNS_13DecoderBufferEPj:
   92|    324|                              uint32_t* out_values) {
   93|    324|  SymbolDecoderT decoder;
   94|    324|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 100, False: 224]
  ------------------
   95|    100|    return false;
   96|    100|  }
   97|       |
   98|    224|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 224, False: 0]
  |  Branch (98:25): [True: 5, False: 219]
  ------------------
   99|      5|    return false;  // Wrong number of symbols.
  100|      5|  }
  101|       |
  102|    219|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 62, False: 157]
  ------------------
  103|     62|    return false;
  104|     62|  }
  105|  20.8M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 20.8M, False: 157]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  20.8M|    const uint32_t value = decoder.DecodeSymbol();
  108|  20.8M|    out_values[i] = value;
  109|  20.8M|  }
  110|    157|  decoder.EndDecoding();
  111|    157|  return true;
  112|    219|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi3EEEEEbjPNS_13DecoderBufferEPj:
   92|    334|                              uint32_t* out_values) {
   93|    334|  SymbolDecoderT decoder;
   94|    334|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 95, False: 239]
  ------------------
   95|     95|    return false;
   96|     95|  }
   97|       |
   98|    239|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 239, False: 0]
  |  Branch (98:25): [True: 3, False: 236]
  ------------------
   99|      3|    return false;  // Wrong number of symbols.
  100|      3|  }
  101|       |
  102|    236|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 82, False: 154]
  ------------------
  103|     82|    return false;
  104|     82|  }
  105|  15.8M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 15.8M, False: 154]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  15.8M|    const uint32_t value = decoder.DecodeSymbol();
  108|  15.8M|    out_values[i] = value;
  109|  15.8M|  }
  110|    154|  decoder.EndDecoding();
  111|    154|  return true;
  112|    236|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi4EEEEEbjPNS_13DecoderBufferEPj:
   92|    180|                              uint32_t* out_values) {
   93|    180|  SymbolDecoderT decoder;
   94|    180|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 62, False: 118]
  ------------------
   95|     62|    return false;
   96|     62|  }
   97|       |
   98|    118|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 118, False: 0]
  |  Branch (98:25): [True: 1, False: 117]
  ------------------
   99|      1|    return false;  // Wrong number of symbols.
  100|      1|  }
  101|       |
  102|    117|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 59, False: 58]
  ------------------
  103|     59|    return false;
  104|     59|  }
  105|  2.20M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 2.20M, False: 58]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  2.20M|    const uint32_t value = decoder.DecodeSymbol();
  108|  2.20M|    out_values[i] = value;
  109|  2.20M|  }
  110|     58|  decoder.EndDecoding();
  111|     58|  return true;
  112|    117|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi5EEEEEbjPNS_13DecoderBufferEPj:
   92|    250|                              uint32_t* out_values) {
   93|    250|  SymbolDecoderT decoder;
   94|    250|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 32, False: 218]
  ------------------
   95|     32|    return false;
   96|     32|  }
   97|       |
   98|    218|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 218, False: 0]
  |  Branch (98:25): [True: 133, False: 85]
  ------------------
   99|    133|    return false;  // Wrong number of symbols.
  100|    133|  }
  101|       |
  102|     85|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 7, False: 78]
  ------------------
  103|      7|    return false;
  104|      7|  }
  105|  2.01M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 2.01M, False: 78]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  2.01M|    const uint32_t value = decoder.DecodeSymbol();
  108|  2.01M|    out_values[i] = value;
  109|  2.01M|  }
  110|     78|  decoder.EndDecoding();
  111|     78|  return true;
  112|     85|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi6EEEEEbjPNS_13DecoderBufferEPj:
   92|    298|                              uint32_t* out_values) {
   93|    298|  SymbolDecoderT decoder;
   94|    298|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 80, False: 218]
  ------------------
   95|     80|    return false;
   96|     80|  }
   97|       |
   98|    218|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 218, False: 0]
  |  Branch (98:25): [True: 1, False: 217]
  ------------------
   99|      1|    return false;  // Wrong number of symbols.
  100|      1|  }
  101|       |
  102|    217|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 63, False: 154]
  ------------------
  103|     63|    return false;
  104|     63|  }
  105|  3.86M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 3.86M, False: 154]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  3.86M|    const uint32_t value = decoder.DecodeSymbol();
  108|  3.86M|    out_values[i] = value;
  109|  3.86M|  }
  110|    154|  decoder.EndDecoding();
  111|    154|  return true;
  112|    217|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi7EEEEEbjPNS_13DecoderBufferEPj:
   92|    386|                              uint32_t* out_values) {
   93|    386|  SymbolDecoderT decoder;
   94|    386|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 101, False: 285]
  ------------------
   95|    101|    return false;
   96|    101|  }
   97|       |
   98|    285|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 285, False: 0]
  |  Branch (98:25): [True: 5, False: 280]
  ------------------
   99|      5|    return false;  // Wrong number of symbols.
  100|      5|  }
  101|       |
  102|    280|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 64, False: 216]
  ------------------
  103|     64|    return false;
  104|     64|  }
  105|   126M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 126M, False: 216]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   126M|    const uint32_t value = decoder.DecodeSymbol();
  108|   126M|    out_values[i] = value;
  109|   126M|  }
  110|    216|  decoder.EndDecoding();
  111|    216|  return true;
  112|    280|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi8EEEEEbjPNS_13DecoderBufferEPj:
   92|    237|                              uint32_t* out_values) {
   93|    237|  SymbolDecoderT decoder;
   94|    237|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 77, False: 160]
  ------------------
   95|     77|    return false;
   96|     77|  }
   97|       |
   98|    160|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 160, False: 0]
  |  Branch (98:25): [True: 0, False: 160]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|    160|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 74, False: 86]
  ------------------
  103|     74|    return false;
  104|     74|  }
  105|   167M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 167M, False: 86]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   167M|    const uint32_t value = decoder.DecodeSymbol();
  108|   167M|    out_values[i] = value;
  109|   167M|  }
  110|     86|  decoder.EndDecoding();
  111|     86|  return true;
  112|    160|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi9EEEEEbjPNS_13DecoderBufferEPj:
   92|    245|                              uint32_t* out_values) {
   93|    245|  SymbolDecoderT decoder;
   94|    245|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 100, False: 145]
  ------------------
   95|    100|    return false;
   96|    100|  }
   97|       |
   98|    145|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 145, False: 0]
  |  Branch (98:25): [True: 5, False: 140]
  ------------------
   99|      5|    return false;  // Wrong number of symbols.
  100|      5|  }
  101|       |
  102|    140|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 58, False: 82]
  ------------------
  103|     58|    return false;
  104|     58|  }
  105|   522k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 522k, False: 82]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   522k|    const uint32_t value = decoder.DecodeSymbol();
  108|   522k|    out_values[i] = value;
  109|   522k|  }
  110|     82|  decoder.EndDecoding();
  111|     82|  return true;
  112|    140|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi10EEEEEbjPNS_13DecoderBufferEPj:
   92|    199|                              uint32_t* out_values) {
   93|    199|  SymbolDecoderT decoder;
   94|    199|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 107, False: 92]
  ------------------
   95|    107|    return false;
   96|    107|  }
   97|       |
   98|     92|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 92, False: 0]
  |  Branch (98:25): [True: 1, False: 91]
  ------------------
   99|      1|    return false;  // Wrong number of symbols.
  100|      1|  }
  101|       |
  102|     91|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 41, False: 50]
  ------------------
  103|     41|    return false;
  104|     41|  }
  105|   302k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 302k, False: 50]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   302k|    const uint32_t value = decoder.DecodeSymbol();
  108|   302k|    out_values[i] = value;
  109|   302k|  }
  110|     50|  decoder.EndDecoding();
  111|     50|  return true;
  112|     91|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi11EEEEEbjPNS_13DecoderBufferEPj:
   92|    261|                              uint32_t* out_values) {
   93|    261|  SymbolDecoderT decoder;
   94|    261|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 131, False: 130]
  ------------------
   95|    131|    return false;
   96|    131|  }
   97|       |
   98|    130|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 130, False: 0]
  |  Branch (98:25): [True: 2, False: 128]
  ------------------
   99|      2|    return false;  // Wrong number of symbols.
  100|      2|  }
  101|       |
  102|    128|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 68, False: 60]
  ------------------
  103|     68|    return false;
  104|     68|  }
  105|   233k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 233k, False: 60]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   233k|    const uint32_t value = decoder.DecodeSymbol();
  108|   233k|    out_values[i] = value;
  109|   233k|  }
  110|     60|  decoder.EndDecoding();
  111|     60|  return true;
  112|    128|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi12EEEEEbjPNS_13DecoderBufferEPj:
   92|    241|                              uint32_t* out_values) {
   93|    241|  SymbolDecoderT decoder;
   94|    241|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 98, False: 143]
  ------------------
   95|     98|    return false;
   96|     98|  }
   97|       |
   98|    143|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 143, False: 0]
  |  Branch (98:25): [True: 1, False: 142]
  ------------------
   99|      1|    return false;  // Wrong number of symbols.
  100|      1|  }
  101|       |
  102|    142|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 80, False: 62]
  ------------------
  103|     80|    return false;
  104|     80|  }
  105|   300k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 300k, False: 62]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   300k|    const uint32_t value = decoder.DecodeSymbol();
  108|   300k|    out_values[i] = value;
  109|   300k|  }
  110|     62|  decoder.EndDecoding();
  111|     62|  return true;
  112|    142|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi13EEEEEbjPNS_13DecoderBufferEPj:
   92|    334|                              uint32_t* out_values) {
   93|    334|  SymbolDecoderT decoder;
   94|    334|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 158, False: 176]
  ------------------
   95|    158|    return false;
   96|    158|  }
   97|       |
   98|    176|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 176, False: 0]
  |  Branch (98:25): [True: 39, False: 137]
  ------------------
   99|     39|    return false;  // Wrong number of symbols.
  100|     39|  }
  101|       |
  102|    137|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 84, False: 53]
  ------------------
  103|     84|    return false;
  104|     84|  }
  105|   440k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 440k, False: 53]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   440k|    const uint32_t value = decoder.DecodeSymbol();
  108|   440k|    out_values[i] = value;
  109|   440k|  }
  110|     53|  decoder.EndDecoding();
  111|     53|  return true;
  112|    137|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi14EEEEEbjPNS_13DecoderBufferEPj:
   92|    299|                              uint32_t* out_values) {
   93|    299|  SymbolDecoderT decoder;
   94|    299|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 150, False: 149]
  ------------------
   95|    150|    return false;
   96|    150|  }
   97|       |
   98|    149|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 149, False: 0]
  |  Branch (98:25): [True: 1, False: 148]
  ------------------
   99|      1|    return false;  // Wrong number of symbols.
  100|      1|  }
  101|       |
  102|    148|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 66, False: 82]
  ------------------
  103|     66|    return false;
  104|     66|  }
  105|  5.02M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 5.02M, False: 82]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  5.02M|    const uint32_t value = decoder.DecodeSymbol();
  108|  5.02M|    out_values[i] = value;
  109|  5.02M|  }
  110|     82|  decoder.EndDecoding();
  111|     82|  return true;
  112|    148|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi15EEEEEbjPNS_13DecoderBufferEPj:
   92|    317|                              uint32_t* out_values) {
   93|    317|  SymbolDecoderT decoder;
   94|    317|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 134, False: 183]
  ------------------
   95|    134|    return false;
   96|    134|  }
   97|       |
   98|    183|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 183, False: 0]
  |  Branch (98:25): [True: 4, False: 179]
  ------------------
   99|      4|    return false;  // Wrong number of symbols.
  100|      4|  }
  101|       |
  102|    179|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 107, False: 72]
  ------------------
  103|    107|    return false;
  104|    107|  }
  105|  8.56M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 8.56M, False: 72]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  8.56M|    const uint32_t value = decoder.DecodeSymbol();
  108|  8.56M|    out_values[i] = value;
  109|  8.56M|  }
  110|     72|  decoder.EndDecoding();
  111|     72|  return true;
  112|    179|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi16EEEEEbjPNS_13DecoderBufferEPj:
   92|    210|                              uint32_t* out_values) {
   93|    210|  SymbolDecoderT decoder;
   94|    210|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 87, False: 123]
  ------------------
   95|     87|    return false;
   96|     87|  }
   97|       |
   98|    123|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 123, False: 0]
  |  Branch (98:25): [True: 3, False: 120]
  ------------------
   99|      3|    return false;  // Wrong number of symbols.
  100|      3|  }
  101|       |
  102|    120|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 62, False: 58]
  ------------------
  103|     62|    return false;
  104|     62|  }
  105|  17.2M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 17.2M, False: 58]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  17.2M|    const uint32_t value = decoder.DecodeSymbol();
  108|  17.2M|    out_values[i] = value;
  109|  17.2M|  }
  110|     58|  decoder.EndDecoding();
  111|     58|  return true;
  112|    120|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi17EEEEEbjPNS_13DecoderBufferEPj:
   92|    243|                              uint32_t* out_values) {
   93|    243|  SymbolDecoderT decoder;
   94|    243|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 111, False: 132]
  ------------------
   95|    111|    return false;
   96|    111|  }
   97|       |
   98|    132|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 132, False: 0]
  |  Branch (98:25): [True: 1, False: 131]
  ------------------
   99|      1|    return false;  // Wrong number of symbols.
  100|      1|  }
  101|       |
  102|    131|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 62, False: 69]
  ------------------
  103|     62|    return false;
  104|     62|  }
  105|  6.82M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 6.82M, False: 69]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  6.82M|    const uint32_t value = decoder.DecodeSymbol();
  108|  6.82M|    out_values[i] = value;
  109|  6.82M|  }
  110|     69|  decoder.EndDecoding();
  111|     69|  return true;
  112|    131|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi18EEEEEbjPNS_13DecoderBufferEPj:
   92|    233|                              uint32_t* out_values) {
   93|    233|  SymbolDecoderT decoder;
   94|    233|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 91, False: 142]
  ------------------
   95|     91|    return false;
   96|     91|  }
   97|       |
   98|    142|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 142, False: 0]
  |  Branch (98:25): [True: 7, False: 135]
  ------------------
   99|      7|    return false;  // Wrong number of symbols.
  100|      7|  }
  101|       |
  102|    135|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 64, False: 71]
  ------------------
  103|     64|    return false;
  104|     64|  }
  105|  7.93M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 7.93M, False: 71]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  7.93M|    const uint32_t value = decoder.DecodeSymbol();
  108|  7.93M|    out_values[i] = value;
  109|  7.93M|  }
  110|     71|  decoder.EndDecoding();
  111|     71|  return true;
  112|    135|}

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

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

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

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

_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEEC2Ev:
   48|  3.61k|    : decoder_(nullptr),
   49|  3.61k|      last_symbol_id_(-1),
   50|  3.61k|      last_vert_id_(-1),
   51|  3.61k|      last_face_id_(-1),
   52|  3.61k|      num_new_vertices_(0),
   53|  3.61k|      num_encoded_vertices_(0),
   54|  3.61k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  3.61k|    MeshEdgebreakerDecoder* decoder) {
   59|  3.61k|  decoder_ = decoder;
   60|  3.61k|  return true;
   61|  3.61k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE23GetAttributeCornerTableEi:
   66|  4.93k|    int att_id) const {
   67|  9.52k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 8.60k, False: 919]
  ------------------
   68|  8.60k|    const int decoder_id = attribute_data_[i].decoder_id;
   69|  8.60k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 4.58k, False: 4.01k]
  |  Branch (69:27): [True: 0, False: 4.01k]
  ------------------
   70|  4.58k|      continue;
   71|  4.58k|    }
   72|  4.01k|    const AttributesDecoderInterface* const dec =
   73|  4.01k|        decoder_->attributes_decoder(decoder_id);
   74|  13.6k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 13.6k, False: 1]
  ------------------
   75|  13.6k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 4.01k, False: 9.63k]
  ------------------
   76|  4.01k|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 2.40k, False: 1.61k]
  ------------------
   77|  2.40k|          return &attribute_data_[i].connectivity_data;
   78|  2.40k|        }
   79|  1.61k|        return nullptr;
   80|  4.01k|      }
   81|  13.6k|    }
   82|  4.01k|  }
   83|    919|  return nullptr;
   84|  4.93k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE24GetAttributeEncodingDataEi:
   89|  4.93k|    int att_id) const {
   90|  9.52k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 8.60k, False: 919]
  ------------------
   91|  8.60k|    const int decoder_id = attribute_data_[i].decoder_id;
   92|  8.60k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 4.58k, False: 4.01k]
  |  Branch (92:27): [True: 0, False: 4.01k]
  ------------------
   93|  4.58k|      continue;
   94|  4.58k|    }
   95|  4.01k|    const AttributesDecoderInterface* const dec =
   96|  4.01k|        decoder_->attributes_decoder(decoder_id);
   97|  13.6k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 13.6k, False: 1]
  ------------------
   98|  13.6k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 4.01k, False: 9.63k]
  ------------------
   99|  4.01k|        return &attribute_data_[i].encoding_data;
  100|  4.01k|      }
  101|  13.6k|    }
  102|  4.01k|  }
  103|    919|  return &pos_encoding_data_;
  104|  4.93k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE23CreateAttributesDecoderEi:
  130|  3.12k|    int32_t att_decoder_id) {
  131|  3.12k|  int8_t att_data_id;
  132|  3.12k|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 12, False: 3.11k]
  ------------------
  133|     12|    return false;
  134|     12|  }
  135|  3.11k|  uint8_t decoder_type;
  136|  3.11k|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 3, False: 3.10k]
  ------------------
  137|      3|    return false;
  138|      3|  }
  139|       |
  140|  3.10k|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 2.46k, False: 644]
  ------------------
  141|  2.46k|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 50, False: 2.41k]
  ------------------
  142|     50|      return false;  // Unexpected attribute data.
  143|     50|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|  2.41k|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 4, False: 2.41k]
  ------------------
  148|      4|      return false;
  149|      4|    }
  150|       |
  151|  2.41k|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|  2.41k|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    644|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 2, False: 642]
  ------------------
  155|      2|      return false;  // Some other decoder is already using the data. Error.
  156|      2|    }
  157|    642|    pos_data_decoder_id_ = att_decoder_id;
  158|    642|  }
  159|       |
  160|  3.05k|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|  3.05k|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  3.05k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 3.04k, False: 5]
  ------------------
  162|  3.04k|    uint8_t traversal_method_encoded;
  163|  3.04k|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 5, False: 3.04k]
  ------------------
  164|      5|      return false;
  165|      5|    }
  166|       |    // Check that decoded traversal method is valid.
  167|  3.04k|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 21, False: 3.02k]
  ------------------
  168|     21|      return false;
  169|     21|    }
  170|  3.02k|    traversal_method =
  171|  3.02k|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|  3.02k|  }
  173|       |
  174|  3.02k|  const Mesh* mesh = decoder_->mesh();
  175|  3.02k|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|  3.02k|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 1.61k, False: 1.40k]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|  1.61k|    MeshAttributeIndicesEncodingData* encoding_data = nullptr;
  181|  1.61k|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 618, False: 1.00k]
  ------------------
  182|    618|      encoding_data = &pos_encoding_data_;
  183|  1.00k|    } else {
  184|  1.00k|      encoding_data = &attribute_data_[att_data_id].encoding_data;
  185|       |      // Mark the attribute connectivity data invalid to ensure it's not used
  186|       |      // later on.
  187|  1.00k|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|  1.00k|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|  1.61k|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 559, False: 1.06k]
  ------------------
  191|    559|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|    559|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|    559|          AttTraverser;
  194|    559|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|  1.06k|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 1.06k, False: 0]
  ------------------
  196|  1.06k|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|  1.06k|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|  1.06k|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|  1.06k|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|  1.61k|  } else {
  203|  1.40k|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 12, False: 1.39k]
  ------------------
  204|     12|      return false;  // Unsupported method.
  205|     12|    }
  206|  1.39k|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 7, False: 1.38k]
  ------------------
  207|      7|      return false;  // Attribute data must be specified.
  208|      7|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|  1.38k|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|  1.38k|        AttObserver;
  214|  1.38k|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|  1.38k|        AttTraverser;
  216|       |
  217|  1.38k|    MeshAttributeIndicesEncodingData* const encoding_data =
  218|  1.38k|        &attribute_data_[att_data_id].encoding_data;
  219|  1.38k|    const MeshAttributeCornerTable* const corner_table =
  220|  1.38k|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|  1.38k|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|  1.38k|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|  1.38k|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|  1.38k|                             encoding_data);
  227|       |
  228|  1.38k|    AttTraverser att_traverser;
  229|  1.38k|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|  1.38k|    traversal_sequencer->SetTraverser(att_traverser);
  232|  1.38k|    sequencer = std::move(traversal_sequencer);
  233|  1.38k|  }
  234|       |
  235|  3.00k|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 3.00k]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|  3.00k|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|  3.00k|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|  3.00k|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|  3.00k|                                        std::move(att_controller));
  244|  3.00k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18DecodeConnectivityEv:
  247|  3.61k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  3.61k|  num_new_vertices_ = 0;
  249|  3.61k|  new_to_parent_vertex_map_.clear();
  250|  3.61k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  3.61k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.61k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 847, False: 2.77k]
  ------------------
  252|    847|    uint32_t num_new_verts;
  253|    847|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    847|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 178, False: 669]
  ------------------
  254|    178|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 178]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    669|    } else {
  258|    669|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 669]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|    669|    }
  262|    847|    num_new_vertices_ = num_new_verts;
  263|    847|  }
  264|  3.61k|#endif
  265|       |
  266|  3.61k|  uint32_t num_encoded_vertices;
  267|  3.61k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  3.61k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.61k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 178, False: 3.44k]
  ------------------
  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.44k|#endif
  275|  3.44k|  {
  276|  3.44k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 3.44k]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|  3.44k|  }
  280|  3.61k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  3.61k|  uint32_t num_faces;
  283|  3.61k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  3.61k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.61k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 178, False: 3.44k]
  ------------------
  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.44k|#endif
  291|  3.44k|  {
  292|  3.44k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 3.44k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  3.44k|  }
  296|  3.61k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 0, False: 3.61k]
  ------------------
  297|      0|    return false;  // Draco cannot handle this many faces.
  298|      0|  }
  299|       |
  300|  3.61k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 3, False: 3.61k]
  ------------------
  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.61k|  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.61k|  const uint64_t num_encoded_vertices_64 =
  311|  3.61k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  3.61k|  const uint64_t max_num_vertex_edges =
  313|  3.61k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  3.61k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 0, False: 3.61k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      0|    return false;
  317|      0|  }
  318|       |
  319|  3.61k|  uint8_t num_attribute_data;
  320|  3.61k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 3.61k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  3.61k|  uint32_t num_encoded_symbols;
  325|  3.61k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  3.61k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.61k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 175, False: 3.44k]
  ------------------
  327|    175|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 175]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    175|  } else
  332|  3.44k|#endif
  333|  3.44k|  {
  334|  3.44k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 3.44k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  3.44k|  }
  338|       |
  339|  3.61k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 1, False: 3.61k]
  ------------------
  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|      1|    return false;
  344|      1|  }
  345|  3.61k|  const uint32_t max_encoded_faces =
  346|  3.61k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  3.61k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 3, False: 3.61k]
  ------------------
  348|       |    // Faces can only be 1 1/3 times bigger than number of encoded symbols. This
  349|       |    // could only happen if all new encoded components started with interior
  350|       |    // triangles. E.g. A mesh with multiple tetrahedrons.
  351|      3|    return false;
  352|      3|  }
  353|       |
  354|  3.61k|  uint32_t num_encoded_split_symbols;
  355|  3.61k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  3.61k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.61k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 171, False: 3.44k]
  ------------------
  357|    171|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 171]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    171|  } else
  362|  3.44k|#endif
  363|  3.44k|  {
  364|  3.44k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 3.44k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  3.44k|  }
  368|       |
  369|  3.61k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 2, False: 3.61k]
  ------------------
  370|      2|    return false;  // Split symbols are a sub-set of all symbols.
  371|      2|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  3.61k|  vertex_traversal_length_.clear();
  375|  3.61k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  3.61k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 3.61k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  3.61k|  processed_corner_ids_.clear();
  380|  3.61k|  processed_corner_ids_.reserve(num_faces);
  381|  3.61k|  processed_connectivity_corners_.clear();
  382|  3.61k|  processed_connectivity_corners_.reserve(num_faces);
  383|  3.61k|  topology_split_data_.clear();
  384|  3.61k|  hole_event_data_.clear();
  385|  3.61k|  init_face_configurations_.clear();
  386|  3.61k|  init_corners_.clear();
  387|       |
  388|  3.61k|  last_symbol_id_ = -1;
  389|  3.61k|  last_face_id_ = -1;
  390|  3.61k|  last_vert_id_ = -1;
  391|       |
  392|  3.61k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  3.61k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  3.61k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 0, False: 3.61k]
  ------------------
  397|  3.61k|          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|  3.61k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  3.61k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  3.61k|  int32_t topology_split_decoded_bytes = -1;
  410|  3.61k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.61k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 838, False: 2.77k]
  ------------------
  411|    838|    uint32_t encoded_connectivity_size;
  412|    838|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    838|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 169, False: 669]
  ------------------
  413|    169|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 0, False: 169]
  ------------------
  414|      0|        return false;
  415|      0|      }
  416|    669|    } else {
  417|    669|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 669]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|    669|    }
  421|    838|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 0, False: 838]
  ------------------
  422|    838|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 9, False: 829]
  ------------------
  423|      9|      return false;
  424|      9|    }
  425|    829|    DecoderBuffer event_buffer;
  426|    829|    event_buffer.Init(
  427|    829|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    829|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    829|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    829|    topology_split_decoded_bytes =
  432|    829|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    829|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 149, False: 680]
  ------------------
  434|    149|      return false;
  435|    149|    }
  436|       |
  437|    829|  } else
  438|  2.77k|#endif
  439|  2.77k|  {
  440|  2.77k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 10, False: 2.76k]
  ------------------
  441|     10|      return false;
  442|     10|    }
  443|  2.77k|  }
  444|       |
  445|  3.44k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  3.44k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  3.44k|                                           num_encoded_split_symbols);
  449|  3.44k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  3.44k|  DecoderBuffer traversal_end_buffer;
  452|  3.44k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 57, False: 3.38k]
  ------------------
  453|     57|    return false;
  454|     57|  }
  455|       |
  456|  3.38k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  3.38k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 258, False: 3.12k]
  ------------------
  458|    258|    return false;
  459|    258|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|  3.12k|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|  3.12k|                           traversal_end_buffer.remaining_size(),
  464|  3.12k|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|  3.12k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|  3.12k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.12k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 602, False: 2.52k]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|    602|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|    602|  }
  471|  3.12k|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|  3.12k|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 3.08k, False: 42]
  ------------------
  475|  3.08k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|  3.08k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  3.08k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 590, False: 2.49k]
  ------------------
  477|  3.02k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 2.43k, False: 590]
  ------------------
  478|  2.43k|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 2.43k]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|  2.43k|      }
  482|       |
  483|    590|    } else
  484|  2.49k|#endif
  485|  2.49k|    {
  486|   239k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 236k, False: 2.49k]
  ------------------
  487|   236k|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 236k]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|   236k|      }
  491|  2.49k|    }
  492|  3.08k|  }
  493|  3.12k|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  13.0k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 9.90k, False: 3.12k]
  ------------------
  498|  9.90k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  4.04M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 4.04M, False: 9.90k]
  ------------------
  501|  4.04M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  4.04M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  9.90k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 9.90k]
  ------------------
  505|  9.90k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  9.90k|  }
  509|       |
  510|  3.12k|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  13.0k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 9.90k, False: 3.12k]
  ------------------
  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|  9.90k|    int32_t att_connectivity_verts =
  517|  9.90k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  9.90k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 787, False: 9.11k]
  ------------------
  519|    787|      att_connectivity_verts = corner_table_->num_vertices();
  520|    787|    }
  521|  9.90k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  9.90k|  }
  523|  3.12k|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 5, False: 3.12k]
  ------------------
  524|      5|    return false;
  525|      5|  }
  526|  3.12k|  return true;
  527|  3.12k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE19OnAttributesDecodedEv:
  530|    570|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|    570|  return true;
  532|    570|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18DecodeConnectivityEi:
  536|  3.38k|    int num_symbols) {
  537|       |  // Algorithm does the reverse decoding of the symbols encoded with the
  538|       |  // edgebreaker method. The reverse decoding always keeps track of the active
  539|       |  // edge identified by its opposite corner (active corner). New faces are
  540|       |  // always added to this active edge. There may be multiple active corners at
  541|       |  // one time that either correspond to separate mesh components or to
  542|       |  // sub-components of one mesh that are going to be merged together using the
  543|       |  // TOPOLOGY_S symbol. We can store these active edges on a stack, because the
  544|       |  // decoder always processes only the latest active edge. TOPOLOGY_S then
  545|       |  // removes the top edge from the stack and TOPOLOGY_E adds a new edge to the
  546|       |  // stack.
  547|  3.38k|  std::vector<CornerIndex> active_corner_stack;
  548|       |
  549|       |  // Additional active edges may be added as a result of topology split events.
  550|       |  // They can be added in arbitrary order, but we always know the split symbol
  551|       |  // id they belong to, so we can address them using this symbol id.
  552|  3.38k|  std::unordered_map<int, CornerIndex> topology_split_active_corners;
  553|       |
  554|       |  // Vector used for storing vertices that were marked as isolated during the
  555|       |  // decoding process. Currently used only when the mesh doesn't contain any
  556|       |  // non-position connectivity data.
  557|  3.38k|  std::vector<VertexIndex> invalid_vertices;
  558|  3.38k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  3.38k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  3.38k|  int num_faces = 0;
  562|  38.2M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 38.2M, False: 3.22k]
  ------------------
  563|  38.2M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  38.2M|    bool check_topology_split = false;
  566|  38.2M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  38.2M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 16.3M, False: 21.8M]
  ------------------
  568|       |      // Create a new face between two edges on the open boundary.
  569|       |      // The first edge is opposite to the corner "a" from the image below.
  570|       |      // The other edge is opposite to the corner "b" that can be reached
  571|       |      // through a CCW traversal around the vertex "v".
  572|       |      // One new active boundary edge is created, opposite to the new corner
  573|       |      // "x".
  574|       |      //
  575|       |      //     *-------*
  576|       |      //    / \     / \
  577|       |      //   /   \   /   \
  578|       |      //  /     \ /     \
  579|       |      // *-------v-------*
  580|       |      //  \b    /x\    a/
  581|       |      //   \   /   \   /
  582|       |      //    \ /  C  \ /
  583|       |      //     *.......*
  584|       |
  585|       |      // Find the corner "b" from the corner "a" which is the corner on the
  586|       |      // top of the active stack.
  587|  16.3M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 6, False: 16.3M]
  ------------------
  588|      6|        return -1;
  589|      6|      }
  590|       |
  591|  16.3M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  16.3M|      const VertexIndex vertex_x =
  593|  16.3M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  16.3M|      const CornerIndex corner_b =
  595|  16.3M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  16.3M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 116, False: 16.3M]
  ------------------
  598|       |        // All matched corners must be different.
  599|    116|        return -1;
  600|    116|      }
  601|  16.3M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 16.3M]
  |  Branch (601:11): [True: 0, False: 16.3M]
  ------------------
  602|  16.3M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 16.3M]
  ------------------
  603|       |        // One of the corners is already opposite to an existing face, which
  604|       |        // should not happen unless the input was tampered with.
  605|      0|        return -1;
  606|      0|      }
  607|       |
  608|       |      // New tip corner.
  609|  16.3M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  16.3M|      SetOppositeCorners(corner_a, corner + 1);
  612|  16.3M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  16.3M|      const VertexIndex vert_a_prev =
  616|  16.3M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  16.3M|      const VertexIndex vert_b_next =
  618|  16.3M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  16.3M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 16.3M]
  |  Branch (619:38): [True: 0, False: 16.3M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  16.3M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  16.3M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  16.3M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  16.3M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  16.3M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  16.3M|      active_corner_stack.back() = corner;
  631|  21.8M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 6.23M, False: 15.6M]
  |  Branch (631:40): [True: 4.12M, False: 11.5M]
  ------------------
  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|  10.3M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 0, False: 10.3M]
  ------------------
  647|      0|        return -1;
  648|      0|      }
  649|  10.3M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  10.3M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 10.3M]
  ------------------
  651|       |        // Active corner is already opposite to an existing face, which should
  652|       |        // not happen unless the input was tampered with.
  653|      0|        return -1;
  654|      0|      }
  655|       |
  656|       |      // First corner on the new face is either corner "l" or "r".
  657|  10.3M|      const CornerIndex corner(3 * face.value());
  658|  10.3M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  10.3M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 6.23M, False: 4.12M]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  6.23M|        opp_corner = corner + 2;
  662|  6.23M|        corner_l = corner + 1;
  663|  6.23M|        corner_r = corner;
  664|  6.23M|      } else {
  665|       |        // "l" is the new first corner.
  666|  4.12M|        opp_corner = corner + 1;
  667|  4.12M|        corner_l = corner;
  668|  4.12M|        corner_r = corner + 2;
  669|  4.12M|      }
  670|  10.3M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  10.3M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  10.3M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 0, False: 10.3M]
  ------------------
  675|      0|        return -1;  // Unexpected number of decoded vertices.
  676|      0|      }
  677|       |
  678|  10.3M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  10.3M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  10.3M|      const VertexIndex vertex_r =
  682|  10.3M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  10.3M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  10.3M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  10.3M|      corner_table_->MapCornerToVertex(
  688|  10.3M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  10.3M|      active_corner_stack.back() = corner;
  690|  10.3M|      check_topology_split = true;
  691|  11.5M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 5.61M, False: 5.90M]
  ------------------
  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|  5.61M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 2, False: 5.61M]
  ------------------
  703|      2|        return -1;
  704|      2|      }
  705|  5.61M|      const CornerIndex corner_b = active_corner_stack.back();
  706|  5.61M|      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|  5.61M|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  5.61M|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 72, False: 5.61M]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|     72|        active_corner_stack.push_back(it->second);
  714|     72|      }
  715|  5.61M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 8, False: 5.61M]
  ------------------
  716|      8|        return -1;
  717|      8|      }
  718|  5.61M|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  5.61M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 5.61M]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  5.61M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 7, False: 5.61M]
  |  Branch (724:11): [True: 7, False: 5.61M]
  ------------------
  725|  5.61M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 5.61M]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|      7|        return -1;
  729|      7|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  5.61M|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  5.61M|      SetOppositeCorners(corner_a, corner + 2);
  735|  5.61M|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  5.61M|      const VertexIndex vertex_p =
  739|  5.61M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  5.61M|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  5.61M|      corner_table_->MapCornerToVertex(
  742|  5.61M|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  5.61M|      const VertexIndex vert_b_prev =
  744|  5.61M|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  5.61M|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  5.61M|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  5.61M|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  5.61M|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  5.61M|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  5.61M|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  5.61M|                                       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|  5.61M|      const CornerIndex first_corner = corner_n;
  757|  15.7M|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 10.1M, False: 5.61M]
  ------------------
  758|  10.1M|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|  10.1M|        corner_n = corner_table_->SwingLeft(corner_n);
  760|  10.1M|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 1, False: 10.1M]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      1|          return -1;
  764|      1|        }
  765|  10.1M|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  5.61M|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  5.61M|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 10.1k, False: 5.60M]
  ------------------
  770|  10.1k|        invalid_vertices.push_back(vertex_n);
  771|  10.1k|      }
  772|  5.61M|      active_corner_stack.back() = corner;
  773|  5.90M|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 5.90M, False: 0]
  ------------------
  774|  5.90M|      const CornerIndex corner(3 * face.value());
  775|  5.90M|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  5.90M|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  5.90M|      corner_table_->MapCornerToVertex(corner + 1,
  779|  5.90M|                                       corner_table_->AddNewVertex());
  780|  5.90M|      corner_table_->MapCornerToVertex(corner + 2,
  781|  5.90M|                                       corner_table_->AddNewVertex());
  782|       |
  783|  5.90M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 1, False: 5.90M]
  ------------------
  784|      1|        return -1;  // Unexpected number of decoded vertices.
  785|      1|      }
  786|       |
  787|  5.90M|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  5.90M|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  5.90M|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  5.90M|      active_corner_stack.push_back(corner);
  792|  5.90M|      check_topology_split = true;
  793|  5.90M|    } else {
  794|       |      // Error. Unknown symbol decoded.
  795|      0|      return -1;
  796|      0|    }
  797|       |    // Inform the traversal decoder that a new corner has been reached.
  798|  38.2M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  38.2M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 16.2M, False: 21.9M]
  ------------------
  801|       |      // Check for topology splits happens only for TOPOLOGY_L, TOPOLOGY_R and
  802|       |      // TOPOLOGY_E symbols because those are the symbols that correspond to
  803|       |      // faces that can be directly connected a TOPOLOGY_S face through the
  804|       |      // topology split event.
  805|       |      // If a topology split is detected, we need to add a new active edge
  806|       |      // onto the active_corner_stack because it will be used later when the
  807|       |      // corresponding TOPOLOGY_S event is decoded.
  808|       |
  809|       |      // Symbol id used by the encoder (reverse).
  810|  16.2M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  16.2M|      EdgeFaceName split_edge;
  812|  16.2M|      int encoder_split_symbol_id;
  813|  16.2M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 3.12k, False: 16.2M]
  ------------------
  814|  16.2M|                             &encoder_split_symbol_id)) {
  815|  3.12k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 18, False: 3.10k]
  ------------------
  816|     18|          return -1;  // Wrong split symbol id.
  817|     18|        }
  818|       |        // Symbol was part of a topology split. Now we need to determine which
  819|       |        // edge should be added to the active edges stack.
  820|  3.10k|        const CornerIndex act_top_corner = active_corner_stack.back();
  821|       |        // The current symbol has one active edge (stored in act_top_corner) and
  822|       |        // two remaining inactive edges that are attached to it.
  823|       |        //              *
  824|       |        //             / \
  825|       |        //  left_edge /   \ right_edge
  826|       |        //           /     \
  827|       |        //          *.......*
  828|       |        //         active_edge
  829|       |
  830|  3.10k|        CornerIndex new_active_corner;
  831|  3.10k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 1.22k, False: 1.88k]
  ------------------
  832|  1.22k|          new_active_corner = corner_table_->Next(act_top_corner);
  833|  1.88k|        } else {
  834|  1.88k|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|  1.88k|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  3.10k|        const int decoder_split_symbol_id =
  839|  3.10k|            num_symbols - encoder_split_symbol_id - 1;
  840|  3.10k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  3.10k|            new_active_corner;
  842|  3.10k|      }
  843|  16.2M|    }
  844|  38.2M|  }
  845|  3.22k|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 3.22k]
  ------------------
  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|  56.0k|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 52.9k, False: 3.15k]
  ------------------
  850|  52.9k|    const CornerIndex corner = active_corner_stack.back();
  851|  52.9k|    active_corner_stack.pop_back();
  852|  52.9k|    const bool interior_face =
  853|  52.9k|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  52.9k|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 42.4k, False: 10.4k]
  ------------------
  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|  42.4k|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 9, False: 42.4k]
  ------------------
  877|      9|        return -1;  // More faces than expected added to the mesh.
  878|      9|      }
  879|       |
  880|  42.4k|      const CornerIndex corner_a = corner;
  881|  42.4k|      const VertexIndex vert_n =
  882|  42.4k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  42.4k|      const CornerIndex corner_b =
  884|  42.4k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  42.4k|      const VertexIndex vert_x =
  887|  42.4k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  42.4k|      const CornerIndex corner_c =
  889|  42.4k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  42.4k|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 2, False: 42.4k]
  |  Branch (891:33): [True: 51, False: 42.3k]
  |  Branch (891:55): [True: 0, False: 42.3k]
  ------------------
  892|       |        // All matched corners must be different.
  893|     53|        return -1;
  894|     53|      }
  895|  42.3k|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 5, False: 42.3k]
  |  Branch (895:11): [True: 8, False: 42.3k]
  ------------------
  896|  42.3k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 1, False: 42.3k]
  ------------------
  897|  42.3k|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 2, False: 42.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|      8|        return -1;
  901|      8|      }
  902|       |
  903|  42.3k|      const VertexIndex vert_p =
  904|  42.3k|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  42.3k|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  42.3k|      const CornerIndex new_corner(3 * face.value());
  909|  42.3k|      SetOppositeCorners(new_corner, corner);
  910|  42.3k|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  42.3k|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  42.3k|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  42.3k|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  42.3k|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|   169k|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 127k, False: 42.3k]
  ------------------
  920|   127k|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|   127k|      }
  922|       |
  923|  42.3k|      init_face_configurations_.push_back(true);
  924|  42.3k|      init_corners_.push_back(new_corner);
  925|  42.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|  10.4k|      init_face_configurations_.push_back(false);
  930|  10.4k|      init_corners_.push_back(corner);
  931|  10.4k|    }
  932|  52.9k|  }
  933|  3.15k|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 29, False: 3.12k]
  ------------------
  934|     29|    return -1;  // Unexpected number of decoded faces.
  935|     29|  }
  936|       |
  937|  3.12k|  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.40k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 3.40k, False: 3.12k]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|  3.40k|    VertexIndex src_vert(num_vertices - 1);
  943|  3.72k|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 316, False: 3.40k]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|    316|      src_vert = VertexIndex(--num_vertices - 1);
  946|    316|    }
  947|  3.40k|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 316, False: 3.09k]
  ------------------
  948|    316|      continue;  // No need to swap anything.
  949|    316|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|  3.09k|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  47.2k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 44.2k, False: 3.09k]
  ------------------
  954|  44.2k|      const CornerIndex cid = vcit.Corner();
  955|  44.2k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 0, False: 44.2k]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      0|        return -1;
  959|      0|      }
  960|  44.2k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  44.2k|    }
  962|  3.09k|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|  3.09k|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|  3.09k|    corner_table_->MakeVertexIsolated(src_vert);
  967|  3.09k|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|  3.09k|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|  3.09k|    num_vertices--;
  972|  3.09k|  }
  973|  3.12k|  return num_vertices;
  974|  3.12k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  3.60k|    DecoderBuffer* decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  3.60k|  uint32_t num_topology_splits;
  982|  3.60k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  3.60k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.60k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 160, False: 3.44k]
  ------------------
  984|    160|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 0, False: 160]
  ------------------
  985|      0|      return -1;
  986|      0|    }
  987|       |
  988|    160|  } else
  989|  3.44k|#endif
  990|  3.44k|  {
  991|  3.44k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 3.44k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  3.44k|  }
  995|  3.60k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 2.63k, False: 962]
  ------------------
  996|  2.63k|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 17, False: 2.62k]
  ------------------
  997|  2.63k|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|     17|      return -1;
  999|     17|    }
 1000|  2.62k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|  2.62k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  2.62k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 75, False: 2.54k]
  ------------------
 1002|  95.5k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 95.4k, False: 21]
  ------------------
 1003|  95.4k|        TopologySplitEventData event_data;
 1004|  95.4k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 29, False: 95.4k]
  ------------------
 1005|     29|          return -1;
 1006|     29|        }
 1007|  95.4k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 20, False: 95.4k]
  ------------------
 1008|     20|          return -1;
 1009|     20|        }
 1010|  95.4k|        uint8_t edge_data;
 1011|  95.4k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 5, False: 95.4k]
  ------------------
 1012|      5|          return -1;
 1013|      5|        }
 1014|  95.4k|        event_data.source_edge = edge_data & 1;
 1015|  95.4k|        topology_split_data_.push_back(event_data);
 1016|  95.4k|      }
 1017|       |
 1018|     75|    } else
 1019|  2.54k|#endif
 1020|  2.54k|    {
 1021|       |      // Decode source and split symbol ids using delta and varint coding. See
 1022|       |      // description in mesh_edgebreaker_encoder_impl.cc for more details.
 1023|  2.54k|      int last_source_symbol_id = 0;
 1024|  66.9k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 64.4k, False: 2.53k]
  ------------------
 1025|  64.4k|        TopologySplitEventData event_data;
 1026|  64.4k|        uint32_t delta;
 1027|  64.4k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 7, False: 64.4k]
  ------------------
 1028|      7|          return -1;
 1029|      7|        }
 1030|  64.4k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  64.4k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 6, False: 64.4k]
  ------------------
 1032|      6|          return -1;
 1033|      6|        }
 1034|  64.4k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 1, False: 64.4k]
  ------------------
 1035|      1|          return -1;
 1036|      1|        }
 1037|  64.4k|        event_data.split_symbol_id =
 1038|  64.4k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  64.4k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  64.4k|        topology_split_data_.push_back(event_data);
 1041|  64.4k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|  2.53k|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  8.34k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 5.81k, False: 2.53k]
  ------------------
 1045|  5.81k|        uint32_t edge_data;
 1046|  5.81k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  5.81k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 950, False: 4.86k]
  ------------------
 1047|    950|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  4.86k|        } else {
 1049|  4.86k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  4.86k|        }
 1051|  5.81k|        TopologySplitEventData& event_data = topology_split_data_[i];
 1052|  5.81k|        event_data.source_edge = edge_data & 1;
 1053|  5.81k|      }
 1054|  2.53k|      decoder_buffer->EndBitDecoding();
 1055|  2.53k|    }
 1056|  2.62k|  }
 1057|  3.51k|  uint32_t num_hole_events = 0;
 1058|  3.51k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  3.51k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  3.51k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 86, False: 3.43k]
  ------------------
 1060|     86|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 2, False: 84]
  ------------------
 1061|      2|      return -1;
 1062|      2|    }
 1063|  3.43k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  3.43k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 659, False: 2.77k]
  ------------------
 1064|    659|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 3, False: 656]
  ------------------
 1065|      3|      return -1;
 1066|      3|    }
 1067|    659|  }
 1068|  3.51k|#endif
 1069|  3.51k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 76, False: 3.43k]
  ------------------
 1070|     76|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     76|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     76|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 54, False: 22]
  ------------------
 1072|   729k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 729k, False: 2]
  ------------------
 1073|   729k|        HoleEventData event_data;
 1074|   729k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 52, False: 729k]
  ------------------
 1075|     52|          return -1;
 1076|     52|        }
 1077|   729k|        hole_event_data_.push_back(event_data);
 1078|   729k|      }
 1079|       |
 1080|     54|    } else
 1081|     22|#endif
 1082|     22|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     22|      int last_symbol_id = 0;
 1085|  51.0k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 51.0k, False: 5]
  ------------------
 1086|  51.0k|        HoleEventData event_data;
 1087|  51.0k|        uint32_t delta;
 1088|  51.0k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 17, False: 51.0k]
  ------------------
 1089|     17|          return -1;
 1090|     17|        }
 1091|  51.0k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  51.0k|        last_symbol_id = event_data.symbol_id;
 1093|  51.0k|        hole_event_data_.push_back(event_data);
 1094|  51.0k|      }
 1095|     22|    }
 1096|     76|  }
 1097|  3.44k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  3.51k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|  2.43k|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|  2.43k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|  2.43k|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|  9.75k|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 7.31k, False: 2.43k]
  ------------------
 1109|  7.31k|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|  7.31k|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 2.69k, False: 4.61k]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|  5.48k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 2.78k, False: 2.69k]
  ------------------
 1114|  2.78k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|  2.78k|      }
 1116|  2.69k|      continue;
 1117|  2.69k|    }
 1118|       |
 1119|  10.1k|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 5.52k, False: 4.61k]
  ------------------
 1120|  5.52k|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|  5.52k|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 3.29k, False: 2.22k]
  ------------------
 1122|  3.29k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|  3.29k|      }
 1124|  5.52k|    }
 1125|  4.61k|  }
 1126|  2.43k|  return true;
 1127|  2.43k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|   236k|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|   236k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|   236k|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|   236k|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|   947k|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 710k, False: 236k]
  ------------------
 1139|   710k|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|   710k|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 40.6k, False: 669k]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   435k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 394k, False: 40.6k]
  ------------------
 1144|   394k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   394k|      }
 1146|  40.6k|      continue;
 1147|  40.6k|    }
 1148|   669k|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|   669k|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 334k, False: 334k]
  ------------------
 1151|   334k|      continue;
 1152|   334k|    }
 1153|       |
 1154|  4.14M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 3.80M, False: 334k]
  ------------------
 1155|  3.80M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  3.80M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 3.63M, False: 166k]
  ------------------
 1157|  3.63M|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|  3.63M|      }
 1159|  3.80M|    }
 1160|   334k|  }
 1161|   236k|  return true;
 1162|   236k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE21AssignPointsToCornersEi:
 1166|  3.12k|    int num_connectivity_verts) {
 1167|       |  // Map between the existing and deduplicated point ids.
 1168|       |  // Note that at this point we have one point id for each corner of the
 1169|       |  // mesh so there is corner_table_->num_corners() point ids.
 1170|  3.12k|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|  3.12k|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 42, False: 3.08k]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|  99.9k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 99.9k, False: 42]
  ------------------
 1176|  99.9k|      Mesh::Face face;
 1177|  99.9k|      const CornerIndex start_corner(3 * f.value());
 1178|   399k|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 299k, False: 99.9k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|   299k|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|   299k|        face[c] = vert_id;
 1182|   299k|      }
 1183|  99.9k|      decoder_->mesh()->SetFace(f, face);
 1184|  99.9k|    }
 1185|     42|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|     42|    return true;
 1187|     42|  }
 1188|       |  // Else we need to deduplicate multiple attributes.
 1189|       |
 1190|       |  // Map between point id and an associated corner id. Only one corner for
 1191|       |  // each point is stored. The corners are used to sample the attribute values
 1192|       |  // in the last stage of the deduplication.
 1193|  3.08k|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|  3.08k|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|   151k|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 148k, False: 3.08k]
  ------------------
 1197|   148k|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|   148k|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 3.23k, False: 144k]
  ------------------
 1199|  3.23k|      continue;  // Isolated vertex.
 1200|  3.23k|    }
 1201|   144k|    CornerIndex deduplication_first_corner = c;
 1202|   144k|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 43.1k, False: 101k]
  ------------------
 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|  43.1k|      deduplication_first_corner = c;
 1206|   101k|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|   120k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 110k, False: 9.87k]
  ------------------
 1210|   110k|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 10.2k, False: 100k]
  ------------------
 1211|  10.2k|          continue;  // No seam for this attribute, ignore it.
 1212|  10.2k|        }
 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|   100k|        const VertexIndex vert_id =
 1217|   100k|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|   100k|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|   100k|        bool seam_found = false;
 1220|   121k|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 113k, False: 8.26k]
  ------------------
 1221|   113k|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 5, False: 113k]
  ------------------
 1222|      5|            return false;
 1223|      5|          }
 1224|   113k|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 91.8k, False: 21.6k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|  91.8k|            deduplication_first_corner = act_c;
 1227|  91.8k|            seam_found = true;
 1228|  91.8k|            break;
 1229|  91.8k|          }
 1230|  21.6k|          act_c = corner_table_->SwingRight(act_c);
 1231|  21.6k|        }
 1232|   100k|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 91.8k, False: 8.26k]
  ------------------
 1233|  91.8k|          break;  // No reason to process other attributes if we found a seam.
 1234|  91.8k|        }
 1235|   100k|      }
 1236|   101k|    }
 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|   144k|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|   144k|    corner_to_point_map[c.value()] =
 1246|   144k|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|   144k|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|   144k|    CornerIndex prev_c = c;
 1250|   144k|    c = corner_table_->SwingRight(c);
 1251|   732k|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 688k, False: 43.3k]
  |  Branch (1251:40): [True: 587k, False: 101k]
  ------------------
 1252|   587k|      bool attribute_seam = false;
 1253|   689k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 636k, False: 53.2k]
  ------------------
 1254|   636k|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 533k, False: 102k]
  ------------------
 1255|   636k|            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|   533k|          attribute_seam = true;
 1259|   533k|          break;
 1260|   533k|        }
 1261|   636k|      }
 1262|   587k|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 533k, False: 53.2k]
  ------------------
 1263|   533k|        corner_to_point_map[c.value()] =
 1264|   533k|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|   533k|        point_to_corner_map.push_back(c.value());
 1266|   533k|      } else {
 1267|  53.2k|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|  53.2k|      }
 1269|   587k|      prev_c = c;
 1270|   587k|      c = corner_table_->SwingRight(c);
 1271|   587k|    }
 1272|   144k|  }
 1273|       |  // Add faces.
 1274|   229k|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 226k, False: 3.08k]
  ------------------
 1275|   226k|    Mesh::Face face;
 1276|   906k|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 679k, False: 226k]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|   679k|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|   679k|    }
 1280|   226k|    decoder_->mesh()->SetFace(f, face);
 1281|   226k|  }
 1282|  3.08k|  decoder_->point_cloud()->set_num_points(
 1283|  3.08k|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|  3.08k|  return true;
 1285|  3.08k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEEC2Ev:
   48|  2.75k|    : decoder_(nullptr),
   49|  2.75k|      last_symbol_id_(-1),
   50|  2.75k|      last_vert_id_(-1),
   51|  2.75k|      last_face_id_(-1),
   52|  2.75k|      num_new_vertices_(0),
   53|  2.75k|      num_encoded_vertices_(0),
   54|  2.75k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  2.75k|    MeshEdgebreakerDecoder* decoder) {
   59|  2.75k|  decoder_ = decoder;
   60|  2.75k|  return true;
   61|  2.75k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE23GetAttributeCornerTableEi:
   66|  2.92k|    int att_id) const {
   67|  4.19k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 3.38k, False: 802]
  ------------------
   68|  3.38k|    const int decoder_id = attribute_data_[i].decoder_id;
   69|  3.38k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 1.26k, False: 2.12k]
  |  Branch (69:27): [True: 0, False: 2.12k]
  ------------------
   70|  1.26k|      continue;
   71|  1.26k|    }
   72|  2.12k|    const AttributesDecoderInterface* const dec =
   73|  2.12k|        decoder_->attributes_decoder(decoder_id);
   74|  6.35k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 6.35k, False: 0]
  ------------------
   75|  6.35k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 2.12k, False: 4.22k]
  ------------------
   76|  2.12k|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 1.45k, False: 667]
  ------------------
   77|  1.45k|          return &attribute_data_[i].connectivity_data;
   78|  1.45k|        }
   79|    667|        return nullptr;
   80|  2.12k|      }
   81|  6.35k|    }
   82|  2.12k|  }
   83|    802|  return nullptr;
   84|  2.92k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE24GetAttributeEncodingDataEi:
   89|  2.92k|    int att_id) const {
   90|  4.19k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 3.38k, False: 802]
  ------------------
   91|  3.38k|    const int decoder_id = attribute_data_[i].decoder_id;
   92|  3.38k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 1.26k, False: 2.12k]
  |  Branch (92:27): [True: 0, False: 2.12k]
  ------------------
   93|  1.26k|      continue;
   94|  1.26k|    }
   95|  2.12k|    const AttributesDecoderInterface* const dec =
   96|  2.12k|        decoder_->attributes_decoder(decoder_id);
   97|  6.35k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 6.35k, False: 0]
  ------------------
   98|  6.35k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 2.12k, False: 4.22k]
  ------------------
   99|  2.12k|        return &attribute_data_[i].encoding_data;
  100|  2.12k|      }
  101|  6.35k|    }
  102|  2.12k|  }
  103|    802|  return &pos_encoding_data_;
  104|  2.92k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE23CreateAttributesDecoderEi:
  130|  2.31k|    int32_t att_decoder_id) {
  131|  2.31k|  int8_t att_data_id;
  132|  2.31k|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 7, False: 2.30k]
  ------------------
  133|      7|    return false;
  134|      7|  }
  135|  2.30k|  uint8_t decoder_type;
  136|  2.30k|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 9, False: 2.29k]
  ------------------
  137|      9|    return false;
  138|      9|  }
  139|       |
  140|  2.29k|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 1.65k, False: 645]
  ------------------
  141|  1.65k|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 29, False: 1.62k]
  ------------------
  142|     29|      return false;  // Unexpected attribute data.
  143|     29|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|  1.62k|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 5, False: 1.61k]
  ------------------
  148|      5|      return false;
  149|      5|    }
  150|       |
  151|  1.61k|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|  1.61k|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    645|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 2, False: 643]
  ------------------
  155|      2|      return false;  // Some other decoder is already using the data. Error.
  156|      2|    }
  157|    643|    pos_data_decoder_id_ = att_decoder_id;
  158|    643|  }
  159|       |
  160|  2.25k|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|  2.25k|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|  2.25k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 2.25k, False: 0]
  ------------------
  162|  2.25k|    uint8_t traversal_method_encoded;
  163|  2.25k|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 1, False: 2.25k]
  ------------------
  164|      1|      return false;
  165|      1|    }
  166|       |    // Check that decoded traversal method is valid.
  167|  2.25k|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 19, False: 2.23k]
  ------------------
  168|     19|      return false;
  169|     19|    }
  170|  2.23k|    traversal_method =
  171|  2.23k|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|  2.23k|  }
  173|       |
  174|  2.23k|  const Mesh* mesh = decoder_->mesh();
  175|  2.23k|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|  2.23k|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 1.21k, False: 1.02k]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|  1.21k|    MeshAttributeIndicesEncodingData* encoding_data = nullptr;
  181|  1.21k|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 625, False: 591]
  ------------------
  182|    625|      encoding_data = &pos_encoding_data_;
  183|    625|    } else {
  184|    591|      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|    591|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|    591|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|  1.21k|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 560, False: 656]
  ------------------
  191|    560|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|    560|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|    560|          AttTraverser;
  194|    560|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|    656|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 656, False: 0]
  ------------------
  196|    656|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|    656|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|    656|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|    656|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|  1.21k|  } else {
  203|  1.02k|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 4, False: 1.01k]
  ------------------
  204|      4|      return false;  // Unsupported method.
  205|      4|    }
  206|  1.01k|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 3, False: 1.01k]
  ------------------
  207|      3|      return false;  // Attribute data must be specified.
  208|      3|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|  1.01k|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|  1.01k|        AttObserver;
  214|  1.01k|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|  1.01k|        AttTraverser;
  216|       |
  217|  1.01k|    MeshAttributeIndicesEncodingData* const encoding_data =
  218|  1.01k|        &attribute_data_[att_data_id].encoding_data;
  219|  1.01k|    const MeshAttributeCornerTable* const corner_table =
  220|  1.01k|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|  1.01k|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|  1.01k|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|  1.01k|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|  1.01k|                             encoding_data);
  227|       |
  228|  1.01k|    AttTraverser att_traverser;
  229|  1.01k|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|  1.01k|    traversal_sequencer->SetTraverser(att_traverser);
  232|  1.01k|    sequencer = std::move(traversal_sequencer);
  233|  1.01k|  }
  234|       |
  235|  2.23k|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 2.23k]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|  2.23k|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|  2.23k|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|  2.23k|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|  2.23k|                                        std::move(att_controller));
  244|  2.23k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18DecodeConnectivityEv:
  247|  2.75k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  2.75k|  num_new_vertices_ = 0;
  249|  2.75k|  new_to_parent_vertex_map_.clear();
  250|  2.75k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  2.75k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.75k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 194, False: 2.56k]
  ------------------
  252|    194|    uint32_t num_new_verts;
  253|    194|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    194|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 144, False: 50]
  ------------------
  254|    144|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 144]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    144|    } else {
  258|     50|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 50]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|     50|    }
  262|    194|    num_new_vertices_ = num_new_verts;
  263|    194|  }
  264|  2.75k|#endif
  265|       |
  266|  2.75k|  uint32_t num_encoded_vertices;
  267|  2.75k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  2.75k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.75k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 144, False: 2.61k]
  ------------------
  269|    144|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 144]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    144|  } else
  274|  2.61k|#endif
  275|  2.61k|  {
  276|  2.61k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 2.61k]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|  2.61k|  }
  280|  2.75k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  2.75k|  uint32_t num_faces;
  283|  2.75k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  2.75k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.75k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 144, False: 2.61k]
  ------------------
  285|    144|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 144]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    144|  } else
  290|  2.61k|#endif
  291|  2.61k|  {
  292|  2.61k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 2.61k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  2.61k|  }
  296|  2.75k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 0, False: 2.75k]
  ------------------
  297|      0|    return false;  // Draco cannot handle this many faces.
  298|      0|  }
  299|       |
  300|  2.75k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 1, False: 2.75k]
  ------------------
  301|      1|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      1|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|  2.75k|  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.75k|  const uint64_t num_encoded_vertices_64 =
  311|  2.75k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  2.75k|  const uint64_t max_num_vertex_edges =
  313|  2.75k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  2.75k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 0, False: 2.75k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      0|    return false;
  317|      0|  }
  318|       |
  319|  2.75k|  uint8_t num_attribute_data;
  320|  2.75k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 2.75k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  2.75k|  uint32_t num_encoded_symbols;
  325|  2.75k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  2.75k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.75k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 143, False: 2.61k]
  ------------------
  327|    143|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 143]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    143|  } else
  332|  2.61k|#endif
  333|  2.61k|  {
  334|  2.61k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 2.61k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  2.61k|  }
  338|       |
  339|  2.75k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 7, False: 2.74k]
  ------------------
  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|      7|    return false;
  344|      7|  }
  345|  2.74k|  const uint32_t max_encoded_faces =
  346|  2.74k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  2.74k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 6, False: 2.74k]
  ------------------
  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|      6|    return false;
  352|      6|  }
  353|       |
  354|  2.74k|  uint32_t num_encoded_split_symbols;
  355|  2.74k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  2.74k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.74k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 131, False: 2.61k]
  ------------------
  357|    131|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 131]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    131|  } else
  362|  2.61k|#endif
  363|  2.61k|  {
  364|  2.61k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 2.61k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  2.61k|  }
  368|       |
  369|  2.74k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 1, False: 2.74k]
  ------------------
  370|      1|    return false;  // Split symbols are a sub-set of all symbols.
  371|      1|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  2.74k|  vertex_traversal_length_.clear();
  375|  2.74k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  2.74k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 2.74k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  2.74k|  processed_corner_ids_.clear();
  380|  2.74k|  processed_corner_ids_.reserve(num_faces);
  381|  2.74k|  processed_connectivity_corners_.clear();
  382|  2.74k|  processed_connectivity_corners_.reserve(num_faces);
  383|  2.74k|  topology_split_data_.clear();
  384|  2.74k|  hole_event_data_.clear();
  385|  2.74k|  init_face_configurations_.clear();
  386|  2.74k|  init_corners_.clear();
  387|       |
  388|  2.74k|  last_symbol_id_ = -1;
  389|  2.74k|  last_face_id_ = -1;
  390|  2.74k|  last_vert_id_ = -1;
  391|       |
  392|  2.74k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  2.74k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  2.74k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 0, False: 2.74k]
  ------------------
  397|  2.74k|          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.74k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  2.74k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  2.74k|  int32_t topology_split_decoded_bytes = -1;
  410|  2.74k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.74k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 179, False: 2.56k]
  ------------------
  411|    179|    uint32_t encoded_connectivity_size;
  412|    179|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    179|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 130, False: 49]
  ------------------
  413|    130|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 0, False: 130]
  ------------------
  414|      0|        return false;
  415|      0|      }
  416|    130|    } else {
  417|     49|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 49]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|     49|    }
  421|    179|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 0, False: 179]
  ------------------
  422|    179|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 5, False: 174]
  ------------------
  423|      5|      return false;
  424|      5|    }
  425|    174|    DecoderBuffer event_buffer;
  426|    174|    event_buffer.Init(
  427|    174|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    174|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    174|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    174|    topology_split_decoded_bytes =
  432|    174|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    174|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 113, False: 61]
  ------------------
  434|    113|      return false;
  435|    113|    }
  436|       |
  437|    174|  } else
  438|  2.56k|#endif
  439|  2.56k|  {
  440|  2.56k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 14, False: 2.54k]
  ------------------
  441|     14|      return false;
  442|     14|    }
  443|  2.56k|  }
  444|       |
  445|  2.60k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  2.60k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  2.60k|                                           num_encoded_split_symbols);
  449|  2.60k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  2.60k|  DecoderBuffer traversal_end_buffer;
  452|  2.60k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 52, False: 2.55k]
  ------------------
  453|     52|    return false;
  454|     52|  }
  455|       |
  456|  2.55k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  2.55k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 207, False: 2.34k]
  ------------------
  458|    207|    return false;
  459|    207|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|  2.34k|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|  2.34k|                           traversal_end_buffer.remaining_size(),
  464|  2.34k|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|  2.34k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|  2.34k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.34k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 27, False: 2.32k]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|     27|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|     27|  }
  471|  2.34k|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|  2.34k|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 2.32k, False: 25]
  ------------------
  475|  2.32k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|  2.32k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  2.32k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 26, False: 2.29k]
  ------------------
  477|  2.32k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 2.29k, False: 26]
  ------------------
  478|  2.29k|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 2.29k]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|  2.29k|      }
  482|       |
  483|     26|    } else
  484|  2.29k|#endif
  485|  2.29k|    {
  486|  11.6M|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 11.6M, False: 2.29k]
  ------------------
  487|  11.6M|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 11.6M]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|  11.6M|      }
  491|  2.29k|    }
  492|  2.32k|  }
  493|  2.34k|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  5.24k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 2.89k, False: 2.34k]
  ------------------
  498|  2.89k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  20.6M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 20.6M, False: 2.89k]
  ------------------
  501|  20.6M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  20.6M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  2.89k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 2.89k]
  ------------------
  505|  2.89k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  2.89k|  }
  509|       |
  510|  2.34k|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  5.24k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 2.89k, False: 2.34k]
  ------------------
  512|       |    // For non-position attributes, preallocate the vertex to value mapping
  513|       |    // using the maximum number of vertices from the base corner table and the
  514|       |    // attribute corner table (since the attribute decoder may use either of
  515|       |    // it).
  516|  2.89k|    int32_t att_connectivity_verts =
  517|  2.89k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  2.89k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 176, False: 2.72k]
  ------------------
  519|    176|      att_connectivity_verts = corner_table_->num_vertices();
  520|    176|    }
  521|  2.89k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  2.89k|  }
  523|  2.34k|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 4, False: 2.34k]
  ------------------
  524|      4|    return false;
  525|      4|  }
  526|  2.34k|  return true;
  527|  2.34k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE19OnAttributesDecodedEv:
  530|    694|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|    694|  return true;
  532|    694|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18DecodeConnectivityEi:
  536|  2.55k|    int num_symbols) {
  537|       |  // Algorithm does the reverse decoding of the symbols encoded with the
  538|       |  // edgebreaker method. The reverse decoding always keeps track of the active
  539|       |  // edge identified by its opposite corner (active corner). New faces are
  540|       |  // always added to this active edge. There may be multiple active corners at
  541|       |  // one time that either correspond to separate mesh components or to
  542|       |  // sub-components of one mesh that are going to be merged together using the
  543|       |  // TOPOLOGY_S symbol. We can store these active edges on a stack, because the
  544|       |  // decoder always processes only the latest active edge. TOPOLOGY_S then
  545|       |  // removes the top edge from the stack and TOPOLOGY_E adds a new edge to the
  546|       |  // stack.
  547|  2.55k|  std::vector<CornerIndex> active_corner_stack;
  548|       |
  549|       |  // Additional active edges may be added as a result of topology split events.
  550|       |  // They can be added in arbitrary order, but we always know the split symbol
  551|       |  // id they belong to, so we can address them using this symbol id.
  552|  2.55k|  std::unordered_map<int, CornerIndex> topology_split_active_corners;
  553|       |
  554|       |  // Vector used for storing vertices that were marked as isolated during the
  555|       |  // decoding process. Currently used only when the mesh doesn't contain any
  556|       |  // non-position connectivity data.
  557|  2.55k|  std::vector<VertexIndex> invalid_vertices;
  558|  2.55k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  2.55k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  2.55k|  int num_faces = 0;
  562|  80.3M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 80.3M, False: 2.44k]
  ------------------
  563|  80.3M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  80.3M|    bool check_topology_split = false;
  566|  80.3M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  80.3M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 39.3M, False: 41.0M]
  ------------------
  568|       |      // Create a new face between two edges on the open boundary.
  569|       |      // The first edge is opposite to the corner "a" from the image below.
  570|       |      // The other edge is opposite to the corner "b" that can be reached
  571|       |      // through a CCW traversal around the vertex "v".
  572|       |      // One new active boundary edge is created, opposite to the new corner
  573|       |      // "x".
  574|       |      //
  575|       |      //     *-------*
  576|       |      //    / \     / \
  577|       |      //   /   \   /   \
  578|       |      //  /     \ /     \
  579|       |      // *-------v-------*
  580|       |      //  \b    /x\    a/
  581|       |      //   \   /   \   /
  582|       |      //    \ /  C  \ /
  583|       |      //     *.......*
  584|       |
  585|       |      // Find the corner "b" from the corner "a" which is the corner on the
  586|       |      // top of the active stack.
  587|  39.3M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 2, False: 39.3M]
  ------------------
  588|      2|        return -1;
  589|      2|      }
  590|       |
  591|  39.3M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  39.3M|      const VertexIndex vertex_x =
  593|  39.3M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  39.3M|      const CornerIndex corner_b =
  595|  39.3M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  39.3M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 62, False: 39.3M]
  ------------------
  598|       |        // All matched corners must be different.
  599|     62|        return -1;
  600|     62|      }
  601|  39.3M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 39.3M]
  |  Branch (601:11): [True: 0, False: 39.3M]
  ------------------
  602|  39.3M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 39.3M]
  ------------------
  603|       |        // One of the corners is already opposite to an existing face, which
  604|       |        // should not happen unless the input was tampered with.
  605|      0|        return -1;
  606|      0|      }
  607|       |
  608|       |      // New tip corner.
  609|  39.3M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  39.3M|      SetOppositeCorners(corner_a, corner + 1);
  612|  39.3M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  39.3M|      const VertexIndex vert_a_prev =
  616|  39.3M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  39.3M|      const VertexIndex vert_b_next =
  618|  39.3M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  39.3M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 39.3M]
  |  Branch (619:38): [True: 0, False: 39.3M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  39.3M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  39.3M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  39.3M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  39.3M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  39.3M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  39.3M|      active_corner_stack.back() = corner;
  631|  41.0M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 40.8M, False: 178k]
  |  Branch (631:40): [True: 35.0k, False: 143k]
  ------------------
  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|  40.8M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 0, False: 40.8M]
  ------------------
  647|      0|        return -1;
  648|      0|      }
  649|  40.8M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  40.8M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 40.8M]
  ------------------
  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|  40.8M|      const CornerIndex corner(3 * face.value());
  658|  40.8M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  40.8M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 40.8M, False: 35.0k]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  40.8M|        opp_corner = corner + 2;
  662|  40.8M|        corner_l = corner + 1;
  663|  40.8M|        corner_r = corner;
  664|  40.8M|      } else {
  665|       |        // "l" is the new first corner.
  666|  35.0k|        opp_corner = corner + 1;
  667|  35.0k|        corner_l = corner;
  668|  35.0k|        corner_r = corner + 2;
  669|  35.0k|      }
  670|  40.8M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  40.8M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  40.8M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 5, False: 40.8M]
  ------------------
  675|      5|        return -1;  // Unexpected number of decoded vertices.
  676|      5|      }
  677|       |
  678|  40.8M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  40.8M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  40.8M|      const VertexIndex vertex_r =
  682|  40.8M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  40.8M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  40.8M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  40.8M|      corner_table_->MapCornerToVertex(
  688|  40.8M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  40.8M|      active_corner_stack.back() = corner;
  690|  40.8M|      check_topology_split = true;
  691|  40.8M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 30.1k, False: 113k]
  ------------------
  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|  30.1k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 2, False: 30.1k]
  ------------------
  703|      2|        return -1;
  704|      2|      }
  705|  30.1k|      const CornerIndex corner_b = active_corner_stack.back();
  706|  30.1k|      active_corner_stack.pop_back();
  707|       |
  708|       |      // Corner "a" can correspond either to a normal active edge, or to an edge
  709|       |      // created from the topology split event.
  710|  30.1k|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  30.1k|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 53, False: 30.1k]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|     53|        active_corner_stack.push_back(it->second);
  714|     53|      }
  715|  30.1k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 12, False: 30.1k]
  ------------------
  716|     12|        return -1;
  717|     12|      }
  718|  30.1k|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  30.1k|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 30.1k]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  30.1k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 14, False: 30.1k]
  |  Branch (724:11): [True: 14, False: 30.1k]
  ------------------
  725|  30.1k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 30.1k]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|     14|        return -1;
  729|     14|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  30.1k|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  30.1k|      SetOppositeCorners(corner_a, corner + 2);
  735|  30.1k|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  30.1k|      const VertexIndex vertex_p =
  739|  30.1k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  30.1k|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  30.1k|      corner_table_->MapCornerToVertex(
  742|  30.1k|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  30.1k|      const VertexIndex vert_b_prev =
  744|  30.1k|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  30.1k|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  30.1k|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  30.1k|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  30.1k|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  30.1k|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  30.1k|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  30.1k|                                       corner_table_->LeftMostCorner(vertex_n));
  753|       |
  754|       |      // Also update the vertex id at corner "n" and all corners that are
  755|       |      // connected to it in the CCW direction.
  756|  30.1k|      const CornerIndex first_corner = corner_n;
  757|   149k|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 119k, False: 30.1k]
  ------------------
  758|   119k|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|   119k|        corner_n = corner_table_->SwingLeft(corner_n);
  760|   119k|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 1, False: 119k]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      1|          return -1;
  764|      1|        }
  765|   119k|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  30.1k|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  30.1k|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 8.40k, False: 21.7k]
  ------------------
  770|  8.40k|        invalid_vertices.push_back(vertex_n);
  771|  8.40k|      }
  772|  30.1k|      active_corner_stack.back() = corner;
  773|   113k|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 113k, False: 0]
  ------------------
  774|   113k|      const CornerIndex corner(3 * face.value());
  775|   113k|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|   113k|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|   113k|      corner_table_->MapCornerToVertex(corner + 1,
  779|   113k|                                       corner_table_->AddNewVertex());
  780|   113k|      corner_table_->MapCornerToVertex(corner + 2,
  781|   113k|                                       corner_table_->AddNewVertex());
  782|       |
  783|   113k|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 1, False: 113k]
  ------------------
  784|      1|        return -1;  // Unexpected number of decoded vertices.
  785|      1|      }
  786|       |
  787|   113k|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|   113k|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|   113k|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|   113k|      active_corner_stack.push_back(corner);
  792|   113k|      check_topology_split = true;
  793|   113k|    } 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|  80.3M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  80.3M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 40.9M, False: 39.3M]
  ------------------
  801|       |      // Check for topology splits happens only for TOPOLOGY_L, TOPOLOGY_R and
  802|       |      // TOPOLOGY_E symbols because those are the symbols that correspond to
  803|       |      // faces that can be directly connected a TOPOLOGY_S face through the
  804|       |      // topology split event.
  805|       |      // If a topology split is detected, we need to add a new active edge
  806|       |      // onto the active_corner_stack because it will be used later when the
  807|       |      // corresponding TOPOLOGY_S event is decoded.
  808|       |
  809|       |      // Symbol id used by the encoder (reverse).
  810|  40.9M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  40.9M|      EdgeFaceName split_edge;
  812|  40.9M|      int encoder_split_symbol_id;
  813|  40.9M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 1.43k, False: 40.9M]
  ------------------
  814|  40.9M|                             &encoder_split_symbol_id)) {
  815|  1.43k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 10, False: 1.42k]
  ------------------
  816|     10|          return -1;  // Wrong split symbol id.
  817|     10|        }
  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.42k|        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.42k|        CornerIndex new_active_corner;
  831|  1.42k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 633, False: 790]
  ------------------
  832|    633|          new_active_corner = corner_table_->Next(act_top_corner);
  833|    790|        } else {
  834|    790|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|    790|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  1.42k|        const int decoder_split_symbol_id =
  839|  1.42k|            num_symbols - encoder_split_symbol_id - 1;
  840|  1.42k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  1.42k|            new_active_corner;
  842|  1.42k|      }
  843|  40.9M|    }
  844|  80.3M|  }
  845|  2.44k|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 2.44k]
  ------------------
  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|  76.9k|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 74.4k, False: 2.41k]
  ------------------
  850|  74.4k|    const CornerIndex corner = active_corner_stack.back();
  851|  74.4k|    active_corner_stack.pop_back();
  852|  74.4k|    const bool interior_face =
  853|  74.4k|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  74.4k|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 70.8k, False: 3.62k]
  ------------------
  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|  70.8k|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 12, False: 70.8k]
  ------------------
  877|     12|        return -1;  // More faces than expected added to the mesh.
  878|     12|      }
  879|       |
  880|  70.8k|      const CornerIndex corner_a = corner;
  881|  70.8k|      const VertexIndex vert_n =
  882|  70.8k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  70.8k|      const CornerIndex corner_b =
  884|  70.8k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  70.8k|      const VertexIndex vert_x =
  887|  70.8k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  70.8k|      const CornerIndex corner_c =
  889|  70.8k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  70.8k|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 3, False: 70.8k]
  |  Branch (891:33): [True: 15, False: 70.8k]
  |  Branch (891:55): [True: 0, False: 70.8k]
  ------------------
  892|       |        // All matched corners must be different.
  893|     18|        return -1;
  894|     18|      }
  895|  70.8k|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 2, False: 70.8k]
  |  Branch (895:11): [True: 2, False: 70.8k]
  ------------------
  896|  70.8k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 0, False: 70.8k]
  ------------------
  897|  70.8k|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 0, False: 70.8k]
  ------------------
  898|       |        // One of the corners is already opposite to an existing face, which
  899|       |        // should not happen unless the input was tampered with.
  900|      2|        return -1;
  901|      2|      }
  902|       |
  903|  70.8k|      const VertexIndex vert_p =
  904|  70.8k|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  70.8k|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  70.8k|      const CornerIndex new_corner(3 * face.value());
  909|  70.8k|      SetOppositeCorners(new_corner, corner);
  910|  70.8k|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  70.8k|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  70.8k|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  70.8k|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  70.8k|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|   283k|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 212k, False: 70.8k]
  ------------------
  920|   212k|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|   212k|      }
  922|       |
  923|  70.8k|      init_face_configurations_.push_back(true);
  924|  70.8k|      init_corners_.push_back(new_corner);
  925|  70.8k|    } else {
  926|       |      // The initial face wasn't interior and the traversal had to start from
  927|       |      // an open boundary. In this case no new face is added, but we need to
  928|       |      // keep record about the first opposite corner to this boundary.
  929|  3.62k|      init_face_configurations_.push_back(false);
  930|  3.62k|      init_corners_.push_back(corner);
  931|  3.62k|    }
  932|  74.4k|  }
  933|  2.41k|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 65, False: 2.35k]
  ------------------
  934|     65|    return -1;  // Unexpected number of decoded faces.
  935|     65|  }
  936|       |
  937|  2.35k|  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|  2.35k|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 593, False: 2.34k]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|    593|    VertexIndex src_vert(num_vertices - 1);
  943|    629|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 36, False: 593]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|     36|      src_vert = VertexIndex(--num_vertices - 1);
  946|     36|    }
  947|    593|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 36, False: 557]
  ------------------
  948|     36|      continue;  // No need to swap anything.
  949|     36|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|    557|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|  3.09k|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 2.54k, False: 556]
  ------------------
  954|  2.54k|      const CornerIndex cid = vcit.Corner();
  955|  2.54k|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 1, False: 2.54k]
  ------------------
  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|  2.54k|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|  2.54k|    }
  962|    556|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|    556|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|    556|    corner_table_->MakeVertexIsolated(src_vert);
  967|    556|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|    556|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|    556|    num_vertices--;
  972|    556|  }
  973|  2.34k|  return num_vertices;
  974|  2.35k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  2.73k|    DecoderBuffer* decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  2.73k|  uint32_t num_topology_splits;
  982|  2.73k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  2.73k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.73k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 125, False: 2.61k]
  ------------------
  984|    125|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 0, False: 125]
  ------------------
  985|      0|      return -1;
  986|      0|    }
  987|       |
  988|    125|  } else
  989|  2.61k|#endif
  990|  2.61k|  {
  991|  2.61k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 2.61k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  2.61k|  }
  995|  2.73k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 513, False: 2.22k]
  ------------------
  996|    513|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 17, False: 496]
  ------------------
  997|    513|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|     17|      return -1;
  999|     17|    }
 1000|    496|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|    496|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    496|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 61, False: 435]
  ------------------
 1002|  30.1k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 30.1k, False: 28]
  ------------------
 1003|  30.1k|        TopologySplitEventData event_data;
 1004|  30.1k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 25, False: 30.0k]
  ------------------
 1005|     25|          return -1;
 1006|     25|        }
 1007|  30.0k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 6, False: 30.0k]
  ------------------
 1008|      6|          return -1;
 1009|      6|        }
 1010|  30.0k|        uint8_t edge_data;
 1011|  30.0k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 2, False: 30.0k]
  ------------------
 1012|      2|          return -1;
 1013|      2|        }
 1014|  30.0k|        event_data.source_edge = edge_data & 1;
 1015|  30.0k|        topology_split_data_.push_back(event_data);
 1016|  30.0k|      }
 1017|       |
 1018|     61|    } else
 1019|    435|#endif
 1020|    435|    {
 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|    435|      int last_source_symbol_id = 0;
 1024|  3.73k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 3.30k, False: 427]
  ------------------
 1025|  3.30k|        TopologySplitEventData event_data;
 1026|  3.30k|        uint32_t delta;
 1027|  3.30k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 4, False: 3.30k]
  ------------------
 1028|      4|          return -1;
 1029|      4|        }
 1030|  3.30k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  3.30k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 4, False: 3.29k]
  ------------------
 1032|      4|          return -1;
 1033|      4|        }
 1034|  3.29k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 0, False: 3.29k]
  ------------------
 1035|      0|          return -1;
 1036|      0|        }
 1037|  3.29k|        event_data.split_symbol_id =
 1038|  3.29k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  3.29k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  3.29k|        topology_split_data_.push_back(event_data);
 1041|  3.29k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|    427|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  3.27k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 2.84k, False: 427]
  ------------------
 1045|  2.84k|        uint32_t edge_data;
 1046|  2.84k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.84k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 818, False: 2.02k]
  ------------------
 1047|    818|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  2.02k|        } else {
 1049|  2.02k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  2.02k|        }
 1051|  2.84k|        TopologySplitEventData& event_data = topology_split_data_[i];
 1052|  2.84k|        event_data.source_edge = edge_data & 1;
 1053|  2.84k|      }
 1054|    427|      decoder_buffer->EndBitDecoding();
 1055|    427|    }
 1056|    496|  }
 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: 81, False: 2.59k]
  ------------------
 1060|     81|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 3, False: 78]
  ------------------
 1061|      3|      return -1;
 1062|      3|    }
 1063|  2.59k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  2.59k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 44, False: 2.55k]
  ------------------
 1064|     44|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 3, False: 41]
  ------------------
 1065|      3|      return -1;
 1066|      3|    }
 1067|     44|  }
 1068|  2.67k|#endif
 1069|  2.67k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 72, False: 2.59k]
  ------------------
 1070|     72|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     72|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     72|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 48, False: 24]
  ------------------
 1072|  1.29M|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 1.29M, False: 2]
  ------------------
 1073|  1.29M|        HoleEventData event_data;
 1074|  1.29M|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 46, False: 1.29M]
  ------------------
 1075|     46|          return -1;
 1076|     46|        }
 1077|  1.29M|        hole_event_data_.push_back(event_data);
 1078|  1.29M|      }
 1079|       |
 1080|     48|    } else
 1081|     24|#endif
 1082|     24|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     24|      int last_symbol_id = 0;
 1085|  17.6k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 17.6k, False: 7]
  ------------------
 1086|  17.6k|        HoleEventData event_data;
 1087|  17.6k|        uint32_t delta;
 1088|  17.6k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 17, False: 17.6k]
  ------------------
 1089|     17|          return -1;
 1090|     17|        }
 1091|  17.6k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  17.6k|        last_symbol_id = event_data.symbol_id;
 1093|  17.6k|        hole_event_data_.push_back(event_data);
 1094|  17.6k|      }
 1095|     24|    }
 1096|     72|  }
 1097|  2.60k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  2.67k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|  2.29k|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|  2.29k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|  2.29k|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|  9.19k|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 6.89k, False: 2.29k]
  ------------------
 1109|  6.89k|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|  6.89k|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 775, False: 6.12k]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|  1.69k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 924, False: 775]
  ------------------
 1114|    924|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|    924|      }
 1116|    775|      continue;
 1117|    775|    }
 1118|       |
 1119|  13.8k|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 7.72k, False: 6.12k]
  ------------------
 1120|  7.72k|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|  7.72k|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 4.86k, False: 2.86k]
  ------------------
 1122|  4.86k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|  4.86k|      }
 1124|  7.72k|    }
 1125|  6.12k|  }
 1126|  2.29k|  return true;
 1127|  2.29k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|  11.6M|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|  11.6M|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|  11.6M|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|  11.6M|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  46.5M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 34.9M, False: 11.6M]
  ------------------
 1139|  34.9M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  34.9M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 156k, False: 34.7M]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   354k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 198k, False: 156k]
  ------------------
 1144|   198k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   198k|      }
 1146|   156k|      continue;
 1147|   156k|    }
 1148|  34.7M|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|  34.7M|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 17.3M, False: 17.3M]
  ------------------
 1151|  17.3M|      continue;
 1152|  17.3M|    }
 1153|       |
 1154|  40.8M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 23.4M, False: 17.3M]
  ------------------
 1155|  23.4M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  23.4M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 20.4M, False: 2.93M]
  ------------------
 1157|  20.4M|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|  20.4M|      }
 1159|  23.4M|    }
 1160|  17.3M|  }
 1161|  11.6M|  return true;
 1162|  11.6M|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE21AssignPointsToCornersEi:
 1166|  2.34k|    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.34k|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|  2.34k|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 25, False: 2.32k]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|   131k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 131k, False: 25]
  ------------------
 1176|   131k|      Mesh::Face face;
 1177|   131k|      const CornerIndex start_corner(3 * f.value());
 1178|   524k|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 393k, False: 131k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|   393k|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|   393k|        face[c] = vert_id;
 1182|   393k|      }
 1183|   131k|      decoder_->mesh()->SetFace(f, face);
 1184|   131k|    }
 1185|     25|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|     25|    return true;
 1187|     25|  }
 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.32k|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|  2.32k|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|  5.90M|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 5.90M, False: 2.32k]
  ------------------
 1197|  5.90M|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|  5.90M|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 3.07k, False: 5.90M]
  ------------------
 1199|  3.07k|      continue;  // Isolated vertex.
 1200|  3.07k|    }
 1201|  5.90M|    CornerIndex deduplication_first_corner = c;
 1202|  5.90M|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 156k, False: 5.74M]
  ------------------
 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|   156k|      deduplication_first_corner = c;
 1206|  5.74M|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|  6.04M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 5.76M, False: 281k]
  ------------------
 1210|  5.76M|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 289k, False: 5.47M]
  ------------------
 1211|   289k|          continue;  // No seam for this attribute, ignore it.
 1212|   289k|        }
 1213|       |        // Else there needs to be at least one seam edge.
 1214|       |
 1215|       |        // At this point, we use identity mapping between corners and point ids.
 1216|  5.47M|        const VertexIndex vert_id =
 1217|  5.47M|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|  5.47M|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|  5.47M|        bool seam_found = false;
 1220|  5.60M|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 5.58M, False: 14.1k]
  ------------------
 1221|  5.58M|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 4, False: 5.58M]
  ------------------
 1222|      4|            return false;
 1223|      4|          }
 1224|  5.58M|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 5.46M, False: 124k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|  5.46M|            deduplication_first_corner = act_c;
 1227|  5.46M|            seam_found = true;
 1228|  5.46M|            break;
 1229|  5.46M|          }
 1230|   124k|          act_c = corner_table_->SwingRight(act_c);
 1231|   124k|        }
 1232|  5.47M|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 5.46M, False: 14.1k]
  ------------------
 1233|  5.46M|          break;  // No reason to process other attributes if we found a seam.
 1234|  5.46M|        }
 1235|  5.47M|      }
 1236|  5.74M|    }
 1237|       |
 1238|       |    // Do a deduplication pass over the corners on the processed vertex.
 1239|       |    // At this point each corner corresponds to one point id and our goal is to
 1240|       |    // merge similar points into a single point id.
 1241|       |    // We do a single pass in a clockwise direction over the corners and we add
 1242|       |    // a new point id whenever one of the attributes change.
 1243|  5.90M|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|  5.90M|    corner_to_point_map[c.value()] =
 1246|  5.90M|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|  5.90M|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|  5.90M|    CornerIndex prev_c = c;
 1250|  5.90M|    c = corner_table_->SwingRight(c);
 1251|  34.8M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 34.7M, False: 158k]
  |  Branch (1251:40): [True: 28.9M, False: 5.74M]
  ------------------
 1252|  28.9M|      bool attribute_seam = false;
 1253|  30.6M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 29.1M, False: 1.49M]
  ------------------
 1254|  29.1M|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 27.4M, False: 1.61M]
  ------------------
 1255|  29.1M|            attribute_data_[i].connectivity_data.Vertex(prev_c)) {
 1256|       |          // Attribute index changed from the previous corner. We need to add a
 1257|       |          // new point here.
 1258|  27.4M|          attribute_seam = true;
 1259|  27.4M|          break;
 1260|  27.4M|        }
 1261|  29.1M|      }
 1262|  28.9M|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 27.4M, False: 1.49M]
  ------------------
 1263|  27.4M|        corner_to_point_map[c.value()] =
 1264|  27.4M|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|  27.4M|        point_to_corner_map.push_back(c.value());
 1266|  27.4M|      } else {
 1267|  1.49M|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|  1.49M|      }
 1269|  28.9M|      prev_c = c;
 1270|  28.9M|      c = corner_table_->SwingRight(c);
 1271|  28.9M|    }
 1272|  5.90M|  }
 1273|       |  // Add faces.
 1274|  11.5M|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 11.5M, False: 2.32k]
  ------------------
 1275|  11.5M|    Mesh::Face face;
 1276|  46.3M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 34.7M, False: 11.5M]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|  34.7M|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|  34.7M|    }
 1280|  11.5M|    decoder_->mesh()->SetFace(f, face);
 1281|  11.5M|  }
 1282|  2.32k|  decoder_->point_cloud()->set_num_points(
 1283|  2.32k|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|  2.32k|  return true;
 1285|  2.32k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEEC2Ev:
   48|  2.49k|    : decoder_(nullptr),
   49|  2.49k|      last_symbol_id_(-1),
   50|  2.49k|      last_vert_id_(-1),
   51|  2.49k|      last_face_id_(-1),
   52|  2.49k|      num_new_vertices_(0),
   53|  2.49k|      num_encoded_vertices_(0),
   54|  2.49k|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|  2.49k|    MeshEdgebreakerDecoder* decoder) {
   59|  2.49k|  decoder_ = decoder;
   60|  2.49k|  return true;
   61|  2.49k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE23GetAttributeCornerTableEi:
   66|  1.22k|    int att_id) const {
   67|  2.18k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 1.65k, False: 533]
  ------------------
   68|  1.65k|    const int decoder_id = attribute_data_[i].decoder_id;
   69|  1.65k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 947, False: 707]
  |  Branch (69:27): [True: 0, False: 707]
  ------------------
   70|    947|      continue;
   71|    947|    }
   72|    707|    const AttributesDecoderInterface* const dec =
   73|    707|        decoder_->attributes_decoder(decoder_id);
   74|  20.2k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 20.2k, False: 16]
  ------------------
   75|  20.2k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 691, False: 19.5k]
  ------------------
   76|    691|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 558, False: 133]
  ------------------
   77|    558|          return &attribute_data_[i].connectivity_data;
   78|    558|        }
   79|    133|        return nullptr;
   80|    691|      }
   81|  20.2k|    }
   82|    707|  }
   83|    533|  return nullptr;
   84|  1.22k|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE24GetAttributeEncodingDataEi:
   89|  1.22k|    int att_id) const {
   90|  2.18k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 1.65k, False: 533]
  ------------------
   91|  1.65k|    const int decoder_id = attribute_data_[i].decoder_id;
   92|  1.65k|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 947, False: 707]
  |  Branch (92:27): [True: 0, False: 707]
  ------------------
   93|    947|      continue;
   94|    947|    }
   95|    707|    const AttributesDecoderInterface* const dec =
   96|    707|        decoder_->attributes_decoder(decoder_id);
   97|  20.2k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 20.2k, False: 16]
  ------------------
   98|  20.2k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 691, False: 19.5k]
  ------------------
   99|    691|        return &attribute_data_[i].encoding_data;
  100|    691|      }
  101|  20.2k|    }
  102|    707|  }
  103|    533|  return &pos_encoding_data_;
  104|  1.22k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE23CreateAttributesDecoderEi:
  130|    852|    int32_t att_decoder_id) {
  131|    852|  int8_t att_data_id;
  132|    852|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 9, False: 843]
  ------------------
  133|      9|    return false;
  134|      9|  }
  135|    843|  uint8_t decoder_type;
  136|    843|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 8, False: 835]
  ------------------
  137|      8|    return false;
  138|      8|  }
  139|       |
  140|    835|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 505, False: 330]
  ------------------
  141|    505|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 19, False: 486]
  ------------------
  142|     19|      return false;  // Unexpected attribute data.
  143|     19|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|    486|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 7, False: 479]
  ------------------
  148|      7|      return false;
  149|      7|    }
  150|       |
  151|    479|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|    479|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|    330|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 1, False: 329]
  ------------------
  155|      1|      return false;  // Some other decoder is already using the data. Error.
  156|      1|    }
  157|    329|    pos_data_decoder_id_ = att_decoder_id;
  158|    329|  }
  159|       |
  160|    808|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|    808|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    808|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 808, False: 0]
  ------------------
  162|    808|    uint8_t traversal_method_encoded;
  163|    808|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 1, False: 807]
  ------------------
  164|      1|      return false;
  165|      1|    }
  166|       |    // Check that decoded traversal method is valid.
  167|    807|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 15, False: 792]
  ------------------
  168|     15|      return false;
  169|     15|    }
  170|    792|    traversal_method =
  171|    792|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|    792|  }
  173|       |
  174|    792|  const Mesh* mesh = decoder_->mesh();
  175|    792|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|    792|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 476, False: 316]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|    476|    MeshAttributeIndicesEncodingData* encoding_data = nullptr;
  181|    476|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 319, False: 157]
  ------------------
  182|    319|      encoding_data = &pos_encoding_data_;
  183|    319|    } else {
  184|    157|      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|    157|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|    157|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|    476|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 250, False: 226]
  ------------------
  191|    250|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|    250|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|    250|          AttTraverser;
  194|    250|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|    250|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 226, False: 0]
  ------------------
  196|    226|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|    226|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|    226|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|    226|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|    476|  } else {
  203|    316|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 8, False: 308]
  ------------------
  204|      8|      return false;  // Unsupported method.
  205|      8|    }
  206|    308|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 0, False: 308]
  ------------------
  207|      0|      return false;  // Attribute data must be specified.
  208|      0|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|    308|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|    308|        AttObserver;
  214|    308|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|    308|        AttTraverser;
  216|       |
  217|    308|    MeshAttributeIndicesEncodingData* const encoding_data =
  218|    308|        &attribute_data_[att_data_id].encoding_data;
  219|    308|    const MeshAttributeCornerTable* const corner_table =
  220|    308|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|    308|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|    308|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|    308|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|    308|                             encoding_data);
  227|       |
  228|    308|    AttTraverser att_traverser;
  229|    308|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|    308|    traversal_sequencer->SetTraverser(att_traverser);
  232|    308|    sequencer = std::move(traversal_sequencer);
  233|    308|  }
  234|       |
  235|    784|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 784]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|    784|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|    784|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|    784|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|    784|                                        std::move(att_controller));
  244|    784|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18DecodeConnectivityEv:
  247|  2.49k|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|  2.49k|  num_new_vertices_ = 0;
  249|  2.49k|  new_to_parent_vertex_map_.clear();
  250|  2.49k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|  2.49k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.49k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 400, False: 2.09k]
  ------------------
  252|    400|    uint32_t num_new_verts;
  253|    400|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    400|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 358, False: 42]
  ------------------
  254|    358|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 358]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|    358|    } else {
  258|     42|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 42]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|     42|    }
  262|    400|    num_new_vertices_ = num_new_verts;
  263|    400|  }
  264|  2.49k|#endif
  265|       |
  266|  2.49k|  uint32_t num_encoded_vertices;
  267|  2.49k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|  2.49k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.49k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 358, False: 2.13k]
  ------------------
  269|    358|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 358]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|    358|  } else
  274|  2.13k|#endif
  275|  2.13k|  {
  276|  2.13k|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 2.13k]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|  2.13k|  }
  280|  2.49k|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|  2.49k|  uint32_t num_faces;
  283|  2.49k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|  2.49k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.49k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 358, False: 2.13k]
  ------------------
  285|    358|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 358]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|    358|  } else
  290|  2.13k|#endif
  291|  2.13k|  {
  292|  2.13k|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 2.13k]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|  2.13k|  }
  296|  2.49k|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 1, False: 2.49k]
  ------------------
  297|      1|    return false;  // Draco cannot handle this many faces.
  298|      1|  }
  299|       |
  300|  2.49k|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 2, False: 2.49k]
  ------------------
  301|      2|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      2|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|  2.49k|  const uint32_t min_num_face_edges = 3 * num_faces / 2;
  307|       |
  308|       |  // Maximum number of edges that can exist between |num_encoded_vertices_|.
  309|       |  // This is based on graph theory assuming simple connected graph.
  310|  2.49k|  const uint64_t num_encoded_vertices_64 =
  311|  2.49k|      static_cast<uint64_t>(num_encoded_vertices_);
  312|  2.49k|  const uint64_t max_num_vertex_edges =
  313|  2.49k|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|  2.49k|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 1, False: 2.49k]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      1|    return false;
  317|      1|  }
  318|       |
  319|  2.49k|  uint8_t num_attribute_data;
  320|  2.49k|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 2.49k]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|  2.49k|  uint32_t num_encoded_symbols;
  325|  2.49k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|  2.49k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.49k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 355, False: 2.13k]
  ------------------
  327|    355|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 355]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|    355|  } else
  332|  2.13k|#endif
  333|  2.13k|  {
  334|  2.13k|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 2.13k]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|  2.13k|  }
  338|       |
  339|  2.49k|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 2, False: 2.48k]
  ------------------
  340|       |    // Number of faces needs to be the same or greater than the number of
  341|       |    // symbols (it can be greater because the initial face may not be encoded as
  342|       |    // a symbol).
  343|      2|    return false;
  344|      2|  }
  345|  2.48k|  const uint32_t max_encoded_faces =
  346|  2.48k|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|  2.48k|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 2, False: 2.48k]
  ------------------
  348|       |    // Faces can only be 1 1/3 times bigger than number of encoded symbols. This
  349|       |    // could only happen if all new encoded components started with interior
  350|       |    // triangles. E.g. A mesh with multiple tetrahedrons.
  351|      2|    return false;
  352|      2|  }
  353|       |
  354|  2.48k|  uint32_t num_encoded_split_symbols;
  355|  2.48k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|  2.48k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.48k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 351, False: 2.13k]
  ------------------
  357|    351|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 351]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|    351|  } else
  362|  2.13k|#endif
  363|  2.13k|  {
  364|  2.13k|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 2.13k]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|  2.13k|  }
  368|       |
  369|  2.48k|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 4, False: 2.48k]
  ------------------
  370|      4|    return false;  // Split symbols are a sub-set of all symbols.
  371|      4|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|  2.48k|  vertex_traversal_length_.clear();
  375|  2.48k|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|  2.48k|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 2.48k]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|  2.48k|  processed_corner_ids_.clear();
  380|  2.48k|  processed_corner_ids_.reserve(num_faces);
  381|  2.48k|  processed_connectivity_corners_.clear();
  382|  2.48k|  processed_connectivity_corners_.reserve(num_faces);
  383|  2.48k|  topology_split_data_.clear();
  384|  2.48k|  hole_event_data_.clear();
  385|  2.48k|  init_face_configurations_.clear();
  386|  2.48k|  init_corners_.clear();
  387|       |
  388|  2.48k|  last_symbol_id_ = -1;
  389|  2.48k|  last_face_id_ = -1;
  390|  2.48k|  last_vert_id_ = -1;
  391|       |
  392|  2.48k|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|  2.48k|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|  2.48k|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 0, False: 2.48k]
  ------------------
  397|  2.48k|          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.48k|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|  2.48k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|  2.48k|  int32_t topology_split_decoded_bytes = -1;
  410|  2.48k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.48k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 389, False: 2.09k]
  ------------------
  411|    389|    uint32_t encoded_connectivity_size;
  412|    389|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    389|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 347, False: 42]
  ------------------
  413|    347|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 0, False: 347]
  ------------------
  414|      0|        return false;
  415|      0|      }
  416|    347|    } else {
  417|     42|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 42]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|     42|    }
  421|    389|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 1, False: 388]
  ------------------
  422|    388|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 0, False: 388]
  ------------------
  423|      1|      return false;
  424|      1|    }
  425|    388|    DecoderBuffer event_buffer;
  426|    388|    event_buffer.Init(
  427|    388|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|    388|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|    388|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|    388|    topology_split_decoded_bytes =
  432|    388|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|    388|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 127, False: 261]
  ------------------
  434|    127|      return false;
  435|    127|    }
  436|       |
  437|    388|  } else
  438|  2.09k|#endif
  439|  2.09k|  {
  440|  2.09k|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 13, False: 2.08k]
  ------------------
  441|     13|      return false;
  442|     13|    }
  443|  2.09k|  }
  444|       |
  445|  2.34k|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|  2.34k|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|  2.34k|                                           num_encoded_split_symbols);
  449|  2.34k|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|  2.34k|  DecoderBuffer traversal_end_buffer;
  452|  2.34k|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 814, False: 1.52k]
  ------------------
  453|    814|    return false;
  454|    814|  }
  455|       |
  456|  1.52k|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|  1.52k|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 726, False: 801]
  ------------------
  458|    726|    return false;
  459|    726|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|    801|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|    801|                           traversal_end_buffer.remaining_size(),
  464|    801|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|    801|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|    801|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    801|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 5, False: 796]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|      5|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|      5|  }
  471|    801|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|    801|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 769, False: 32]
  ------------------
  475|    769|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|    769|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|    769|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 5, False: 764]
  ------------------
  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|    764|#endif
  485|    764|    {
  486|   405k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 405k, False: 764]
  ------------------
  487|   405k|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 405k]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|   405k|      }
  491|    764|    }
  492|    769|  }
  493|    801|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|  2.77k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 1.97k, False: 801]
  ------------------
  498|  1.97k|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|   588k|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 588k, False: 1.97k]
  ------------------
  501|   588k|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|   588k|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|  1.97k|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 1.97k]
  ------------------
  505|  1.97k|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|  1.97k|  }
  509|       |
  510|    801|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|  2.77k|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 1.97k, False: 801]
  ------------------
  512|       |    // For non-position attributes, preallocate the vertex to value mapping
  513|       |    // using the maximum number of vertices from the base corner table and the
  514|       |    // attribute corner table (since the attribute decoder may use either of
  515|       |    // it).
  516|  1.97k|    int32_t att_connectivity_verts =
  517|  1.97k|        attribute_data_[i].connectivity_data.num_vertices();
  518|  1.97k|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 3, False: 1.97k]
  ------------------
  519|      3|      att_connectivity_verts = corner_table_->num_vertices();
  520|      3|    }
  521|  1.97k|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|  1.97k|  }
  523|    801|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 13, False: 788]
  ------------------
  524|     13|    return false;
  525|     13|  }
  526|    788|  return true;
  527|    801|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE19OnAttributesDecodedEv:
  530|     96|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|     96|  return true;
  532|     96|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18DecodeConnectivityEi:
  536|  1.52k|    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.52k|  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.52k|  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.52k|  std::vector<VertexIndex> invalid_vertices;
  558|  1.52k|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|  1.52k|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|  1.52k|  int num_faces = 0;
  562|   101M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 101M, False: 960]
  ------------------
  563|   101M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|   101M|    bool check_topology_split = false;
  566|   101M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|   101M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 3.41M, False: 97.9M]
  ------------------
  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|  3.41M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 101, False: 3.41M]
  ------------------
  588|    101|        return -1;
  589|    101|      }
  590|       |
  591|  3.41M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  3.41M|      const VertexIndex vertex_x =
  593|  3.41M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  3.41M|      const CornerIndex corner_b =
  595|  3.41M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  3.41M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 178, False: 3.41M]
  ------------------
  598|       |        // All matched corners must be different.
  599|    178|        return -1;
  600|    178|      }
  601|  3.41M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 3.41M]
  |  Branch (601:11): [True: 0, False: 3.41M]
  ------------------
  602|  3.41M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 3.41M]
  ------------------
  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|  3.41M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  3.41M|      SetOppositeCorners(corner_a, corner + 1);
  612|  3.41M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  3.41M|      const VertexIndex vert_a_prev =
  616|  3.41M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  3.41M|      const VertexIndex vert_b_next =
  618|  3.41M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  3.41M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 3.41M]
  |  Branch (619:38): [True: 0, False: 3.41M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  3.41M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  3.41M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  3.41M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  3.41M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  3.41M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  3.41M|      active_corner_stack.back() = corner;
  631|  97.9M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 8.91k, False: 97.9M]
  |  Branch (631:40): [True: 87.3M, False: 10.5M]
  ------------------
  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|  87.3M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 1, False: 87.3M]
  ------------------
  647|      1|        return -1;
  648|      1|      }
  649|  87.3M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  87.3M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 87.3M]
  ------------------
  651|       |        // Active corner is already opposite to an existing face, which should
  652|       |        // not happen unless the input was tampered with.
  653|      0|        return -1;
  654|      0|      }
  655|       |
  656|       |      // First corner on the new face is either corner "l" or "r".
  657|  87.3M|      const CornerIndex corner(3 * face.value());
  658|  87.3M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  87.3M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 8.91k, False: 87.3M]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  8.91k|        opp_corner = corner + 2;
  662|  8.91k|        corner_l = corner + 1;
  663|  8.91k|        corner_r = corner;
  664|  87.3M|      } else {
  665|       |        // "l" is the new first corner.
  666|  87.3M|        opp_corner = corner + 1;
  667|  87.3M|        corner_l = corner;
  668|  87.3M|        corner_r = corner + 2;
  669|  87.3M|      }
  670|  87.3M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  87.3M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  87.3M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 10, False: 87.3M]
  ------------------
  675|     10|        return -1;  // Unexpected number of decoded vertices.
  676|     10|      }
  677|       |
  678|  87.3M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  87.3M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  87.3M|      const VertexIndex vertex_r =
  682|  87.3M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  87.3M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  87.3M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  87.3M|      corner_table_->MapCornerToVertex(
  688|  87.3M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  87.3M|      active_corner_stack.back() = corner;
  690|  87.3M|      check_topology_split = true;
  691|  87.3M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 45.7k, False: 10.5M]
  ------------------
  692|       |      // Create a new face that merges two last active edges from the active
  693|       |      // stack. No new vertex is created, but two vertices at corners "p" and
  694|       |      // "n" need to be merged into a single vertex.
  695|       |      //
  696|       |      // *-------v-------*
  697|       |      //  \a   p/x\n   b/
  698|       |      //   \   /   \   /
  699|       |      //    \ /  S  \ /
  700|       |      //     *.......*
  701|       |      //
  702|  45.7k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 0, False: 45.7k]
  ------------------
  703|      0|        return -1;
  704|      0|      }
  705|  45.7k|      const CornerIndex corner_b = active_corner_stack.back();
  706|  45.7k|      active_corner_stack.pop_back();
  707|       |
  708|       |      // Corner "a" can correspond either to a normal active edge, or to an edge
  709|       |      // created from the topology split event.
  710|  45.7k|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  45.7k|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 106, False: 45.6k]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|    106|        active_corner_stack.push_back(it->second);
  714|    106|      }
  715|  45.7k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 77, False: 45.7k]
  ------------------
  716|     77|        return -1;
  717|     77|      }
  718|  45.7k|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  45.7k|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 45.7k]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  45.7k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 3, False: 45.7k]
  |  Branch (724:11): [True: 3, False: 45.7k]
  ------------------
  725|  45.7k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 45.7k]
  ------------------
  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|  45.7k|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  45.7k|      SetOppositeCorners(corner_a, corner + 2);
  735|  45.7k|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|  45.7k|      const VertexIndex vertex_p =
  739|  45.7k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  45.7k|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  45.7k|      corner_table_->MapCornerToVertex(
  742|  45.7k|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  45.7k|      const VertexIndex vert_b_prev =
  744|  45.7k|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  45.7k|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  45.7k|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  45.7k|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  45.7k|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  45.7k|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  45.7k|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  45.7k|                                       corner_table_->LeftMostCorner(vertex_n));
  753|       |
  754|       |      // Also update the vertex id at corner "n" and all corners that are
  755|       |      // connected to it in the CCW direction.
  756|  45.7k|      const CornerIndex first_corner = corner_n;
  757|   148k|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 102k, False: 45.7k]
  ------------------
  758|   102k|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|   102k|        corner_n = corner_table_->SwingLeft(corner_n);
  760|   102k|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 1, False: 102k]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      1|          return -1;
  764|      1|        }
  765|   102k|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  45.7k|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  45.7k|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 33.9k, False: 11.7k]
  ------------------
  770|  33.9k|        invalid_vertices.push_back(vertex_n);
  771|  33.9k|      }
  772|  45.7k|      active_corner_stack.back() = corner;
  773|  10.5M|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 10.5M, False: 153]
  ------------------
  774|  10.5M|      const CornerIndex corner(3 * face.value());
  775|  10.5M|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  10.5M|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  10.5M|      corner_table_->MapCornerToVertex(corner + 1,
  779|  10.5M|                                       corner_table_->AddNewVertex());
  780|  10.5M|      corner_table_->MapCornerToVertex(corner + 2,
  781|  10.5M|                                       corner_table_->AddNewVertex());
  782|       |
  783|  10.5M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 12, False: 10.5M]
  ------------------
  784|     12|        return -1;  // Unexpected number of decoded vertices.
  785|     12|      }
  786|       |
  787|  10.5M|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  10.5M|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  10.5M|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  10.5M|      active_corner_stack.push_back(corner);
  792|  10.5M|      check_topology_split = true;
  793|  10.5M|    } else {
  794|       |      // Error. Unknown symbol decoded.
  795|    153|      return -1;
  796|    153|    }
  797|       |    // Inform the traversal decoder that a new corner has been reached.
  798|   101M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|   101M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 97.9M, False: 3.45M]
  ------------------
  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|  97.9M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  97.9M|      EdgeFaceName split_edge;
  812|  97.9M|      int encoder_split_symbol_id;
  813|  97.9M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 2.52k, False: 97.9M]
  ------------------
  814|  97.9M|                             &encoder_split_symbol_id)) {
  815|  2.52k|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 31, False: 2.49k]
  ------------------
  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.49k|        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.49k|        CornerIndex new_active_corner;
  831|  2.49k|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 920, False: 1.57k]
  ------------------
  832|    920|          new_active_corner = corner_table_->Next(act_top_corner);
  833|  1.57k|        } else {
  834|  1.57k|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|  1.57k|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|  2.49k|        const int decoder_split_symbol_id =
  839|  2.49k|            num_symbols - encoder_split_symbol_id - 1;
  840|  2.49k|        topology_split_active_corners[decoder_split_symbol_id] =
  841|  2.49k|            new_active_corner;
  842|  2.49k|      }
  843|  97.9M|    }
  844|   101M|  }
  845|    960|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 960]
  ------------------
  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|  6.00M|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 6.00M, False: 914]
  ------------------
  850|  6.00M|    const CornerIndex corner = active_corner_stack.back();
  851|  6.00M|    active_corner_stack.pop_back();
  852|  6.00M|    const bool interior_face =
  853|  6.00M|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  6.00M|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 4.44M, False: 1.55M]
  ------------------
  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|  4.44M|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 28, False: 4.44M]
  ------------------
  877|     28|        return -1;  // More faces than expected added to the mesh.
  878|     28|      }
  879|       |
  880|  4.44M|      const CornerIndex corner_a = corner;
  881|  4.44M|      const VertexIndex vert_n =
  882|  4.44M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  4.44M|      const CornerIndex corner_b =
  884|  4.44M|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  4.44M|      const VertexIndex vert_x =
  887|  4.44M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  4.44M|      const CornerIndex corner_c =
  889|  4.44M|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  4.44M|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 2, False: 4.44M]
  |  Branch (891:33): [True: 5, False: 4.44M]
  |  Branch (891:55): [True: 0, False: 4.44M]
  ------------------
  892|       |        // All matched corners must be different.
  893|      7|        return -1;
  894|      7|      }
  895|  4.44M|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 2, False: 4.44M]
  |  Branch (895:11): [True: 11, False: 4.44M]
  ------------------
  896|  4.44M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 4, False: 4.44M]
  ------------------
  897|  4.44M|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 5, False: 4.44M]
  ------------------
  898|       |        // One of the corners is already opposite to an existing face, which
  899|       |        // should not happen unless the input was tampered with.
  900|     11|        return -1;
  901|     11|      }
  902|       |
  903|  4.44M|      const VertexIndex vert_p =
  904|  4.44M|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  4.44M|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  4.44M|      const CornerIndex new_corner(3 * face.value());
  909|  4.44M|      SetOppositeCorners(new_corner, corner);
  910|  4.44M|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  4.44M|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  4.44M|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  4.44M|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  4.44M|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|  17.7M|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 13.3M, False: 4.44M]
  ------------------
  920|  13.3M|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|  13.3M|      }
  922|       |
  923|  4.44M|      init_face_configurations_.push_back(true);
  924|  4.44M|      init_corners_.push_back(new_corner);
  925|  4.44M|    } 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.55M|      init_face_configurations_.push_back(false);
  930|  1.55M|      init_corners_.push_back(corner);
  931|  1.55M|    }
  932|  6.00M|  }
  933|    914|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 113, False: 801]
  ------------------
  934|    113|    return -1;  // Unexpected number of decoded faces.
  935|    113|  }
  936|       |
  937|    801|  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|    801|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 40, False: 801]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|     40|    VertexIndex src_vert(num_vertices - 1);
  943|     43|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 3, False: 40]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|      3|      src_vert = VertexIndex(--num_vertices - 1);
  946|      3|    }
  947|     40|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 3, False: 37]
  ------------------
  948|      3|      continue;  // No need to swap anything.
  949|      3|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|     37|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|    218|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 181, False: 37]
  ------------------
  954|    181|      const CornerIndex cid = vcit.Corner();
  955|    181|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 0, False: 181]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      0|        return -1;
  959|      0|      }
  960|    181|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|    181|    }
  962|     37|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|     37|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|     37|    corner_table_->MakeVertexIsolated(src_vert);
  967|     37|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|     37|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|     37|    num_vertices--;
  972|     37|  }
  973|    801|  return num_vertices;
  974|    801|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|  2.48k|    DecoderBuffer* decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|  2.48k|  uint32_t num_topology_splits;
  982|  2.48k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|  2.48k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.48k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 346, False: 2.13k]
  ------------------
  984|    346|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 1, False: 345]
  ------------------
  985|      1|      return -1;
  986|      1|    }
  987|       |
  988|    346|  } else
  989|  2.13k|#endif
  990|  2.13k|  {
  991|  2.13k|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 2.13k]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|  2.13k|  }
  995|  2.48k|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 326, False: 2.15k]
  ------------------
  996|    326|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 16, False: 310]
  ------------------
  997|    326|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|     16|      return -1;
  999|     16|    }
 1000|    310|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|    310|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    310|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 64, False: 246]
  ------------------
 1002|   537k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 537k, False: 16]
  ------------------
 1003|   537k|        TopologySplitEventData event_data;
 1004|   537k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 32, False: 537k]
  ------------------
 1005|     32|          return -1;
 1006|     32|        }
 1007|   537k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 14, False: 537k]
  ------------------
 1008|     14|          return -1;
 1009|     14|        }
 1010|   537k|        uint8_t edge_data;
 1011|   537k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 2, False: 537k]
  ------------------
 1012|      2|          return -1;
 1013|      2|        }
 1014|   537k|        event_data.source_edge = edge_data & 1;
 1015|   537k|        topology_split_data_.push_back(event_data);
 1016|   537k|      }
 1017|       |
 1018|     64|    } else
 1019|    246|#endif
 1020|    246|    {
 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|    246|      int last_source_symbol_id = 0;
 1024|  35.2k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 35.0k, False: 229]
  ------------------
 1025|  35.0k|        TopologySplitEventData event_data;
 1026|  35.0k|        uint32_t delta;
 1027|  35.0k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 8, False: 35.0k]
  ------------------
 1028|      8|          return -1;
 1029|      8|        }
 1030|  35.0k|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|  35.0k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 7, False: 35.0k]
  ------------------
 1032|      7|          return -1;
 1033|      7|        }
 1034|  35.0k|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 2, False: 34.9k]
  ------------------
 1035|      2|          return -1;
 1036|      2|        }
 1037|  34.9k|        event_data.split_symbol_id =
 1038|  34.9k|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|  34.9k|        last_source_symbol_id = event_data.source_symbol_id;
 1040|  34.9k|        topology_split_data_.push_back(event_data);
 1041|  34.9k|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|    229|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|  4.17k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 3.94k, False: 229]
  ------------------
 1045|  3.94k|        uint32_t edge_data;
 1046|  3.94k|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.94k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 506, False: 3.44k]
  ------------------
 1047|    506|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|  3.44k|        } else {
 1049|  3.44k|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|  3.44k|        }
 1051|  3.94k|        TopologySplitEventData& event_data = topology_split_data_[i];
 1052|  3.94k|        event_data.source_edge = edge_data & 1;
 1053|  3.94k|      }
 1054|    229|      decoder_buffer->EndBitDecoding();
 1055|    229|    }
 1056|    310|  }
 1057|  2.39k|  uint32_t num_hole_events = 0;
 1058|  2.39k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|  2.39k|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.39k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 277, False: 2.12k]
  ------------------
 1060|    277|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 2, False: 275]
  ------------------
 1061|      2|      return -1;
 1062|      2|    }
 1063|  2.12k|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|  2.12k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 41, False: 2.08k]
  ------------------
 1064|     41|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 3, False: 38]
  ------------------
 1065|      3|      return -1;
 1066|      3|    }
 1067|     41|  }
 1068|  2.39k|#endif
 1069|  2.39k|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 67, False: 2.32k]
  ------------------
 1070|     67|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     67|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     67|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 42, False: 25]
  ------------------
 1072|   216k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 216k, False: 7]
  ------------------
 1073|   216k|        HoleEventData event_data;
 1074|   216k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 35, False: 216k]
  ------------------
 1075|     35|          return -1;
 1076|     35|        }
 1077|   216k|        hole_event_data_.push_back(event_data);
 1078|   216k|      }
 1079|       |
 1080|     42|    } else
 1081|     25|#endif
 1082|     25|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     25|      int last_symbol_id = 0;
 1085|  34.1k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 34.1k, False: 7]
  ------------------
 1086|  34.1k|        HoleEventData event_data;
 1087|  34.1k|        uint32_t delta;
 1088|  34.1k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 18, False: 34.1k]
  ------------------
 1089|     18|          return -1;
 1090|     18|        }
 1091|  34.1k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  34.1k|        last_symbol_id = event_data.symbol_id;
 1093|  34.1k|        hole_event_data_.push_back(event_data);
 1094|  34.1k|      }
 1095|     25|    }
 1096|     67|  }
 1097|  2.34k|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|  2.39k|}
_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|   405k|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|   405k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|   405k|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|   405k|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  1.62M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 1.21M, False: 405k]
  ------------------
 1139|  1.21M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  1.21M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 262k, False: 952k]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   526k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 264k, False: 262k]
  ------------------
 1144|   264k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   264k|      }
 1146|   262k|      continue;
 1147|   262k|    }
 1148|   952k|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|   952k|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 476k, False: 476k]
  ------------------
 1151|   476k|      continue;
 1152|   476k|    }
 1153|       |
 1154|   955k|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 478k, False: 476k]
  ------------------
 1155|   478k|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|   478k|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 323k, False: 155k]
  ------------------
 1157|   323k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|   323k|      }
 1159|   478k|    }
 1160|   476k|  }
 1161|   405k|  return true;
 1162|   405k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE21AssignPointsToCornersEi:
 1166|    801|    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|    801|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|    801|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 32, False: 769]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|  16.3k|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 16.2k, False: 32]
  ------------------
 1176|  16.2k|      Mesh::Face face;
 1177|  16.2k|      const CornerIndex start_corner(3 * f.value());
 1178|  65.1k|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 48.8k, False: 16.2k]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|  48.8k|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|  48.8k|        face[c] = vert_id;
 1182|  48.8k|      }
 1183|  16.2k|      decoder_->mesh()->SetFace(f, face);
 1184|  16.2k|    }
 1185|     32|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|     32|    return true;
 1187|     32|  }
 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|    769|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|    769|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|   435k|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 434k, False: 756]
  ------------------
 1197|   434k|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|   434k|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 5.53k, False: 428k]
  ------------------
 1199|  5.53k|      continue;  // Isolated vertex.
 1200|  5.53k|    }
 1201|   428k|    CornerIndex deduplication_first_corner = c;
 1202|   428k|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 260k, False: 168k]
  ------------------
 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|   260k|      deduplication_first_corner = c;
 1206|   260k|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|   173k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 168k, False: 4.31k]
  ------------------
 1210|   168k|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 3.95k, False: 164k]
  ------------------
 1211|  3.95k|          continue;  // No seam for this attribute, ignore it.
 1212|  3.95k|        }
 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|   164k|        const VertexIndex vert_id =
 1217|   164k|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|   164k|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|   164k|        bool seam_found = false;
 1220|   168k|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 168k, False: 546]
  ------------------
 1221|   168k|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 13, False: 168k]
  ------------------
 1222|     13|            return false;
 1223|     13|          }
 1224|   168k|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 164k, False: 4.11k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|   164k|            deduplication_first_corner = act_c;
 1227|   164k|            seam_found = true;
 1228|   164k|            break;
 1229|   164k|          }
 1230|  4.11k|          act_c = corner_table_->SwingRight(act_c);
 1231|  4.11k|        }
 1232|   164k|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 164k, False: 546]
  ------------------
 1233|   164k|          break;  // No reason to process other attributes if we found a seam.
 1234|   164k|        }
 1235|   164k|      }
 1236|   168k|    }
 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|   428k|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|   428k|    corner_to_point_map[c.value()] =
 1246|   428k|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|   428k|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|   428k|    CornerIndex prev_c = c;
 1250|   428k|    c = corner_table_->SwingRight(c);
 1251|  1.25M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 996k, False: 261k]
  |  Branch (1251:40): [True: 828k, False: 167k]
  ------------------
 1252|   828k|      bool attribute_seam = false;
 1253|  1.21M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 829k, False: 389k]
  ------------------
 1254|   829k|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 439k, False: 389k]
  ------------------
 1255|   829k|            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|   439k|          attribute_seam = true;
 1259|   439k|          break;
 1260|   439k|        }
 1261|   829k|      }
 1262|   828k|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 439k, False: 389k]
  ------------------
 1263|   439k|        corner_to_point_map[c.value()] =
 1264|   439k|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|   439k|        point_to_corner_map.push_back(c.value());
 1266|   439k|      } else {
 1267|   389k|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|   389k|      }
 1269|   828k|      prev_c = c;
 1270|   828k|      c = corner_table_->SwingRight(c);
 1271|   828k|    }
 1272|   428k|  }
 1273|       |  // Add faces.
 1274|   266k|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 265k, False: 756]
  ------------------
 1275|   265k|    Mesh::Face face;
 1276|  1.06M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 797k, False: 265k]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|   797k|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|   797k|    }
 1280|   265k|    decoder_->mesh()->SetFace(f, face);
 1281|   265k|  }
 1282|    756|  decoder_->point_cloud()->set_num_points(
 1283|    756|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|    756|  return true;
 1285|    769|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    559|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|    559|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    559|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    559|  const Mesh* mesh = decoder_->mesh();
  115|    559|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    559|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    559|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    559|                           encoding_data);
  120|       |
  121|    559|  TraverserT att_traverser;
  122|    559|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    559|  traversal_sequencer->SetTraverser(att_traverser);
  125|    559|  return std::move(traversal_sequencer);
  126|    559|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|  1.06k|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|  1.06k|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|  1.06k|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|  1.06k|  const Mesh* mesh = decoder_->mesh();
  115|  1.06k|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|  1.06k|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|  1.06k|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|  1.06k|                           encoding_data);
  120|       |
  121|  1.06k|  TraverserT att_traverser;
  122|  1.06k|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|  1.06k|  traversal_sequencer->SetTraverser(att_traverser);
  125|  1.06k|  return std::move(traversal_sequencer);
  126|  1.06k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    560|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|    560|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    560|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    560|  const Mesh* mesh = decoder_->mesh();
  115|    560|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    560|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    560|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    560|                           encoding_data);
  120|       |
  121|    560|  TraverserT att_traverser;
  122|    560|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    560|  traversal_sequencer->SetTraverser(att_traverser);
  125|    560|  return std::move(traversal_sequencer);
  126|    560|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    656|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|    656|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    656|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    656|  const Mesh* mesh = decoder_->mesh();
  115|    656|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    656|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    656|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    656|                           encoding_data);
  120|       |
  121|    656|  TraverserT att_traverser;
  122|    656|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    656|  traversal_sequencer->SetTraverser(att_traverser);
  125|    656|  return std::move(traversal_sequencer);
  126|    656|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    250|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|    250|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    250|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    250|  const Mesh* mesh = decoder_->mesh();
  115|    250|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    250|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    250|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    250|                           encoding_data);
  120|       |
  121|    250|  TraverserT att_traverser;
  122|    250|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    250|  traversal_sequencer->SetTraverser(att_traverser);
  125|    250|  return std::move(traversal_sequencer);
  126|    250|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    226|    MeshAttributeIndicesEncodingData* encoding_data) {
  111|    226|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    226|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    226|  const Mesh* mesh = decoder_->mesh();
  115|    226|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    226|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    226|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    226|                           encoding_data);
  120|       |
  121|    226|  TraverserT att_traverser;
  122|    226|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    226|  traversal_sequencer->SetTraverser(att_traverser);
  125|    226|  return std::move(traversal_sequencer);
  126|    226|}

_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE10GetDecoderEv:
   65|  10.3k|  MeshEdgebreakerDecoder* GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE14GetCornerTableEv:
   66|  4.93k|  const CornerTable* GetCornerTable() const override {
   67|  4.93k|    return corner_table_.get();
   68|  4.93k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  16.2M|                       int* out_encoder_split_symbol_id) {
   87|  16.2M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 87.5k, False: 16.1M]
  ------------------
   88|  87.5k|      return false;
   89|  87.5k|    }
   90|  16.1M|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 18, False: 16.1M]
  ------------------
   91|  16.1M|        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|     18|      *out_encoder_split_symbol_id = -1;
   98|     18|      return true;
   99|     18|    }
  100|  16.1M|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 16.1M, False: 3.10k]
  ------------------
  101|  16.1M|      return false;
  102|  16.1M|    }
  103|  3.10k|    *out_face_edge =
  104|  3.10k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  3.10k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  3.10k|    topology_split_data_.pop_back();
  108|  3.10k|    return true;
  109|  16.1M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  54.3M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  54.3M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  54.3M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  54.3M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE13AttributeDataC2Ev:
  210|  23.5k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE10GetDecoderEv:
   65|  7.82k|  MeshEdgebreakerDecoder* GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE14GetCornerTableEv:
   66|  5.53k|  const CornerTable* GetCornerTable() const override {
   67|  5.53k|    return corner_table_.get();
   68|  5.53k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  40.9M|                       int* out_encoder_split_symbol_id) {
   87|  40.9M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 40.8M, False: 79.6k]
  ------------------
   88|  40.8M|      return false;
   89|  40.8M|    }
   90|  79.6k|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 10, False: 79.5k]
  ------------------
   91|  79.6k|        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|     10|      *out_encoder_split_symbol_id = -1;
   98|     10|      return true;
   99|     10|    }
  100|  79.5k|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 78.1k, False: 1.42k]
  ------------------
  101|  78.1k|      return false;
  102|  78.1k|    }
  103|  1.42k|    *out_face_edge =
  104|  1.42k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  1.42k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  1.42k|    topology_split_data_.pop_back();
  108|  1.42k|    return true;
  109|  79.5k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|   119M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|   119M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|   119M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|   119M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE13AttributeDataC2Ev:
  210|  12.6k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE10GetDecoderEv:
   65|  13.3k|  MeshEdgebreakerDecoder* GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE14GetCornerTableEv:
   66|  3.56k|  const CornerTable* GetCornerTable() const override {
   67|  3.56k|    return corner_table_.get();
   68|  3.56k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  97.9M|                       int* out_encoder_split_symbol_id) {
   87|  97.9M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 74.7M, False: 23.2M]
  ------------------
   88|  74.7M|      return false;
   89|  74.7M|    }
   90|  23.2M|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 31, False: 23.2M]
  ------------------
   91|  23.2M|        static_cast<uint32_t>(encoder_symbol_id)) {
   92|       |      // Something is wrong; if the desired source symbol is greater than the
   93|       |      // current encoder_symbol_id, we missed it, or the input was tampered
   94|       |      // (|encoder_symbol_id| keeps decreasing).
   95|       |      // Return invalid symbol id to notify the decoder that there was an
   96|       |      // error.
   97|     31|      *out_encoder_split_symbol_id = -1;
   98|     31|      return true;
   99|     31|    }
  100|  23.2M|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 23.2M, False: 2.49k]
  ------------------
  101|  23.2M|      return false;
  102|  23.2M|    }
  103|  2.49k|    *out_face_edge =
  104|  2.49k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  2.49k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  2.49k|    topology_split_data_.pop_back();
  108|  2.49k|    return true;
  109|  23.2M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|   107M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|   107M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|   107M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|   107M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE13AttributeDataC2Ev:
  210|  9.04k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}

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

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

_ZN5draco31MeshEdgebreakerTraversalDecoderC2Ev:
   33|  8.86k|      : attribute_connectivity_decoders_(nullptr),
   34|  8.86k|        num_attribute_data_(0),
   35|  8.86k|        decoder_impl_(nullptr) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder4InitEPNS_35MeshEdgebreakerDecoderImplInterfaceE:
   36|  8.39k|  void Init(MeshEdgebreakerDecoderImplInterface* decoder) {
   37|  8.39k|    decoder_impl_ = decoder;
   38|  8.39k|    buffer_.Init(decoder->GetDecoder()->buffer()->data_head(),
   39|  8.39k|                 decoder->GetDecoder()->buffer()->remaining_size(),
   40|  8.39k|                 decoder->GetDecoder()->buffer()->bitstream_version());
   41|  8.39k|  }
_ZNK5draco31MeshEdgebreakerTraversalDecoder16BitstreamVersionEv:
   44|  6.35k|  uint16_t BitstreamVersion() const {
   45|  6.35k|    return decoder_impl_->GetDecoder()->bitstream_version();
   46|  6.35k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder21SetNumEncodedVerticesEi:
   50|  3.44k|  void SetNumEncodedVertices(int /* num_vertices */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19SetNumAttributeDataEi:
   54|  8.39k|  void SetNumAttributeData(int num_data) { num_attribute_data_ = num_data; }
_ZN5draco31MeshEdgebreakerTraversalDecoder5StartEPNS_13DecoderBufferE:
   59|  6.05k|  bool Start(DecoderBuffer* out_buffer) {
   60|       |    // Decode symbols from the main buffer decoder and face configurations from
   61|       |    // the start_face_buffer decoder.
   62|  6.05k|    if (!DecodeTraversalSymbols()) {
  ------------------
  |  Branch (62:9): [True: 33, False: 6.01k]
  ------------------
   63|     33|      return false;
   64|     33|    }
   65|       |
   66|  6.01k|    if (!DecodeStartFaces()) {
  ------------------
  |  Branch (66:9): [True: 25, False: 5.99k]
  ------------------
   67|     25|      return false;
   68|     25|    }
   69|       |
   70|  5.99k|    if (!DecodeAttributeSeams()) {
  ------------------
  |  Branch (70:9): [True: 35, False: 5.95k]
  ------------------
   71|     35|      return false;
   72|     35|    }
   73|  5.95k|    *out_buffer = buffer_;
   74|  5.95k|    return true;
   75|  5.99k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder28DecodeStartFaceConfigurationEv:
   78|  6.13M|  inline bool DecodeStartFaceConfiguration() {
   79|  6.13M|    uint32_t face_configuration;
   80|  6.13M|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   81|  6.13M|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  6.13M|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (81:9): [True: 1.15k, False: 6.13M]
  ------------------
   82|  1.15k|      start_face_buffer_.DecodeLeastSignificantBits32(1, &face_configuration);
   83|       |
   84|  1.15k|    } else
   85|  6.13M|#endif
   86|  6.13M|    {
   87|  6.13M|      face_configuration = start_face_decoder_.DecodeNextBit();
   88|  6.13M|    }
   89|  6.13M|    return face_configuration;
   90|  6.13M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder12DecodeSymbolEv:
   93|  38.6M|  inline uint32_t DecodeSymbol() {
   94|  38.6M|    uint32_t symbol;
   95|  38.6M|    symbol_buffer_.DecodeLeastSignificantBits32(1, &symbol);
   96|  38.6M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (96:9): [True: 16.5M, False: 22.1M]
  ------------------
   97|  16.5M|      return symbol;
   98|  16.5M|    }
   99|       |    // Else decode two additional bits.
  100|  22.1M|    uint32_t symbol_suffix;
  101|  22.1M|    symbol_buffer_.DecodeLeastSignificantBits32(2, &symbol_suffix);
  102|  22.1M|    symbol |= (symbol_suffix << 1);
  103|  22.1M|    return symbol;
  104|  38.6M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder22NewActiveCornerReachedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  38.2M|  inline void NewActiveCornerReached(CornerIndex /* corner */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder13MergeVerticesENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_:
  111|  5.61M|  inline void MergeVertices(VertexIndex /* dest */, VertexIndex /* source */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19DecodeAttributeSeamEi:
  117|  27.7M|  inline bool DecodeAttributeSeam(int attribute) {
  118|  27.7M|    return attribute_connectivity_decoders_[attribute].DecodeNextBit();
  119|  27.7M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder4DoneEv:
  122|  6.27k|  void Done() {
  123|  6.27k|    if (symbol_buffer_.bit_decoder_active()) {
  ------------------
  |  Branch (123:9): [True: 5.48k, False: 796]
  ------------------
  124|  5.48k|      symbol_buffer_.EndBitDecoding();
  125|  5.48k|    }
  126|  6.27k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  127|  6.27k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  6.27k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (127:9): [True: 634, False: 5.64k]
  ------------------
  128|    634|      start_face_buffer_.EndBitDecoding();
  129|       |
  130|    634|    } else
  131|  5.64k|#endif
  132|  5.64k|    {
  133|  5.64k|      start_face_decoder_.EndDecoding();
  134|  5.64k|    }
  135|  6.27k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder6bufferEv:
  138|  2.27k|  DecoderBuffer* buffer() { return &buffer_; }
_ZN5draco31MeshEdgebreakerTraversalDecoder22DecodeTraversalSymbolsEv:
  140|  6.31k|  bool DecodeTraversalSymbols() {
  141|  6.31k|    uint64_t traversal_size;
  142|  6.31k|    symbol_buffer_ = buffer_;
  143|  6.31k|    if (!symbol_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (143:9): [True: 12, False: 6.29k]
  ------------------
  144|     12|      return false;
  145|     12|    }
  146|  6.29k|    buffer_ = symbol_buffer_;
  147|  6.29k|    if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (147:9): [True: 45, False: 6.25k]
  ------------------
  148|     45|      return false;
  149|     45|    }
  150|  6.25k|    buffer_.Advance(traversal_size);
  151|  6.25k|    return true;
  152|  6.29k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder16DecodeStartFacesEv:
  154|  8.33k|  bool DecodeStartFaces() {
  155|       |    // Create a decoder that is set to the end of the encoded traversal data.
  156|  8.33k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  157|  8.33k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  8.33k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (157:9): [True: 957, False: 7.37k]
  ------------------
  158|    957|      start_face_buffer_ = buffer_;
  159|    957|      uint64_t traversal_size;
  160|    957|      if (!start_face_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (160:11): [True: 1, False: 956]
  ------------------
  161|      1|        return false;
  162|      1|      }
  163|    956|      buffer_ = start_face_buffer_;
  164|    956|      if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (164:11): [True: 36, False: 920]
  ------------------
  165|     36|        return false;
  166|     36|      }
  167|    920|      buffer_.Advance(traversal_size);
  168|    920|      return true;
  169|    956|    }
  170|  7.37k|#endif
  171|  7.37k|    return start_face_decoder_.StartDecoding(&buffer_);
  172|  8.33k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder20DecodeAttributeSeamsEv:
  174|  8.28k|  bool DecodeAttributeSeams() {
  175|       |    // Prepare attribute decoding.
  176|  8.28k|    if (num_attribute_data_ > 0) {
  ------------------
  |  Branch (176:9): [True: 6.51k, False: 1.77k]
  ------------------
  177|  6.51k|      attribute_connectivity_decoders_ = std::unique_ptr<BinaryDecoder[]>(
  178|  6.51k|          new BinaryDecoder[num_attribute_data_]);
  179|  23.6k|      for (int i = 0; i < num_attribute_data_; ++i) {
  ------------------
  |  Branch (179:23): [True: 17.1k, False: 6.45k]
  ------------------
  180|  17.1k|        if (!attribute_connectivity_decoders_[i].StartDecoding(&buffer_)) {
  ------------------
  |  Branch (180:13): [True: 53, False: 17.1k]
  ------------------
  181|     53|          return false;
  182|     53|        }
  183|  17.1k|      }
  184|  6.51k|    }
  185|  8.23k|    return true;
  186|  8.28k|  }

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

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

_ZN5draco21MeshSequentialDecoderC2Ev:
   27|  2.38k|MeshSequentialDecoder::MeshSequentialDecoder() = default;
_ZN5draco21MeshSequentialDecoder18DecodeConnectivityEv:
   29|  2.18k|bool MeshSequentialDecoder::DecodeConnectivity() {
   30|  2.18k|  uint32_t num_faces;
   31|  2.18k|  uint32_t num_points;
   32|  2.18k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   33|  2.18k|  if (bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.18k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (33:7): [True: 358, False: 1.82k]
  ------------------
   34|    358|    if (!buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (34:9): [True: 0, False: 358]
  ------------------
   35|      0|      return false;
   36|      0|    }
   37|    358|    if (!buffer()->Decode(&num_points)) {
  ------------------
  |  Branch (37:9): [True: 0, False: 358]
  ------------------
   38|      0|      return false;
   39|      0|    }
   40|       |
   41|    358|  } else
   42|  1.82k|#endif
   43|  1.82k|  {
   44|  1.82k|    if (!DecodeVarint(&num_faces, buffer())) {
  ------------------
  |  Branch (44:9): [True: 0, False: 1.82k]
  ------------------
   45|      0|      return false;
   46|      0|    }
   47|  1.82k|    if (!DecodeVarint(&num_points, buffer())) {
  ------------------
  |  Branch (47:9): [True: 0, False: 1.82k]
  ------------------
   48|      0|      return false;
   49|      0|    }
   50|  1.82k|  }
   51|       |
   52|       |  // Check that num_faces and num_points are valid values.
   53|  2.18k|  const uint64_t faces_64 = static_cast<uint64_t>(num_faces);
   54|       |  // Compressed sequential encoding can only handle (2^32 - 1) / 3 indices.
   55|  2.18k|  if (faces_64 > 0xffffffff / 3) {
  ------------------
  |  Branch (55:7): [True: 0, False: 2.18k]
  ------------------
   56|      0|    return false;
   57|      0|  }
   58|  2.18k|  if (faces_64 > buffer()->remaining_size() / 3) {
  ------------------
  |  Branch (58:7): [True: 3, False: 2.18k]
  ------------------
   59|       |    // The number of faces is unreasonably high, because face indices do not
   60|       |    // fit in the remaining size of the buffer.
   61|      3|    return false;
   62|      3|  }
   63|  2.18k|  uint8_t connectivity_method;
   64|  2.18k|  if (!buffer()->Decode(&connectivity_method)) {
  ------------------
  |  Branch (64:7): [True: 0, False: 2.18k]
  ------------------
   65|      0|    return false;
   66|      0|  }
   67|  2.18k|  if (connectivity_method == 0) {
  ------------------
  |  Branch (67:7): [True: 1.38k, False: 801]
  ------------------
   68|  1.38k|    if (!DecodeAndDecompressIndices(num_faces, num_points)) {
  ------------------
  |  Branch (68:9): [True: 1.25k, False: 125]
  ------------------
   69|  1.25k|      return false;
   70|  1.25k|    }
   71|  1.38k|  } else {
   72|    801|    if (num_points < 256) {
  ------------------
  |  Branch (72:9): [True: 641, False: 160]
  ------------------
   73|       |      // Decode indices as uint8_t.
   74|  1.94k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (74:28): [True: 1.31k, False: 631]
  ------------------
   75|  1.31k|        Mesh::Face face;
   76|  5.22k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (76:25): [True: 3.92k, False: 1.30k]
  ------------------
   77|  3.92k|          uint8_t val;
   78|  3.92k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (78:15): [True: 4, False: 3.91k]
  ------------------
   79|      4|            return false;
   80|      4|          }
   81|  3.91k|          if (val >= num_points) {
  ------------------
  |  Branch (81:15): [True: 6, False: 3.91k]
  ------------------
   82|      6|            return false;
   83|      6|          }
   84|  3.91k|          face[j] = val;
   85|  3.91k|        }
   86|  1.30k|        mesh()->AddFace(face);
   87|  1.30k|      }
   88|    641|    } else if (num_points < (1 << 16)) {
  ------------------
  |  Branch (88:16): [True: 78, False: 82]
  ------------------
   89|       |      // Decode indices as uint16_t.
   90|  36.3k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:28): [True: 36.3k, False: 40]
  ------------------
   91|  36.3k|        Mesh::Face face;
   92|   145k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (92:25): [True: 108k, False: 36.2k]
  ------------------
   93|   108k|          uint16_t val;
   94|   108k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (94:15): [True: 9, False: 108k]
  ------------------
   95|      9|            return false;
   96|      9|          }
   97|   108k|          if (val >= num_points) {
  ------------------
  |  Branch (97:15): [True: 29, False: 108k]
  ------------------
   98|     29|            return false;
   99|     29|          }
  100|   108k|          face[j] = val;
  101|   108k|        }
  102|  36.2k|        mesh()->AddFace(face);
  103|  36.2k|      }
  104|     82|    } else if (num_points < (1 << 21) &&
  ------------------
  |  Branch (104:16): [True: 24, False: 58]
  ------------------
  105|     24|               bitstream_version() >= DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|     24|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (105:16): [True: 21, False: 3]
  ------------------
  106|       |      // Decode indices as uint32_t.
  107|    671|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (107:28): [True: 661, False: 10]
  ------------------
  108|    661|        Mesh::Face face;
  109|  2.62k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (109:25): [True: 1.97k, False: 650]
  ------------------
  110|  1.97k|          uint32_t val;
  111|  1.97k|          if (!DecodeVarint(&val, buffer())) {
  ------------------
  |  Branch (111:15): [True: 5, False: 1.97k]
  ------------------
  112|      5|            return false;
  113|      5|          }
  114|  1.97k|          if (val >= num_points) {
  ------------------
  |  Branch (114:15): [True: 6, False: 1.96k]
  ------------------
  115|      6|            return false;
  116|      6|          }
  117|  1.96k|          face[j] = val;
  118|  1.96k|        }
  119|    650|        mesh()->AddFace(face);
  120|    650|      }
  121|     61|    } else {
  122|       |      // Decode faces as uint32_t (default).
  123|  41.1k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (123:28): [True: 41.1k, False: 24]
  ------------------
  124|  41.1k|        Mesh::Face face;
  125|   164k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (125:25): [True: 123k, False: 41.0k]
  ------------------
  126|   123k|          uint32_t val;
  127|   123k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (127:15): [True: 23, False: 123k]
  ------------------
  128|     23|            return false;
  129|     23|          }
  130|   123k|          if (val >= num_points) {
  ------------------
  |  Branch (130:15): [True: 14, False: 123k]
  ------------------
  131|     14|            return false;
  132|     14|          }
  133|   123k|          face[j] = val;
  134|   123k|        }
  135|  41.0k|        mesh()->AddFace(face);
  136|  41.0k|      }
  137|     61|    }
  138|    801|  }
  139|    830|  point_cloud()->set_num_points(num_points);
  140|    830|  return true;
  141|  2.18k|}
_ZN5draco21MeshSequentialDecoder23CreateAttributesDecoderEi:
  143|  25.2k|bool MeshSequentialDecoder::CreateAttributesDecoder(int32_t att_decoder_id) {
  144|       |  // Always create the basic attribute decoder.
  145|  25.2k|  return SetAttributesDecoder(
  146|  25.2k|      att_decoder_id,
  147|  25.2k|      std::unique_ptr<AttributesDecoder>(
  148|  25.2k|          new SequentialAttributeDecodersController(
  149|  25.2k|              std::unique_ptr<PointsSequencer>(
  150|  25.2k|                  new LinearSequencer(point_cloud()->num_points())))));
  151|  25.2k|}
_ZN5draco21MeshSequentialDecoder26DecodeAndDecompressIndicesEjj:
  154|  1.38k|                                                       uint32_t num_points) {
  155|       |  // Get decoded indices differences that were encoded with an entropy code.
  156|  1.38k|  std::vector<uint32_t> indices_buffer(num_faces * 3);
  157|  1.38k|  if (!DecodeSymbols(num_faces * 3, 1, buffer(), indices_buffer.data())) {
  ------------------
  |  Branch (157:7): [True: 1.16k, False: 219]
  ------------------
  158|  1.16k|    return false;
  159|  1.16k|  }
  160|       |  // Reconstruct the indices from the differences.
  161|       |  // See MeshSequentialEncoder::CompressAndEncodeIndices() for more details.
  162|    219|  int32_t last_index_value = 0;  // This will always be >= 0.
  163|    219|  int vertex_index = 0;
  164|  67.1k|  for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (164:24): [True: 67.0k, False: 125]
  ------------------
  165|  67.0k|    Mesh::Face face;
  166|   268k|    for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (166:21): [True: 201k, False: 66.9k]
  ------------------
  167|   201k|      const uint32_t encoded_val = indices_buffer[vertex_index++];
  168|   201k|      int32_t index_diff = (encoded_val >> 1);
  169|   201k|      if (encoded_val & 1) {
  ------------------
  |  Branch (169:11): [True: 1.29k, False: 199k]
  ------------------
  170|  1.29k|        if (index_diff > last_index_value) {
  ------------------
  |  Branch (170:13): [True: 29, False: 1.26k]
  ------------------
  171|       |          // Subtracting index_diff would result in a negative index.
  172|     29|          return false;
  173|     29|        }
  174|  1.26k|        index_diff = -index_diff;
  175|   199k|      } else {
  176|   199k|        if (index_diff >
  ------------------
  |  Branch (176:13): [True: 22, False: 199k]
  ------------------
  177|   199k|            (std::numeric_limits<int32_t>::max() - last_index_value)) {
  178|       |          // Adding index_diff to last_index_value would overflow.
  179|     22|          return false;
  180|     22|        }
  181|   199k|      }
  182|   201k|      const int32_t index_value = index_diff + last_index_value;
  183|   201k|      if (index_value < 0 || static_cast<uint32_t>(index_value) >= num_points) {
  ------------------
  |  Branch (183:11): [True: 0, False: 201k]
  |  Branch (183:30): [True: 43, False: 200k]
  ------------------
  184|     43|        return false;
  185|     43|      }
  186|   200k|      face[j] = index_value;
  187|   200k|      last_index_value = index_value;
  188|   200k|    }
  189|  66.9k|    mesh()->AddFace(face);
  190|  66.9k|  }
  191|    125|  return true;
  192|    219|}

_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  1.84k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  2.15M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  2.15M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 2.13M, False: 17.3k]
  ------------------
   61|  2.13M|      return true;  // Already traversed.
   62|  2.13M|    }
   63|       |
   64|  17.3k|    corner_traversal_stack_.clear();
   65|  17.3k|    corner_traversal_stack_.push_back(corner_id);
   66|       |    // For the first face, check the remaining corners as they may not be
   67|       |    // processed yet.
   68|  17.3k|    const VertexIndex next_vert =
   69|  17.3k|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  17.3k|    const VertexIndex prev_vert =
   71|  17.3k|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  17.3k|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 17.3k]
  |  Branch (72:45): [True: 0, False: 17.3k]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  17.3k|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 16.3k, False: 997]
  ------------------
   76|  16.3k|      this->MarkVertexVisited(next_vert);
   77|  16.3k|      this->traversal_observer().OnNewVertexVisited(
   78|  16.3k|          next_vert, this->corner_table()->Next(corner_id));
   79|  16.3k|    }
   80|  17.3k|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 9.98k, False: 7.34k]
  ------------------
   81|  9.98k|      this->MarkVertexVisited(prev_vert);
   82|  9.98k|      this->traversal_observer().OnNewVertexVisited(
   83|  9.98k|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  9.98k|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|  46.0k|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 28.6k, False: 17.3k]
  ------------------
   88|       |      // Currently processed corner.
   89|  28.6k|      corner_id = corner_traversal_stack_.back();
   90|  28.6k|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  28.6k|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 28.6k]
  |  Branch (92:47): [True: 765, False: 27.9k]
  ------------------
   93|       |        // This face has been already traversed.
   94|    765|        corner_traversal_stack_.pop_back();
   95|    765|        continue;
   96|    765|      }
   97|  2.15M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 2.15M, Folded]
  ------------------
   98|  2.15M|        this->MarkFaceVisited(face_id);
   99|  2.15M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  2.15M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  2.15M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 2.15M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  2.15M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 1.08M, False: 1.06M]
  ------------------
  105|  1.08M|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|  1.08M|          this->MarkVertexVisited(vert_id);
  107|  1.08M|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|  1.08M|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 1.05M, False: 30.1k]
  ------------------
  109|  1.05M|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|  1.05M|            face_id = FaceIndex(corner_id.value() / 3);
  111|  1.05M|            continue;
  112|  1.05M|          }
  113|  1.08M|        }
  114|       |        // The current vertex has been already visited or it was on a boundary.
  115|       |        // We need to determine whether we can visit any of it's neighboring
  116|       |        // faces.
  117|  1.09M|        const CornerIndex right_corner_id =
  118|  1.09M|            this->corner_table()->GetRightCorner(corner_id);
  119|  1.09M|        const CornerIndex left_corner_id =
  120|  1.09M|            this->corner_table()->GetLeftCorner(corner_id);
  121|  1.09M|        const FaceIndex right_face_id(
  122|  1.09M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 22.1k, False: 1.07M]
  ------------------
  123|  1.09M|                 ? kInvalidFaceIndex
  124|  1.09M|                 : FaceIndex(right_corner_id.value() / 3)));
  125|  1.09M|        const FaceIndex left_face_id(
  126|  1.09M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 20.9k, False: 1.07M]
  ------------------
  127|  1.09M|                 ? kInvalidFaceIndex
  128|  1.09M|                 : FaceIndex(left_corner_id.value() / 3)));
  129|  1.09M|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 1.06M, False: 28.9k]
  ------------------
  130|       |          // Right face has been already visited.
  131|  1.06M|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 22.2k, False: 1.04M]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  22.2k|            corner_traversal_stack_.pop_back();
  134|  22.2k|            break;  // Break from the while (true) loop.
  135|  1.04M|          } else {
  136|       |            // Go to the left face.
  137|  1.04M|            corner_id = left_corner_id;
  138|  1.04M|            face_id = left_face_id;
  139|  1.04M|          }
  140|  1.06M|        } else {
  141|       |          // Right face was not visited.
  142|  28.9k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 23.2k, False: 5.67k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  23.2k|            corner_id = right_corner_id;
  145|  23.2k|            face_id = right_face_id;
  146|  23.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|  5.67k|            corner_traversal_stack_.back() = left_corner_id;
  154|       |            // Add a new corner to the top of the stack (right face needs to
  155|       |            // be traversed first).
  156|  5.67k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  5.67k|            break;
  159|  5.67k|          }
  160|  28.9k|        }
  161|  1.09M|      }
  162|  27.9k|    }
  163|  17.3k|    return true;
  164|  17.3k|  }
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  1.84k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  3.88k|  DepthFirstTraverser() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  2.66k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  3.94M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  3.94M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 489k, False: 3.45M]
  ------------------
   61|   489k|      return true;  // Already traversed.
   62|   489k|    }
   63|       |
   64|  3.45M|    corner_traversal_stack_.clear();
   65|  3.45M|    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.45M|    const VertexIndex next_vert =
   69|  3.45M|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  3.45M|    const VertexIndex prev_vert =
   71|  3.45M|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  3.45M|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 3.45M]
  |  Branch (72:45): [True: 0, False: 3.45M]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  3.45M|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 3.45M, False: 1.65k]
  ------------------
   76|  3.45M|      this->MarkVertexVisited(next_vert);
   77|  3.45M|      this->traversal_observer().OnNewVertexVisited(
   78|  3.45M|          next_vert, this->corner_table()->Next(corner_id));
   79|  3.45M|    }
   80|  3.45M|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 3.45M, False: 1.54k]
  ------------------
   81|  3.45M|      this->MarkVertexVisited(prev_vert);
   82|  3.45M|      this->traversal_observer().OnNewVertexVisited(
   83|  3.45M|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  3.45M|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|  6.96M|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 3.50M, False: 3.45M]
  ------------------
   88|       |      // Currently processed corner.
   89|  3.50M|      corner_id = corner_traversal_stack_.back();
   90|  3.50M|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  3.50M|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 3.50M]
  |  Branch (92:47): [True: 4.25k, False: 3.50M]
  ------------------
   93|       |        // This face has been already traversed.
   94|  4.25k|        corner_traversal_stack_.pop_back();
   95|  4.25k|        continue;
   96|  4.25k|      }
   97|  3.94M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 3.94M, Folded]
  ------------------
   98|  3.94M|        this->MarkFaceVisited(face_id);
   99|  3.94M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  3.94M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  3.94M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 3.94M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  3.94M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 3.71M, False: 229k]
  ------------------
  105|  3.71M|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|  3.71M|          this->MarkVertexVisited(vert_id);
  107|  3.71M|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|  3.71M|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 215k, False: 3.50M]
  ------------------
  109|   215k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   215k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   215k|            continue;
  112|   215k|          }
  113|  3.71M|        }
  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.73M|        const CornerIndex right_corner_id =
  118|  3.73M|            this->corner_table()->GetRightCorner(corner_id);
  119|  3.73M|        const CornerIndex left_corner_id =
  120|  3.73M|            this->corner_table()->GetLeftCorner(corner_id);
  121|  3.73M|        const FaceIndex right_face_id(
  122|  3.73M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 3.48M, False: 248k]
  ------------------
  123|  3.73M|                 ? kInvalidFaceIndex
  124|  3.73M|                 : FaceIndex(right_corner_id.value() / 3)));
  125|  3.73M|        const FaceIndex left_face_id(
  126|  3.73M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 3.47M, False: 254k]
  ------------------
  127|  3.73M|                 ? kInvalidFaceIndex
  128|  3.73M|                 : FaceIndex(left_corner_id.value() / 3)));
  129|  3.73M|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 3.68M, False: 40.9k]
  ------------------
  130|       |          // Right face has been already visited.
  131|  3.68M|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 3.47M, False: 211k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  3.47M|            corner_traversal_stack_.pop_back();
  134|  3.47M|            break;  // Break from the while (true) loop.
  135|  3.47M|          } else {
  136|       |            // Go to the left face.
  137|   211k|            corner_id = left_corner_id;
  138|   211k|            face_id = left_face_id;
  139|   211k|          }
  140|  3.68M|        } else {
  141|       |          // Right face was not visited.
  142|  40.9k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 16.1k, False: 24.8k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  16.1k|            corner_id = right_corner_id;
  145|  16.1k|            face_id = right_face_id;
  146|  24.8k|          } else {
  147|       |            // Both neighboring faces are unvisited, we need to visit both of
  148|       |            // them.
  149|       |
  150|       |            // Split the traversal.
  151|       |            // First make the top of the current corner stack point to the left
  152|       |            // face (this one will be processed second).
  153|  24.8k|            corner_traversal_stack_.back() = left_corner_id;
  154|       |            // Add a new corner to the top of the stack (right face needs to
  155|       |            // be traversed first).
  156|  24.8k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  24.8k|            break;
  159|  24.8k|          }
  160|  40.9k|        }
  161|  3.73M|      }
  162|  3.50M|    }
  163|  3.45M|    return true;
  164|  3.45M|  }
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  2.66k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  5.42k|  DepthFirstTraverser() {}

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

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

_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|  1.36k|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  3.20k|  bool UpdatePointToAttributeIndexMapping(PointAttribute* attribute) override {
   49|  3.20k|    const auto* corner_table = traverser_.corner_table();
   50|  3.20k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  3.20k|    const size_t num_faces = mesh_->num_faces();
   52|  3.20k|    const size_t num_points = mesh_->num_points();
   53|  6.31M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 6.31M, False: 3.20k]
  ------------------
   54|  6.31M|      const auto& face = mesh_->face(f);
   55|  25.2M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 18.9M, False: 6.31M]
  ------------------
   56|  18.9M|        const PointIndex point_id = face[p];
   57|  18.9M|        const VertexIndex vert_id =
   58|  18.9M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  18.9M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 18.9M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  18.9M|        const AttributeValueIndex att_entry_id(
   63|  18.9M|            encoding_data_
   64|  18.9M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  18.9M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 18.9M]
  |  Branch (65:13): [True: 0, False: 18.9M]
  |  Branch (65:39): [True: 0, False: 18.9M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|  18.9M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  18.9M|      }
   71|  6.31M|    }
   72|  3.20k|    return true;
   73|  3.20k|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|  1.32k|  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.32k|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|  1.32k|    traverser_.OnTraversalStart();
   82|  1.32k|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 1.32k]
  ------------------
   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.32k|    } else {
   89|  1.32k|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  4.26M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 4.26M, False: 1.32k]
  ------------------
   91|  4.26M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 4.26M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  4.26M|      }
   95|  1.32k|    }
   96|  1.32k|    traverser_.OnTraversalEnd();
   97|  1.32k|    return true;
   98|  1.32k|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  4.26M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  4.26M|    return traverser_.TraverseFromCorner(corner_id);
  103|  4.26M|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|  1.36k|  void SetTraverser(const TraverserT& t) { traverser_ = t; }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|  1.94k|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  11.1k|  bool UpdatePointToAttributeIndexMapping(PointAttribute* attribute) override {
   49|  11.1k|    const auto* corner_table = traverser_.corner_table();
   50|  11.1k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  11.1k|    const size_t num_faces = mesh_->num_faces();
   52|  11.1k|    const size_t num_points = mesh_->num_points();
   53|  3.97M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 3.96M, False: 11.1k]
  ------------------
   54|  3.96M|      const auto& face = mesh_->face(f);
   55|  15.8M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 11.8M, False: 3.96M]
  ------------------
   56|  11.8M|        const PointIndex point_id = face[p];
   57|  11.8M|        const VertexIndex vert_id =
   58|  11.8M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  11.8M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 11.8M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  11.8M|        const AttributeValueIndex att_entry_id(
   63|  11.8M|            encoding_data_
   64|  11.8M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  11.8M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 11.8M]
  |  Branch (65:13): [True: 0, False: 11.8M]
  |  Branch (65:39): [True: 0, False: 11.8M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|  11.8M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  11.8M|      }
   71|  3.96M|    }
   72|  11.1k|    return true;
   73|  11.1k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|  1.84k|  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.84k|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|  1.84k|    traverser_.OnTraversalStart();
   82|  1.84k|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 1.84k]
  ------------------
   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.84k|    } else {
   89|  1.84k|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  2.15M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 2.15M, False: 1.84k]
  ------------------
   91|  2.15M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 2.15M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  2.15M|      }
   95|  1.84k|    }
   96|  1.84k|    traverser_.OnTraversalEnd();
   97|  1.84k|    return true;
   98|  1.84k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  2.15M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  2.15M|    return traverser_.TraverseFromCorner(corner_id);
  103|  2.15M|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|  1.94k|  void SetTraverser(const TraverserT& t) { traverser_ = t; }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|  2.71k|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  17.2k|  bool UpdatePointToAttributeIndexMapping(PointAttribute* attribute) override {
   49|  17.2k|    const auto* corner_table = traverser_.corner_table();
   50|  17.2k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  17.2k|    const size_t num_faces = mesh_->num_faces();
   52|  17.2k|    const size_t num_points = mesh_->num_points();
   53|  7.10M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 7.09M, False: 17.2k]
  ------------------
   54|  7.09M|      const auto& face = mesh_->face(f);
   55|  28.3M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 21.2M, False: 7.09M]
  ------------------
   56|  21.2M|        const PointIndex point_id = face[p];
   57|  21.2M|        const VertexIndex vert_id =
   58|  21.2M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  21.2M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 21.2M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  21.2M|        const AttributeValueIndex att_entry_id(
   63|  21.2M|            encoding_data_
   64|  21.2M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  21.2M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 21.2M]
  |  Branch (65:13): [True: 3, False: 21.2M]
  |  Branch (65:39): [True: 3, False: 21.2M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      3|          return false;
   68|      3|        }
   69|  21.2M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  21.2M|      }
   71|  7.09M|    }
   72|  17.2k|    return true;
   73|  17.2k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|  2.66k|  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.66k|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|  2.66k|    traverser_.OnTraversalStart();
   82|  2.66k|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 2.66k]
  ------------------
   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.66k|    } else {
   89|  2.66k|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  3.94M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 3.94M, False: 2.66k]
  ------------------
   91|  3.94M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 3.94M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  3.94M|      }
   95|  2.66k|    }
   96|  2.66k|    traverser_.OnTraversalEnd();
   97|  2.66k|    return true;
   98|  2.66k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  3.94M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  3.94M|    return traverser_.TraverseFromCorner(corner_id);
  103|  3.94M|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|  2.71k|  void SetTraverser(const TraverserT& t) { traverser_ = t; }

_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  5.42k|  virtual ~TraverserBase() = default;
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  47.0M|  inline const CornerTable* corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  25.5M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  25.5M|    return is_vertex_visited_[vert_id.value()];
   65|  25.5M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  3.32M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  3.32M|    is_vertex_visited_[vert_id.value()] = true;
   68|  3.32M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  9.74M|  inline TraversalObserverT& traversal_observer() {
   75|  9.74M|    return traversal_observer_;
   76|  9.74M|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  18.8M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  18.8M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 135k, False: 18.7M]
  ------------------
   47|   135k|      return true;  // Invalid faces are always considered as visited.
   48|   135k|    }
   49|  18.7M|    return is_face_visited_[face_id.value()];
   50|  18.8M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  6.41M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  6.41M|    is_face_visited_[face_id.value()] = true;
   62|  6.41M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  6.62k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  6.62k|  virtual ~TraverserBase() = default;
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  3.31k|                    TraversalObserver traversal_observer) {
   37|  3.31k|    corner_table_ = corner_table;
   38|  3.31k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  3.31k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  3.31k|    traversal_observer_ = traversal_observer;
   41|  3.31k|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  2.15M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  2.15M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 2.15M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  2.15M|    return is_face_visited_[corner_id.value() / 3];
   58|  2.15M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  36.1M|  inline const CornerTable* corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  3.94M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  3.94M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 3.94M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  3.94M|    return is_face_visited_[corner_id.value() / 3];
   58|  3.94M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  10.8M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  10.8M|    return is_vertex_visited_[vert_id.value()];
   65|  10.8M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  10.6M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  10.6M|    is_vertex_visited_[vert_id.value()] = true;
   68|  10.6M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  14.5M|  inline TraversalObserverT& traversal_observer() {
   75|  14.5M|    return traversal_observer_;
   76|  14.5M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  10.9M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  10.9M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 6.95M, False: 4.00M]
  ------------------
   47|  6.95M|      return true;  // Invalid faces are always considered as visited.
   48|  6.95M|    }
   49|  4.00M|    return is_face_visited_[face_id.value()];
   50|  10.9M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  3.94M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  3.94M|    is_face_visited_[face_id.value()] = true;
   62|  3.94M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  5.42k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  2.71k|                    TraversalObserver traversal_observer) {
   37|  2.71k|    corner_table_ = corner_table;
   38|  2.71k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  2.71k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  2.71k|    traversal_observer_ = traversal_observer;
   41|  2.71k|  }

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

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

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

_ZN5draco18MostSignificantBitEj:
   58|  1.20k|inline int MostSignificantBit(uint32_t n) {
   59|  1.20k|#if defined(__GNUC__)
   60|  1.20k|  return 31 ^ __builtin_clz(n);
   61|       |#elif defined(_MSC_VER)
   62|       |
   63|       |  unsigned long where;
   64|       |  _BitScanReverse(&where, n);
   65|       |  return (int)where;
   66|       |#else
   67|       |  uint32_t msb = 0;
   68|       |  if (n) {
   69|       |    if (0xFFFF0000 & n) {
   70|       |      n >>= (1 << 4);
   71|       |      msb |= (1 << 4);
   72|       |    }
   73|       |    if (0x0000FF00 & n) {
   74|       |      n >>= (1 << 3);
   75|       |      msb |= (1 << 3);
   76|       |    }
   77|       |    if (0x000000F0 & n) {
   78|       |      n >>= (1 << 2);
   79|       |      msb |= (1 << 2);
   80|       |    }
   81|       |    if (0x0000000C & n) {
   82|       |      n >>= (1 << 1);
   83|       |      msb |= (1 << 1);
   84|       |    }
   85|       |    if (0x00000002 & n) {
   86|       |      msb |= (1 << 0);
   87|       |    }
   88|       |  } else {
   89|       |    msb = -1;
   90|       |  }
   91|       |  return msb;
   92|       |#endif
   93|  1.20k|}
_ZN5draco24ConvertSymbolToSignedIntIjEENSt3__111make_signedIT_E4typeES3_:
  127|  1.54G|    IntTypeT val) {
  128|  1.54G|  static_assert(std::is_integral<IntTypeT>::value, "IntTypeT is not integral.");
  129|  1.54G|  typedef typename std::make_signed<IntTypeT>::type SignedType;
  130|  1.54G|  const bool is_positive = !static_cast<bool>(val & 1);
  131|  1.54G|  val >>= 1;
  132|  1.54G|  if (is_positive) {
  ------------------
  |  Branch (132:7): [True: 1.42G, False: 123M]
  ------------------
  133|  1.42G|    return static_cast<SignedType>(val);
  134|  1.42G|  }
  135|   123M|  SignedType ret = static_cast<SignedType>(val);
  136|   123M|  ret = -ret - 1;
  137|   123M|  return ret;
  138|  1.54G|}

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

_ZN5draco20DataBufferDescriptorC2Ev:
   28|   148k|  DataBufferDescriptor() : buffer_id(0), buffer_update_count(0) {}
_ZN5draco10DataBuffer5WriteElPKvm:
   53|   219M|  void Write(int64_t byte_pos, const void* in_data, size_t data_size) {
   54|   219M|    memcpy(const_cast<uint8_t*>(data()) + byte_pos, in_data, data_size);
   55|   219M|  }
_ZNK5draco10DataBuffer12update_countEv:
   67|  32.1k|  int64_t update_count() const { return descriptor_.buffer_update_count; }
_ZNK5draco10DataBuffer9data_sizeEv:
   68|  56.8M|  size_t data_size() const { return data_.size(); }
_ZN5draco10DataBuffer4dataEv:
   70|   294M|  uint8_t* data() { return data_.data(); }
_ZNK5draco10DataBuffer9buffer_idEv:
   71|  32.1k|  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|  11.7k|void DecoderBuffer::Init(const char* data, size_t data_size) {
   30|  11.7k|  Init(data, data_size, bitstream_version_);
   31|  11.7k|}
_ZN5draco13DecoderBuffer4InitEPKcmt:
   33|  27.8k|void DecoderBuffer::Init(const char* data, size_t data_size, uint16_t version) {
   34|  27.8k|  data_ = data;
   35|  27.8k|  data_size_ = data_size;
   36|  27.8k|  bitstream_version_ = version;
   37|  27.8k|  pos_ = 0;
   38|  27.8k|}
_ZN5draco13DecoderBuffer16StartBitDecodingEbPm:
   40|  10.7k|bool DecoderBuffer::StartBitDecoding(bool decode_size, uint64_t* out_size) {
   41|  10.7k|  if (decode_size) {
  ------------------
  |  Branch (41:7): [True: 7.26k, False: 3.51k]
  ------------------
   42|  7.26k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   43|  7.26k|    if (bitstream_version_ < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  7.26k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (43:9): [True: 1.95k, False: 5.30k]
  ------------------
   44|  1.95k|      if (!Decode(out_size)) {
  ------------------
  |  Branch (44:11): [True: 1, False: 1.95k]
  ------------------
   45|      1|        return false;
   46|      1|      }
   47|  1.95k|    } else
   48|  5.30k|#endif
   49|  5.30k|    {
   50|  5.30k|      if (!DecodeVarint(out_size, this)) {
  ------------------
  |  Branch (50:11): [True: 12, False: 5.29k]
  ------------------
   51|     12|        return false;
   52|     12|      }
   53|  5.30k|    }
   54|  7.26k|  }
   55|  10.7k|  bit_mode_ = true;
   56|  10.7k|  bit_decoder_.reset(data_head(), remaining_size());
   57|  10.7k|  return true;
   58|  10.7k|}
_ZN5draco13DecoderBuffer14EndBitDecodingEv:
   60|  9.62k|void DecoderBuffer::EndBitDecoding() {
   61|  9.62k|  bit_mode_ = false;
   62|  9.62k|  const uint64_t bits_decoded = bit_decoder_.BitsDecoded();
   63|  9.62k|  const uint64_t bytes_decoded = (bits_decoded + 7) / 8;
   64|  9.62k|  pos_ += bytes_decoded;
   65|  9.62k|}
_ZN5draco13DecoderBuffer10BitDecoderC2Ev:
   68|  48.1k|    : bit_buffer_(nullptr), bit_buffer_end_(nullptr), bit_offset_(0) {}
_ZN5draco13DecoderBuffer10BitDecoderD2Ev:
   70|  59.9k|DecoderBuffer::BitDecoder::~BitDecoder() = default;

_ZN5draco13DecoderBuffer28DecodeLeastSignificantBits32EjPj:
   57|  66.0M|  bool DecodeLeastSignificantBits32(uint32_t nbits, uint32_t* out_value) {
   58|  66.0M|    if (!bit_decoder_active()) {
  ------------------
  |  Branch (58:9): [True: 0, False: 66.0M]
  ------------------
   59|      0|      return false;
   60|      0|    }
   61|  66.0M|    return bit_decoder_.GetBits(nbits, out_value);
   62|  66.0M|  }
_ZN5draco13DecoderBuffer6DecodeEPvm:
   76|  1.38G|  bool Decode(void* out_data, size_t size_to_decode) {
   77|  1.38G|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (77:9): [True: 429, False: 1.38G]
  ------------------
   78|    429|      return false;  // Buffer overflow.
   79|    429|    }
   80|  1.38G|    memcpy(out_data, (data_ + pos_), size_to_decode);
   81|  1.38G|    pos_ += size_to_decode;
   82|  1.38G|    return true;
   83|  1.38G|  }
_ZN5draco13DecoderBuffer7AdvanceEl:
  105|  42.5k|  void Advance(int64_t bytes) { pos_ += bytes; }
_ZN5draco13DecoderBuffer21set_bitstream_versionEt:
  111|  11.7k|  void set_bitstream_version(uint16_t version) { bitstream_version_ = version; }
_ZNK5draco13DecoderBuffer9data_headEv:
  114|  61.6k|  const char* data_head() const { return data_ + pos_; }
_ZNK5draco13DecoderBuffer14remaining_sizeEv:
  115|   292k|  int64_t remaining_size() const { return data_size_ - pos_; }
_ZNK5draco13DecoderBuffer12decoded_sizeEv:
  116|  8.39k|  int64_t decoded_size() const { return pos_; }
_ZNK5draco13DecoderBuffer18bit_decoder_activeEv:
  117|  66.0M|  bool bit_decoder_active() const { return bit_mode_; }
_ZNK5draco13DecoderBuffer17bitstream_versionEv:
  120|  6.21M|  uint16_t bitstream_version() const { return bitstream_version_; }
_ZN5draco13DecoderBuffer10BitDecoder5resetEPKvm:
  130|  10.7k|    void reset(const void* b, size_t s) {
  131|  10.7k|      bit_offset_ = 0;
  132|  10.7k|      bit_buffer_ = static_cast<const uint8_t*>(b);
  133|  10.7k|      bit_buffer_end_ = bit_buffer_ + s;
  134|  10.7k|    }
_ZNK5draco13DecoderBuffer10BitDecoder11BitsDecodedEv:
  137|  9.62k|    uint64_t BitsDecoded() const { return static_cast<uint64_t>(bit_offset_); }
_ZN5draco13DecoderBuffer10BitDecoder7GetBitsEjPj:
  158|  66.0M|    bool GetBits(uint32_t nbits, uint32_t* x) {
  159|  66.0M|      if (nbits > 32) {
  ------------------
  |  Branch (159:11): [True: 3, False: 66.0M]
  ------------------
  160|      3|        return false;
  161|      3|      }
  162|  66.0M|      uint32_t value = 0;
  163|   151M|      for (uint32_t bit = 0; bit < nbits; ++bit) {
  ------------------
  |  Branch (163:30): [True: 85.2M, False: 66.0M]
  ------------------
  164|  85.2M|        value |= GetBit() << bit;
  165|  85.2M|      }
  166|  66.0M|      *x = value;
  167|  66.0M|      return true;
  168|  66.0M|    }
_ZN5draco13DecoderBuffer10BitDecoder6GetBitEv:
  173|  85.2M|    int GetBit() {
  174|  85.2M|      const size_t off = bit_offset_;
  175|  85.2M|      const size_t byte_offset = off >> 3;
  176|  85.2M|      const int bit_shift = static_cast<int>(off & 0x7);
  177|  85.2M|      if (bit_buffer_ + byte_offset < bit_buffer_end_) {
  ------------------
  |  Branch (177:11): [True: 80.1M, False: 5.06M]
  ------------------
  178|  80.1M|        const int bit = (bit_buffer_[byte_offset] >> bit_shift) & 1;
  179|  80.1M|        bit_offset_ = off + 1;
  180|  80.1M|        return bit;
  181|  80.1M|      }
  182|  5.06M|      return 0;
  183|  85.2M|    }
_ZN5draco13DecoderBuffer6DecodeIhEEbPT_:
   68|  30.3M|  bool Decode(T* out_val) {
   69|  30.3M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 2.97k, False: 30.3M]
  ------------------
   70|  2.97k|      return false;
   71|  2.97k|    }
   72|  30.3M|    pos_ += sizeof(T);
   73|  30.3M|    return true;
   74|  30.3M|  }
_ZN5draco13DecoderBuffer4PeekIhEEbPT_:
   87|  30.3M|  bool Peek(T* out_val) {
   88|  30.3M|    const size_t size_to_decode = sizeof(T);
   89|  30.3M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 2.97k, False: 30.3M]
  ------------------
   90|  2.97k|      return false;  // Buffer overflow.
   91|  2.97k|    }
   92|  30.3M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  30.3M|    return true;
   94|  30.3M|  }
_ZN5draco13DecoderBuffer6DecodeIiEEbPT_:
   68|  21.0k|  bool Decode(T* out_val) {
   69|  21.0k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 178, False: 20.8k]
  ------------------
   70|    178|      return false;
   71|    178|    }
   72|  20.8k|    pos_ += sizeof(T);
   73|  20.8k|    return true;
   74|  21.0k|  }
_ZN5draco13DecoderBuffer4PeekIiEEbPT_:
   87|  21.0k|  bool Peek(T* out_val) {
   88|  21.0k|    const size_t size_to_decode = sizeof(T);
   89|  21.0k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 178, False: 20.8k]
  ------------------
   90|    178|      return false;  // Buffer overflow.
   91|    178|    }
   92|  20.8k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  20.8k|    return true;
   94|  21.0k|  }
_ZN5draco13DecoderBuffer6DecodeIjEEbPT_:
   68|  1.45M|  bool Decode(T* out_val) {
   69|  1.45M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 205, False: 1.45M]
  ------------------
   70|    205|      return false;
   71|    205|    }
   72|  1.45M|    pos_ += sizeof(T);
   73|  1.45M|    return true;
   74|  1.45M|  }
_ZN5draco13DecoderBuffer4PeekIjEEbPT_:
   87|  1.45M|  bool Peek(T* out_val) {
   88|  1.45M|    const size_t size_to_decode = sizeof(T);
   89|  1.45M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 205, False: 1.45M]
  ------------------
   90|    205|      return false;  // Buffer overflow.
   91|    205|    }
   92|  1.45M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.45M|    return true;
   94|  1.45M|  }
_ZN5draco13DecoderBuffer6DecodeIaEEbPT_:
   68|  38.2k|  bool Decode(T* out_val) {
   69|  38.2k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 175, False: 38.0k]
  ------------------
   70|    175|      return false;
   71|    175|    }
   72|  38.0k|    pos_ += sizeof(T);
   73|  38.0k|    return true;
   74|  38.2k|  }
_ZN5draco13DecoderBuffer4PeekIaEEbPT_:
   87|  38.2k|  bool Peek(T* out_val) {
   88|  38.2k|    const size_t size_to_decode = sizeof(T);
   89|  38.2k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 175, False: 38.0k]
  ------------------
   90|    175|      return false;  // Buffer overflow.
   91|    175|    }
   92|  38.0k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  38.0k|    return true;
   94|  38.2k|  }
_ZN5draco13DecoderBuffer6DecodeINS_13HoleEventDataEEEbPT_:
   68|  2.24M|  bool Decode(T* out_val) {
   69|  2.24M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 133, False: 2.24M]
  ------------------
   70|    133|      return false;
   71|    133|    }
   72|  2.24M|    pos_ += sizeof(T);
   73|  2.24M|    return true;
   74|  2.24M|  }
_ZN5draco13DecoderBuffer4PeekINS_13HoleEventDataEEEbPT_:
   87|  2.24M|  bool Peek(T* out_val) {
   88|  2.24M|    const size_t size_to_decode = sizeof(T);
   89|  2.24M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 133, False: 2.24M]
  ------------------
   90|    133|      return false;  // Buffer overflow.
   91|    133|    }
   92|  2.24M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  2.24M|    return true;
   94|  2.24M|  }
_ZN5draco13DecoderBuffer6DecodeItEEbPT_:
   68|   132k|  bool Decode(T* out_val) {
   69|   132k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 10, False: 132k]
  ------------------
   70|     10|      return false;
   71|     10|    }
   72|   132k|    pos_ += sizeof(T);
   73|   132k|    return true;
   74|   132k|  }
_ZN5draco13DecoderBuffer4PeekItEEbPT_:
   87|   132k|  bool Peek(T* out_val) {
   88|   132k|    const size_t size_to_decode = sizeof(T);
   89|   132k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 10, False: 132k]
  ------------------
   90|     10|      return false;  // Buffer overflow.
   91|     10|    }
   92|   132k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|   132k|    return true;
   94|   132k|  }
_ZN5draco13DecoderBuffer6DecodeImEEbPT_:
   68|  2.28k|  bool Decode(T* out_val) {
   69|  2.28k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 9, False: 2.27k]
  ------------------
   70|      9|      return false;
   71|      9|    }
   72|  2.27k|    pos_ += sizeof(T);
   73|  2.27k|    return true;
   74|  2.28k|  }
_ZN5draco13DecoderBuffer4PeekImEEbPT_:
   87|  2.28k|  bool Peek(T* out_val) {
   88|  2.28k|    const size_t size_to_decode = sizeof(T);
   89|  2.28k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 9, False: 2.27k]
  ------------------
   90|      9|      return false;  // Buffer overflow.
   91|      9|    }
   92|  2.27k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  2.27k|    return true;
   94|  2.28k|  }
_ZN5draco13DecoderBuffer6DecodeIfEEbPT_:
   68|    167|  bool Decode(T* out_val) {
   69|    167|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 31, False: 136]
  ------------------
   70|     31|      return false;
   71|     31|    }
   72|    136|    pos_ += sizeof(T);
   73|    136|    return true;
   74|    167|  }
_ZN5draco13DecoderBuffer4PeekIfEEbPT_:
   87|    167|  bool Peek(T* out_val) {
   88|    167|    const size_t size_to_decode = sizeof(T);
   89|    167|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 31, False: 136]
  ------------------
   90|     31|      return false;  // Buffer overflow.
   91|     31|    }
   92|    136|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|    136|    return true;
   94|    167|  }

_ZNK5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EE5valueEv:
   73|   128M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EE5valueEv:
   73|   137M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEgeERKj:
   98|  12.3M|  constexpr bool operator>=(const ValueTypeT& val) const {
   99|  12.3M|    return value_ >= val;
  100|  12.3M|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EE5valueEv:
   73|   389M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EE5valueEv:
   73|  5.16G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKj:
   90|  29.7M|  constexpr bool operator<(const ValueTypeT& val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEaSERKS2_:
  151|   126M|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|   126M|    value_ = i.value_;
  153|   126M|    return *this;
  154|   126M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKS2_:
  151|   255M|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|   255M|    value_ = i.value_;
  153|   255M|    return *this;
  154|   255M|  }
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEppEv:
  102|  29.7M|  inline ThisIndexType& operator++() {
  103|  29.7M|    ++value_;
  104|  29.7M|    return *this;
  105|  29.7M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEeqERKS2_:
   75|  3.76G|  constexpr bool operator==(const IndexType& i) const {
   76|  3.76G|    return value_ == i.value_;
   77|  3.76G|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EE5valueEv:
   73|  1.54G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKS2_:
   87|  4.04k|  constexpr bool operator<(const IndexType& i) const {
   88|  4.04k|    return value_ < i.value_;
   89|  4.04k|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEeqERKS2_:
   75|   183M|  constexpr bool operator==(const IndexType& i) const {
   76|   183M|    return value_ == i.value_;
   77|   183M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEmiERKj:
  131|   259M|  constexpr ThisIndexType operator-(const ValueTypeT& val) const {
  132|   259M|    return ThisIndexType(value_ - val);
  133|   259M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEplERKj:
  125|  1.22G|  constexpr ThisIndexType operator+(const ValueTypeT& val) const {
  126|  1.22G|    return ThisIndexType(value_ + val);
  127|  1.22G|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEeqERKS2_:
   75|  29.8M|  constexpr bool operator==(const IndexType& i) const {
   76|  29.8M|    return value_ == i.value_;
   77|  29.8M|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEneERKS2_:
   81|   433M|  constexpr bool operator!=(const IndexType& i) const {
   82|   433M|    return value_ != i.value_;
   83|   433M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEneERKS2_:
   81|   554M|  constexpr bool operator!=(const IndexType& i) const {
   82|   554M|    return value_ != i.value_;
   83|   554M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEppEv:
  102|   803M|  inline ThisIndexType& operator++() {
  103|   803M|    ++value_;
  104|   803M|    return *this;
  105|   803M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEaSERKS2_:
  151|   741M|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|   741M|    value_ = i.value_;
  153|   741M|    return *this;
  154|   741M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEaSERKS2_:
  151|  1.80G|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|  1.80G|    value_ = i.value_;
  153|  1.80G|    return *this;
  154|  1.80G|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEgeERKj:
   98|  52.1M|  constexpr bool operator>=(const ValueTypeT& val) const {
   99|  52.1M|    return value_ >= val;
  100|  52.1M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEltERKj:
   90|  12.2M|  constexpr bool operator<(const ValueTypeT& val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ej:
   71|  1.79G|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2ERKS2_:
   70|  23.4G|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2Ej:
   71|   315M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2ERKS2_:
   70|  15.4G|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ev:
   69|   434M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEplERKj:
  125|  33.1M|  constexpr ThisIndexType operator+(const ValueTypeT& val) const {
  126|  33.1M|    return ThisIndexType(value_ + val);
  127|  33.1M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2Ej:
   71|   285M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKS2_:
   87|  36.3M|  constexpr bool operator<(const IndexType& i) const {
   88|  36.3M|    return value_ < i.value_;
   89|  36.3M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2ERKS2_:
   70|   288M|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ev:
   69|   255M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2ERKS2_:
   70|  87.3M|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2Ej:
   71|   103M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2ERKS2_:
   70|   394M|  constexpr IndexType(const IndexType& i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEaSERKS2_:
  151|  6.83M|  inline ThisIndexType& operator=(const ThisIndexType& i) {
  152|  6.83M|    value_ = i.value_;
  153|  6.83M|    return *this;
  154|  6.83M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEpLERKj:
  139|  12.2M|  inline ThisIndexType operator+=(const ValueTypeT& val) {
  140|  12.2M|    value_ += val;
  141|  12.2M|    return *this;
  142|  12.2M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKj:
  155|  37.4M|  inline ThisIndexType& operator=(const ValueTypeT& val) {
  156|  37.4M|    value_ = val;
  157|  37.4M|    return *this;
  158|  37.4M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ej:
   71|   218M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKj:
   90|  10.1M|  constexpr bool operator<(const ValueTypeT& val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEppEv:
  102|  10.1M|  inline ThisIndexType& operator++() {
  103|  10.1M|    ++value_;
  104|  10.1M|    return *this;
  105|  10.1M|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEltERKj:
   90|  33.0M|  constexpr bool operator<(const ValueTypeT& val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEppEv:
  102|  33.0M|  inline ThisIndexType& operator++() {
  103|  33.0M|    ++value_;
  104|  33.0M|    return *this;
  105|  33.0M|  }

_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   73|  51.9M|  inline const_reference operator[](const IndexTypeT& index) const {
   74|  51.9M|    return vector_[index.value()];
   75|  51.9M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE4sizeEv:
   59|  33.0M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE5clearEv:
   48|  16.7k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE6resizeEmRKS5_:
   51|  38.3k|  void resize(size_t size, const ValueTypeT& val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   70|  85.1M|  inline reference operator[](const IndexTypeT& index) {
   71|  85.1M|    return vector_[index.value()];
   72|  85.1M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE9push_backERKS8_:
   62|   146k|  void push_back(const ValueTypeT& val) { vector_.push_back(val); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE4sizeEv:
   59|  24.6M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE6resizeEmRKS8_:
   51|  6.27k|  void resize(size_t size, const ValueTypeT& val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEixERKS3_:
   70|  12.3M|  inline reference operator[](const IndexTypeT& index) {
   71|  12.3M|    return vector_[index.value()];
   72|  12.3M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEixERKS3_:
   73|  31.3M|  inline const_reference operator[](const IndexTypeT& index) const {
   74|  31.3M|    return vector_[index.value()];
   75|  31.3M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE4sizeEv:
   59|   360M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE4sizeEv:
   59|  16.9M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   73|   489M|  inline const_reference operator[](const IndexTypeT& index) const {
   74|   489M|    return vector_[index.value()];
   75|   489M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   73|  1.38G|  inline const_reference operator[](const IndexTypeT& index) const {
   74|  1.38G|    return vector_[index.value()];
   75|  1.38G|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   70|   683M|  inline reference operator[](const IndexTypeT& index) {
   71|   683M|    return vector_[index.value()];
   72|   683M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   73|  91.5M|  inline const_reference operator[](const IndexTypeT& index) const {
   74|  91.5M|    return vector_[index.value()];
   75|  91.5M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   70|   563M|  inline reference operator[](const IndexTypeT& index) {
   71|   563M|    return vector_[index.value()];
   72|   563M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE9push_backERKS5_:
   62|   188M|  void push_back(const ValueTypeT& val) { vector_.push_back(val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   70|   403M|  inline reference operator[](const IndexTypeT& index) {
   71|   403M|    return vector_[index.value()];
   72|   403M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE6resizeEmRKi:
   51|  3.58k|  void resize(size_t size, const ValueTypeT& val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEixERKS3_:
   70|   406M|  inline reference operator[](const IndexTypeT& index) {
   71|   406M|    return vector_[index.value()];
   72|   406M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEC2Ev:
   39|  82.9k|  IndexTypeVector() {}
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4sizeEv:
   59|  4.26M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaEC2Ev:
   39|  77.7k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEC2Ev:
   39|  8.83k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EC2Ev:
   39|  8.83k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEC2Ev:
   39|  8.83k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_EC2Ev:
   39|  8.83k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE5clearEv:
   48|  23.6k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4swapERS4_:
   55|  23.6k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT>& arg) {
   56|  23.6k|    vector_.swap(arg.vector_);
   57|  23.6k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE5clearEv:
   48|  23.6k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE4swapERS4_:
   55|  23.6k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT>& arg) {
   56|  23.6k|    vector_.swap(arg.vector_);
   57|  23.6k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE6assignEmRKS5_:
   52|  8.83k|  void assign(size_t size, const ValueTypeT& val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_E6assignEmRKS3_:
   52|  8.83k|  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.83k|  void reserve(size_t size) { vector_.reserve(size); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEC2Ev:
   39|  11.7k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEC2Ev:
   39|   115k|  IndexTypeVector() {}

_ZN5draco14DataTypeLengthENS_8DataTypeE:
   19|   162k|int32_t DataTypeLength(DataType dt) {
   20|   162k|  switch (dt) {
   21|  98.3k|    case DT_INT8:
  ------------------
  |  Branch (21:5): [True: 98.3k, False: 63.8k]
  ------------------
   22|   102k|    case DT_UINT8:
  ------------------
  |  Branch (22:5): [True: 4.33k, False: 157k]
  ------------------
   23|   102k|      return 1;
   24|  2.35k|    case DT_INT16:
  ------------------
  |  Branch (24:5): [True: 2.35k, False: 159k]
  ------------------
   25|  2.81k|    case DT_UINT16:
  ------------------
  |  Branch (25:5): [True: 454, False: 161k]
  ------------------
   26|  2.81k|      return 2;
   27|  48.8k|    case DT_INT32:
  ------------------
  |  Branch (27:5): [True: 48.8k, False: 113k]
  ------------------
   28|  49.4k|    case DT_UINT32:
  ------------------
  |  Branch (28:5): [True: 646, False: 161k]
  ------------------
   29|  49.4k|      return 4;
   30|  1.02k|    case DT_INT64:
  ------------------
  |  Branch (30:5): [True: 1.02k, False: 161k]
  ------------------
   31|  2.12k|    case DT_UINT64:
  ------------------
  |  Branch (31:5): [True: 1.10k, False: 161k]
  ------------------
   32|  2.12k|      return 8;
   33|  4.34k|    case DT_FLOAT32:
  ------------------
  |  Branch (33:5): [True: 4.34k, False: 157k]
  ------------------
   34|  4.34k|      return 4;
   35|    569|    case DT_FLOAT64:
  ------------------
  |  Branch (35:5): [True: 569, False: 161k]
  ------------------
   36|    569|      return 8;
   37|    208|    case DT_BOOL:
  ------------------
  |  Branch (37:5): [True: 208, False: 162k]
  ------------------
   38|    208|      return 1;
   39|      0|    default:
  ------------------
  |  Branch (39:5): [True: 0, False: 162k]
  ------------------
   40|      0|      return -1;
   41|   162k|  }
   42|   162k|}

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

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

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

_ZN5draco7OptionsC2Ev:
   32|  11.7k|  Options() = default;
_ZN5draco7OptionsD2Ev:
   33|  11.7k|  ~Options() = default;

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

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

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

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

_ZN5draco12DecodeVarintIjEEbPT_PNS_13DecoderBufferE:
   63|   897k|bool DecodeVarint(IntTypeT* out_val, DecoderBuffer* buffer) {
   64|   897k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 897k, Folded]
  ------------------
   65|   897k|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 1.08k, False: 896k]
  ------------------
   66|  1.08k|      return false;
   67|  1.08k|    }
   68|   897k|  } 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|   896k|  return true;
   77|   897k|}
mesh_edgebreaker_decoder_impl.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   381k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|   381k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   381k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 65, False: 381k]
  ------------------
   33|     65|    return false;
   34|     65|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   381k|  uint8_t in;
   39|   381k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 651, False: 380k]
  ------------------
   40|    651|    return false;
   41|    651|  }
   42|   380k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 17.7k, False: 363k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  17.7k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 395, False: 17.3k]
  ------------------
   45|    395|      return false;
   46|    395|    }
   47|       |    // Append decoded info from this byte.
   48|  17.3k|    *out_val <<= 7;
   49|  17.3k|    *out_val |= in & ((1 << 7) - 1);
   50|   363k|  } else {
   51|       |    // Last byte reached
   52|   363k|    *out_val = in;
   53|   363k|  }
   54|   380k|  return true;
   55|   380k|}
mesh_sequential_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  6.60k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  6.60k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  6.60k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 1, False: 6.60k]
  ------------------
   33|      1|    return false;
   34|      1|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  6.60k|  uint8_t in;
   39|  6.60k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 4, False: 6.60k]
  ------------------
   40|      4|    return false;
   41|      4|  }
   42|  6.60k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 978, False: 5.62k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    978|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 7, False: 971]
  ------------------
   45|      7|      return false;
   46|      7|    }
   47|       |    // Append decoded info from this byte.
   48|    971|    *out_val <<= 7;
   49|    971|    *out_val |= in & ((1 << 7) - 1);
   50|  5.62k|  } else {
   51|       |    // Last byte reached
   52|  5.62k|    *out_val = in;
   53|  5.62k|  }
   54|  6.59k|  return true;
   55|  6.60k|}
_ZN5draco12DecodeVarintImEEbPT_PNS_13DecoderBufferE:
   63|  8.40k|bool DecodeVarint(IntTypeT* out_val, DecoderBuffer* buffer) {
   64|  8.40k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 8.40k, Folded]
  ------------------
   65|  8.40k|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 140, False: 8.26k]
  ------------------
   66|    140|      return false;
   67|    140|    }
   68|  8.40k|  } 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.26k|  return true;
   77|  8.40k|}
decoder_buffer.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  5.31k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  5.31k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  5.31k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 0, False: 5.31k]
  ------------------
   33|      0|    return false;
   34|      0|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  5.31k|  uint8_t in;
   39|  5.31k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 12, False: 5.30k]
  ------------------
   40|     12|    return false;
   41|     12|  }
   42|  5.30k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 7, False: 5.29k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|      7|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 2, False: 5]
  ------------------
   45|      2|      return false;
   46|      2|    }
   47|       |    // Append decoded info from this byte.
   48|      5|    *out_val <<= 7;
   49|      5|    *out_val |= in & ((1 << 7) - 1);
   50|  5.29k|  } else {
   51|       |    // Last byte reached
   52|  5.29k|    *out_val = in;
   53|  5.29k|  }
   54|  5.30k|  return true;
   55|  5.30k|}
metadata_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   377k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|   377k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   377k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 14, False: 377k]
  ------------------
   33|     14|    return false;
   34|     14|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   377k|  uint8_t in;
   39|   377k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 110, False: 377k]
  ------------------
   40|    110|    return false;
   41|    110|  }
   42|   377k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.94k, False: 375k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.94k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 77, False: 1.87k]
  ------------------
   45|     77|      return false;
   46|     77|    }
   47|       |    // Append decoded info from this byte.
   48|  1.87k|    *out_val <<= 7;
   49|  1.87k|    *out_val |= in & ((1 << 7) - 1);
   50|   375k|  } else {
   51|       |    // Last byte reached
   52|   375k|    *out_val = in;
   53|   375k|  }
   54|   377k|  return true;
   55|   377k|}
sequential_integer_attribute_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  7.59k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  7.59k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  7.59k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 4, False: 7.58k]
  ------------------
   33|      4|    return false;
   34|      4|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  7.58k|  uint8_t in;
   39|  7.58k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 43, False: 7.54k]
  ------------------
   40|     43|    return false;
   41|     43|  }
   42|  7.54k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.01k, False: 6.53k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.01k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 39, False: 972]
  ------------------
   45|     39|      return false;
   46|     39|    }
   47|       |    // Append decoded info from this byte.
   48|    972|    *out_val <<= 7;
   49|    972|    *out_val |= in & ((1 << 7) - 1);
   50|  6.53k|  } else {
   51|       |    // Last byte reached
   52|  6.53k|    *out_val = in;
   53|  6.53k|  }
   54|  7.50k|  return true;
   55|  7.54k|}
rans_bit_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  31.1k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  31.1k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  31.1k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 4, False: 31.1k]
  ------------------
   33|      4|    return false;
   34|      4|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  31.1k|  uint8_t in;
   39|  31.1k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 37, False: 31.1k]
  ------------------
   40|     37|    return false;
   41|     37|  }
   42|  31.1k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 467, False: 30.6k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    467|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 34, False: 433]
  ------------------
   45|     34|      return false;
   46|     34|    }
   47|       |    // Append decoded info from this byte.
   48|    433|    *out_val <<= 7;
   49|    433|    *out_val |= in & ((1 << 7) - 1);
   50|  30.6k|  } else {
   51|       |    // Last byte reached
   52|  30.6k|    *out_val = in;
   53|  30.6k|  }
   54|  31.1k|  return true;
   55|  31.1k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  6.78k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  6.78k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  6.78k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 74, False: 6.71k]
  ------------------
   33|     74|    return false;
   34|     74|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  6.71k|  uint8_t in;
   39|  6.71k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 54, False: 6.65k]
  ------------------
   40|     54|    return false;
   41|     54|  }
   42|  6.65k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.53k, False: 5.12k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.53k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 395, False: 1.14k]
  ------------------
   45|    395|      return false;
   46|    395|    }
   47|       |    // Append decoded info from this byte.
   48|  1.14k|    *out_val <<= 7;
   49|  1.14k|    *out_val |= in & ((1 << 7) - 1);
   50|  5.12k|  } else {
   51|       |    // Last byte reached
   52|  5.12k|    *out_val = in;
   53|  5.12k|  }
   54|  6.26k|  return true;
   55|  6.65k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  4.74k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|  4.74k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  4.74k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 95, False: 4.65k]
  ------------------
   33|     95|    return false;
   34|     95|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  4.65k|  uint8_t in;
   39|  4.65k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 33, False: 4.61k]
  ------------------
   40|     33|    return false;
   41|     33|  }
   42|  4.61k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.64k, False: 2.97k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.64k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 1.00k, False: 642]
  ------------------
   45|  1.00k|      return false;
   46|  1.00k|    }
   47|       |    // Append decoded info from this byte.
   48|    642|    *out_val <<= 7;
   49|    642|    *out_val |= in & ((1 << 7) - 1);
   50|  2.97k|  } else {
   51|       |    // Last byte reached
   52|  2.97k|    *out_val = in;
   53|  2.97k|  }
   54|  3.61k|  return true;
   55|  4.61k|}
attributes_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   113k|bool DecodeVarintUnsigned(int depth, IntTypeT* out_val, DecoderBuffer* buffer) {
   31|   113k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   113k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 8, False: 113k]
  ------------------
   33|      8|    return false;
   34|      8|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   113k|  uint8_t in;
   39|   113k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 20, False: 113k]
  ------------------
   40|     20|    return false;
   41|     20|  }
   42|   113k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 3.78k, False: 110k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  3.78k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 41, False: 3.74k]
  ------------------
   45|     41|      return false;
   46|     41|    }
   47|       |    // Append decoded info from this byte.
   48|  3.74k|    *out_val <<= 7;
   49|  3.74k|    *out_val |= in & ((1 << 7) - 1);
   50|   110k|  } else {
   51|       |    // Last byte reached
   52|   110k|    *out_val = in;
   53|   110k|  }
   54|   113k|  return true;
   55|   113k|}

_ZN5draco7VectorDIfLi3EEC2Ev:
   42|  44.7k|  VectorD() {
   43|   178k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 134k, False: 44.7k]
  ------------------
   44|   134k|      (*this)[i] = Scalar(0);
   45|   134k|    }
   46|  44.7k|  }
_ZN5draco7VectorDIfLi3EEixEi:
  114|   216k|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIfLi3EEixEi:
  115|   171k|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIlLi3EEixEi:
  115|   131M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIlLi3EEmiERKS1_:
  139|  14.5M|  Self operator-(const Self& o) const {
  140|  14.5M|    Self ret;
  141|  58.2M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 43.6M, False: 14.5M]
  ------------------
  142|  43.6M|      ret[i] = (*this)[i] - o[i];
  143|  43.6M|    }
  144|  14.5M|    return ret;
  145|  14.5M|  }
_ZN5draco12CrossProductIlTnPNSt3__19enable_ifIXaasr3std11is_integralIT_EE5valuesr3std9is_signedIS3_EE5valueEvE4typeELPv0EEENS_7VectorDIS3_Li3EEERKS9_SB_:
  325|  7.27M|                                 const VectorD<ScalarT, 3>& v) {
  326|       |  // Preventing accidental use with uint32_t and the like.
  327|  7.27M|  static_assert(std::is_signed<ScalarT>::value,
  328|  7.27M|                "ScalarT must be a signed type. ");
  329|  7.27M|  VectorD<ScalarT, 3> r;
  330|  7.27M|  typedef typename std::make_unsigned<ScalarT>::type ScalarUT;
  331|  7.27M|  const ScalarUT u0 = static_cast<ScalarUT>(u[0]);
  332|  7.27M|  const ScalarUT u1 = static_cast<ScalarUT>(u[1]);
  333|  7.27M|  const ScalarUT u2 = static_cast<ScalarUT>(u[2]);
  334|  7.27M|  const ScalarUT v0 = static_cast<ScalarUT>(v[0]);
  335|  7.27M|  const ScalarUT v1 = static_cast<ScalarUT>(v[1]);
  336|  7.27M|  const ScalarUT v2 = static_cast<ScalarUT>(v[2]);
  337|  7.27M|  r[0] = static_cast<ScalarT>((u1 * v2) - (u2 * v1));
  338|  7.27M|  r[1] = static_cast<ScalarT>((u2 * v0) - (u0 * v2));
  339|  7.27M|  r[2] = static_cast<ScalarT>((u0 * v1) - (u1 * v0));
  340|  7.27M|  return r;
  341|  7.27M|}
_ZN5draco7VectorDIlLi3EE4dataEv:
  284|  7.27M|  Scalar* data() { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE4dataEv:
  285|  7.27M|  const Scalar* data() const { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE6AbsSumEv:
  239|  4.36M|  Scalar AbsSum() const {
  240|  4.36M|    Scalar result(0);
  241|  17.4M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (241:21): [True: 13.0M, False: 4.35M]
  ------------------
  242|  13.0M|      Scalar next_value = std::abs(v_[i]);
  243|  13.0M|      if (result > std::numeric_limits<Scalar>::max() - next_value) {
  ------------------
  |  Branch (243:11): [True: 8.64k, False: 13.0M]
  ------------------
  244|       |        // Return the max if adding would have caused an overflow.
  245|  8.64k|        return std::numeric_limits<Scalar>::max();
  246|  8.64k|      }
  247|  13.0M|      result += next_value;
  248|  13.0M|    }
  249|  4.35M|    return result;
  250|  4.36M|  }
_ZNK5draco7VectorDIlLi3EEdvERKl:
  184|   155k|  Self operator/(const Scalar& o) const {
  185|   155k|    Self ret;
  186|   622k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (186:21): [True: 467k, False: 155k]
  ------------------
  187|   467k|      ret[i] = (*this)[i] / o;
  188|   467k|    }
  189|   155k|    return ret;
  190|   155k|  }
_ZN5draco7VectorDIlLi3EEixEi:
  114|   233M|  Scalar& operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEixEi:
  114|  21.7M|  Scalar& operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EE4dataEv:
  284|  13.0M|  Scalar* data() { return &(v_[0]); }
_ZNK5draco7VectorDIiLi3EEngEv:
  122|  3.62M|  Self operator-() const {
  123|  3.62M|    Self ret;
  124|  14.5M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (124:21): [True: 10.8M, False: 3.62M]
  ------------------
  125|  10.8M|      ret[i] = -(*this)[i];
  126|  10.8M|    }
  127|  3.62M|    return ret;
  128|  3.62M|  }
_ZNK5draco7VectorDIiLi3EEixEi:
  115|  10.8M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEmiERKS1_:
  139|  1.44M|  Self operator-(const Self& o) const {
  140|  1.44M|    Self ret;
  141|  4.33M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 2.88M, False: 1.44M]
  ------------------
  142|  2.88M|      ret[i] = (*this)[i] - o[i];
  143|  2.88M|    }
  144|  1.44M|    return ret;
  145|  1.44M|  }
_ZN5draco7VectorDIjLi2EEixEi:
  114|  17.3M|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEixEi:
  115|  25.9M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIiLi2EEixEi:
  114|   436M|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEplERKS1_:
  131|  2.88M|  Self operator+(const Self& o) const {
  132|  2.88M|    Self ret;
  133|  8.66M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (133:21): [True: 5.77M, False: 2.88M]
  ------------------
  134|  5.77M|      ret[i] = (*this)[i] + o[i];
  135|  5.77M|    }
  136|  2.88M|    return ret;
  137|  2.88M|  }
_ZNK5draco7VectorDIiLi2EEixEi:
  115|   315M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIiLi2EEmiERKS1_:
  139|  16.2M|  Self operator-(const Self& o) const {
  140|  16.2M|    Self ret;
  141|  48.6M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 32.4M, False: 16.2M]
  ------------------
  142|  32.4M|      ret[i] = (*this)[i] - o[i];
  143|  32.4M|    }
  144|  16.2M|    return ret;
  145|  16.2M|  }
_ZNK5draco7VectorDIiLi2EEplERKS1_:
  131|  16.2M|  Self operator+(const Self& o) const {
  132|  16.2M|    Self ret;
  133|  48.6M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (133:21): [True: 32.4M, False: 16.2M]
  ------------------
  134|  32.4M|      ret[i] = (*this)[i] + o[i];
  135|  32.4M|    }
  136|  16.2M|    return ret;
  137|  16.2M|  }
_ZNK5draco7VectorDIfLi2EEeqERKS1_:
  208|   315k|  bool operator==(const Self& o) const {
  209|   930k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (209:21): [True: 623k, False: 306k]
  ------------------
  210|   623k|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (210:11): [True: 8.64k, False: 615k]
  ------------------
  211|  8.64k|        return false;
  212|  8.64k|      }
  213|   623k|    }
  214|   306k|    return true;
  215|   315k|  }
_ZNK5draco7VectorDIfLi2EEixEi:
  115|  3.78M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIfLi3EEmiERKS1_:
  139|  18.0k|  Self operator-(const Self& o) const {
  140|  18.0k|    Self ret;
  141|  72.1k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 54.1k, False: 18.0k]
  ------------------
  142|  54.1k|      ret[i] = (*this)[i] - o[i];
  143|  54.1k|    }
  144|  18.0k|    return ret;
  145|  18.0k|  }
_ZNK5draco7VectorDIfLi3EE11SquaredNormEv:
  236|  9.39k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIfLi3EE3DotERKS1_:
  252|  10.1k|  Scalar Dot(const Self& o) const {
  253|  10.1k|    Scalar ret(0);
  254|  40.5k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (254:21): [True: 30.3k, False: 10.1k]
  ------------------
  255|  30.3k|      ret += (*this)[i] * o[i];
  256|  30.3k|    }
  257|  10.1k|    return ret;
  258|  10.1k|  }
_ZNK5draco7VectorDIfLi3EEmlERKf:
  176|    742|  Self operator*(const Scalar& o) const {
  177|    742|    Self ret;
  178|  2.96k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (178:21): [True: 2.22k, False: 742]
  ------------------
  179|  2.22k|      ret[i] = (*this)[i] * o;
  180|  2.22k|    }
  181|    742|    return ret;
  182|    742|  }
_ZNK5draco7VectorDIfLi2EEmiERKS1_:
  139|  8.64k|  Self operator-(const Self& o) const {
  140|  8.64k|    Self ret;
  141|  25.9k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 17.2k, False: 8.64k]
  ------------------
  142|  17.2k|      ret[i] = (*this)[i] - o[i];
  143|  17.2k|    }
  144|  8.64k|    return ret;
  145|  8.64k|  }
_ZN5draco7VectorDIfLi2EEC2Ev:
   42|  17.2k|  VectorD() {
   43|  51.8k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 34.5k, False: 17.2k]
  ------------------
   44|  34.5k|      (*this)[i] = Scalar(0);
   45|  34.5k|    }
   46|  17.2k|  }
_ZN5draco7VectorDIfLi2EEC2ERKfS3_:
   54|   639k|  VectorD(const Scalar& c0, const Scalar& c1) : v_({{c0, c1}}) {
   55|   639k|    DRACO_DCHECK_EQ(dimension, 2);
   56|   639k|    v_[0] = c0;
   57|   639k|    v_[1] = c1;
   58|   639k|  }
_ZN5draco7VectorDIfLi2EEixEi:
  114|  69.0k|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIlLi2EEeqERKS1_:
  208|   267k|  bool operator==(const Self& o) const {
  209|   793k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (209:21): [True: 530k, False: 262k]
  ------------------
  210|   530k|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (210:11): [True: 4.98k, False: 525k]
  ------------------
  211|  4.98k|        return false;
  212|  4.98k|      }
  213|   530k|    }
  214|   262k|    return true;
  215|   267k|  }
_ZNK5draco7VectorDIlLi2EEixEi:
  115|  1.61M|  const Scalar& operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIlLi3EEC2Ev:
   42|  45.2M|  VectorD() {
   43|   181M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 135M, False: 45.2M]
  ------------------
   44|   135M|      (*this)[i] = Scalar(0);
   45|   135M|    }
   46|  45.2M|  }
_ZNK5draco7VectorDIlLi3EE11SquaredNormEv:
  236|  6.22k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIlLi3EE3DotERKS1_:
  252|  7.74k|  Scalar Dot(const Self& o) const {
  253|  7.74k|    Scalar ret(0);
  254|  30.9k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (254:21): [True: 23.2k, False: 7.74k]
  ------------------
  255|  23.2k|      ret += (*this)[i] * o[i];
  256|  23.2k|    }
  257|  7.74k|    return ret;
  258|  7.74k|  }
_ZNK5draco7VectorDIlLi2EEmiERKS1_:
  139|  1.51k|  Self operator-(const Self& o) const {
  140|  1.51k|    Self ret;
  141|  4.54k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 3.03k, False: 1.51k]
  ------------------
  142|  3.03k|      ret[i] = (*this)[i] - o[i];
  143|  3.03k|    }
  144|  1.51k|    return ret;
  145|  1.51k|  }
_ZN5draco7VectorDImLi2EEC2IlLi2EEERKNS0_IT_XT0_EEE:
  104|  4.79k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t>& src_vector) {
  105|  14.3k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (105:21): [True: 9.59k, False: 4.79k]
  ------------------
  106|  9.59k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (106:11): [True: 9.59k, False: 0]
  ------------------
  107|  9.59k|        v_[i] = Scalar(src_vector[i]);
  108|  9.59k|      } else {
  109|      0|        v_[i] = Scalar(0);
  110|      0|      }
  111|  9.59k|    }
  112|  4.79k|  }
_ZNK5draco7VectorDImLi2EEmlERKm:
  176|  2.59k|  Self operator*(const Scalar& o) const {
  177|  2.59k|    Self ret;
  178|  7.77k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (178:21): [True: 5.18k, False: 2.59k]
  ------------------
  179|  5.18k|      ret[i] = (*this)[i] * o;
  180|  5.18k|    }
  181|  2.59k|    return ret;
  182|  2.59k|  }
_ZN5draco7VectorDImLi2EEC2Ev:
   42|  4.99k|  VectorD() {
   43|  14.9k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 9.98k, False: 4.99k]
  ------------------
   44|  9.98k|      (*this)[i] = Scalar(0);
   45|  9.98k|    }
   46|  4.99k|  }
_ZNK5draco7VectorDImLi2EEixEi:
  115|  19.5k|  const Scalar& operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDImLi2EEixEi:
  114|  19.9k|  Scalar& operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDImLi2EEplERKS1_:
  131|  1.90k|  Self operator+(const Self& o) const {
  132|  1.90k|    Self ret;
  133|  5.72k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (133:21): [True: 3.81k, False: 1.90k]
  ------------------
  134|  3.81k|      ret[i] = (*this)[i] + o[i];
  135|  3.81k|    }
  136|  1.90k|    return ret;
  137|  1.90k|  }
_ZN5draco7VectorDIlLi2EEC2ImLi2EEERKNS0_IT_XT0_EEE:
  104|  2.39k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t>& src_vector) {
  105|  7.19k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (105:21): [True: 4.79k, False: 2.39k]
  ------------------
  106|  4.79k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (106:11): [True: 4.79k, False: 0]
  ------------------
  107|  4.79k|        v_[i] = Scalar(src_vector[i]);
  108|  4.79k|      } else {
  109|      0|        v_[i] = Scalar(0);
  110|      0|      }
  111|  4.79k|    }
  112|  2.39k|  }
_ZNK5draco7VectorDIlLi3EEplERKS1_:
  131|  1.24k|  Self operator+(const Self& o) const {
  132|  1.24k|    Self ret;
  133|  4.96k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (133:21): [True: 3.72k, False: 1.24k]
  ------------------
  134|  3.72k|      ret[i] = (*this)[i] + o[i];
  135|  3.72k|    }
  136|  1.24k|    return ret;
  137|  1.24k|  }
_ZN5dracomlIlLi3EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  294|  1.24k|    const ScalarT& o, const VectorD<ScalarT, dimension_t>& v) {
  295|  1.24k|  return v * o;
  296|  1.24k|}
_ZNK5draco7VectorDIlLi3EEmlERKl:
  176|  1.24k|  Self operator*(const Scalar& o) const {
  177|  1.24k|    Self ret;
  178|  4.96k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (178:21): [True: 3.72k, False: 1.24k]
  ------------------
  179|  3.72k|      ret[i] = (*this)[i] * o;
  180|  3.72k|    }
  181|  1.24k|    return ret;
  182|  1.24k|  }
_ZN5draco7VectorDIlLi2EEC2ERKlS3_:
   54|   536k|  VectorD(const Scalar& c0, const Scalar& c1) : v_({{c0, c1}}) {
   55|   536k|    DRACO_DCHECK_EQ(dimension, 2);
   56|   536k|    v_[0] = c0;
   57|   536k|    v_[1] = c1;
   58|   536k|  }
_ZNK5draco7VectorDIlLi2EEmlERKl:
  176|  1.24k|  Self operator*(const Scalar& o) const {
  177|  1.24k|    Self ret;
  178|  3.72k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (178:21): [True: 2.48k, False: 1.24k]
  ------------------
  179|  2.48k|      ret[i] = (*this)[i] * o;
  180|  2.48k|    }
  181|  1.24k|    return ret;
  182|  1.24k|  }
_ZN5draco7VectorDIlLi2EEC2Ev:
   42|  5.10k|  VectorD() {
   43|  15.3k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 10.2k, False: 5.10k]
  ------------------
   44|  10.2k|      (*this)[i] = Scalar(0);
   45|  10.2k|    }
   46|  5.10k|  }
_ZNK5draco7VectorDIlLi2EEdvERKl:
  184|  1.10k|  Self operator/(const Scalar& o) const {
  185|  1.10k|    Self ret;
  186|  3.30k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (186:21): [True: 2.20k, False: 1.10k]
  ------------------
  187|  2.20k|      ret[i] = (*this)[i] / o;
  188|  2.20k|    }
  189|  1.10k|    return ret;
  190|  1.10k|  }
_ZNK5draco7VectorDImLi2EEmiERKS1_:
  139|    491|  Self operator-(const Self& o) const {
  140|    491|    Self ret;
  141|  1.47k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (141:21): [True: 982, False: 491]
  ------------------
  142|    982|      ret[i] = (*this)[i] - o[i];
  143|    982|    }
  144|    491|    return ret;
  145|    491|  }
_ZN5draco7VectorDIlLi2EEixEi:
  114|  20.1k|  Scalar& operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEC2Ev:
   42|  3.63M|  VectorD() {
   43|  14.5M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 10.8M, False: 3.63M]
  ------------------
   44|  10.8M|      (*this)[i] = Scalar(0);
   45|  10.8M|    }
   46|  3.63M|  }
_ZN5draco7VectorDIiLi2EEC2ERKiS3_:
   54|  69.3M|  VectorD(const Scalar& c0, const Scalar& c1) : v_({{c0, c1}}) {
   55|  69.3M|    DRACO_DCHECK_EQ(dimension, 2);
   56|  69.3M|    v_[0] = c0;
   57|  69.3M|    v_[1] = c1;
   58|  69.3M|  }
_ZN5draco7VectorDIjLi2EEC2IiLi2EEERKNS0_IT_XT0_EEE:
  104|  8.66M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t>& src_vector) {
  105|  25.9M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (105:21): [True: 17.3M, False: 8.66M]
  ------------------
  106|  17.3M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (106:11): [True: 17.3M, False: 0]
  ------------------
  107|  17.3M|        v_[i] = Scalar(src_vector[i]);
  108|  17.3M|      } else {
  109|      0|        v_[i] = Scalar(0);
  110|      0|      }
  111|  17.3M|    }
  112|  8.66M|  }
_ZN5draco7VectorDIjLi2EEC2Ev:
   42|  4.33M|  VectorD() {
   43|  12.9M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 8.66M, False: 4.33M]
  ------------------
   44|  8.66M|      (*this)[i] = Scalar(0);
   45|  8.66M|    }
   46|  4.33M|  }
_ZN5draco7VectorDIiLi2EEC2IjLi2EEERKNS0_IT_XT0_EEE:
  104|  4.33M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t>& src_vector) {
  105|  12.9M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (105:21): [True: 8.66M, False: 4.33M]
  ------------------
  106|  8.66M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (106:11): [True: 8.66M, False: 0]
  ------------------
  107|  8.66M|        v_[i] = Scalar(src_vector[i]);
  108|  8.66M|      } else {
  109|      0|        v_[i] = Scalar(0);
  110|      0|      }
  111|  8.66M|    }
  112|  4.33M|  }
_ZN5draco7VectorDIiLi2EEC2ERKS1_:
   90|  50.2M|  VectorD(const Self& o) {
   91|   150M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (91:21): [True: 100M, False: 50.2M]
  ------------------
   92|   100M|      (*this)[i] = o[i];
   93|   100M|    }
   94|  50.2M|  }
_ZN5draco7VectorDIiLi2EEC2Ev:
   42|  32.4M|  VectorD() {
   43|  97.3M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (43:21): [True: 64.9M, False: 32.4M]
  ------------------
   44|  64.9M|      (*this)[i] = Scalar(0);
   45|  64.9M|    }
   46|  32.4M|  }

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

_ZNK5draco11CornerTable12num_verticesEv:
   73|   171M|  inline int num_vertices() const {
   74|   171M|    return static_cast<int>(vertex_corners_.size());
   75|   171M|  }
_ZNK5draco11CornerTable11num_cornersEv:
   76|  12.3M|  inline int num_corners() const {
   77|  12.3M|    return static_cast<int>(corner_to_vertex_map_.size());
   78|  12.3M|  }
_ZNK5draco11CornerTable9num_facesEv:
   79|  4.60M|  inline int num_faces() const {
   80|  4.60M|    return static_cast<int>(corner_to_vertex_map_.size() / 3);
   81|  4.60M|  }
_ZNK5draco11CornerTable8OppositeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   83|   489M|  inline CornerIndex Opposite(CornerIndex corner) const {
   84|   489M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (84:9): [True: 0, False: 489M]
  ------------------
   85|      0|      return corner;
   86|      0|    }
   87|   489M|    return opposite_corners_[corner];
   88|   489M|  }
_ZNK5draco11CornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   89|   826M|  inline CornerIndex Next(CornerIndex corner) const {
   90|   826M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (90:9): [True: 22.9M, False: 803M]
  ------------------
   91|  22.9M|      return corner;
   92|  22.9M|    }
   93|   803M|    return LocalIndex(++corner) ? corner : corner - 3;
  ------------------
  |  Branch (93:12): [True: 732M, False: 71.5M]
  ------------------
   94|   826M|  }
_ZNK5draco11CornerTable8PreviousENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   95|   720M|  inline CornerIndex Previous(CornerIndex corner) const {
   96|   720M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (96:9): [True: 8.70M, False: 712M]
  ------------------
   97|  8.70M|      return corner;
   98|  8.70M|    }
   99|   712M|    return LocalIndex(corner) ? corner - 1 : corner + 2;
  ------------------
  |  Branch (99:12): [True: 188M, False: 523M]
  ------------------
  100|   720M|  }
_ZNK5draco11CornerTable6VertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  1.38G|  inline VertexIndex Vertex(CornerIndex corner) const {
  102|  1.38G|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (102:9): [True: 0, False: 1.38G]
  ------------------
  103|      0|      return kInvalidVertexIndex;
  104|      0|    }
  105|  1.38G|    return ConfidentVertex(corner);
  106|  1.38G|  }
_ZNK5draco11CornerTable15ConfidentVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  1.38G|  inline VertexIndex ConfidentVertex(CornerIndex corner) const {
  108|  1.38G|    DRACO_DCHECK_GE(corner.value(), 0);
  109|  1.38G|    DRACO_DCHECK_LT(corner.value(), num_corners());
  110|  1.38G|    return corner_to_vertex_map_[corner];
  111|  1.38G|  }
_ZNK5draco11CornerTable4FaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  112|  48.6M|  inline FaceIndex Face(CornerIndex corner) const {
  113|  48.6M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (113:9): [True: 0, False: 48.6M]
  ------------------
  114|      0|      return kInvalidFaceIndex;
  115|      0|    }
  116|  48.6M|    return FaceIndex(corner.value() / 3);
  117|  48.6M|  }
_ZNK5draco11CornerTable10LocalIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  128|  1.51G|  inline int LocalIndex(CornerIndex corner) const { return corner.value() % 3; }
_ZNK5draco11CornerTable14LeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  150|  91.5M|  inline CornerIndex LeftMostCorner(VertexIndex v) const {
  151|  91.5M|    return vertex_corners_[v];
  152|  91.5M|  }
_ZNK5draco11CornerTable12IsOnBoundaryENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  185|  1.08M|  inline bool IsOnBoundary(VertexIndex vert) const {
  186|  1.08M|    const CornerIndex corner = LeftMostCorner(vert);
  187|  1.08M|    if (SwingLeft(corner) == kInvalidCornerIndex) {
  ------------------
  |  Branch (187:9): [True: 30.1k, False: 1.05M]
  ------------------
  188|  30.1k|      return true;
  189|  30.1k|    }
  190|  1.05M|    return false;
  191|  1.08M|  }
_ZNK5draco11CornerTable10SwingRightENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  200|   107M|  inline CornerIndex SwingRight(CornerIndex corner) const {
  201|   107M|    return Previous(Opposite(Previous(corner)));
  202|   107M|  }
_ZNK5draco11CornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  205|  15.4M|  inline CornerIndex SwingLeft(CornerIndex corner) const {
  206|  15.4M|    return Next(Opposite(Next(corner)));
  207|  15.4M|  }
_ZNK5draco11CornerTable13GetLeftCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  217|  5.36M|  inline CornerIndex GetLeftCorner(CornerIndex corner_id) const {
  218|  5.36M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (218:9): [True: 0, False: 5.36M]
  ------------------
  219|      0|      return kInvalidCornerIndex;
  220|      0|    }
  221|  5.36M|    return Opposite(Previous(corner_id));
  222|  5.36M|  }
_ZNK5draco11CornerTable14GetRightCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  223|  6.41M|  inline CornerIndex GetRightCorner(CornerIndex corner_id) const {
  224|  6.41M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (224:9): [True: 0, False: 6.41M]
  ------------------
  225|      0|      return kInvalidCornerIndex;
  226|      0|    }
  227|  6.41M|    return Opposite(Next(corner_id));
  228|  6.41M|  }
_ZN5draco11CornerTable17SetOppositeCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_:
  248|   563M|                                CornerIndex opp_corner_id) {
  249|   563M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  250|   563M|    opposite_corners_[corner_id] = opp_corner_id;
  251|   563M|  }
_ZN5draco11CornerTable17MapCornerToVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEE:
  265|   683M|  inline void MapCornerToVertex(CornerIndex corner_id, VertexIndex vert_id) {
  266|   683M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  267|   683M|    corner_to_vertex_map_[corner_id] = vert_id;
  268|   683M|  }
_ZN5draco11CornerTable12AddNewVertexEv:
  270|   188M|  VertexIndex AddNewVertex() {
  271|   188M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  272|       |    // Add a new invalid vertex.
  273|   188M|    vertex_corners_.push_back(kInvalidCornerIndex);
  274|   188M|    return VertexIndex(static_cast<uint32_t>(vertex_corners_.size() - 1));
  275|   188M|  }
_ZN5draco11CornerTable17SetLeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEE:
  292|   397M|  void SetLeftMostCorner(VertexIndex vert, CornerIndex corner) {
  293|   397M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  294|   397M|    if (vert != kInvalidVertexIndex) {
  ------------------
  |  Branch (294:9): [True: 397M, False: 0]
  ------------------
  295|   397M|      vertex_corners_[vert] = corner;
  296|   397M|    }
  297|   397M|  }
_ZN5draco11CornerTable18MakeVertexIsolatedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  328|  5.69M|  void MakeVertexIsolated(VertexIndex vert) {
  329|  5.69M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  330|  5.69M|    vertex_corners_[vert] = kInvalidCornerIndex;
  331|  5.69M|  }

_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  228|  3.68k|      : corner_table_(table),
  229|  3.68k|        start_corner_(table->LeftMostCorner(vert_id)),
  230|  3.68k|        corner_(start_corner_),
  231|  3.68k|        left_traversal_(true) {}
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE3EndEv:
  244|  3.87M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEppEv:
  267|  46.9k|  VertexCornersIterator& operator++() {
  268|  46.9k|    Next();
  269|  46.9k|    return *this;
  270|  46.9k|  }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEE4NextEv:
  247|  3.30M|  void Next() {
  248|  3.30M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 3.24M, False: 58.6k]
  ------------------
  249|  3.24M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  3.24M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 30.9k, False: 3.21M]
  ------------------
  251|       |        // Open boundary reached.
  252|  30.9k|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  30.9k|        left_traversal_ = false;
  254|  3.21M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 537k, False: 2.67M]
  ------------------
  255|       |        // End reached.
  256|   537k|        corner_ = kInvalidCornerIndex;
  257|   537k|      }
  258|  3.24M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  58.6k|      corner_ = corner_table_->SwingRight(corner_);
  262|  58.6k|    }
  263|  3.30M|  }
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE6CornerEv:
  241|  6.55M|  CornerIndex Corner() const { return corner_; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE3EndEv:
  244|  7.81M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE6CornerEv:
  241|  8.03M|  CornerIndex Corner() const { return corner_; }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE4NextEv:
  247|  4.02M|  void Next() {
  248|  4.02M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 3.99M, False: 21.8k]
  ------------------
  249|  3.99M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  3.99M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 3.76M, False: 238k]
  ------------------
  251|       |        // Open boundary reached.
  252|  3.76M|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  3.76M|        left_traversal_ = false;
  254|  3.76M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 37.4k, False: 200k]
  ------------------
  255|       |        // End reached.
  256|  37.4k|        corner_ = kInvalidCornerIndex;
  257|  37.4k|      }
  258|  3.99M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  21.8k|      corner_ = corner_table_->SwingRight(corner_);
  262|  21.8k|    }
  263|  4.02M|  }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|  3.79M|      : corner_table_(table),
  236|  3.79M|        start_corner_(corner_id),
  237|  3.79M|        corner_(start_corner_),
  238|  3.79M|        left_traversal_(true) {}
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|   565k|      : corner_table_(table),
  236|   565k|        start_corner_(corner_id),
  237|   565k|        corner_(start_corner_),
  238|   565k|        left_traversal_(true) {}

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

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

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

_ZNK5draco24MeshAttributeCornerTable26IsCornerOppositeToSeamEdgeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   45|  89.5M|  inline bool IsCornerOppositeToSeamEdge(CornerIndex corner) const {
   46|  89.5M|    return is_edge_on_seam_[corner.value()];
   47|  89.5M|  }
_ZNK5draco24MeshAttributeCornerTable8OppositeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   49|  42.4M|  inline CornerIndex Opposite(CornerIndex corner) const {
   50|  42.4M|    if (corner == kInvalidCornerIndex || IsCornerOppositeToSeamEdge(corner)) {
  ------------------
  |  Branch (50:9): [True: 0, False: 42.4M]
  |  Branch (50:42): [True: 39.5M, False: 2.89M]
  ------------------
   51|  39.5M|      return kInvalidCornerIndex;
   52|  39.5M|    }
   53|  2.89M|    return corner_table_->Opposite(corner);
   54|  42.4M|  }
_ZNK5draco24MeshAttributeCornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   56|  52.0M|  inline CornerIndex Next(CornerIndex corner) const {
   57|  52.0M|    return corner_table_->Next(corner);
   58|  52.0M|  }
_ZNK5draco24MeshAttributeCornerTable8PreviousENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   60|  31.8M|  inline CornerIndex Previous(CornerIndex corner) const {
   61|  31.8M|    return corner_table_->Previous(corner);
   62|  31.8M|  }
_ZNK5draco24MeshAttributeCornerTable14IsCornerOnSeamENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   65|  6.04M|  inline bool IsCornerOnSeam(CornerIndex corner) const {
   66|  6.04M|    return is_vertex_on_seam_[corner_table_->Vertex(corner).value()];
   67|  6.04M|  }
_ZNK5draco24MeshAttributeCornerTable13GetLeftCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.73M|  inline CornerIndex GetLeftCorner(CornerIndex corner) const {
   72|  3.73M|    return Opposite(Previous(corner));
   73|  3.73M|  }
_ZNK5draco24MeshAttributeCornerTable14GetRightCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   74|  3.94M|  inline CornerIndex GetRightCorner(CornerIndex corner) const {
   75|  3.94M|    return Opposite(Next(corner));
   76|  3.94M|  }
_ZNK5draco24MeshAttributeCornerTable10SwingRightENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   79|  7.93M|  inline CornerIndex SwingRight(CornerIndex corner) const {
   80|  7.93M|    return Previous(Opposite(Previous(corner)));
   81|  7.93M|  }
_ZNK5draco24MeshAttributeCornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   84|  17.9M|  inline CornerIndex SwingLeft(CornerIndex corner) const {
   85|  17.9M|    return Next(Opposite(Next(corner)));
   86|  17.9M|  }
_ZNK5draco24MeshAttributeCornerTable12num_verticesEv:
   88|  20.1k|  int num_vertices() const {
   89|  20.1k|    return static_cast<int>(vertex_to_attribute_entry_id_map_.size());
   90|  20.1k|  }
_ZNK5draco24MeshAttributeCornerTable9num_facesEv:
   91|  5.37k|  int num_faces() const { return static_cast<int>(corner_table_->num_faces()); }
_ZNK5draco24MeshAttributeCornerTable11num_cornersEv:
   92|  3.24k|  int num_corners() const { return corner_table_->num_corners(); }
_ZNK5draco24MeshAttributeCornerTable6VertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   94|   120M|  VertexIndex Vertex(CornerIndex corner) const {
   95|   120M|    DRACO_DCHECK_LT(corner.value(), corner_to_vertex_map_.size());
   96|   120M|    return ConfidentVertex(corner);
   97|   120M|  }
_ZNK5draco24MeshAttributeCornerTable15ConfidentVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   98|   120M|  VertexIndex ConfidentVertex(CornerIndex corner) const {
   99|   120M|    return corner_to_vertex_map_[corner.value()];
  100|   120M|  }
_ZNK5draco24MeshAttributeCornerTable14LeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  106|  3.71M|  inline CornerIndex LeftMostCorner(VertexIndex v) const {
  107|  3.71M|    return vertex_to_left_most_corner_map_[v.value()];
  108|  3.71M|  }
_ZNK5draco24MeshAttributeCornerTable12IsOnBoundaryENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  122|  3.71M|  inline bool IsOnBoundary(VertexIndex vert) const {
  123|  3.71M|    const CornerIndex corner = LeftMostCorner(vert);
  124|  3.71M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (124:9): [True: 0, False: 3.71M]
  ------------------
  125|      0|      return true;
  126|      0|    }
  127|  3.71M|    if (SwingLeft(corner) == kInvalidCornerIndex) {
  ------------------
  |  Branch (127:9): [True: 3.50M, False: 215k]
  ------------------
  128|  3.50M|      return true;
  129|  3.50M|    }
  130|   215k|    return false;
  131|  3.71M|  }

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

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

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

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

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

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

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

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

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

