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

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

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

_ZN5draco30AttributeQuantizationTransformC2Ev:
   29|    763|  AttributeQuantizationTransform() : quantization_bits_(-1), range_(0.f) {}
_ZNK5draco30AttributeQuantizationTransform17quantization_bitsEv:
   59|     38|  int32_t quantization_bits() const { return quantization_bits_; }
_ZNK5draco30AttributeQuantizationTransform5rangeEv:
   62|     38|  float range() const { return range_; }

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

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

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

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

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

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

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

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

_ZNK5draco17AttributesDecoder14GetAttributeIdEi:
   44|  66.3k|  int32_t GetAttributeId(int i) const override {
   45|  66.3k|    return point_attribute_ids_[i];
   46|  66.3k|  }
_ZNK5draco17AttributesDecoder16GetNumAttributesEv:
   47|  46.7k|  int32_t GetNumAttributes() const override {
   48|  46.7k|    return static_cast<int32_t>(point_attribute_ids_.size());
   49|  46.7k|  }
_ZNK5draco17AttributesDecoder10GetDecoderEv:
   50|  40.0k|  PointCloudDecoder *GetDecoder() const override {
   51|  40.0k|    return point_cloud_decoder_;
   52|  40.0k|  }
_ZN5draco17AttributesDecoder16DecodeAttributesEPNS_13DecoderBufferE:
   55|  6.43k|  bool DecodeAttributes(DecoderBuffer *in_buffer) override {
   56|  6.43k|    if (!DecodePortableAttributes(in_buffer)) {
  ------------------
  |  Branch (56:9): [True: 3.06k, False: 3.37k]
  ------------------
   57|  3.06k|      return false;
   58|  3.06k|    }
   59|  3.37k|    if (!DecodeDataNeededByPortableTransforms(in_buffer)) {
  ------------------
  |  Branch (59:9): [True: 1.50k, False: 1.87k]
  ------------------
   60|  1.50k|      return false;
   61|  1.50k|    }
   62|  1.87k|    if (!TransformAttributesToOriginalFormat()) {
  ------------------
  |  Branch (62:9): [True: 483, False: 1.38k]
  ------------------
   63|    483|      return false;
   64|    483|    }
   65|  1.38k|    return true;
   66|  1.87k|  }
_ZNK5draco17AttributesDecoder27GetLocalIdForPointAttributeEi:
   69|  1.94k|  int32_t GetLocalIdForPointAttribute(int32_t point_attribute_id) const {
   70|  1.94k|    const int id_map_size =
   71|  1.94k|        static_cast<int>(point_attribute_to_local_id_map_.size());
   72|  1.94k|    if (point_attribute_id >= id_map_size) {
  ------------------
  |  Branch (72:9): [True: 0, False: 1.94k]
  ------------------
   73|      0|      return -1;
   74|      0|    }
   75|  1.94k|    return point_attribute_to_local_id_map_[point_attribute_id];
   76|  1.94k|  }
_ZN5draco17AttributesDecoderD2Ev:
   35|  47.2k|  virtual ~AttributesDecoder() = default;

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

_ZN5draco23KdTreeAttributesDecoderC2Ev:
  132|  14.4k|KdTreeAttributesDecoder::KdTreeAttributesDecoder() {}
_ZN5draco23KdTreeAttributesDecoder24DecodePortableAttributesEPNS_13DecoderBufferE:
  135|  2.14k|    DecoderBuffer *in_buffer) {
  136|  2.14k|  if (in_buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 3)) {
  ------------------
  |  |  115|  2.14k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (136:7): [True: 1.11k, False: 1.03k]
  ------------------
  137|       |    // Old bitstream does everything in the
  138|       |    // DecodeDataNeededByPortableTransforms() method.
  139|  1.11k|    return true;
  140|  1.11k|  }
  141|  1.03k|  uint8_t compression_level = 0;
  142|  1.03k|  if (!in_buffer->Decode(&compression_level)) {
  ------------------
  |  Branch (142:7): [True: 7, False: 1.02k]
  ------------------
  143|      7|    return false;
  144|      7|  }
  145|  1.02k|  const int32_t num_points = GetDecoder()->point_cloud()->num_points();
  146|       |
  147|       |  // Decode data using the kd tree decoding into integer (portable) attributes.
  148|       |  // We first need to go over all attributes and create a new portable storage
  149|       |  // for those attributes that need it (floating point attributes that have to
  150|       |  // be dequantized after decoding).
  151|       |
  152|  1.02k|  const int num_attributes = GetNumAttributes();
  153|  1.02k|  uint32_t total_dimensionality = 0;  // position is a required dimension
  154|  1.02k|  std::vector<AttributeTuple> atts(num_attributes);
  155|       |
  156|  2.70k|  for (int i = 0; i < GetNumAttributes(); ++i) {
  ------------------
  |  Branch (156:19): [True: 1.68k, False: 1.02k]
  ------------------
  157|  1.68k|    const int att_id = GetAttributeId(i);
  158|  1.68k|    PointAttribute *const att = GetDecoder()->point_cloud()->attribute(att_id);
  159|       |    // All attributes have the same number of values and identity mapping
  160|       |    // between PointIndex and AttributeValueIndex.
  161|  1.68k|    att->Reset(num_points);
  162|  1.68k|    att->SetIdentityMapping();
  163|       |
  164|  1.68k|    PointAttribute *target_att = nullptr;
  165|  1.68k|    if (att->data_type() == DT_UINT32 || att->data_type() == DT_UINT16 ||
  ------------------
  |  Branch (165:9): [True: 58, False: 1.62k]
  |  Branch (165:42): [True: 267, False: 1.36k]
  ------------------
  166|  1.36k|        att->data_type() == DT_UINT8) {
  ------------------
  |  Branch (166:9): [True: 187, False: 1.17k]
  ------------------
  167|       |      // We can decode to these attributes directly.
  168|    512|      target_att = att;
  169|  1.17k|    } else if (att->data_type() == DT_INT32 || att->data_type() == DT_INT16 ||
  ------------------
  |  Branch (169:16): [True: 198, False: 975]
  |  Branch (169:48): [True: 199, False: 776]
  ------------------
  170|    869|               att->data_type() == DT_INT8) {
  ------------------
  |  Branch (170:16): [True: 472, False: 304]
  ------------------
  171|       |      // Prepare storage for data that is used to convert unsigned values back
  172|       |      // to the signed ones.
  173|  34.2k|      for (int c = 0; c < att->num_components(); ++c) {
  ------------------
  |  Branch (173:23): [True: 33.3k, False: 869]
  ------------------
  174|  33.3k|        min_signed_values_.push_back(0);
  175|  33.3k|      }
  176|    869|      target_att = att;
  177|    869|    } else if (att->data_type() == DT_FLOAT32) {
  ------------------
  |  Branch (177:16): [True: 300, False: 4]
  ------------------
  178|       |      // Create a portable attribute that will hold the decoded data. We will
  179|       |      // dequantize the decoded data to the final attribute later on.
  180|    300|      const int num_components = att->num_components();
  181|    300|      GeometryAttribute va;
  182|    300|      va.Init(att->attribute_type(), nullptr, num_components, DT_UINT32, false,
  183|    300|              num_components * DataTypeLength(DT_UINT32), 0);
  184|    300|      std::unique_ptr<PointAttribute> port_att(new PointAttribute(va));
  185|    300|      port_att->SetIdentityMapping();
  186|    300|      port_att->Reset(num_points);
  187|    300|      quantized_portable_attributes_.push_back(std::move(port_att));
  188|    300|      target_att = quantized_portable_attributes_.back().get();
  189|    300|    } else {
  190|       |      // Unsupported type.
  191|      4|      return false;
  192|      4|    }
  193|       |    // Add attribute to the output iterator used by the core algorithm.
  194|  1.68k|    const DataType data_type = target_att->data_type();
  195|  1.68k|    const uint32_t data_size = (std::max)(0, DataTypeLength(data_type));
  196|  1.68k|    const uint32_t num_components = target_att->num_components();
  197|  1.68k|    atts[i] = std::make_tuple(target_att, total_dimensionality, data_type,
  198|  1.68k|                              data_size, num_components);
  199|  1.68k|    total_dimensionality += num_components;
  200|  1.68k|  }
  201|  1.02k|  typedef PointAttributeVectorOutputIterator<uint32_t> OutIt;
  202|  1.02k|  OutIt out_it(atts);
  203|       |
  204|  1.02k|  switch (compression_level) {
  205|    145|    case 0: {
  ------------------
  |  Branch (205:5): [True: 145, False: 879]
  ------------------
  206|    145|      if (!DecodePoints<0, OutIt>(total_dimensionality, num_points, in_buffer,
  ------------------
  |  Branch (206:11): [True: 87, False: 58]
  ------------------
  207|    145|                                  &out_it)) {
  208|     87|        return false;
  209|     87|      }
  210|     58|      break;
  211|    145|    }
  212|     72|    case 1: {
  ------------------
  |  Branch (212:5): [True: 72, False: 952]
  ------------------
  213|     72|      if (!DecodePoints<1, OutIt>(total_dimensionality, num_points, in_buffer,
  ------------------
  |  Branch (213:11): [True: 45, False: 27]
  ------------------
  214|     72|                                  &out_it)) {
  215|     45|        return false;
  216|     45|      }
  217|     27|      break;
  218|     72|    }
  219|    141|    case 2: {
  ------------------
  |  Branch (219:5): [True: 141, False: 883]
  ------------------
  220|    141|      if (!DecodePoints<2, OutIt>(total_dimensionality, num_points, in_buffer,
  ------------------
  |  Branch (220:11): [True: 116, False: 25]
  ------------------
  221|    141|                                  &out_it)) {
  222|    116|        return false;
  223|    116|      }
  224|     25|      break;
  225|    141|    }
  226|    121|    case 3: {
  ------------------
  |  Branch (226:5): [True: 121, False: 903]
  ------------------
  227|    121|      if (!DecodePoints<3, OutIt>(total_dimensionality, num_points, in_buffer,
  ------------------
  |  Branch (227:11): [True: 108, False: 13]
  ------------------
  228|    121|                                  &out_it)) {
  229|    108|        return false;
  230|    108|      }
  231|     13|      break;
  232|    121|    }
  233|    193|    case 4: {
  ------------------
  |  Branch (233:5): [True: 193, False: 831]
  ------------------
  234|    193|      if (!DecodePoints<4, OutIt>(total_dimensionality, num_points, in_buffer,
  ------------------
  |  Branch (234:11): [True: 166, False: 27]
  ------------------
  235|    193|                                  &out_it)) {
  236|    166|        return false;
  237|    166|      }
  238|     27|      break;
  239|    193|    }
  240|    201|    case 5: {
  ------------------
  |  Branch (240:5): [True: 201, False: 823]
  ------------------
  241|    201|      if (!DecodePoints<5, OutIt>(total_dimensionality, num_points, in_buffer,
  ------------------
  |  Branch (241:11): [True: 189, False: 12]
  ------------------
  242|    201|                                  &out_it)) {
  243|    189|        return false;
  244|    189|      }
  245|     12|      break;
  246|    201|    }
  247|    142|    case 6: {
  ------------------
  |  Branch (247:5): [True: 142, False: 882]
  ------------------
  248|    142|      if (!DecodePoints<6, OutIt>(total_dimensionality, num_points, in_buffer,
  ------------------
  |  Branch (248:11): [True: 121, False: 21]
  ------------------
  249|    142|                                  &out_it)) {
  250|    121|        return false;
  251|    121|      }
  252|     21|      break;
  253|    142|    }
  254|     21|    default:
  ------------------
  |  Branch (254:5): [True: 9, False: 1.01k]
  ------------------
  255|      9|      return false;
  256|  1.02k|  }
  257|    183|  return true;
  258|  1.02k|}
_ZN5draco23KdTreeAttributesDecoder36DecodeDataNeededByPortableTransformsEPNS_13DecoderBufferE:
  274|  1.29k|    DecoderBuffer *in_buffer) {
  275|  1.29k|  if (in_buffer->bitstream_version() >= DRACO_BITSTREAM_VERSION(2, 3)) {
  ------------------
  |  |  115|  1.29k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (275:7): [True: 183, False: 1.11k]
  ------------------
  276|       |    // Decode quantization data for each attribute that need it.
  277|       |    // TODO(ostava): This should be moved to AttributeQuantizationTransform.
  278|    183|    std::vector<float> min_value;
  279|    577|    for (int i = 0; i < GetNumAttributes(); ++i) {
  ------------------
  |  Branch (279:21): [True: 439, False: 138]
  ------------------
  280|    439|      const int att_id = GetAttributeId(i);
  281|    439|      const PointAttribute *const att =
  282|    439|          GetDecoder()->point_cloud()->attribute(att_id);
  283|    439|      if (att->data_type() == DT_FLOAT32) {
  ------------------
  |  Branch (283:11): [True: 149, False: 290]
  ------------------
  284|    149|        const int num_components = att->num_components();
  285|    149|        min_value.resize(num_components);
  286|    149|        if (!in_buffer->Decode(&min_value[0], sizeof(float) * num_components)) {
  ------------------
  |  Branch (286:13): [True: 20, False: 129]
  ------------------
  287|     20|          return false;
  288|     20|        }
  289|    129|        float max_value_dif;
  290|    129|        if (!in_buffer->Decode(&max_value_dif)) {
  ------------------
  |  Branch (290:13): [True: 6, False: 123]
  ------------------
  291|      6|          return false;
  292|      6|        }
  293|    123|        uint8_t quantization_bits;
  294|    123|        if (!in_buffer->Decode(&quantization_bits) || quantization_bits > 31) {
  ------------------
  |  Branch (294:13): [True: 3, False: 120]
  |  Branch (294:55): [True: 10, False: 110]
  ------------------
  295|     13|          return false;
  296|     13|        }
  297|    110|        AttributeQuantizationTransform transform;
  298|    110|        if (!transform.SetParameters(quantization_bits, min_value.data(),
  ------------------
  |  Branch (298:13): [True: 6, False: 104]
  ------------------
  299|    110|                                     num_components, max_value_dif)) {
  300|      6|          return false;
  301|      6|        }
  302|    104|        const int num_transforms =
  303|    104|            static_cast<int>(attribute_quantization_transforms_.size());
  304|    104|        if (!transform.TransferToAttribute(
  ------------------
  |  Branch (304:13): [True: 0, False: 104]
  ------------------
  305|    104|                quantized_portable_attributes_[num_transforms].get())) {
  306|      0|          return false;
  307|      0|        }
  308|    104|        attribute_quantization_transforms_.push_back(transform);
  309|    104|      }
  310|    439|    }
  311|       |
  312|       |    // Decode transform data for signed integer attributes.
  313|  3.60k|    for (int i = 0; i < min_signed_values_.size(); ++i) {
  ------------------
  |  Branch (313:21): [True: 3.50k, False: 101]
  ------------------
  314|  3.50k|      int32_t val;
  315|  3.50k|      if (!DecodeVarint(&val, in_buffer)) {
  ------------------
  |  Branch (315:11): [True: 37, False: 3.46k]
  ------------------
  316|     37|        return false;
  317|     37|      }
  318|  3.46k|      min_signed_values_[i] = val;
  319|  3.46k|    }
  320|    101|    return true;
  321|    138|  }
  322|  1.11k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  323|       |  // Handle old bitstream
  324|       |  // Figure out the total dimensionality of the point cloud
  325|  1.11k|  const uint32_t attribute_count = GetNumAttributes();
  326|  1.11k|  uint32_t total_dimensionality = 0;  // position is a required dimension
  327|  1.11k|  std::vector<AttributeTuple> atts(attribute_count);
  328|  1.11k|  for (auto attribute_index = 0;
  329|  2.47k|       static_cast<uint32_t>(attribute_index) < attribute_count;
  ------------------
  |  Branch (329:8): [True: 1.36k, False: 1.11k]
  ------------------
  330|  1.36k|       attribute_index += 1)  // increment the dimensionality as needed...
  331|  1.36k|  {
  332|  1.36k|    const int att_id = GetAttributeId(attribute_index);
  333|  1.36k|    PointAttribute *const att = GetDecoder()->point_cloud()->attribute(att_id);
  334|  1.36k|    const DataType data_type = att->data_type();
  335|  1.36k|    const uint32_t data_size = (std::max)(0, DataTypeLength(data_type));
  336|  1.36k|    const uint32_t num_components = att->num_components();
  337|  1.36k|    if (data_size > 4) {
  ------------------
  |  Branch (337:9): [True: 1, False: 1.36k]
  ------------------
  338|      1|      return false;
  339|      1|    }
  340|       |
  341|  1.36k|    atts[attribute_index] = std::make_tuple(
  342|  1.36k|        att, total_dimensionality, data_type, data_size, num_components);
  343|       |    // everything is treated as 32bit in the encoder.
  344|  1.36k|    total_dimensionality += num_components;
  345|  1.36k|  }
  346|       |
  347|  1.11k|  const int att_id = GetAttributeId(0);
  348|  1.11k|  PointAttribute *const att = GetDecoder()->point_cloud()->attribute(att_id);
  349|  1.11k|  att->SetIdentityMapping();
  350|       |  // Decode method
  351|  1.11k|  uint8_t method;
  352|  1.11k|  if (!in_buffer->Decode(&method)) {
  ------------------
  |  Branch (352:7): [True: 4, False: 1.10k]
  ------------------
  353|      4|    return false;
  354|      4|  }
  355|  1.10k|  if (method == KdTreeAttributesEncodingMethod::kKdTreeQuantizationEncoding) {
  ------------------
  |  Branch (355:7): [True: 713, False: 393]
  ------------------
  356|       |    // This method only supports one attribute with exactly three components.
  357|    713|    if (atts.size() != 1 || std::get<4>(atts[0]) != 3) {
  ------------------
  |  Branch (357:9): [True: 2, False: 711]
  |  Branch (357:29): [True: 5, False: 706]
  ------------------
  358|      7|      return false;
  359|      7|    }
  360|    706|    uint8_t compression_level = 0;
  361|    706|    if (!in_buffer->Decode(&compression_level)) {
  ------------------
  |  Branch (361:9): [True: 2, False: 704]
  ------------------
  362|      2|      return false;
  363|      2|    }
  364|    704|    uint32_t num_points = 0;
  365|    704|    if (!in_buffer->Decode(&num_points)) {
  ------------------
  |  Branch (365:9): [True: 2, False: 702]
  ------------------
  366|      2|      return false;
  367|      2|    }
  368|    702|    att->Reset(num_points);
  369|    702|    FloatPointsTreeDecoder decoder;
  370|    702|    decoder.set_num_points_from_header(num_points);
  371|    702|    PointAttributeVectorOutputIterator<float> out_it(atts);
  372|    702|    if (!decoder.DecodePointCloud(in_buffer, out_it)) {
  ------------------
  |  Branch (372:9): [True: 693, False: 9]
  ------------------
  373|    693|      return false;
  374|    693|    }
  375|    702|  } else if (method == KdTreeAttributesEncodingMethod::kKdTreeIntegerEncoding) {
  ------------------
  |  Branch (375:14): [True: 382, False: 11]
  ------------------
  376|    382|    uint8_t compression_level = 0;
  377|    382|    if (!in_buffer->Decode(&compression_level)) {
  ------------------
  |  Branch (377:9): [True: 1, False: 381]
  ------------------
  378|      1|      return false;
  379|      1|    }
  380|    381|    if (6 < compression_level) {
  ------------------
  |  Branch (380:9): [True: 2, False: 379]
  ------------------
  381|      2|      DRACO_LOGE(
  ------------------
  |  |   31|      2|#define DRACO_LOGE printf
  ------------------
  382|      2|          "KdTreeAttributesDecoder: compression level %i not supported.\n",
  383|      2|          compression_level);
  384|      2|      return false;
  385|      2|    }
  386|       |
  387|    379|    uint32_t num_points;
  388|    379|    if (!in_buffer->Decode(&num_points)) {
  ------------------
  |  Branch (388:9): [True: 3, False: 376]
  ------------------
  389|      3|      return false;
  390|      3|    }
  391|       |
  392|    376|    for (auto attribute_index = 0;
  393|    896|         static_cast<uint32_t>(attribute_index) < attribute_count;
  ------------------
  |  Branch (393:10): [True: 520, False: 376]
  ------------------
  394|    520|         attribute_index += 1) {
  395|    520|      const int att_id = GetAttributeId(attribute_index);
  396|    520|      PointAttribute *const attr =
  397|    520|          GetDecoder()->point_cloud()->attribute(att_id);
  398|    520|      attr->Reset(num_points);
  399|    520|      attr->SetIdentityMapping();
  400|    520|    }
  401|       |
  402|    376|    PointAttributeVectorOutputIterator<uint32_t> out_it(atts);
  403|       |
  404|    376|    switch (compression_level) {
  405|    126|      case 0: {
  ------------------
  |  Branch (405:7): [True: 126, False: 250]
  ------------------
  406|    126|        DynamicIntegerPointsKdTreeDecoder<0> decoder(total_dimensionality);
  407|    126|        if (!decoder.DecodePoints(in_buffer, out_it)) {
  ------------------
  |  Branch (407:13): [True: 100, False: 26]
  ------------------
  408|    100|          return false;
  409|    100|        }
  410|     26|        break;
  411|    126|      }
  412|    129|      case 1: {
  ------------------
  |  Branch (412:7): [True: 129, False: 247]
  ------------------
  413|    129|        DynamicIntegerPointsKdTreeDecoder<1> decoder(total_dimensionality);
  414|    129|        if (!decoder.DecodePoints(in_buffer, out_it)) {
  ------------------
  |  Branch (414:13): [True: 103, False: 26]
  ------------------
  415|    103|          return false;
  416|    103|        }
  417|     26|        break;
  418|    129|      }
  419|     49|      case 2: {
  ------------------
  |  Branch (419:7): [True: 49, False: 327]
  ------------------
  420|     49|        DynamicIntegerPointsKdTreeDecoder<2> decoder(total_dimensionality);
  421|     49|        if (!decoder.DecodePoints(in_buffer, out_it)) {
  ------------------
  |  Branch (421:13): [True: 47, False: 2]
  ------------------
  422|     47|          return false;
  423|     47|        }
  424|      2|        break;
  425|     49|      }
  426|     55|      case 3: {
  ------------------
  |  Branch (426:7): [True: 55, False: 321]
  ------------------
  427|     55|        DynamicIntegerPointsKdTreeDecoder<3> decoder(total_dimensionality);
  428|     55|        if (!decoder.DecodePoints(in_buffer, out_it)) {
  ------------------
  |  Branch (428:13): [True: 52, False: 3]
  ------------------
  429|     52|          return false;
  430|     52|        }
  431|      3|        break;
  432|     55|      }
  433|     10|      case 4: {
  ------------------
  |  Branch (433:7): [True: 10, False: 366]
  ------------------
  434|     10|        DynamicIntegerPointsKdTreeDecoder<4> decoder(total_dimensionality);
  435|     10|        if (!decoder.DecodePoints(in_buffer, out_it)) {
  ------------------
  |  Branch (435:13): [True: 9, False: 1]
  ------------------
  436|      9|          return false;
  437|      9|        }
  438|      1|        break;
  439|     10|      }
  440|      3|      case 5: {
  ------------------
  |  Branch (440:7): [True: 3, False: 373]
  ------------------
  441|      3|        DynamicIntegerPointsKdTreeDecoder<5> decoder(total_dimensionality);
  442|      3|        if (!decoder.DecodePoints(in_buffer, out_it)) {
  ------------------
  |  Branch (442:13): [True: 2, False: 1]
  ------------------
  443|      2|          return false;
  444|      2|        }
  445|      1|        break;
  446|      3|      }
  447|      4|      case 6: {
  ------------------
  |  Branch (447:7): [True: 4, False: 372]
  ------------------
  448|      4|        DynamicIntegerPointsKdTreeDecoder<6> decoder(total_dimensionality);
  449|      4|        if (!decoder.DecodePoints(in_buffer, out_it)) {
  ------------------
  |  Branch (449:13): [True: 1, False: 3]
  ------------------
  450|      1|          return false;
  451|      1|        }
  452|      3|        break;
  453|      4|      }
  454|      3|      default:
  ------------------
  |  Branch (454:7): [True: 0, False: 376]
  ------------------
  455|      0|        return false;
  456|    376|    }
  457|    376|  } else {
  458|       |    // Invalid method.
  459|     11|    return false;
  460|     11|  }
  461|     71|  return true;
  462|       |#else
  463|       |  return false;
  464|       |#endif
  465|  1.10k|}
_ZN5draco23KdTreeAttributesDecoder35TransformAttributesToOriginalFormatEv:
  493|    172|bool KdTreeAttributesDecoder::TransformAttributesToOriginalFormat() {
  494|    172|  if (quantized_portable_attributes_.empty() && min_signed_values_.empty()) {
  ------------------
  |  Branch (494:7): [True: 158, False: 14]
  |  Branch (494:49): [True: 92, False: 66]
  ------------------
  495|     92|    return true;
  496|     92|  }
  497|     80|  int num_processed_quantized_attributes = 0;
  498|     80|  int num_processed_signed_components = 0;
  499|       |  // Dequantize attributes that needed it.
  500|    322|  for (int i = 0; i < GetNumAttributes(); ++i) {
  ------------------
  |  Branch (500:19): [True: 242, False: 80]
  ------------------
  501|    242|    const int att_id = GetAttributeId(i);
  502|    242|    PointAttribute *const att = GetDecoder()->point_cloud()->attribute(att_id);
  503|    242|    if (att->data_type() == DT_INT32 || att->data_type() == DT_INT16 ||
  ------------------
  |  Branch (503:9): [True: 52, False: 190]
  |  Branch (503:41): [True: 58, False: 132]
  ------------------
  504|    135|        att->data_type() == DT_INT8) {
  ------------------
  |  Branch (504:9): [True: 25, False: 107]
  ------------------
  505|    135|      std::vector<uint32_t> unsigned_val(att->num_components());
  506|    135|      std::vector<int32_t> signed_val(att->num_components());
  507|       |      // Values are stored as unsigned in the attribute, make them signed again.
  508|    135|      if (att->data_type() == DT_INT32) {
  ------------------
  |  Branch (508:11): [True: 52, False: 83]
  ------------------
  509|     52|        if (!TransformAttributeBackToSignedType<int32_t>(
  ------------------
  |  Branch (509:13): [True: 0, False: 52]
  ------------------
  510|     52|                att, num_processed_signed_components)) {
  511|      0|          return false;
  512|      0|        }
  513|     83|      } else if (att->data_type() == DT_INT16) {
  ------------------
  |  Branch (513:18): [True: 58, False: 25]
  ------------------
  514|     58|        if (!TransformAttributeBackToSignedType<int16_t>(
  ------------------
  |  Branch (514:13): [True: 0, False: 58]
  ------------------
  515|     58|                att, num_processed_signed_components)) {
  516|      0|          return false;
  517|      0|        }
  518|     58|      } else if (att->data_type() == DT_INT8) {
  ------------------
  |  Branch (518:18): [True: 25, False: 0]
  ------------------
  519|     25|        if (!TransformAttributeBackToSignedType<int8_t>(
  ------------------
  |  Branch (519:13): [True: 0, False: 25]
  ------------------
  520|     25|                att, num_processed_signed_components)) {
  521|      0|          return false;
  522|      0|        }
  523|     25|      }
  524|    135|      num_processed_signed_components += att->num_components();
  525|    135|    } else if (att->data_type() == DT_FLOAT32) {
  ------------------
  |  Branch (525:16): [True: 38, False: 69]
  ------------------
  526|       |      // TODO(ostava): This code should be probably moved out to attribute
  527|       |      // transform and shared with the SequentialQuantizationAttributeDecoder.
  528|       |
  529|     38|      const PointAttribute *const src_att =
  530|     38|          quantized_portable_attributes_[num_processed_quantized_attributes]
  531|     38|              .get();
  532|       |
  533|     38|      const AttributeQuantizationTransform &transform =
  534|     38|          attribute_quantization_transforms_
  535|     38|              [num_processed_quantized_attributes];
  536|       |
  537|     38|      num_processed_quantized_attributes++;
  538|       |
  539|     38|      if (GetDecoder()->options()->GetAttributeBool(
  ------------------
  |  Branch (539:11): [True: 0, False: 38]
  ------------------
  540|     38|              att->attribute_type(), "skip_attribute_transform", false)) {
  541|       |        // Attribute transform should not be performed. In this case, we replace
  542|       |        // the output geometry attribute with the portable attribute.
  543|       |        // TODO(ostava): We can potentially avoid this copy by introducing a new
  544|       |        // mechanism that would allow to use the final attributes as portable
  545|       |        // attributes for predictors that may need them.
  546|      0|        att->CopyFrom(*src_att);
  547|      0|        continue;
  548|      0|      }
  549|       |
  550|       |      // Convert all quantized values back to floats.
  551|     38|      const int32_t max_quantized_value =
  552|     38|          (1u << static_cast<uint32_t>(transform.quantization_bits())) - 1;
  553|     38|      const int num_components = att->num_components();
  554|     38|      const int entry_size = sizeof(float) * num_components;
  555|     38|      const std::unique_ptr<float[]> att_val(new float[num_components]);
  556|     38|      int quant_val_id = 0;
  557|     38|      int out_byte_pos = 0;
  558|     38|      Dequantizer dequantizer;
  559|     38|      if (!dequantizer.Init(transform.range(), max_quantized_value)) {
  ------------------
  |  Branch (559:11): [True: 0, False: 38]
  ------------------
  560|      0|        return false;
  561|      0|      }
  562|     38|      const uint32_t *const portable_attribute_data =
  563|     38|          reinterpret_cast<const uint32_t *>(
  564|     38|              src_att->GetAddress(AttributeValueIndex(0)));
  565|     38|      for (uint32_t i = 0; i < src_att->size(); ++i) {
  ------------------
  |  Branch (565:28): [True: 0, False: 38]
  ------------------
  566|      0|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (566:25): [True: 0, False: 0]
  ------------------
  567|      0|          float value = dequantizer.DequantizeFloat(
  568|      0|              portable_attribute_data[quant_val_id++]);
  569|      0|          value = value + transform.min_value(c);
  570|      0|          att_val[c] = value;
  571|      0|        }
  572|       |        // Store the floating point value into the attribute buffer.
  573|      0|        att->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  574|      0|        out_byte_pos += entry_size;
  575|      0|      }
  576|     38|    }
  577|    242|  }
  578|     80|  return true;
  579|     80|}
_ZN5draco34PointAttributeVectorOutputIteratorIjEC2ERKNSt3__16vectorINS2_5tupleIJPNS_14PointAttributeEjNS_8DataTypeEjjEEENS2_9allocatorIS8_EEEE:
   48|  1.40k|      : attributes_(atts), point_id_(0) {
   49|  1.40k|    DRACO_DCHECK_GE(atts.size(), 1);
   50|  1.40k|    uint32_t required_decode_bytes = 0;
   51|  3.59k|    for (auto index = 0; index < attributes_.size(); index++) {
  ------------------
  |  Branch (51:26): [True: 2.19k, False: 1.40k]
  ------------------
   52|  2.19k|      const AttributeTuple &att = attributes_[index];
   53|  2.19k|      required_decode_bytes = (std::max)(required_decode_bytes,
   54|  2.19k|                                         std::get<3>(att) * std::get<4>(att));
   55|  2.19k|    }
   56|  1.40k|    memory_.resize(required_decode_bytes);
   57|  1.40k|    data_ = memory_.data();
   58|  1.40k|  }
_ZN5draco23KdTreeAttributesDecoder12DecodePointsILi0ENS_34PointAttributeVectorOutputIteratorIjEEEEbiiPNS_13DecoderBufferEPT0_:
  264|    145|                                           OutIteratorT *out_iterator) {
  265|    145|  DynamicIntegerPointsKdTreeDecoder<level_t> decoder(total_dimensionality);
  266|    145|  if (!decoder.DecodePoints(in_buffer, *out_iterator, num_expected_points) ||
  ------------------
  |  Branch (266:7): [True: 83, False: 62]
  ------------------
  267|     87|      decoder.num_decoded_points() != num_expected_points) {
  ------------------
  |  Branch (267:7): [True: 4, False: 58]
  ------------------
  268|     87|    return false;
  269|     87|  }
  270|     58|  return true;
  271|    145|}
_ZN5draco34PointAttributeVectorOutputIteratorIjEdeEv:
   73|   610M|  Self &operator*() { return *this; }
_ZN5draco34PointAttributeVectorOutputIteratorIjEaSERKNSt3__16vectorIjNS2_9allocatorIjEEEE:
   91|   610M|  const Self &operator=(const std::vector<CoeffT> &val) {
   92|   902M|    for (auto index = 0; index < attributes_.size(); index++) {
  ------------------
  |  Branch (92:26): [True: 659M, False: 242M]
  ------------------
   93|   659M|      AttributeTuple &att = attributes_[index];
   94|   659M|      PointAttribute *attribute = std::get<0>(att);
   95|   659M|      const AttributeValueIndex avi = attribute->mapped_index(point_id_);
   96|   659M|      if (avi >= static_cast<uint32_t>(attribute->size())) {
  ------------------
  |  Branch (96:11): [True: 367M, False: 291M]
  ------------------
   97|   367M|        return *this;
   98|   367M|      }
   99|   291M|      const uint32_t &offset = std::get<1>(att);
  100|   291M|      const uint32_t &data_size = std::get<3>(att);
  101|   291M|      const uint32_t &num_components = std::get<4>(att);
  102|   291M|      const uint32_t *data_source = val.data() + offset;
  103|   291M|      if (data_size < 4) {  // handle uint16_t, uint8_t
  ------------------
  |  Branch (103:11): [True: 160M, False: 131M]
  ------------------
  104|       |        // selectively copy data bytes
  105|   160M|        uint8_t *data_counter = data_;
  106|   429M|        for (uint32_t index = 0; index < num_components;
  ------------------
  |  Branch (106:34): [True: 269M, False: 160M]
  ------------------
  107|   269M|             index += 1, data_counter += data_size) {
  108|   269M|          std::memcpy(data_counter, data_source + index, data_size);
  109|   269M|        }
  110|       |        // redirect to copied data
  111|   160M|        data_source = reinterpret_cast<uint32_t *>(data_);
  112|   160M|      }
  113|   291M|      attribute->SetAttributeValue(avi, data_source);
  114|   291M|    }
  115|   242M|    return *this;
  116|   610M|  }
_ZN5draco34PointAttributeVectorOutputIteratorIjEppEv:
   60|   610M|  const Self &operator++() {
   61|   610M|    ++point_id_;
   62|   610M|    return *this;
   63|   610M|  }
_ZN5draco23KdTreeAttributesDecoder12DecodePointsILi1ENS_34PointAttributeVectorOutputIteratorIjEEEEbiiPNS_13DecoderBufferEPT0_:
  264|     72|                                           OutIteratorT *out_iterator) {
  265|     72|  DynamicIntegerPointsKdTreeDecoder<level_t> decoder(total_dimensionality);
  266|     72|  if (!decoder.DecodePoints(in_buffer, *out_iterator, num_expected_points) ||
  ------------------
  |  Branch (266:7): [True: 43, False: 29]
  ------------------
  267|     45|      decoder.num_decoded_points() != num_expected_points) {
  ------------------
  |  Branch (267:7): [True: 2, False: 27]
  ------------------
  268|     45|    return false;
  269|     45|  }
  270|     27|  return true;
  271|     72|}
_ZN5draco23KdTreeAttributesDecoder12DecodePointsILi2ENS_34PointAttributeVectorOutputIteratorIjEEEEbiiPNS_13DecoderBufferEPT0_:
  264|    141|                                           OutIteratorT *out_iterator) {
  265|    141|  DynamicIntegerPointsKdTreeDecoder<level_t> decoder(total_dimensionality);
  266|    141|  if (!decoder.DecodePoints(in_buffer, *out_iterator, num_expected_points) ||
  ------------------
  |  Branch (266:7): [True: 111, False: 30]
  ------------------
  267|    116|      decoder.num_decoded_points() != num_expected_points) {
  ------------------
  |  Branch (267:7): [True: 5, False: 25]
  ------------------
  268|    116|    return false;
  269|    116|  }
  270|     25|  return true;
  271|    141|}
_ZN5draco23KdTreeAttributesDecoder12DecodePointsILi3ENS_34PointAttributeVectorOutputIteratorIjEEEEbiiPNS_13DecoderBufferEPT0_:
  264|    121|                                           OutIteratorT *out_iterator) {
  265|    121|  DynamicIntegerPointsKdTreeDecoder<level_t> decoder(total_dimensionality);
  266|    121|  if (!decoder.DecodePoints(in_buffer, *out_iterator, num_expected_points) ||
  ------------------
  |  Branch (266:7): [True: 102, False: 19]
  ------------------
  267|    108|      decoder.num_decoded_points() != num_expected_points) {
  ------------------
  |  Branch (267:7): [True: 6, False: 13]
  ------------------
  268|    108|    return false;
  269|    108|  }
  270|     13|  return true;
  271|    121|}
_ZN5draco23KdTreeAttributesDecoder12DecodePointsILi4ENS_34PointAttributeVectorOutputIteratorIjEEEEbiiPNS_13DecoderBufferEPT0_:
  264|    193|                                           OutIteratorT *out_iterator) {
  265|    193|  DynamicIntegerPointsKdTreeDecoder<level_t> decoder(total_dimensionality);
  266|    193|  if (!decoder.DecodePoints(in_buffer, *out_iterator, num_expected_points) ||
  ------------------
  |  Branch (266:7): [True: 132, False: 61]
  ------------------
  267|    166|      decoder.num_decoded_points() != num_expected_points) {
  ------------------
  |  Branch (267:7): [True: 34, False: 27]
  ------------------
  268|    166|    return false;
  269|    166|  }
  270|     27|  return true;
  271|    193|}
_ZN5draco23KdTreeAttributesDecoder12DecodePointsILi5ENS_34PointAttributeVectorOutputIteratorIjEEEEbiiPNS_13DecoderBufferEPT0_:
  264|    201|                                           OutIteratorT *out_iterator) {
  265|    201|  DynamicIntegerPointsKdTreeDecoder<level_t> decoder(total_dimensionality);
  266|    201|  if (!decoder.DecodePoints(in_buffer, *out_iterator, num_expected_points) ||
  ------------------
  |  Branch (266:7): [True: 152, False: 49]
  ------------------
  267|    189|      decoder.num_decoded_points() != num_expected_points) {
  ------------------
  |  Branch (267:7): [True: 37, False: 12]
  ------------------
  268|    189|    return false;
  269|    189|  }
  270|     12|  return true;
  271|    201|}
_ZN5draco23KdTreeAttributesDecoder12DecodePointsILi6ENS_34PointAttributeVectorOutputIteratorIjEEEEbiiPNS_13DecoderBufferEPT0_:
  264|    142|                                           OutIteratorT *out_iterator) {
  265|    142|  DynamicIntegerPointsKdTreeDecoder<level_t> decoder(total_dimensionality);
  266|    142|  if (!decoder.DecodePoints(in_buffer, *out_iterator, num_expected_points) ||
  ------------------
  |  Branch (266:7): [True: 106, False: 36]
  ------------------
  267|    121|      decoder.num_decoded_points() != num_expected_points) {
  ------------------
  |  Branch (267:7): [True: 15, False: 21]
  ------------------
  268|    121|    return false;
  269|    121|  }
  270|     21|  return true;
  271|    142|}
_ZN5draco34PointAttributeVectorOutputIteratorIfEC2ERKNSt3__16vectorINS2_5tupleIJPNS_14PointAttributeEjNS_8DataTypeEjjEEENS2_9allocatorIS8_EEEE:
   48|    702|      : attributes_(atts), point_id_(0) {
   49|    702|    DRACO_DCHECK_GE(atts.size(), 1);
   50|    702|    uint32_t required_decode_bytes = 0;
   51|  1.40k|    for (auto index = 0; index < attributes_.size(); index++) {
  ------------------
  |  Branch (51:26): [True: 702, False: 702]
  ------------------
   52|    702|      const AttributeTuple &att = attributes_[index];
   53|    702|      required_decode_bytes = (std::max)(required_decode_bytes,
   54|    702|                                         std::get<3>(att) * std::get<4>(att));
   55|    702|    }
   56|    702|    memory_.resize(required_decode_bytes);
   57|    702|    data_ = memory_.data();
   58|    702|  }
_ZN5draco34PointAttributeVectorOutputIteratorIfEdeEv:
   73|  8.97M|  Self &operator*() { return *this; }
_ZN5draco34PointAttributeVectorOutputIteratorIfEaSERKNS_7VectorDIfLi3EEE:
   77|  8.97M|  const Self &operator=(const VectorD<CoeffT, 3> &val) {
   78|  8.97M|    DRACO_DCHECK_EQ(attributes_.size(), 1);  // Expect only ONE attribute.
   79|  8.97M|    AttributeTuple &att = attributes_[0];
   80|  8.97M|    PointAttribute *attribute = std::get<0>(att);
   81|  8.97M|    const AttributeValueIndex avi = attribute->mapped_index(point_id_);
   82|  8.97M|    if (avi >= static_cast<uint32_t>(attribute->size())) {
  ------------------
  |  Branch (82:9): [True: 8.97M, False: 4]
  ------------------
   83|  8.97M|      return *this;
   84|  8.97M|    }
   85|      4|    const uint32_t &offset = std::get<1>(att);
   86|      4|    DRACO_DCHECK_EQ(offset, 0);  // expected to be zero
   87|      4|    attribute->SetAttributeValue(avi, &val[0] + offset);
   88|      4|    return *this;
   89|  8.97M|  }
_ZN5draco34PointAttributeVectorOutputIteratorIfEppEv:
   60|  8.97M|  const Self &operator++() {
   61|  8.97M|    ++point_id_;
   62|  8.97M|    return *this;
   63|  8.97M|  }
_ZN5draco23KdTreeAttributesDecoder34TransformAttributeBackToSignedTypeIiEEbPNS_14PointAttributeEi:
  469|     52|    PointAttribute *att, int num_processed_signed_components) {
  470|     52|  typedef typename std::make_unsigned<SignedDataTypeT>::type UnsignedType;
  471|     52|  std::vector<UnsignedType> unsigned_val(att->num_components());
  472|     52|  std::vector<SignedDataTypeT> signed_val(att->num_components());
  473|       |
  474|     86|  for (AttributeValueIndex avi(0); avi < static_cast<uint32_t>(att->size());
  ------------------
  |  Branch (474:36): [True: 34, False: 52]
  ------------------
  475|     52|       ++avi) {
  476|     34|    att->GetValue(avi, &unsigned_val[0]);
  477|  5.50k|    for (int c = 0; c < att->num_components(); ++c) {
  ------------------
  |  Branch (477:21): [True: 5.47k, False: 34]
  ------------------
  478|       |      // Up-cast |unsigned_val| to int32_t to ensure we don't overflow it for
  479|       |      // smaller data types. But first check that the up-casting does not cause
  480|       |      // signed integer overflow.
  481|  5.47k|      if (unsigned_val[c] > std::numeric_limits<int32_t>::max()) {
  ------------------
  |  Branch (481:11): [True: 0, False: 5.47k]
  ------------------
  482|      0|        return false;
  483|      0|      }
  484|  5.47k|      signed_val[c] = static_cast<SignedDataTypeT>(
  485|  5.47k|          static_cast<int32_t>(unsigned_val[c]) +
  486|  5.47k|          min_signed_values_[num_processed_signed_components + c]);
  487|  5.47k|    }
  488|     34|    att->SetAttributeValue(avi, &signed_val[0]);
  489|     34|  }
  490|     52|  return true;
  491|     52|}
_ZN5draco23KdTreeAttributesDecoder34TransformAttributeBackToSignedTypeIsEEbPNS_14PointAttributeEi:
  469|     58|    PointAttribute *att, int num_processed_signed_components) {
  470|     58|  typedef typename std::make_unsigned<SignedDataTypeT>::type UnsignedType;
  471|     58|  std::vector<UnsignedType> unsigned_val(att->num_components());
  472|     58|  std::vector<SignedDataTypeT> signed_val(att->num_components());
  473|       |
  474|     58|  for (AttributeValueIndex avi(0); avi < static_cast<uint32_t>(att->size());
  ------------------
  |  Branch (474:36): [True: 0, False: 58]
  ------------------
  475|     58|       ++avi) {
  476|      0|    att->GetValue(avi, &unsigned_val[0]);
  477|      0|    for (int c = 0; c < att->num_components(); ++c) {
  ------------------
  |  Branch (477:21): [True: 0, False: 0]
  ------------------
  478|       |      // Up-cast |unsigned_val| to int32_t to ensure we don't overflow it for
  479|       |      // smaller data types. But first check that the up-casting does not cause
  480|       |      // signed integer overflow.
  481|      0|      if (unsigned_val[c] > std::numeric_limits<int32_t>::max()) {
  ------------------
  |  Branch (481:11): [True: 0, False: 0]
  ------------------
  482|      0|        return false;
  483|      0|      }
  484|      0|      signed_val[c] = static_cast<SignedDataTypeT>(
  485|      0|          static_cast<int32_t>(unsigned_val[c]) +
  486|      0|          min_signed_values_[num_processed_signed_components + c]);
  487|      0|    }
  488|      0|    att->SetAttributeValue(avi, &signed_val[0]);
  489|      0|  }
  490|     58|  return true;
  491|     58|}
_ZN5draco23KdTreeAttributesDecoder34TransformAttributeBackToSignedTypeIaEEbPNS_14PointAttributeEi:
  469|     25|    PointAttribute *att, int num_processed_signed_components) {
  470|     25|  typedef typename std::make_unsigned<SignedDataTypeT>::type UnsignedType;
  471|     25|  std::vector<UnsignedType> unsigned_val(att->num_components());
  472|     25|  std::vector<SignedDataTypeT> signed_val(att->num_components());
  473|       |
  474|     88|  for (AttributeValueIndex avi(0); avi < static_cast<uint32_t>(att->size());
  ------------------
  |  Branch (474:36): [True: 63, False: 25]
  ------------------
  475|     63|       ++avi) {
  476|     63|    att->GetValue(avi, &unsigned_val[0]);
  477|    147|    for (int c = 0; c < att->num_components(); ++c) {
  ------------------
  |  Branch (477:21): [True: 84, False: 63]
  ------------------
  478|       |      // Up-cast |unsigned_val| to int32_t to ensure we don't overflow it for
  479|       |      // smaller data types. But first check that the up-casting does not cause
  480|       |      // signed integer overflow.
  481|     84|      if (unsigned_val[c] > std::numeric_limits<int32_t>::max()) {
  ------------------
  |  Branch (481:11): [True: 0, False: 84]
  ------------------
  482|      0|        return false;
  483|      0|      }
  484|     84|      signed_val[c] = static_cast<SignedDataTypeT>(
  485|     84|          static_cast<int32_t>(unsigned_val[c]) +
  486|     84|          min_signed_values_[num_processed_signed_components + c]);
  487|     84|    }
  488|     63|    att->SetAttributeValue(avi, &signed_val[0]);
  489|     63|  }
  490|     25|  return true;
  491|     25|}

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

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

_ZN5draco17OctahedronToolBoxC2Ev:
   53|  2.69k|      : quantization_bits_(-1),
   54|  2.69k|        max_quantized_value_(-1),
   55|  2.69k|        max_value_(-1),
   56|  2.69k|        dequantization_scale_(1.f),
   57|  2.69k|        center_value_(-1) {}
_ZN5draco17OctahedronToolBox19SetQuantizationBitsEi:
   59|  2.41k|  bool SetQuantizationBits(int32_t q) {
   60|  2.41k|    if (q < 2 || q > 30) {
  ------------------
  |  Branch (60:9): [True: 704, False: 1.71k]
  |  Branch (60:18): [True: 147, False: 1.56k]
  ------------------
   61|    851|      return false;
   62|    851|    }
   63|  1.56k|    quantization_bits_ = q;
   64|  1.56k|    max_quantized_value_ = (1u << quantization_bits_) - 1;
   65|  1.56k|    max_value_ = max_quantized_value_ - 1;
   66|  1.56k|    dequantization_scale_ = 2.f / max_value_;
   67|  1.56k|    center_value_ = max_value_ / 2;
   68|  1.56k|    return true;
   69|  2.41k|  }
_ZNK5draco17OctahedronToolBox28CanonicalizeOctahedralCoordsEiiPiS1_:
   76|  1.60M|                                           int32_t *out_t) const {
   77|  1.60M|    if ((s == 0 && t == 0) || (s == 0 && t == max_value_) ||
  ------------------
  |  Branch (77:10): [True: 2.66k, False: 1.60M]
  |  Branch (77:20): [True: 0, False: 2.66k]
  |  Branch (77:32): [True: 2.66k, False: 1.60M]
  |  Branch (77:42): [True: 0, False: 2.66k]
  ------------------
   78|  1.60M|        (s == max_value_ && t == 0)) {
  ------------------
  |  Branch (78:10): [True: 1.41M, False: 194k]
  |  Branch (78:29): [True: 6.58k, False: 1.40M]
  ------------------
   79|  6.58k|      s = max_value_;
   80|  6.58k|      t = max_value_;
   81|  1.60M|    } else if (s == 0 && t > center_value_) {
  ------------------
  |  Branch (81:16): [True: 2.66k, False: 1.59M]
  |  Branch (81:26): [True: 784, False: 1.88k]
  ------------------
   82|    784|      t = center_value_ - (t - center_value_);
   83|  1.60M|    } else if (s == max_value_ && t < center_value_) {
  ------------------
  |  Branch (83:16): [True: 1.40M, False: 193k]
  |  Branch (83:35): [True: 7.13k, False: 1.40M]
  ------------------
   84|  7.13k|      t = center_value_ + (center_value_ - t);
   85|  1.59M|    } else if (t == max_value_ && s < center_value_) {
  ------------------
  |  Branch (85:16): [True: 1.40M, False: 192k]
  |  Branch (85:35): [True: 286, False: 1.40M]
  ------------------
   86|    286|      s = center_value_ + (center_value_ - s);
   87|  1.59M|    } else if (t == 0 && s > center_value_) {
  ------------------
  |  Branch (87:16): [True: 3.18k, False: 1.59M]
  |  Branch (87:26): [True: 1.32k, False: 1.86k]
  ------------------
   88|  1.32k|      s = center_value_ - (s - center_value_);
   89|  1.32k|    }
   90|       |
   91|  1.60M|    *out_s = s;
   92|  1.60M|    *out_t = t;
   93|  1.60M|  }
_ZNK5draco17OctahedronToolBox40IntegerVectorToQuantizedOctahedralCoordsEPKiPiS3_:
   99|  1.60M|                                                       int32_t *out_t) const {
  100|  1.60M|    DRACO_DCHECK_EQ(
  101|  1.60M|        std::abs(int_vec[0]) + std::abs(int_vec[1]) + std::abs(int_vec[2]),
  102|  1.60M|        center_value_);
  103|  1.60M|    int32_t s, t;
  104|  1.60M|    if (int_vec[0] >= 0) {
  ------------------
  |  Branch (104:9): [True: 634k, False: 973k]
  ------------------
  105|       |      // Right hemisphere.
  106|   634k|      s = (int_vec[1] + center_value_);
  107|   634k|      t = (int_vec[2] + center_value_);
  108|   973k|    } else {
  109|       |      // Left hemisphere.
  110|   973k|      if (int_vec[1] < 0) {
  ------------------
  |  Branch (110:11): [True: 33.5k, False: 940k]
  ------------------
  111|  33.5k|        s = std::abs(int_vec[2]);
  112|   940k|      } else {
  113|   940k|        s = (max_value_ - std::abs(int_vec[2]));
  114|   940k|      }
  115|   973k|      if (int_vec[2] < 0) {
  ------------------
  |  Branch (115:11): [True: 36.0k, False: 937k]
  ------------------
  116|  36.0k|        t = std::abs(int_vec[1]);
  117|   937k|      } else {
  118|   937k|        t = (max_value_ - std::abs(int_vec[1]));
  119|   937k|      }
  120|   973k|    }
  121|  1.60M|    CanonicalizeOctahedralCoords(s, t, out_s, out_t);
  122|  1.60M|  }
_ZNK5draco17OctahedronToolBox37QuantizedOctahedralCoordsToUnitVectorEiiPf:
  198|  9.11M|                                                    float *out_vector) const {
  199|  9.11M|    OctahedralCoordsToUnitVector(in_s * dequantization_scale_ - 1.f,
  200|  9.11M|                                 in_t * dequantization_scale_ - 1.f,
  201|  9.11M|                                 out_vector);
  202|  9.11M|  }
_ZNK5draco17OctahedronToolBox11IsInDiamondERKiS2_:
  205|  49.3M|  inline bool IsInDiamond(const int32_t &s, const int32_t &t) const {
  206|       |    // Expect center already at origin.
  207|  49.3M|    DRACO_DCHECK_LE(s, center_value_);
  208|  49.3M|    DRACO_DCHECK_LE(t, center_value_);
  209|  49.3M|    DRACO_DCHECK_GE(s, -center_value_);
  210|  49.3M|    DRACO_DCHECK_GE(t, -center_value_);
  211|  49.3M|    const uint32_t st =
  212|  49.3M|        static_cast<uint32_t>(std::abs(s)) + static_cast<uint32_t>(std::abs(t));
  213|  49.3M|    return st <= center_value_;
  214|  49.3M|  }
_ZNK5draco17OctahedronToolBox13InvertDiamondEPiS1_:
  216|  58.4M|  void InvertDiamond(int32_t *s, int32_t *t) const {
  217|       |    // Expect center already at origin.
  218|  58.4M|    DRACO_DCHECK_LE(*s, center_value_);
  219|  58.4M|    DRACO_DCHECK_LE(*t, center_value_);
  220|  58.4M|    DRACO_DCHECK_GE(*s, -center_value_);
  221|  58.4M|    DRACO_DCHECK_GE(*t, -center_value_);
  222|  58.4M|    int32_t sign_s = 0;
  223|  58.4M|    int32_t sign_t = 0;
  224|  58.4M|    if (*s >= 0 && *t >= 0) {
  ------------------
  |  Branch (224:9): [True: 48.1M, False: 10.2M]
  |  Branch (224:20): [True: 44.9M, False: 3.19M]
  ------------------
  225|  44.9M|      sign_s = 1;
  226|  44.9M|      sign_t = 1;
  227|  44.9M|    } else if (*s <= 0 && *t <= 0) {
  ------------------
  |  Branch (227:16): [True: 10.9M, False: 2.49M]
  |  Branch (227:27): [True: 4.26M, False: 6.72M]
  ------------------
  228|  4.26M|      sign_s = -1;
  229|  4.26M|      sign_t = -1;
  230|  9.21M|    } else {
  231|  9.21M|      sign_s = (*s > 0) ? 1 : -1;
  ------------------
  |  Branch (231:16): [True: 2.49M, False: 6.72M]
  ------------------
  232|  9.21M|      sign_t = (*t > 0) ? 1 : -1;
  ------------------
  |  Branch (232:16): [True: 6.72M, False: 2.49M]
  ------------------
  233|  9.21M|    }
  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|  58.4M|    const uint32_t corner_point_s = sign_s * center_value_;
  239|  58.4M|    const uint32_t corner_point_t = sign_t * center_value_;
  240|  58.4M|    uint32_t us = *s;
  241|  58.4M|    uint32_t ut = *t;
  242|  58.4M|    us = us + us - corner_point_s;
  243|  58.4M|    ut = ut + ut - corner_point_t;
  244|  58.4M|    if (sign_s * sign_t >= 0) {
  ------------------
  |  Branch (244:9): [True: 49.1M, False: 9.21M]
  ------------------
  245|  49.1M|      uint32_t temp = us;
  246|  49.1M|      us = -ut;
  247|  49.1M|      ut = -temp;
  248|  49.1M|    } else {
  249|  9.21M|      std::swap(us, ut);
  250|  9.21M|    }
  251|  58.4M|    us = us + corner_point_s;
  252|  58.4M|    ut = ut + corner_point_t;
  253|       |
  254|  58.4M|    *s = us;
  255|  58.4M|    *t = ut;
  256|  58.4M|    *s /= 2;
  257|  58.4M|    *t /= 2;
  258|  58.4M|  }
_ZNK5draco17OctahedronToolBox6ModMaxEi:
  272|  98.7M|  int32_t ModMax(int32_t x) const {
  273|  98.7M|    if (x > this->center_value()) {
  ------------------
  |  Branch (273:9): [True: 8.41k, False: 98.7M]
  ------------------
  274|  8.41k|      return x - this->max_quantized_value();
  275|  8.41k|    }
  276|  98.7M|    if (x < -this->center_value()) {
  ------------------
  |  Branch (276:9): [True: 1.81k, False: 98.7M]
  ------------------
  277|  1.81k|      return x + this->max_quantized_value();
  278|  1.81k|    }
  279|  98.7M|    return x;
  280|  98.7M|  }
_ZNK5draco17OctahedronToolBox17quantization_bitsEv:
  291|  1.52k|  int32_t quantization_bits() const { return quantization_bits_; }
_ZNK5draco17OctahedronToolBox19max_quantized_valueEv:
  292|  10.2k|  int32_t max_quantized_value() const { return max_quantized_value_; }
_ZNK5draco17OctahedronToolBox12center_valueEv:
  294|   296M|  int32_t center_value() const { return center_value_; }
_ZNK5draco17OctahedronToolBox28OctahedralCoordsToUnitVectorEffPf:
  298|  9.11M|                                           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|  9.11M|    float y = in_s_scaled;
  329|  9.11M|    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|  9.11M|    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|  9.11M|    float x_offset = -x;
  342|  9.11M|    x_offset = x_offset < 0 ? 0 : x_offset;
  ------------------
  |  Branch (342:16): [True: 11.6k, False: 9.10M]
  ------------------
  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|  9.11M|    y += y < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (347:10): [True: 42.4k, False: 9.07M]
  ------------------
  348|  9.11M|    z += z < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (348:10): [True: 390k, False: 8.72M]
  ------------------
  349|       |
  350|       |    // Normalize the computed vector.
  351|  9.11M|    const float norm_squared = x * x + y * y + z * z;
  352|  9.11M|    if (norm_squared < 1e-6) {
  ------------------
  |  Branch (352:9): [True: 0, False: 9.11M]
  ------------------
  353|      0|      out_vector[0] = 0;
  354|      0|      out_vector[1] = 0;
  355|      0|      out_vector[2] = 0;
  356|  9.11M|    } else {
  357|  9.11M|      const float d = 1.0f / std::sqrt(norm_squared);
  358|  9.11M|      out_vector[0] = x * d;
  359|  9.11M|      out_vector[1] = y * d;
  360|  9.11M|      out_vector[2] = z * d;
  361|  9.11M|    }
  362|  9.11M|  }
_ZNK5draco17OctahedronToolBox25CanonicalizeIntegerVectorIiEEvPT_:
  173|  1.60M|  void CanonicalizeIntegerVector(T *vec) const {
  174|  1.60M|    static_assert(std::is_integral<T>::value, "T must be an integral type.");
  175|  1.60M|    static_assert(std::is_signed<T>::value, "T must be a signed type.");
  176|  1.60M|    const int64_t abs_sum = static_cast<int64_t>(std::abs(vec[0])) +
  177|  1.60M|                            static_cast<int64_t>(std::abs(vec[1])) +
  178|  1.60M|                            static_cast<int64_t>(std::abs(vec[2]));
  179|       |
  180|  1.60M|    if (abs_sum == 0) {
  ------------------
  |  Branch (180:9): [True: 1.42M, False: 182k]
  ------------------
  181|  1.42M|      vec[0] = center_value_;  // vec[1] == v[2] == 0
  182|  1.42M|    } else {
  183|   182k|      vec[0] =
  184|   182k|          (static_cast<int64_t>(vec[0]) * static_cast<int64_t>(center_value_)) /
  185|   182k|          abs_sum;
  186|   182k|      vec[1] =
  187|   182k|          (static_cast<int64_t>(vec[1]) * static_cast<int64_t>(center_value_)) /
  188|   182k|          abs_sum;
  189|   182k|      if (vec[2] >= 0) {
  ------------------
  |  Branch (189:11): [True: 97.9k, False: 84.1k]
  ------------------
  190|  97.9k|        vec[2] = center_value_ - std::abs(vec[0]) - std::abs(vec[1]);
  191|  97.9k|      } else {
  192|  84.1k|        vec[2] = -(center_value_ - std::abs(vec[0]) - std::abs(vec[1]));
  193|  84.1k|      }
  194|   182k|    }
  195|  1.60M|  }

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

_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    357|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    357|            attribute, transform, mesh_data),
   52|    357|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  193|    349|                                                                *buffer) {
  194|    349|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  195|    349|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    349|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (195:7): [True: 7, False: 342]
  ------------------
  196|       |    // Decode prediction mode.
  197|      7|    uint8_t mode;
  198|      7|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (198:9): [True: 0, False: 7]
  ------------------
  199|      0|      return false;
  200|      0|    }
  201|       |
  202|      7|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (202:9): [True: 5, False: 2]
  ------------------
  203|       |      // Unsupported mode.
  204|      5|      return false;
  205|      5|    }
  206|      7|  }
  207|    344|#endif
  208|       |
  209|       |  // Encode selected edges using separate rans bit coder for each context.
  210|  1.54k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (210:19): [True: 1.27k, False: 266]
  ------------------
  211|  1.27k|    uint32_t num_flags;
  212|  1.27k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (212:9): [True: 16, False: 1.26k]
  ------------------
  213|     16|      return false;
  214|     16|    }
  215|  1.26k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (215:9): [True: 40, False: 1.22k]
  ------------------
  216|     40|      return false;
  217|     40|    }
  218|  1.22k|    if (num_flags > 0) {
  ------------------
  |  Branch (218:9): [True: 511, False: 709]
  ------------------
  219|    511|      is_crease_edge_[i].resize(num_flags);
  220|    511|      RAnsBitDecoder decoder;
  221|    511|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (221:11): [True: 22, False: 489]
  ------------------
  222|     22|        return false;
  223|     22|      }
  224|   724k|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (224:28): [True: 723k, False: 489]
  ------------------
  225|   723k|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  226|   723k|      }
  227|    489|      decoder.EndDecoding();
  228|    489|    }
  229|  1.22k|  }
  230|    266|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  231|    266|                                     MeshDataT>::DecodePredictionData(buffer);
  232|    344|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    249|                          const PointIndex * /* entry_to_point_id_map */) {
   87|    249|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    249|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  1.24k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 996, False: 249]
  ------------------
   93|    996|    pred_vals[i].resize(num_components, 0);
   94|    996|  }
   95|    249|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    249|                                         out_data);
   97|       |
   98|    249|  const CornerTable *const table = this->mesh_data().corner_table();
   99|    249|  const std::vector<int32_t> *const vertex_to_data_map =
  100|    249|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    249|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    249|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    249|  const int corner_map_size =
  109|    249|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|   375k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 375k, False: 148]
  ------------------
  111|   375k|    const CornerIndex start_corner_id =
  112|   375k|        this->mesh_data().data_to_corner_map()->at(p);
  113|       |
  114|   375k|    CornerIndex corner_id(start_corner_id);
  115|   375k|    int num_parallelograms = 0;
  116|   375k|    bool first_pass = true;
  117|   897k|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (117:12): [True: 549k, False: 347k]
  ------------------
  118|   549k|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (118:11): [True: 62.0k, False: 487k]
  ------------------
  119|   549k|              p, corner_id, table, *vertex_to_data_map, out_data,
  120|   549k|              num_components, &(pred_vals[num_parallelograms][0]))) {
  121|       |        // Parallelogram prediction applied and stored in
  122|       |        // |pred_vals[num_parallelograms]|
  123|  62.0k|        ++num_parallelograms;
  124|       |        // Stop processing when we reach the maximum number of allowed
  125|       |        // parallelograms.
  126|  62.0k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (126:13): [True: 609, False: 61.4k]
  ------------------
  127|    609|          break;
  128|    609|        }
  129|  62.0k|      }
  130|       |
  131|       |      // Proceed to the next corner attached to the vertex. First swing left
  132|       |      // and if we reach a boundary, swing right from the start corner.
  133|   549k|      if (first_pass) {
  ------------------
  |  Branch (133:11): [True: 540k, False: 8.78k]
  ------------------
  134|   540k|        corner_id = table->SwingLeft(corner_id);
  135|   540k|      } else {
  136|  8.78k|        corner_id = table->SwingRight(corner_id);
  137|  8.78k|      }
  138|   549k|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (138:11): [True: 27.8k, False: 521k]
  ------------------
  139|  27.8k|        break;
  140|  27.8k|      }
  141|   521k|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (141:11): [True: 351k, False: 169k]
  |  Branch (141:47): [True: 347k, False: 4.50k]
  ------------------
  142|   347k|        first_pass = false;
  143|   347k|        corner_id = table->SwingRight(start_corner_id);
  144|   347k|      }
  145|   521k|    }
  146|       |
  147|       |    // Check which of the available parallelograms are actually used and compute
  148|       |    // the final predicted value.
  149|   375k|    int num_used_parallelograms = 0;
  150|   375k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (150:9): [True: 34.3k, False: 341k]
  ------------------
  151|  2.08M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (151:23): [True: 2.04M, False: 34.3k]
  ------------------
  152|  2.04M|        multi_pred_vals[i] = 0;
  153|  2.04M|      }
  154|       |      // Check which parallelograms are actually used.
  155|  96.1k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (155:23): [True: 61.9k, False: 34.2k]
  ------------------
  156|  61.9k|        const int context = num_parallelograms - 1;
  157|  61.9k|        const int pos = is_crease_edge_pos[context]++;
  158|  61.9k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (158:13): [True: 101, False: 61.8k]
  ------------------
  159|    101|          return false;
  160|    101|        }
  161|  61.8k|        const bool is_crease = is_crease_edge_[context][pos];
  162|  61.8k|        if (!is_crease) {
  ------------------
  |  Branch (162:13): [True: 6.14k, False: 55.7k]
  ------------------
  163|  6.14k|          ++num_used_parallelograms;
  164|   474k|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (164:27): [True: 468k, False: 6.14k]
  ------------------
  165|   468k|            multi_pred_vals[j] =
  166|   468k|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  167|   468k|          }
  168|  6.14k|        }
  169|  61.8k|      }
  170|  34.3k|    }
  171|   375k|    const int dst_offset = p * num_components;
  172|   375k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (172:9): [True: 372k, False: 3.15k]
  ------------------
  173|       |      // No parallelogram was valid.
  174|       |      // We use the last decoded point as a reference.
  175|   372k|      const int src_offset = (p - 1) * num_components;
  176|   372k|      this->transform().ComputeOriginalValue(
  177|   372k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  178|   372k|    } else {
  179|       |      // Compute the correction from the predicted value.
  180|   250k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (180:23): [True: 247k, False: 3.15k]
  ------------------
  181|   247k|        multi_pred_vals[c] /= num_used_parallelograms;
  182|   247k|      }
  183|  3.15k|      this->transform().ComputeOriginalValue(
  184|  3.15k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  185|  3.15k|    }
  186|   375k|  }
  187|    148|  return true;
  188|    249|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    395|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    395|            attribute, transform, mesh_data),
   52|    395|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  193|    380|                                                                *buffer) {
  194|    380|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  195|    380|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    380|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (195:7): [True: 2, False: 378]
  ------------------
  196|       |    // Decode prediction mode.
  197|      2|    uint8_t mode;
  198|      2|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (198:9): [True: 0, False: 2]
  ------------------
  199|      0|      return false;
  200|      0|    }
  201|       |
  202|      2|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (202:9): [True: 1, False: 1]
  ------------------
  203|       |      // Unsupported mode.
  204|      1|      return false;
  205|      1|    }
  206|      2|  }
  207|    379|#endif
  208|       |
  209|       |  // Encode selected edges using separate rans bit coder for each context.
  210|  1.68k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (210:19): [True: 1.38k, False: 300]
  ------------------
  211|  1.38k|    uint32_t num_flags;
  212|  1.38k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (212:9): [True: 10, False: 1.37k]
  ------------------
  213|     10|      return false;
  214|     10|    }
  215|  1.37k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (215:9): [True: 39, False: 1.34k]
  ------------------
  216|     39|      return false;
  217|     39|    }
  218|  1.34k|    if (num_flags > 0) {
  ------------------
  |  Branch (218:9): [True: 600, False: 740]
  ------------------
  219|    600|      is_crease_edge_[i].resize(num_flags);
  220|    600|      RAnsBitDecoder decoder;
  221|    600|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (221:11): [True: 30, False: 570]
  ------------------
  222|     30|        return false;
  223|     30|      }
  224|  1.14M|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (224:28): [True: 1.14M, False: 570]
  ------------------
  225|  1.14M|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  226|  1.14M|      }
  227|    570|      decoder.EndDecoding();
  228|    570|    }
  229|  1.34k|  }
  230|    300|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  231|    300|                                     MeshDataT>::DecodePredictionData(buffer);
  232|    379|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    266|                          const PointIndex * /* entry_to_point_id_map */) {
   87|    266|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    266|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  1.33k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 1.06k, False: 266]
  ------------------
   93|  1.06k|    pred_vals[i].resize(num_components, 0);
   94|  1.06k|  }
   95|    266|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    266|                                         out_data);
   97|       |
   98|    266|  const CornerTable *const table = this->mesh_data().corner_table();
   99|    266|  const std::vector<int32_t> *const vertex_to_data_map =
  100|    266|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    266|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    266|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    266|  const int corner_map_size =
  109|    266|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|   137k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 137k, False: 141]
  ------------------
  111|   137k|    const CornerIndex start_corner_id =
  112|   137k|        this->mesh_data().data_to_corner_map()->at(p);
  113|       |
  114|   137k|    CornerIndex corner_id(start_corner_id);
  115|   137k|    int num_parallelograms = 0;
  116|   137k|    bool first_pass = true;
  117|   868k|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (117:12): [True: 855k, False: 13.2k]
  ------------------
  118|   855k|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (118:11): [True: 256k, False: 599k]
  ------------------
  119|   855k|              p, corner_id, table, *vertex_to_data_map, out_data,
  120|   855k|              num_components, &(pred_vals[num_parallelograms][0]))) {
  121|       |        // Parallelogram prediction applied and stored in
  122|       |        // |pred_vals[num_parallelograms]|
  123|   256k|        ++num_parallelograms;
  124|       |        // Stop processing when we reach the maximum number of allowed
  125|       |        // parallelograms.
  126|   256k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (126:13): [True: 466, False: 255k]
  ------------------
  127|    466|          break;
  128|    466|        }
  129|   256k|      }
  130|       |
  131|       |      // Proceed to the next corner attached to the vertex. First swing left
  132|       |      // and if we reach a boundary, swing right from the start corner.
  133|   855k|      if (first_pass) {
  ------------------
  |  Branch (133:11): [True: 838k, False: 16.2k]
  ------------------
  134|   838k|        corner_id = table->SwingLeft(corner_id);
  135|   838k|      } else {
  136|  16.2k|        corner_id = table->SwingRight(corner_id);
  137|  16.2k|      }
  138|   855k|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (138:11): [True: 123k, False: 731k]
  ------------------
  139|   123k|        break;
  140|   123k|      }
  141|   731k|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (141:11): [True: 23.1k, False: 708k]
  |  Branch (141:47): [True: 13.2k, False: 9.84k]
  ------------------
  142|  13.2k|        first_pass = false;
  143|  13.2k|        corner_id = table->SwingRight(start_corner_id);
  144|  13.2k|      }
  145|   731k|    }
  146|       |
  147|       |    // Check which of the available parallelograms are actually used and compute
  148|       |    // the final predicted value.
  149|   137k|    int num_used_parallelograms = 0;
  150|   137k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (150:9): [True: 134k, False: 3.01k]
  ------------------
  151|  18.3M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (151:23): [True: 18.1M, False: 134k]
  ------------------
  152|  18.1M|        multi_pred_vals[i] = 0;
  153|  18.1M|      }
  154|       |      // Check which parallelograms are actually used.
  155|   390k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (155:23): [True: 256k, False: 133k]
  ------------------
  156|   256k|        const int context = num_parallelograms - 1;
  157|   256k|        const int pos = is_crease_edge_pos[context]++;
  158|   256k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (158:13): [True: 125, False: 256k]
  ------------------
  159|    125|          return false;
  160|    125|        }
  161|   256k|        const bool is_crease = is_crease_edge_[context][pos];
  162|   256k|        if (!is_crease) {
  ------------------
  |  Branch (162:13): [True: 13.1k, False: 242k]
  ------------------
  163|  13.1k|          ++num_used_parallelograms;
  164|  1.79M|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (164:27): [True: 1.78M, False: 13.1k]
  ------------------
  165|  1.78M|            multi_pred_vals[j] =
  166|  1.78M|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  167|  1.78M|          }
  168|  13.1k|        }
  169|   256k|      }
  170|   134k|    }
  171|   136k|    const int dst_offset = p * num_components;
  172|   136k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (172:9): [True: 130k, False: 6.36k]
  ------------------
  173|       |      // No parallelogram was valid.
  174|       |      // We use the last decoded point as a reference.
  175|   130k|      const int src_offset = (p - 1) * num_components;
  176|   130k|      this->transform().ComputeOriginalValue(
  177|   130k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  178|   130k|    } else {
  179|       |      // Compute the correction from the predicted value.
  180|   866k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (180:23): [True: 860k, False: 6.36k]
  ------------------
  181|   860k|        multi_pred_vals[c] /= num_used_parallelograms;
  182|   860k|      }
  183|  6.36k|      this->transform().ComputeOriginalValue(
  184|  6.36k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  185|  6.36k|    }
  186|   136k|  }
  187|    141|  return true;
  188|    266|}

_ZN5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE3SetEPKNS_4MeshEPKS1_PKNSt3__16vectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS8_9allocatorISC_EEEEPKNS9_IiNSD_IiEEEE:
   37|  2.15k|           const std::vector<int32_t> *vertex_to_data_map) {
   38|  2.15k|    mesh_ = mesh;
   39|  2.15k|    corner_table_ = table;
   40|  2.15k|    data_to_corner_map_ = data_to_corner_map;
   41|  2.15k|    vertex_to_data_map_ = vertex_to_data_map;
   42|  2.15k|  }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE12corner_tableEv:
   45|  9.35M|  const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE18vertex_to_data_mapEv:
   46|  6.13M|  const std::vector<int32_t> *vertex_to_data_map() const {
   47|  6.13M|    return vertex_to_data_map_;
   48|  6.13M|  }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE18data_to_corner_mapEv:
   49|  4.59M|  const std::vector<CornerIndex> *data_to_corner_map() const {
   50|  4.59M|    return data_to_corner_map_;
   51|  4.59M|  }
_ZN5draco24MeshPredictionSchemeDataINS_11CornerTableEE3SetEPKNS_4MeshEPKS1_PKNSt3__16vectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS8_9allocatorISC_EEEEPKNS9_IiNSD_IiEEEE:
   37|  2.39k|           const std::vector<int32_t> *vertex_to_data_map) {
   38|  2.39k|    mesh_ = mesh;
   39|  2.39k|    corner_table_ = table;
   40|  2.39k|    data_to_corner_map_ = data_to_corner_map;
   41|  2.39k|    vertex_to_data_map_ = vertex_to_data_map;
   42|  2.39k|  }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE12corner_tableEv:
   45|  9.48M|  const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE18vertex_to_data_mapEv:
   46|  8.33M|  const std::vector<int32_t> *vertex_to_data_map() const {
   47|  8.33M|    return vertex_to_data_map_;
   48|  8.33M|  }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE18data_to_corner_mapEv:
   49|  2.22M|  const std::vector<CornerIndex> *data_to_corner_map() const {
   50|  2.22M|    return data_to_corner_map_;
   51|  2.22M|  }
_ZN5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEC2Ev:
   30|  2.15k|      : mesh_(nullptr),
   31|  2.15k|        corner_table_(nullptr),
   32|  2.15k|        vertex_to_data_map_(nullptr),
   33|  2.15k|        data_to_corner_map_(nullptr) {}
_ZN5draco24MeshPredictionSchemeDataINS_11CornerTableEEC2Ev:
   30|  2.39k|      : mesh_(nullptr),
   31|  2.39k|        corner_table_(nullptr),
   32|  2.39k|        vertex_to_data_map_(nullptr),
   33|  2.39k|        data_to_corner_map_(nullptr) {}

_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|   365k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   230k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|   252k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   181k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  1.79k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  1.79k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|  8.41M|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  2.11k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  2.11k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|  2.27M|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    164|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    164|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    128|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    128|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    184|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    184|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    140|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    140|        mesh_data_(mesh_data) {}

_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    327|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    164|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    164|    DRACO_DCHECK_EQ(i, 0);
   70|    164|    (void)i;
   71|    164|    return GeometryAttribute::POSITION;
   72|    164|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    164|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    164|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 164]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    164|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 163]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    163|    predictor_.SetPositionAttribute(*att);
   82|    163|    return true;
   83|    164|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    163|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    163|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 7, False: 156]
  ------------------
  145|      7|    return false;
  146|      7|  }
  147|       |
  148|    156|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    156|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    156|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 50, False: 106]
  ------------------
  150|     50|    uint8_t prediction_mode;
  151|     50|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 0, False: 50]
  ------------------
  152|      0|      return false;
  153|      0|    }
  154|     50|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 1, False: 49]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      1|      return false;
  157|      1|    }
  158|       |
  159|     49|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 49]
  ------------------
  160|     49|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     49|  }
  164|    155|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    155|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 4, False: 151]
  ------------------
  168|      4|    return false;
  169|      4|  }
  170|       |
  171|    151|  return true;
  172|    155|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    151|                                      const PointIndex *entry_to_point_id_map) {
  103|    151|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    151|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    151|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    151|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    151|  const int corner_map_size =
  111|    151|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    151|  VectorD<int32_t, 3> pred_normal_3d;
  114|    151|  int32_t pred_normal_oct[2];
  115|       |
  116|   365k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 365k, False: 151]
  ------------------
  117|   365k|    const CornerIndex corner_id =
  118|   365k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   365k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   365k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   365k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   365k|                    octahedron_tool_box_.center_value());
  125|   365k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 363k, False: 1.58k]
  ------------------
  126|   363k|      pred_normal_3d = -pred_normal_3d;
  127|   363k|    }
  128|   365k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   365k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   365k|    const int data_offset = data_id * 2;
  132|   365k|    this->transform().ComputeOriginalValue(
  133|   365k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   365k|  }
  135|    151|  flip_normal_bit_decoder_.EndDecoding();
  136|    151|  return true;
  137|    151|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    151|  void SetQuantizationBits(int q) {
   85|    151|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    151|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    251|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    128|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    128|    DRACO_DCHECK_EQ(i, 0);
   70|    128|    (void)i;
   71|    128|    return GeometryAttribute::POSITION;
   72|    128|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    125|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    125|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 125]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    125|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 2, False: 123]
  ------------------
   79|      2|      return false;  // Currently works only for 3 component positions.
   80|      2|    }
   81|    123|    predictor_.SetPositionAttribute(*att);
   82|    123|    return true;
   83|    125|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    123|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    123|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 7, False: 116]
  ------------------
  145|      7|    return false;
  146|      7|  }
  147|       |
  148|    116|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    116|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    116|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 17, False: 99]
  ------------------
  150|     17|    uint8_t prediction_mode;
  151|     17|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 0, False: 17]
  ------------------
  152|      0|      return false;
  153|      0|    }
  154|     17|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 1, False: 16]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      1|      return false;
  157|      1|    }
  158|       |
  159|     16|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 16]
  ------------------
  160|     16|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     16|  }
  164|    115|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    115|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 3, False: 112]
  ------------------
  168|      3|    return false;
  169|      3|  }
  170|       |
  171|    112|  return true;
  172|    115|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    112|                                      const PointIndex *entry_to_point_id_map) {
  103|    112|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    112|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    112|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    112|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    112|  const int corner_map_size =
  111|    112|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    112|  VectorD<int32_t, 3> pred_normal_3d;
  114|    112|  int32_t pred_normal_oct[2];
  115|       |
  116|   230k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 230k, False: 112]
  ------------------
  117|   230k|    const CornerIndex corner_id =
  118|   230k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   230k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   230k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   230k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   230k|                    octahedron_tool_box_.center_value());
  125|   230k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 208k, False: 21.6k]
  ------------------
  126|   208k|      pred_normal_3d = -pred_normal_3d;
  127|   208k|    }
  128|   230k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   230k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   230k|    const int data_offset = data_id * 2;
  132|   230k|    this->transform().ComputeOriginalValue(
  133|   230k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   230k|  }
  135|    112|  flip_normal_bit_decoder_.EndDecoding();
  136|    112|  return true;
  137|    112|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    112|  void SetQuantizationBits(int q) {
   85|    112|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    112|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    367|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    184|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    184|    DRACO_DCHECK_EQ(i, 0);
   70|    184|    (void)i;
   71|    184|    return GeometryAttribute::POSITION;
   72|    184|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    184|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    184|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 184]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    184|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 183]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    183|    predictor_.SetPositionAttribute(*att);
   82|    183|    return true;
   83|    184|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    183|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    183|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 9, False: 174]
  ------------------
  145|      9|    return false;
  146|      9|  }
  147|       |
  148|    174|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    174|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    174|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 54, False: 120]
  ------------------
  150|     54|    uint8_t prediction_mode;
  151|     54|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 53]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|     53|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 11, False: 42]
  ------------------
  155|       |      // Invalid prediction mode.
  156|     11|      return false;
  157|     11|    }
  158|       |
  159|     42|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 42]
  ------------------
  160|     42|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     42|  }
  164|    162|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    162|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 6, False: 156]
  ------------------
  168|      6|    return false;
  169|      6|  }
  170|       |
  171|    156|  return true;
  172|    162|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    156|                                      const PointIndex *entry_to_point_id_map) {
  103|    156|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    156|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    156|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    156|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    156|  const int corner_map_size =
  111|    156|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    156|  VectorD<int32_t, 3> pred_normal_3d;
  114|    156|  int32_t pred_normal_oct[2];
  115|       |
  116|   252k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 252k, False: 156]
  ------------------
  117|   252k|    const CornerIndex corner_id =
  118|   252k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   252k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   252k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   252k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   252k|                    octahedron_tool_box_.center_value());
  125|   252k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 250k, False: 1.96k]
  ------------------
  126|   250k|      pred_normal_3d = -pred_normal_3d;
  127|   250k|    }
  128|   252k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   252k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   252k|    const int data_offset = data_id * 2;
  132|   252k|    this->transform().ComputeOriginalValue(
  133|   252k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   252k|  }
  135|    156|  flip_normal_bit_decoder_.EndDecoding();
  136|    156|  return true;
  137|    156|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    156|  void SetQuantizationBits(int q) {
   85|    156|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    156|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    276|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    140|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    140|    DRACO_DCHECK_EQ(i, 0);
   70|    140|    (void)i;
   71|    140|    return GeometryAttribute::POSITION;
   72|    140|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    140|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    140|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 140]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    140|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 4, False: 136]
  ------------------
   79|      4|      return false;  // Currently works only for 3 component positions.
   80|      4|    }
   81|    136|    predictor_.SetPositionAttribute(*att);
   82|    136|    return true;
   83|    140|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    136|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    136|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 5, False: 131]
  ------------------
  145|      5|    return false;
  146|      5|  }
  147|       |
  148|    131|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    131|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    131|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 24, False: 107]
  ------------------
  150|     24|    uint8_t prediction_mode;
  151|     24|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 0, False: 24]
  ------------------
  152|      0|      return false;
  153|      0|    }
  154|     24|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 1, False: 23]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      1|      return false;
  157|      1|    }
  158|       |
  159|     23|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 23]
  ------------------
  160|     23|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     23|  }
  164|    130|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    130|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 4, False: 126]
  ------------------
  168|      4|    return false;
  169|      4|  }
  170|       |
  171|    126|  return true;
  172|    130|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    126|                                      const PointIndex *entry_to_point_id_map) {
  103|    126|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    126|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    126|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    126|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    126|  const int corner_map_size =
  111|    126|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    126|  VectorD<int32_t, 3> pred_normal_3d;
  114|    126|  int32_t pred_normal_oct[2];
  115|       |
  116|   181k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 181k, False: 126]
  ------------------
  117|   181k|    const CornerIndex corner_id =
  118|   181k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   181k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   181k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   181k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   181k|                    octahedron_tool_box_.center_value());
  125|   181k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 173k, False: 8.35k]
  ------------------
  126|   173k|      pred_normal_3d = -pred_normal_3d;
  127|   173k|    }
  128|   181k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   181k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   181k|    const int data_offset = data_id * 2;
  132|   181k|    this->transform().ComputeOriginalValue(
  133|   181k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   181k|  }
  135|    126|  flip_normal_bit_decoder_.EndDecoding();
  136|    126|  return true;
  137|    126|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    126|  void SetQuantizationBits(int q) {
   85|    126|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    126|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    185|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    185|            attribute, transform, mesh_data),
   37|    185|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    367|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    185|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    185|    DRACO_DCHECK_EQ(i, 0);
   70|    185|    (void)i;
   71|    185|    return GeometryAttribute::POSITION;
   72|    185|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    184|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    184|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 184]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    184|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 2, False: 182]
  ------------------
   79|      2|      return false;  // Currently works only for 3 component positions.
   80|      2|    }
   81|    182|    predictor_.SetPositionAttribute(*att);
   82|    182|    return true;
   83|    184|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    182|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    182|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 24, False: 158]
  ------------------
  145|     24|    return false;
  146|     24|  }
  147|       |
  148|    158|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    158|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    158|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 50, False: 108]
  ------------------
  150|     50|    uint8_t prediction_mode;
  151|     50|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 0, False: 50]
  ------------------
  152|      0|      return false;
  153|      0|    }
  154|     50|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 7, False: 43]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      7|      return false;
  157|      7|    }
  158|       |
  159|     43|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 43]
  ------------------
  160|     43|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     43|  }
  164|    151|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    151|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 12, False: 139]
  ------------------
  168|     12|    return false;
  169|     12|  }
  170|       |
  171|    139|  return true;
  172|    151|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_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|       |
  113|    139|  VectorD<int32_t, 3> pred_normal_3d;
  114|    139|  int32_t pred_normal_oct[2];
  115|       |
  116|   379k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 379k, False: 139]
  ------------------
  117|   379k|    const CornerIndex corner_id =
  118|   379k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   379k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   379k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   379k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   379k|                    octahedron_tool_box_.center_value());
  125|   379k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 342k, False: 36.5k]
  ------------------
  126|   342k|      pred_normal_3d = -pred_normal_3d;
  127|   342k|    }
  128|   379k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   379k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   379k|    const int data_offset = data_id * 2;
  132|   379k|    this->transform().ComputeOriginalValue(
  133|   379k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   379k|  }
  135|    139|  flip_normal_bit_decoder_.EndDecoding();
  136|    139|  return true;
  137|    139|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    139|  void SetQuantizationBits(int q) {
   85|    139|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    139|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    431|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    431|            attribute, transform, mesh_data),
   37|    431|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    860|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    431|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    431|    DRACO_DCHECK_EQ(i, 0);
   70|    431|    (void)i;
   71|    431|    return GeometryAttribute::POSITION;
   72|    431|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    430|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    430|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 430]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    430|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 429]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    429|    predictor_.SetPositionAttribute(*att);
   82|    429|    return true;
   83|    430|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    428|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    428|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 28, False: 400]
  ------------------
  145|     28|    return false;
  146|     28|  }
  147|       |
  148|    400|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    400|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    400|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 103, False: 297]
  ------------------
  150|    103|    uint8_t prediction_mode;
  151|    103|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 102]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|    102|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 1, False: 101]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      1|      return false;
  157|      1|    }
  158|       |
  159|    101|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 101]
  ------------------
  160|    101|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|    101|  }
  164|    398|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    398|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 16, False: 382]
  ------------------
  168|     16|    return false;
  169|     16|  }
  170|       |
  171|    382|  return true;
  172|    398|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    382|                                      const PointIndex *entry_to_point_id_map) {
  103|    382|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    382|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    382|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    382|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    382|  const int corner_map_size =
  111|    382|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    382|  VectorD<int32_t, 3> pred_normal_3d;
  114|    382|  int32_t pred_normal_oct[2];
  115|       |
  116|   200k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 199k, False: 382]
  ------------------
  117|   199k|    const CornerIndex corner_id =
  118|   199k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   199k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   199k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   199k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   199k|                    octahedron_tool_box_.center_value());
  125|   199k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 169k, False: 29.8k]
  ------------------
  126|   169k|      pred_normal_3d = -pred_normal_3d;
  127|   169k|    }
  128|   199k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   199k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   199k|    const int data_offset = data_id * 2;
  132|   199k|    this->transform().ComputeOriginalValue(
  133|   199k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   199k|  }
  135|    382|  flip_normal_bit_decoder_.EndDecoding();
  136|    382|  return true;
  137|    382|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    382|  void SetQuantizationBits(int q) {
   85|    382|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    382|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    164|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    164|            attribute, transform, mesh_data),
   37|    164|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    128|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    128|            attribute, transform, mesh_data),
   37|    128|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    184|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    184|            attribute, transform, mesh_data),
   37|    184|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    140|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    140|            attribute, transform, mesh_data),
   37|    140|        predictor_(mesh_data) {}

_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    213|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    213|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 47, False: 166]
  ------------------
  105|     47|      this->normal_prediction_mode_ = mode;
  106|     47|      return true;
  107|    166|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 166, False: 0]
  ------------------
  108|    166|      this->normal_prediction_mode_ = mode;
  109|    166|      return true;
  110|    166|    }
  111|      0|    return false;
  112|    213|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   365k|                             DataTypeT *prediction) override {
   42|   365k|    DRACO_DCHECK(this->IsInitialized());
   43|   365k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   365k|    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|   365k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   365k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   365k|    VectorD<int64_t, 3> normal;
   53|   365k|    CornerIndex c_next, c_prev;
   54|   828k|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 462k, False: 365k]
  ------------------
   55|       |      // Getting corners.
   56|   462k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 276, False: 462k]
  ------------------
   57|    276|        c_next = corner_table->Next(corner_id);
   58|    276|        c_prev = corner_table->Previous(corner_id);
   59|   462k|      } else {
   60|   462k|        c_next = corner_table->Next(cit.Corner());
   61|   462k|        c_prev = corner_table->Previous(cit.Corner());
   62|   462k|      }
   63|   462k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   462k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   462k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   462k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   462k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   462k|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|   462k|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|   462k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   462k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   462k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   462k|      cit.Next();
   81|   462k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   365k|    constexpr int64_t upper_bound = 1 << 29;
   85|   365k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 216, False: 365k]
  ------------------
   86|    216|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    216|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 57, False: 159]
  ------------------
   88|     57|        const int64_t quotient = abs_sum / upper_bound;
   89|     57|        normal = normal / quotient;
   90|     57|      }
   91|   365k|    } else {
   92|   365k|      const int64_t abs_sum = normal.AbsSum();
   93|   365k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 1.29k, False: 363k]
  ------------------
   94|  1.29k|        const int64_t quotient = abs_sum / upper_bound;
   95|  1.29k|        normal = normal / quotient;
   96|  1.29k|      }
   97|   365k|    }
   98|   365k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   365k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   365k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   365k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   365k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    144|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    144|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 15, False: 129]
  ------------------
  105|     15|      this->normal_prediction_mode_ = mode;
  106|     15|      return true;
  107|    129|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 129, False: 0]
  ------------------
  108|    129|      this->normal_prediction_mode_ = mode;
  109|    129|      return true;
  110|    129|    }
  111|      0|    return false;
  112|    144|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   230k|                             DataTypeT *prediction) override {
   42|   230k|    DRACO_DCHECK(this->IsInitialized());
   43|   230k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   230k|    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|   230k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   230k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   230k|    VectorD<int64_t, 3> normal;
   53|   230k|    CornerIndex c_next, c_prev;
   54|  1.60M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.37M, False: 230k]
  ------------------
   55|       |      // Getting corners.
   56|  1.37M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 84, False: 1.37M]
  ------------------
   57|     84|        c_next = corner_table->Next(corner_id);
   58|     84|        c_prev = corner_table->Previous(corner_id);
   59|  1.37M|      } else {
   60|  1.37M|        c_next = corner_table->Next(cit.Corner());
   61|  1.37M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.37M|      }
   63|  1.37M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.37M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.37M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.37M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.37M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.37M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.37M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.37M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.37M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.37M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.37M|      cit.Next();
   81|  1.37M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   230k|    constexpr int64_t upper_bound = 1 << 29;
   85|   230k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 56, False: 229k]
  ------------------
   86|     56|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|     56|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 19, False: 37]
  ------------------
   88|     19|        const int64_t quotient = abs_sum / upper_bound;
   89|     19|        normal = normal / quotient;
   90|     19|      }
   91|   229k|    } else {
   92|   229k|      const int64_t abs_sum = normal.AbsSum();
   93|   229k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 72.7k, False: 157k]
  ------------------
   94|  72.7k|        const int64_t quotient = abs_sum / upper_bound;
   95|  72.7k|        normal = normal / quotient;
   96|  72.7k|      }
   97|   229k|    }
   98|   230k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   230k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   230k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   230k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   230k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    226|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    226|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 40, False: 186]
  ------------------
  105|     40|      this->normal_prediction_mode_ = mode;
  106|     40|      return true;
  107|    186|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 186, False: 0]
  ------------------
  108|    186|      this->normal_prediction_mode_ = mode;
  109|    186|      return true;
  110|    186|    }
  111|      0|    return false;
  112|    226|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   252k|                             DataTypeT *prediction) override {
   42|   252k|    DRACO_DCHECK(this->IsInitialized());
   43|   252k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   252k|    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|   252k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   252k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   252k|    VectorD<int64_t, 3> normal;
   53|   252k|    CornerIndex c_next, c_prev;
   54|   551k|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 299k, False: 252k]
  ------------------
   55|       |      // Getting corners.
   56|   299k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 234, False: 299k]
  ------------------
   57|    234|        c_next = corner_table->Next(corner_id);
   58|    234|        c_prev = corner_table->Previous(corner_id);
   59|   299k|      } else {
   60|   299k|        c_next = corner_table->Next(cit.Corner());
   61|   299k|        c_prev = corner_table->Previous(cit.Corner());
   62|   299k|      }
   63|   299k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   299k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   299k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   299k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   299k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   299k|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|   299k|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|   299k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   299k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   299k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   299k|      cit.Next();
   81|   299k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   252k|    constexpr int64_t upper_bound = 1 << 29;
   85|   252k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 156, False: 252k]
  ------------------
   86|    156|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    156|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 47, False: 109]
  ------------------
   88|     47|        const int64_t quotient = abs_sum / upper_bound;
   89|     47|        normal = normal / quotient;
   90|     47|      }
   91|   252k|    } else {
   92|   252k|      const int64_t abs_sum = normal.AbsSum();
   93|   252k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 1.48k, False: 250k]
  ------------------
   94|  1.48k|        const int64_t quotient = abs_sum / upper_bound;
   95|  1.48k|        normal = normal / quotient;
   96|  1.48k|      }
   97|   252k|    }
   98|   252k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   252k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   252k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   252k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   252k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    163|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    163|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 22, False: 141]
  ------------------
  105|     22|      this->normal_prediction_mode_ = mode;
  106|     22|      return true;
  107|    141|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 141, False: 0]
  ------------------
  108|    141|      this->normal_prediction_mode_ = mode;
  109|    141|      return true;
  110|    141|    }
  111|      0|    return false;
  112|    163|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   181k|                             DataTypeT *prediction) override {
   42|   181k|    DRACO_DCHECK(this->IsInitialized());
   43|   181k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   181k|    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|   181k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   181k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   181k|    VectorD<int64_t, 3> normal;
   53|   181k|    CornerIndex c_next, c_prev;
   54|  1.26M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.07M, False: 181k]
  ------------------
   55|       |      // Getting corners.
   56|  1.07M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 120, False: 1.07M]
  ------------------
   57|    120|        c_next = corner_table->Next(corner_id);
   58|    120|        c_prev = corner_table->Previous(corner_id);
   59|  1.07M|      } else {
   60|  1.07M|        c_next = corner_table->Next(cit.Corner());
   61|  1.07M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.07M|      }
   63|  1.07M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.07M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.07M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.07M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.07M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.07M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.07M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.07M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.07M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.07M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.07M|      cit.Next();
   81|  1.07M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   181k|    constexpr int64_t upper_bound = 1 << 29;
   85|   181k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 80, False: 181k]
  ------------------
   86|     80|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|     80|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 34, False: 46]
  ------------------
   88|     34|        const int64_t quotient = abs_sum / upper_bound;
   89|     34|        normal = normal / quotient;
   90|     34|      }
   91|   181k|    } else {
   92|   181k|      const int64_t abs_sum = normal.AbsSum();
   93|   181k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 82.2k, False: 99.3k]
  ------------------
   94|  82.2k|        const int64_t quotient = abs_sum / upper_bound;
   95|  82.2k|        normal = normal / quotient;
   96|  82.2k|      }
   97|   181k|    }
   98|   181k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   181k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   181k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   181k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   181k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    185|      : Base(md) {
   35|    185|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    185|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    228|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    228|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 39, False: 189]
  ------------------
  105|     39|      this->normal_prediction_mode_ = mode;
  106|     39|      return true;
  107|    189|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 189, False: 0]
  ------------------
  108|    189|      this->normal_prediction_mode_ = mode;
  109|    189|      return true;
  110|    189|    }
  111|      0|    return false;
  112|    228|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   379k|                             DataTypeT *prediction) override {
   42|   379k|    DRACO_DCHECK(this->IsInitialized());
   43|   379k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   379k|    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|   379k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   379k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   379k|    VectorD<int64_t, 3> normal;
   53|   379k|    CornerIndex c_next, c_prev;
   54|  1.07M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 691k, False: 379k]
  ------------------
   55|       |      // Getting corners.
   56|   691k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 203k, False: 487k]
  ------------------
   57|   203k|        c_next = corner_table->Next(corner_id);
   58|   203k|        c_prev = corner_table->Previous(corner_id);
   59|   487k|      } else {
   60|   487k|        c_next = corner_table->Next(cit.Corner());
   61|   487k|        c_prev = corner_table->Previous(cit.Corner());
   62|   487k|      }
   63|   691k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   691k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   691k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   691k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   691k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   691k|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|   691k|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|   691k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   691k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   691k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   691k|      cit.Next();
   81|   691k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   379k|    constexpr int64_t upper_bound = 1 << 29;
   85|   379k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 34.4k, False: 344k]
  ------------------
   86|  34.4k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  34.4k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 72, False: 34.3k]
  ------------------
   88|     72|        const int64_t quotient = abs_sum / upper_bound;
   89|     72|        normal = normal / quotient;
   90|     72|      }
   91|   344k|    } else {
   92|   344k|      const int64_t abs_sum = normal.AbsSum();
   93|   344k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 1.31k, False: 343k]
  ------------------
   94|  1.31k|        const int64_t quotient = abs_sum / upper_bound;
   95|  1.31k|        normal = normal / quotient;
   96|  1.31k|      }
   97|   344k|    }
   98|   379k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   379k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   379k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   379k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   379k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    431|      : Base(md) {
   35|    431|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    431|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    532|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    532|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 100, False: 432]
  ------------------
  105|    100|      this->normal_prediction_mode_ = mode;
  106|    100|      return true;
  107|    432|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 432, False: 0]
  ------------------
  108|    432|      this->normal_prediction_mode_ = mode;
  109|    432|      return true;
  110|    432|    }
  111|      0|    return false;
  112|    532|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   199k|                             DataTypeT *prediction) override {
   42|   199k|    DRACO_DCHECK(this->IsInitialized());
   43|   199k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   199k|    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|   199k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   199k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   199k|    VectorD<int64_t, 3> normal;
   53|   199k|    CornerIndex c_next, c_prev;
   54|  1.33M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.13M, False: 199k]
  ------------------
   55|       |      // Getting corners.
   56|  1.13M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 407k, False: 731k]
  ------------------
   57|   407k|        c_next = corner_table->Next(corner_id);
   58|   407k|        c_prev = corner_table->Previous(corner_id);
   59|   731k|      } else {
   60|   731k|        c_next = corner_table->Next(cit.Corner());
   61|   731k|        c_prev = corner_table->Previous(cit.Corner());
   62|   731k|      }
   63|  1.13M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.13M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.13M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.13M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.13M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.13M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.13M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.13M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.13M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.13M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.13M|      cit.Next();
   81|  1.13M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   199k|    constexpr int64_t upper_bound = 1 << 29;
   85|   199k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 69.5k, False: 130k]
  ------------------
   86|  69.5k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  69.5k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 211, False: 69.2k]
  ------------------
   88|    211|        const int64_t quotient = abs_sum / upper_bound;
   89|    211|        normal = normal / quotient;
   90|    211|      }
   91|   130k|    } else {
   92|   130k|      const int64_t abs_sum = normal.AbsSum();
   93|   130k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 9.91k, False: 120k]
  ------------------
   94|  9.91k|        const int64_t quotient = abs_sum / upper_bound;
   95|  9.91k|        normal = normal / quotient;
   96|  9.91k|      }
   97|   130k|    }
   98|   199k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   199k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   199k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   199k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   199k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    164|      : Base(md) {
   35|    164|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    164|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    128|      : Base(md) {
   35|    128|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    128|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    184|      : Base(md) {
   35|    184|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    184|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    140|      : Base(md) {
   35|    140|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    140|  };

_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  1.29M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  1.29M|    DRACO_DCHECK(this->IsInitialized());
   73|  1.29M|    const auto corner_table = mesh_data_.corner_table();
   74|  1.29M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  1.29M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  1.29M|    return GetPositionForDataId(data_id);
   77|  1.29M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  1.29M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  1.29M|    DRACO_DCHECK(this->IsInitialized());
   65|  1.29M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  1.29M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  1.29M|    VectorD<int64_t, 3> pos;
   68|  1.29M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  1.29M|    return pos;
   70|  1.29M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    163|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    163|    pos_attribute_ = &position_attribute;
   43|    163|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    151|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    151|    entry_to_point_id_map_ = map;
   46|    151|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.97M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.97M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.97M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.97M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.97M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.97M|    return GetPositionForDataId(data_id);
   77|  2.97M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  2.97M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.97M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.97M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.97M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.97M|    VectorD<int64_t, 3> pos;
   68|  2.97M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.97M|    return pos;
   70|  2.97M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    123|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    123|    pos_attribute_ = &position_attribute;
   43|    123|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    112|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    112|    entry_to_point_id_map_ = map;
   46|    112|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|   851k|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|   851k|    DRACO_DCHECK(this->IsInitialized());
   73|   851k|    const auto corner_table = mesh_data_.corner_table();
   74|   851k|    const auto vert_id = corner_table->Vertex(ci).value();
   75|   851k|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|   851k|    return GetPositionForDataId(data_id);
   77|   851k|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|   851k|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|   851k|    DRACO_DCHECK(this->IsInitialized());
   65|   851k|    const auto point_id = entry_to_point_id_map_[data_id];
   66|   851k|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|   851k|    VectorD<int64_t, 3> pos;
   68|   851k|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|   851k|    return pos;
   70|   851k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    183|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    183|    pos_attribute_ = &position_attribute;
   43|    183|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    156|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    156|    entry_to_point_id_map_ = map;
   46|    156|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.34M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.34M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.34M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.34M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.34M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.34M|    return GetPositionForDataId(data_id);
   77|  2.34M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  2.34M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.34M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.34M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.34M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.34M|    VectorD<int64_t, 3> pos;
   68|  2.34M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.34M|    return pos;
   70|  2.34M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    136|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    136|    pos_attribute_ = &position_attribute;
   43|    136|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    126|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    126|    entry_to_point_id_map_ = map;
   46|    126|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    185|      : pos_attribute_(nullptr),
   36|    185|        entry_to_point_id_map_(nullptr),
   37|    185|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    185|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  1.76M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  1.76M|    DRACO_DCHECK(this->IsInitialized());
   73|  1.76M|    const auto corner_table = mesh_data_.corner_table();
   74|  1.76M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  1.76M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  1.76M|    return GetPositionForDataId(data_id);
   77|  1.76M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  1.76M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  1.76M|    DRACO_DCHECK(this->IsInitialized());
   65|  1.76M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  1.76M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  1.76M|    VectorD<int64_t, 3> pos;
   68|  1.76M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  1.76M|    return pos;
   70|  1.76M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    182|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    182|    pos_attribute_ = &position_attribute;
   43|    182|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    139|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    139|    entry_to_point_id_map_ = map;
   46|    139|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    431|      : pos_attribute_(nullptr),
   36|    431|        entry_to_point_id_map_(nullptr),
   37|    431|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    431|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.47M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.47M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.47M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.47M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.47M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.47M|    return GetPositionForDataId(data_id);
   77|  2.47M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  2.47M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.47M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.47M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.47M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.47M|    VectorD<int64_t, 3> pos;
   68|  2.47M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.47M|    return pos;
   70|  2.47M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    429|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    429|    pos_attribute_ = &position_attribute;
   43|    429|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    382|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    382|    entry_to_point_id_map_ = map;
   46|    382|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    164|      : pos_attribute_(nullptr),
   36|    164|        entry_to_point_id_map_(nullptr),
   37|    164|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    164|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    128|      : pos_attribute_(nullptr),
   36|    128|        entry_to_point_id_map_(nullptr),
   37|    128|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    128|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    184|      : pos_attribute_(nullptr),
   36|    184|        entry_to_point_id_map_(nullptr),
   37|    184|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    184|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    140|      : pos_attribute_(nullptr),
   36|    140|        entry_to_point_id_map_(nullptr),
   37|    140|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    140|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}

_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    339|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    339|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    328|                          const PointIndex * /* entry_to_point_id_map */) {
   64|    328|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    328|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    328|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    328|      new DataTypeT[num_components]());
   70|       |
   71|    328|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    328|  const CornerTable *const table = this->mesh_data().corner_table();
   74|    328|  const std::vector<int32_t> *const vertex_to_data_map =
   75|    328|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    328|  const int corner_map_size =
   78|    328|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|  1.32M|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (79:19): [True: 1.32M, False: 328]
  ------------------
   80|  1.32M|    const CornerIndex start_corner_id =
   81|  1.32M|        this->mesh_data().data_to_corner_map()->at(p);
   82|       |
   83|  1.32M|    CornerIndex corner_id(start_corner_id);
   84|  1.32M|    int num_parallelograms = 0;
   85|  66.2M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (85:21): [True: 64.9M, False: 1.32M]
  ------------------
   86|  64.9M|      pred_vals[i] = static_cast<DataTypeT>(0);
   87|  64.9M|    }
   88|  3.22M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (88:12): [True: 1.89M, False: 1.32M]
  ------------------
   89|  1.89M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (89:11): [True: 231k, False: 1.66M]
  ------------------
   90|  1.89M|              p, corner_id, table, *vertex_to_data_map, out_data,
   91|  1.89M|              num_components, parallelogram_pred_vals.get())) {
   92|  9.87M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (92:25): [True: 9.64M, False: 231k]
  ------------------
   93|  9.64M|          pred_vals[c] =
   94|  9.64M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   95|  9.64M|        }
   96|   231k|        ++num_parallelograms;
   97|   231k|      }
   98|       |
   99|       |      // Proceed to the next corner attached to the vertex.
  100|  1.89M|      corner_id = table->SwingRight(corner_id);
  101|  1.89M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (101:11): [True: 112k, False: 1.78M]
  ------------------
  102|   112k|        corner_id = kInvalidCornerIndex;
  103|   112k|      }
  104|  1.89M|    }
  105|       |
  106|  1.32M|    const int dst_offset = p * num_components;
  107|  1.32M|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (107:9): [True: 1.20M, False: 120k]
  ------------------
  108|       |      // No parallelogram was valid.
  109|       |      // We use the last decoded point as a reference.
  110|  1.20M|      const int src_offset = (p - 1) * num_components;
  111|  1.20M|      this->transform().ComputeOriginalValue(
  112|  1.20M|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  113|  1.20M|    } else {
  114|       |      // Compute the correction from the predicted value.
  115|  5.15M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (115:23): [True: 5.03M, False: 120k]
  ------------------
  116|  5.03M|        pred_vals[c] /= num_parallelograms;
  117|  5.03M|      }
  118|   120k|      this->transform().ComputeOriginalValue(
  119|   120k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  120|   120k|    }
  121|  1.32M|  }
  122|    328|  return true;
  123|    328|}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    424|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    424|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    393|                          const PointIndex * /* entry_to_point_id_map */) {
   64|    393|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    393|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    393|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    393|      new DataTypeT[num_components]());
   70|       |
   71|    393|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    393|  const CornerTable *const table = this->mesh_data().corner_table();
   74|    393|  const std::vector<int32_t> *const vertex_to_data_map =
   75|    393|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    393|  const int corner_map_size =
   78|    393|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|   792k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (79:19): [True: 791k, False: 393]
  ------------------
   80|   791k|    const CornerIndex start_corner_id =
   81|   791k|        this->mesh_data().data_to_corner_map()->at(p);
   82|       |
   83|   791k|    CornerIndex corner_id(start_corner_id);
   84|   791k|    int num_parallelograms = 0;
   85|  22.4M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (85:21): [True: 21.6M, False: 791k]
  ------------------
   86|  21.6M|      pred_vals[i] = static_cast<DataTypeT>(0);
   87|  21.6M|    }
   88|  5.47M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (88:12): [True: 4.67M, False: 791k]
  ------------------
   89|  4.67M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (89:11): [True: 1.54M, False: 3.13M]
  ------------------
   90|  4.67M|              p, corner_id, table, *vertex_to_data_map, out_data,
   91|  4.67M|              num_components, parallelogram_pred_vals.get())) {
   92|  43.8M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (92:25): [True: 42.2M, False: 1.54M]
  ------------------
   93|  42.2M|          pred_vals[c] =
   94|  42.2M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   95|  42.2M|        }
   96|  1.54M|        ++num_parallelograms;
   97|  1.54M|      }
   98|       |
   99|       |      // Proceed to the next corner attached to the vertex.
  100|  4.67M|      corner_id = table->SwingRight(corner_id);
  101|  4.67M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (101:11): [True: 774k, False: 3.90M]
  ------------------
  102|   774k|        corner_id = kInvalidCornerIndex;
  103|   774k|      }
  104|  4.67M|    }
  105|       |
  106|   791k|    const int dst_offset = p * num_components;
  107|   791k|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (107:9): [True: 1.86k, False: 790k]
  ------------------
  108|       |      // No parallelogram was valid.
  109|       |      // We use the last decoded point as a reference.
  110|  1.86k|      const int src_offset = (p - 1) * num_components;
  111|  1.86k|      this->transform().ComputeOriginalValue(
  112|  1.86k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  113|   790k|    } else {
  114|       |      // Compute the correction from the predicted value.
  115|  22.3M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (115:23): [True: 21.6M, False: 790k]
  ------------------
  116|  21.6M|        pred_vals[c] /= num_parallelograms;
  117|  21.6M|      }
  118|   790k|      this->transform().ComputeOriginalValue(
  119|   790k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  120|   790k|    }
  121|   791k|  }
  122|    393|  return true;
  123|    393|}

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

_ZN5draco30ComputeParallelogramPredictionINS_24MeshAttributeCornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  3.23M|    int num_components, DataTypeT *out_prediction) {
   49|  3.23M|  const CornerIndex oci = table->Opposite(ci);
   50|  3.23M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 2.30M, False: 929k]
  ------------------
   51|  2.30M|    return false;
   52|  2.30M|  }
   53|   929k|  int vert_opp, vert_next, vert_prev;
   54|   929k|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|   929k|                                        &vert_opp, &vert_next, &vert_prev);
   56|   929k|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 482k, False: 446k]
  |  Branch (56:35): [True: 359k, False: 123k]
  ------------------
   57|   359k|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 344k, False: 15.1k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|   344k|    const int v_opp_off = vert_opp * num_components;
   60|   344k|    const int v_next_off = vert_next * num_components;
   61|   344k|    const int v_prev_off = vert_prev * num_components;
   62|  14.5M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 14.1M, False: 344k]
  ------------------
   63|  14.1M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  14.1M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  14.1M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  14.1M|      const int64_t result =
   67|  14.1M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  14.1M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  14.1M|    }
   71|   344k|    return true;
   72|   344k|  }
   73|   585k|  return false;  // Not all data is available for prediction
   74|   929k|}
_ZN5draco23GetParallelogramEntriesINS_24MeshAttributeCornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|   929k|    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|   929k|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|   929k|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|   929k|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|   929k|}
_ZN5draco30ComputeParallelogramPredictionINS_11CornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  5.94M|    int num_components, DataTypeT *out_prediction) {
   49|  5.94M|  const CornerIndex oci = table->Opposite(ci);
   50|  5.94M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 72.8k, False: 5.87M]
  ------------------
   51|  72.8k|    return false;
   52|  72.8k|  }
   53|  5.87M|  int vert_opp, vert_next, vert_prev;
   54|  5.87M|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  5.87M|                                        &vert_opp, &vert_next, &vert_prev);
   56|  5.87M|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 3.10M, False: 2.76M]
  |  Branch (56:35): [True: 2.42M, False: 686k]
  ------------------
   57|  2.42M|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 2.20M, False: 220k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|  2.20M|    const int v_opp_off = vert_opp * num_components;
   60|  2.20M|    const int v_next_off = vert_next * num_components;
   61|  2.20M|    const int v_prev_off = vert_prev * num_components;
   62|  94.6M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 92.4M, False: 2.20M]
  ------------------
   63|  92.4M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  92.4M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  92.4M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  92.4M|      const int64_t result =
   67|  92.4M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  92.4M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  92.4M|    }
   71|  2.20M|    return true;
   72|  2.20M|  }
   73|  3.66M|  return false;  // Not all data is available for prediction
   74|  5.87M|}
_ZN5draco23GetParallelogramEntriesINS_11CornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  5.87M|    int *next_entry, int *prev_entry) {
   32|       |  // One vertex of the input |table| correspond to exactly one attribute value
   33|       |  // entry. The |table| can be either CornerTable for per-vertex attributes,
   34|       |  // or MeshAttributeCornerTable for attributes with interior seams.
   35|  5.87M|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  5.87M|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  5.87M|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  5.87M|}

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

_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   36|    221|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   37|    221|            attribute, transform, mesh_data),
   38|    221|        predictor_(mesh_data) {}
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   60|    439|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   62|    221|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   63|    221|    DRACO_DCHECK_EQ(i, 0);
   64|    221|    (void)i;
   65|    221|    return GeometryAttribute::POSITION;
   66|    221|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   68|    219|  bool SetParentAttribute(const PointAttribute *att) override {
   69|    219|    if (!att || att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (69:9): [True: 0, False: 219]
  |  Branch (69:17): [True: 0, False: 219]
  ------------------
   70|      0|      return false;  // Invalid attribute type.
   71|      0|    }
   72|    219|    if (att->num_components() != 3) {
  ------------------
  |  Branch (72:9): [True: 1, False: 218]
  ------------------
   73|      1|      return false;  // Currently works only for 3 component positions.
   74|      1|    }
   75|    218|    predictor_.SetPositionAttribute(*att);
   76|    218|    return true;
   77|    219|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  118|    214|                                                                *buffer) {
  119|       |  // Decode the delta coded orientations.
  120|    214|  int32_t num_orientations = 0;
  121|    214|  if (!buffer->Decode(&num_orientations) || num_orientations < 0) {
  ------------------
  |  Branch (121:7): [True: 2, False: 212]
  |  Branch (121:45): [True: 7, False: 205]
  ------------------
  122|      9|    return false;
  123|      9|  }
  124|    205|  predictor_.ResizeOrientations(num_orientations);
  125|    205|  bool last_orientation = true;
  126|    205|  RAnsBitDecoder decoder;
  127|    205|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (127:7): [True: 7, False: 198]
  ------------------
  128|      7|    return false;
  129|      7|  }
  130|  5.58G|  for (int i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (130:19): [True: 5.58G, False: 198]
  ------------------
  131|  5.58G|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (131:9): [True: 537M, False: 5.05G]
  ------------------
  132|   537M|      last_orientation = !last_orientation;
  133|   537M|    }
  134|  5.58G|    predictor_.set_orientation(i, last_orientation);
  135|  5.58G|  }
  136|    198|  decoder.EndDecoding();
  137|    198|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  138|    198|                                     MeshDataT>::DecodePredictionData(buffer);
  139|    205|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   90|    181|                                      const PointIndex *entry_to_point_id_map) {
   91|    181|  if (num_components != MeshPredictionSchemeTexCoordsPortablePredictor<
  ------------------
  |  Branch (91:7): [True: 9, False: 172]
  ------------------
   92|    181|                            DataTypeT, MeshDataT>::kNumComponents) {
   93|      9|    return false;
   94|      9|  }
   95|    172|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
   96|    172|  this->transform().Init(num_components);
   97|       |
   98|    172|  const int corner_map_size =
   99|    172|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  100|   374k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (100:19): [True: 374k, False: 88]
  ------------------
  101|   374k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  102|   374k|    if (!predictor_.template ComputePredictedValue<false>(corner_id, out_data,
  ------------------
  |  Branch (102:9): [True: 84, False: 374k]
  ------------------
  103|   374k|                                                          p)) {
  104|     84|      return false;
  105|     84|    }
  106|       |
  107|   374k|    const int dst_offset = p * num_components;
  108|   374k|    this->transform().ComputeOriginalValue(predictor_.predicted_value(),
  109|   374k|                                           in_corr + dst_offset,
  110|   374k|                                           out_data + dst_offset);
  111|   374k|  }
  112|     88|  return true;
  113|    172|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   36|    212|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   37|    212|            attribute, transform, mesh_data),
   38|    212|        predictor_(mesh_data) {}
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   60|    419|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   62|    212|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   63|    212|    DRACO_DCHECK_EQ(i, 0);
   64|    212|    (void)i;
   65|    212|    return GeometryAttribute::POSITION;
   66|    212|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   68|    209|  bool SetParentAttribute(const PointAttribute *att) override {
   69|    209|    if (!att || att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (69:9): [True: 0, False: 209]
  |  Branch (69:17): [True: 0, False: 209]
  ------------------
   70|      0|      return false;  // Invalid attribute type.
   71|      0|    }
   72|    209|    if (att->num_components() != 3) {
  ------------------
  |  Branch (72:9): [True: 2, False: 207]
  ------------------
   73|      2|      return false;  // Currently works only for 3 component positions.
   74|      2|    }
   75|    207|    predictor_.SetPositionAttribute(*att);
   76|    207|    return true;
   77|    209|  }
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  118|    206|                                                                *buffer) {
  119|       |  // Decode the delta coded orientations.
  120|    206|  int32_t num_orientations = 0;
  121|    206|  if (!buffer->Decode(&num_orientations) || num_orientations < 0) {
  ------------------
  |  Branch (121:7): [True: 2, False: 204]
  |  Branch (121:45): [True: 1, False: 203]
  ------------------
  122|      3|    return false;
  123|      3|  }
  124|    203|  predictor_.ResizeOrientations(num_orientations);
  125|    203|  bool last_orientation = true;
  126|    203|  RAnsBitDecoder decoder;
  127|    203|  if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (127:7): [True: 8, False: 195]
  ------------------
  128|      8|    return false;
  129|      8|  }
  130|  5.94G|  for (int i = 0; i < num_orientations; ++i) {
  ------------------
  |  Branch (130:19): [True: 5.94G, False: 195]
  ------------------
  131|  5.94G|    if (!decoder.DecodeNextBit()) {
  ------------------
  |  Branch (131:9): [True: 420M, False: 5.52G]
  ------------------
  132|   420M|      last_orientation = !last_orientation;
  133|   420M|    }
  134|  5.94G|    predictor_.set_orientation(i, last_orientation);
  135|  5.94G|  }
  136|    195|  decoder.EndDecoding();
  137|    195|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  138|    195|                                     MeshDataT>::DecodePredictionData(buffer);
  139|    203|}
_ZN5draco44MeshPredictionSchemeTexCoordsPortableDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   90|    158|                                      const PointIndex *entry_to_point_id_map) {
   91|    158|  if (num_components != MeshPredictionSchemeTexCoordsPortablePredictor<
  ------------------
  |  Branch (91:7): [True: 10, False: 148]
  ------------------
   92|    158|                            DataTypeT, MeshDataT>::kNumComponents) {
   93|     10|    return false;
   94|     10|  }
   95|    148|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
   96|    148|  this->transform().Init(num_components);
   97|       |
   98|    148|  const int corner_map_size =
   99|    148|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  100|   193k|  for (int p = 0; p < corner_map_size; ++p) {
  ------------------
  |  Branch (100:19): [True: 193k, False: 106]
  ------------------
  101|   193k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
  102|   193k|    if (!predictor_.template ComputePredictedValue<false>(corner_id, out_data,
  ------------------
  |  Branch (102:9): [True: 42, False: 193k]
  ------------------
  103|   193k|                                                          p)) {
  104|     42|      return false;
  105|     42|    }
  106|       |
  107|   193k|    const int dst_offset = p * num_components;
  108|   193k|    this->transform().ComputeOriginalValue(predictor_.predicted_value(),
  109|   193k|                                           in_corr + dst_offset,
  110|   193k|                                           out_data + dst_offset);
  111|   193k|  }
  112|    106|  return true;
  113|    148|}

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

_ZNK5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|    179|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    450|  bool AreCorrectionsPositive() override {
   71|    450|    return transform_.AreCorrectionsPositive();
   72|    450|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    164|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|    164|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 23, False: 141]
  ------------------
   50|     23|      return false;
   51|     23|    }
   52|    141|    return true;
   53|    164|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE9transformEv:
   81|  41.4M|  inline Transform &transform() { return transform_; }
_ZNK5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|    248|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    533|  bool AreCorrectionsPositive() override {
   71|    533|    return transform_.AreCorrectionsPositive();
   72|    533|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    214|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|    214|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 28, False: 186]
  ------------------
   50|     28|      return false;
   51|     28|    }
   52|    186|    return true;
   53|    214|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE9transformEv:
   81|  7.94M|  inline Transform &transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   46|  4.26k|      : attribute_(attribute), transform_(transform) {}
_ZNK5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22GetNumParentAttributesEv:
   58|  2.92k|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22AreCorrectionsPositiveEv:
   70|  4.07k|  bool AreCorrectionsPositive() override {
   71|  4.07k|    return transform_.AreCorrectionsPositive();
   72|  4.07k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|  3.24k|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|  3.24k|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 239, False: 3.00k]
  ------------------
   50|    239|      return false;
   51|    239|    }
   52|  3.00k|    return true;
   53|  3.24k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE9transformEv:
   81|   114M|  inline Transform &transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    471|      : attribute_(attribute), transform_(transform) {}
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    572|      : attribute_(attribute), transform_(transform) {}

_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    471|                                 const PointCloudDecoder *decoder) {
  188|    471|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    471|      method, att_id, decoder, TransformT());
  190|    471|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    471|                                 const TransformT &transform) {
  156|    471|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 471]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    471|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|    471|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 450, False: 21]
  ------------------
  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|    450|    const MeshDecoder *const mesh_decoder =
  167|    450|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|    450|    auto ret = CreateMeshPredictionScheme<
  170|    450|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    450|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    450|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    450|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 292, False: 158]
  ------------------
  174|    292|      return ret;
  175|    292|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    450|  }
  178|       |  // Create delta decoder.
  179|    179|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    179|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    471|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    168|      uint16_t bitstream_version) {
  143|    168|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    168|        method, attribute, transform, mesh_data, bitstream_version);
  145|    168|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    168|        uint16_t bitstream_version) {
  127|    168|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 164, False: 4]
  ------------------
  128|    164|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    164|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    164|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    164|                                                  mesh_data));
  132|    164|      }
  133|      4|      return nullptr;
  134|    168|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    131|      uint16_t bitstream_version) {
  143|    131|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    131|        method, attribute, transform, mesh_data, bitstream_version);
  145|    131|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    131|        uint16_t bitstream_version) {
  127|    131|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 128, False: 3]
  ------------------
  128|    128|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    128|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    128|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    128|                                                  mesh_data));
  132|    128|      }
  133|      3|      return nullptr;
  134|    131|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    572|                                 const PointCloudDecoder *decoder) {
  188|    572|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    572|      method, att_id, decoder, TransformT());
  190|    572|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    572|                                 const TransformT &transform) {
  156|    572|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 572]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    572|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|    572|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 571, False: 1]
  ------------------
  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|    571|    const MeshDecoder *const mesh_decoder =
  167|    571|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|    571|    auto ret = CreateMeshPredictionScheme<
  170|    571|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    571|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    571|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    571|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 324, False: 247]
  ------------------
  174|    324|      return ret;
  175|    324|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    571|  }
  178|       |  // Create delta decoder.
  179|    248|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    248|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    572|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    188|      uint16_t bitstream_version) {
  143|    188|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    188|        method, attribute, transform, mesh_data, bitstream_version);
  145|    188|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    188|        uint16_t bitstream_version) {
  111|    188|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 184, False: 4]
  ------------------
  112|    184|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    184|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    184|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    184|                                                  mesh_data));
  116|    184|      }
  117|      4|      return nullptr;
  118|    188|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    149|      uint16_t bitstream_version) {
  143|    149|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    149|        method, attribute, transform, mesh_data, bitstream_version);
  145|    149|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    149|        uint16_t bitstream_version) {
  111|    149|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 140, False: 9]
  ------------------
  112|    140|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    140|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    140|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    140|                                                  mesh_data));
  116|    140|      }
  117|      9|      return nullptr;
  118|    149|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|  4.26k|                                 const PointCloudDecoder *decoder) {
  188|  4.26k|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|  4.26k|      method, att_id, decoder, TransformT());
  190|  4.26k|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|  4.26k|                                 const TransformT &transform) {
  156|  4.26k|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 4.26k]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|  4.26k|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|  4.26k|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 4.22k, False: 38]
  ------------------
  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|  4.22k|    const MeshDecoder *const mesh_decoder =
  167|  4.22k|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|  4.22k|    auto ret = CreateMeshPredictionScheme<
  170|  4.22k|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|  4.22k|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|  4.22k|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|  4.22k|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 3.91k, False: 316]
  ------------------
  174|  3.91k|      return ret;
  175|  3.91k|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|  4.22k|  }
  178|       |  // Create delta decoder.
  179|    354|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    354|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|  4.26k|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  1.79k|      uint16_t bitstream_version) {
  143|  1.79k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  1.79k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  1.79k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  1.79k|        uint16_t bitstream_version) {
   53|  1.79k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 545, False: 1.25k]
  ------------------
   54|    545|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    545|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    545|                                                         MeshDataT>(
   57|    545|                attribute, transform, mesh_data));
   58|    545|      }
   59|  1.25k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  1.25k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 339, False: 913]
  ------------------
   61|    339|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    339|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    339|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    339|                                                  mesh_data));
   65|    339|      }
   66|    913|#endif
   67|    913|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 357, False: 556]
  ------------------
   68|    357|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    357|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    357|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    357|                                                  mesh_data));
   72|    357|      }
   73|    556|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|    556|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 150, False: 406]
  ------------------
   75|    150|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    150|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    150|                                                     MeshDataT>(
   78|    150|                attribute, transform, mesh_data, bitstream_version));
   79|    150|      }
   80|    406|#endif
   81|    406|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 221, False: 185]
  ------------------
   82|    221|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    221|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    221|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    221|                                                  mesh_data));
   86|    221|      }
   87|    185|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    185|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 185, False: 0]
  ------------------
   89|    185|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    185|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    185|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    185|                                                  mesh_data));
   93|    185|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  1.79k|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  2.11k|      uint16_t bitstream_version) {
  143|  2.11k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  2.11k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  2.11k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  2.11k|        uint16_t bitstream_version) {
   53|  2.11k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 515, False: 1.59k]
  ------------------
   54|    515|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    515|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    515|                                                         MeshDataT>(
   57|    515|                attribute, transform, mesh_data));
   58|    515|      }
   59|  1.59k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  1.59k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 424, False: 1.17k]
  ------------------
   61|    424|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    424|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    424|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    424|                                                  mesh_data));
   65|    424|      }
   66|  1.17k|#endif
   67|  1.17k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 395, False: 779]
  ------------------
   68|    395|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    395|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    395|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    395|                                                  mesh_data));
   72|    395|      }
   73|    779|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|    779|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 136, False: 643]
  ------------------
   75|    136|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    136|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    136|                                                     MeshDataT>(
   78|    136|                attribute, transform, mesh_data, bitstream_version));
   79|    136|      }
   80|    643|#endif
   81|    643|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 212, False: 431]
  ------------------
   82|    212|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    212|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    212|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    212|                                                  mesh_data));
   86|    212|      }
   87|    431|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    431|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 431, False: 0]
  ------------------
   89|    431|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    431|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    431|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    431|                                                  mesh_data));
   93|    431|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  2.11k|    }

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

_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    450|    uint16_t bitstream_version) {
   38|    450|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|    450|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 450, False: 0]
  ------------------
   40|    450|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 7, False: 443]
  ------------------
   41|    443|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 14, False: 429]
  ------------------
   42|    429|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 1, False: 428]
  ------------------
   43|    428|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 28, False: 400]
  ------------------
   44|    400|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 292, False: 108]
  ------------------
   45|    347|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 5, False: 103]
  ------------------
   46|    347|    const CornerTable *const ct = source->GetCornerTable();
   47|    347|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|    347|        source->GetAttributeEncodingData(att_id);
   49|    347|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 48, False: 299]
  |  Branch (49:26): [True: 0, False: 299]
  ------------------
   50|       |      // No connectivity data found.
   51|     48|      return nullptr;
   52|     48|    }
   53|       |    // Connectivity data exists.
   54|    299|    const MeshAttributeCornerTable *const att_ct =
   55|    299|        source->GetAttributeCornerTable(att_id);
   56|    299|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 168, False: 131]
  ------------------
   57|    168|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    168|      MeshData md;
   59|    168|      md.Set(source->mesh(), att_ct,
   60|    168|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    168|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    168|      MeshPredictionSchemeFactoryT factory;
   63|    168|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    168|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 164, False: 4]
  ------------------
   65|    164|        return ret;
   66|    164|      }
   67|    168|    } else {
   68|    131|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    131|      MeshData md;
   70|    131|      md.Set(source->mesh(), ct,
   71|    131|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    131|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    131|      MeshPredictionSchemeFactoryT factory;
   74|    131|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    131|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 128, False: 3]
  ------------------
   76|    128|        return ret;
   77|    128|      }
   78|    131|    }
   79|    299|  }
   80|    110|  return nullptr;
   81|    450|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    571|    uint16_t bitstream_version) {
   38|    571|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|    571|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 571, False: 0]
  ------------------
   40|    571|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 54, False: 517]
  ------------------
   41|    517|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 44, False: 473]
  ------------------
   42|    473|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 17, False: 456]
  ------------------
   43|    456|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 1, False: 455]
  ------------------
   44|    455|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 324, False: 131]
  ------------------
   45|    444|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 4, False: 127]
  ------------------
   46|    444|    const CornerTable *const ct = source->GetCornerTable();
   47|    444|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|    444|        source->GetAttributeEncodingData(att_id);
   49|    444|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 107, False: 337]
  |  Branch (49:26): [True: 0, False: 337]
  ------------------
   50|       |      // No connectivity data found.
   51|    107|      return nullptr;
   52|    107|    }
   53|       |    // Connectivity data exists.
   54|    337|    const MeshAttributeCornerTable *const att_ct =
   55|    337|        source->GetAttributeCornerTable(att_id);
   56|    337|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 188, False: 149]
  ------------------
   57|    188|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    188|      MeshData md;
   59|    188|      md.Set(source->mesh(), att_ct,
   60|    188|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    188|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    188|      MeshPredictionSchemeFactoryT factory;
   63|    188|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    188|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 184, False: 4]
  ------------------
   65|    184|        return ret;
   66|    184|      }
   67|    188|    } else {
   68|    149|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    149|      MeshData md;
   70|    149|      md.Set(source->mesh(), ct,
   71|    149|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    149|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    149|      MeshPredictionSchemeFactoryT factory;
   74|    149|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    149|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 140, False: 9]
  ------------------
   76|    140|        return ret;
   77|    140|      }
   78|    149|    }
   79|    337|  }
   80|    140|  return nullptr;
   81|    571|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|  4.22k|    uint16_t bitstream_version) {
   38|  4.22k|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|  4.22k|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 4.22k, False: 0]
  ------------------
   40|  4.22k|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 1.09k, False: 3.13k]
  ------------------
   41|  3.13k|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 784, False: 2.34k]
  ------------------
   42|  2.34k|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 765, False: 1.58k]
  ------------------
   43|  1.58k|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 449, False: 1.13k]
  ------------------
   44|  1.13k|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 624, False: 509]
  ------------------
   45|  4.00k|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 292, False: 217]
  ------------------
   46|  4.00k|    const CornerTable *const ct = source->GetCornerTable();
   47|  4.00k|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|  4.00k|        source->GetAttributeEncodingData(att_id);
   49|  4.00k|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 99, False: 3.91k]
  |  Branch (49:26): [True: 0, False: 3.91k]
  ------------------
   50|       |      // No connectivity data found.
   51|     99|      return nullptr;
   52|     99|    }
   53|       |    // Connectivity data exists.
   54|  3.91k|    const MeshAttributeCornerTable *const att_ct =
   55|  3.91k|        source->GetAttributeCornerTable(att_id);
   56|  3.91k|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 1.79k, False: 2.11k]
  ------------------
   57|  1.79k|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|  1.79k|      MeshData md;
   59|  1.79k|      md.Set(source->mesh(), att_ct,
   60|  1.79k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|  1.79k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|  1.79k|      MeshPredictionSchemeFactoryT factory;
   63|  1.79k|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|  1.79k|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 1.79k, False: 0]
  ------------------
   65|  1.79k|        return ret;
   66|  1.79k|      }
   67|  2.11k|    } else {
   68|  2.11k|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|  2.11k|      MeshData md;
   70|  2.11k|      md.Set(source->mesh(), ct,
   71|  2.11k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|  2.11k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|  2.11k|      MeshPredictionSchemeFactoryT factory;
   74|  2.11k|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|  2.11k|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 2.11k, False: 0]
  ------------------
   76|  2.11k|        return ret;
   77|  2.11k|      }
   78|  2.11k|    }
   79|  3.91k|  }
   80|    217|  return nullptr;
   81|  4.22k|}

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

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

_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE14IsInBottomLeftERKNS_7VectorDIiLi2EEE:
   92|  7.94M|  bool IsInBottomLeft(const Point2 &p) const {
   93|  7.94M|    if (p[0] == 0 && p[1] == 0) {
  ------------------
  |  Branch (93:9): [True: 2.18M, False: 5.76M]
  |  Branch (93:22): [True: 1.11M, False: 1.07M]
  ------------------
   94|  1.11M|      return true;
   95|  1.11M|    }
   96|  6.83M|    return (p[0] < 0 && p[1] <= 0);
  ------------------
  |  Branch (96:13): [True: 1.83M, False: 5.00M]
  |  Branch (96:25): [True: 1.07M, False: 753k]
  ------------------
   97|  7.94M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE16GetRotationCountENS_7VectorDIiLi2EEE:
   50|  7.94M|  int32_t GetRotationCount(Point2 pred) const {
   51|  7.94M|    const DataType sign_x = pred[0];
   52|  7.94M|    const DataType sign_y = pred[1];
   53|       |
   54|  7.94M|    int32_t rotation_count = 0;
   55|  7.94M|    if (sign_x == 0) {
  ------------------
  |  Branch (55:9): [True: 2.18M, False: 5.76M]
  ------------------
   56|  2.18M|      if (sign_y == 0) {
  ------------------
  |  Branch (56:11): [True: 1.11M, False: 1.07M]
  ------------------
   57|  1.11M|        rotation_count = 0;
   58|  1.11M|      } else if (sign_y > 0) {
  ------------------
  |  Branch (58:18): [True: 364k, False: 709k]
  ------------------
   59|   364k|        rotation_count = 3;
   60|   709k|      } else {
   61|   709k|        rotation_count = 1;
   62|   709k|      }
   63|  5.76M|    } else if (sign_x > 0) {
  ------------------
  |  Branch (63:16): [True: 3.93M, False: 1.83M]
  ------------------
   64|  3.93M|      if (sign_y >= 0) {
  ------------------
  |  Branch (64:11): [True: 2.86M, False: 1.06M]
  ------------------
   65|  2.86M|        rotation_count = 2;
   66|  2.86M|      } else {
   67|  1.06M|        rotation_count = 1;
   68|  1.06M|      }
   69|  3.93M|    } else {
   70|  1.83M|      if (sign_y <= 0) {
  ------------------
  |  Branch (70:11): [True: 1.07M, False: 753k]
  ------------------
   71|  1.07M|        rotation_count = 0;
   72|  1.07M|      } else {
   73|   753k|        rotation_count = 3;
   74|   753k|      }
   75|  1.83M|    }
   76|  7.94M|    return rotation_count;
   77|  7.94M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE11RotatePointENS_7VectorDIiLi2EEEi:
   79|  11.5M|  Point2 RotatePoint(Point2 p, int32_t rotation_count) const {
   80|  11.5M|    switch (rotation_count) {
   81|  2.89M|      case 1:
  ------------------
  |  Branch (81:7): [True: 2.89M, False: 8.62M]
  ------------------
   82|  2.89M|        return Point2(p[1], -p[0]);
   83|  5.72M|      case 2:
  ------------------
  |  Branch (83:7): [True: 5.72M, False: 5.79M]
  ------------------
   84|  5.72M|        return Point2(-p[0], -p[1]);
   85|  2.89M|      case 3:
  ------------------
  |  Branch (85:7): [True: 2.89M, False: 8.62M]
  ------------------
   86|  2.89M|        return Point2(-p[1], p[0]);
   87|      0|      default:
  ------------------
  |  Branch (87:7): [True: 0, False: 11.5M]
  ------------------
   88|      0|        return p;
   89|  11.5M|    }
   90|  11.5M|  }
_ZN5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiEC2Ev:
   40|    572|  PredictionSchemeNormalOctahedronCanonicalizedTransformBase() : Base() {}

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

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

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

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

_ZN5draco26SequentialAttributeDecoderC2Ev:
   20|  15.0k|    : decoder_(nullptr), attribute_(nullptr), attribute_id_(-1) {}
_ZN5draco26SequentialAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   23|  15.0k|                                      int attribute_id) {
   24|  15.0k|  decoder_ = decoder;
   25|  15.0k|  attribute_ = decoder->point_cloud()->attribute(attribute_id);
   26|  15.0k|  attribute_id_ = attribute_id;
   27|  15.0k|  return true;
   28|  15.0k|}
_ZN5draco26SequentialAttributeDecoder23DecodePortableAttributeERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   38|  9.35k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   39|  9.35k|  if (attribute_->num_components() <= 0 ||
  ------------------
  |  Branch (39:7): [True: 0, False: 9.35k]
  ------------------
   40|  9.35k|      !attribute_->Reset(point_ids.size())) {
  ------------------
  |  Branch (40:7): [True: 0, False: 9.35k]
  ------------------
   41|      0|    return false;
   42|      0|  }
   43|  9.35k|  if (!DecodeValues(point_ids, in_buffer)) {
  ------------------
  |  Branch (43:7): [True: 2.21k, False: 7.14k]
  ------------------
   44|  2.21k|    return false;
   45|  2.21k|  }
   46|  7.14k|  return true;
   47|  9.35k|}
_ZN5draco26SequentialAttributeDecoder35DecodeDataNeededByPortableTransformERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   50|  2.96k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   51|       |  // Default implementation does not apply any transform.
   52|  2.96k|  return true;
   53|  2.96k|}
_ZN5draco26SequentialAttributeDecoder34TransformAttributeToOriginalFormatERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEE:
   56|    368|    const std::vector<PointIndex> &point_ids) {
   57|       |  // Default implementation does not apply any transform.
   58|    368|  return true;
   59|    368|}
_ZN5draco26SequentialAttributeDecoder20GetPortableAttributeEv:
   61|  6.25k|const PointAttribute *SequentialAttributeDecoder::GetPortableAttribute() {
   62|       |  // If needed, copy point to attribute value index mapping from the final
   63|       |  // attribute to the portable attribute.
   64|  6.25k|  if (!attribute_->is_mapping_identity() && portable_attribute_ &&
  ------------------
  |  Branch (64:7): [True: 4.73k, False: 1.52k]
  |  Branch (64:45): [True: 4.37k, False: 353]
  ------------------
   65|  4.37k|      portable_attribute_->is_mapping_identity()) {
  ------------------
  |  Branch (65:7): [True: 3.39k, False: 982]
  ------------------
   66|  3.39k|    portable_attribute_->SetExplicitMapping(attribute_->indices_map_size());
   67|  3.39k|    for (PointIndex i(0);
   68|  19.9M|         i < static_cast<uint32_t>(attribute_->indices_map_size()); ++i) {
  ------------------
  |  Branch (68:10): [True: 19.9M, False: 3.39k]
  ------------------
   69|  19.9M|      portable_attribute_->SetPointMapEntry(i, attribute_->mapped_index(i));
   70|  19.9M|    }
   71|  3.39k|  }
   72|  6.25k|  return portable_attribute_.get();
   73|  6.25k|}
_ZN5draco26SequentialAttributeDecoder20InitPredictionSchemeEPNS_25PredictionSchemeInterfaceE:
   76|  5.30k|    PredictionSchemeInterface *ps) {
   77|  7.22k|  for (int i = 0; i < ps->GetNumParentAttributes(); ++i) {
  ------------------
  |  Branch (77:19): [True: 1.95k, False: 5.27k]
  ------------------
   78|  1.95k|    const int att_id = decoder_->point_cloud()->GetNamedAttributeId(
   79|  1.95k|        ps->GetParentAttributeType(i));
   80|  1.95k|    if (att_id == -1) {
  ------------------
  |  Branch (80:9): [True: 7, False: 1.94k]
  ------------------
   81|      7|      return false;  // Requested attribute does not exist.
   82|      7|    }
   83|  1.94k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   84|  1.94k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.94k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (84:9): [True: 0, False: 1.94k]
  ------------------
   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|  1.94k|#endif
   90|  1.94k|    {
   91|  1.94k|      const PointAttribute *const pa = decoder_->GetPortableAttribute(att_id);
   92|  1.94k|      if (pa == nullptr || !ps->SetParentAttribute(pa)) {
  ------------------
  |  Branch (92:11): [True: 4, False: 1.94k]
  |  Branch (92:28): [True: 22, False: 1.91k]
  ------------------
   93|     26|        return false;
   94|     26|      }
   95|  1.94k|    }
   96|  1.94k|  }
   97|  5.27k|  return true;
   98|  5.30k|}
_ZN5draco26SequentialAttributeDecoder12DecodeValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
  101|    806|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
  102|    806|  const int32_t num_values = static_cast<uint32_t>(point_ids.size());
  103|    806|  const int entry_size = static_cast<int>(attribute_->byte_stride());
  104|    806|  std::unique_ptr<uint8_t[]> value_data_ptr(new uint8_t[entry_size]);
  105|    806|  uint8_t *const value_data = value_data_ptr.get();
  106|    806|  int out_byte_pos = 0;
  107|       |  // Decode raw attribute values in their original format.
  108|  5.46k|  for (int i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (108:19): [True: 4.86k, False: 598]
  ------------------
  109|  4.86k|    if (!in_buffer->Decode(value_data, entry_size)) {
  ------------------
  |  Branch (109:9): [True: 208, False: 4.66k]
  ------------------
  110|    208|      return false;
  111|    208|    }
  112|  4.66k|    attribute_->buffer()->Write(out_byte_pos, value_data, entry_size);
  113|  4.66k|    out_byte_pos += entry_size;
  114|  4.66k|  }
  115|    598|  return true;
  116|    806|}

_ZNK5draco26SequentialAttributeDecoder9attributeEv:
   53|  6.88k|  const PointAttribute *attribute() const { return attribute_; }
_ZN5draco26SequentialAttributeDecoder9attributeEv:
   54|   307M|  PointAttribute *attribute() { return attribute_; }
_ZNK5draco26SequentialAttributeDecoder12attribute_idEv:
   55|  5.30k|  int attribute_id() const { return attribute_id_; }
_ZNK5draco26SequentialAttributeDecoder7decoderEv:
   56|  26.1k|  PointCloudDecoder *decoder() const { return decoder_; }
_ZN5draco26SequentialAttributeDecoder20SetPortableAttributeENSt3__110unique_ptrINS_14PointAttributeENS1_14default_deleteIS3_EEEE:
   69|  7.99k|  void SetPortableAttribute(std::unique_ptr<PointAttribute> att) {
   70|  7.99k|    portable_attribute_ = std::move(att);
   71|  7.99k|  }
_ZN5draco26SequentialAttributeDecoder18portable_attributeEv:
   73|  27.8k|  PointAttribute *portable_attribute() { return portable_attribute_.get(); }
_ZN5draco26SequentialAttributeDecoderD2Ev:
   29|  15.0k|  virtual ~SequentialAttributeDecoder() = default;

_ZN5draco37SequentialAttributeDecodersControllerC2ENSt3__110unique_ptrINS_15PointsSequencerENS1_14default_deleteIS3_EEEE:
   26|  32.7k|    : sequencer_(std::move(sequencer)) {}
_ZN5draco37SequentialAttributeDecodersController27DecodeAttributesDecoderDataEPNS_13DecoderBufferE:
   29|  6.36k|    DecoderBuffer *buffer) {
   30|  6.36k|  if (!AttributesDecoder::DecodeAttributesDecoderData(buffer)) {
  ------------------
  |  Branch (30:7): [True: 313, False: 6.04k]
  ------------------
   31|    313|    return false;
   32|    313|  }
   33|       |  // Decode unique ids of all sequential encoders and create them.
   34|  6.04k|  const int32_t num_attributes = GetNumAttributes();
   35|  6.04k|  sequential_decoders_.resize(num_attributes);
   36|  21.0k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (36:19): [True: 15.0k, False: 6.00k]
  ------------------
   37|  15.0k|    uint8_t decoder_type;
   38|  15.0k|    if (!buffer->Decode(&decoder_type)) {
  ------------------
  |  Branch (38:9): [True: 14, False: 15.0k]
  ------------------
   39|     14|      return false;
   40|     14|    }
   41|       |    // Create the decoder from the id.
   42|  15.0k|    sequential_decoders_[i] = CreateSequentialDecoder(decoder_type);
   43|  15.0k|    if (!sequential_decoders_[i]) {
  ------------------
  |  Branch (43:9): [True: 16, False: 15.0k]
  ------------------
   44|     16|      return false;
   45|     16|    }
   46|  15.0k|    if (!sequential_decoders_[i]->Init(GetDecoder(), GetAttributeId(i))) {
  ------------------
  |  Branch (46:9): [True: 11, False: 15.0k]
  ------------------
   47|     11|      return false;
   48|     11|    }
   49|  15.0k|  }
   50|  6.00k|  return true;
   51|  6.04k|}
_ZN5draco37SequentialAttributeDecodersController16DecodeAttributesEPNS_13DecoderBufferE:
   54|  4.30k|    DecoderBuffer *buffer) {
   55|  4.30k|  if (!sequencer_ || !sequencer_->GenerateSequence(&point_ids_)) {
  ------------------
  |  Branch (55:7): [True: 0, False: 4.30k]
  |  Branch (55:22): [True: 11, False: 4.29k]
  ------------------
   56|     11|    return false;
   57|     11|  }
   58|       |  // Initialize point to attribute value mapping for all decoded attributes.
   59|  4.29k|  const int32_t num_attributes = GetNumAttributes();
   60|  17.1k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (60:19): [True: 12.9k, False: 4.29k]
  ------------------
   61|  12.9k|    PointAttribute *const pa =
   62|  12.9k|        GetDecoder()->point_cloud()->attribute(GetAttributeId(i));
   63|  12.9k|    if (!sequencer_->UpdatePointToAttributeIndexMapping(pa)) {
  ------------------
  |  Branch (63:9): [True: 1, False: 12.9k]
  ------------------
   64|      1|      return false;
   65|      1|    }
   66|  12.9k|  }
   67|  4.29k|  return AttributesDecoder::DecodeAttributes(buffer);
   68|  4.29k|}
_ZN5draco37SequentialAttributeDecodersController24DecodePortableAttributesEPNS_13DecoderBufferE:
   71|  4.29k|    DecoderBuffer *in_buffer) {
   72|  4.29k|  const int32_t num_attributes = GetNumAttributes();
   73|  11.4k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (73:19): [True: 9.35k, False: 2.07k]
  ------------------
   74|  9.35k|    if (!sequential_decoders_[i]->DecodePortableAttribute(point_ids_,
  ------------------
  |  Branch (74:9): [True: 2.21k, False: 7.14k]
  ------------------
   75|  9.35k|                                                          in_buffer)) {
   76|  2.21k|      return false;
   77|  2.21k|    }
   78|  9.35k|  }
   79|  2.07k|  return true;
   80|  4.29k|}
_ZN5draco37SequentialAttributeDecodersController36DecodeDataNeededByPortableTransformsEPNS_13DecoderBufferE:
   83|  2.07k|    DecodeDataNeededByPortableTransforms(DecoderBuffer *in_buffer) {
   84|  2.07k|  const int32_t num_attributes = GetNumAttributes();
   85|  5.50k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (85:19): [True: 3.80k, False: 1.69k]
  ------------------
   86|  3.80k|    if (!sequential_decoders_[i]->DecodeDataNeededByPortableTransform(
  ------------------
  |  Branch (86:9): [True: 379, False: 3.43k]
  ------------------
   87|  3.80k|            point_ids_, in_buffer)) {
   88|    379|      return false;
   89|    379|    }
   90|  3.80k|  }
   91|  1.69k|  return true;
   92|  2.07k|}
_ZN5draco37SequentialAttributeDecodersController35TransformAttributesToOriginalFormatEv:
   95|  1.69k|    TransformAttributesToOriginalFormat() {
   96|  1.69k|  const int32_t num_attributes = GetNumAttributes();
   97|  4.22k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (97:19): [True: 3.01k, False: 1.21k]
  ------------------
   98|       |    // Check whether the attribute transform should be skipped.
   99|  3.01k|    if (GetDecoder()->options()) {
  ------------------
  |  Branch (99:9): [True: 3.01k, False: 0]
  ------------------
  100|  3.01k|      const PointAttribute *const attribute =
  101|  3.01k|          sequential_decoders_[i]->attribute();
  102|  3.01k|      const PointAttribute *const portable_attribute =
  103|  3.01k|          sequential_decoders_[i]->GetPortableAttribute();
  104|  3.01k|      if (portable_attribute &&
  ------------------
  |  Branch (104:11): [True: 2.64k, False: 368]
  |  Branch (104:11): [True: 0, False: 3.01k]
  ------------------
  105|  2.64k|          GetDecoder()->options()->GetAttributeBool(
  ------------------
  |  Branch (105:11): [True: 0, False: 2.64k]
  ------------------
  106|  2.64k|              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|  3.01k|    }
  116|  3.01k|    if (!sequential_decoders_[i]->TransformAttributeToOriginalFormat(
  ------------------
  |  Branch (116:9): [True: 483, False: 2.52k]
  ------------------
  117|  3.01k|            point_ids_)) {
  118|    483|      return false;
  119|    483|    }
  120|  3.01k|  }
  121|  1.21k|  return true;
  122|  1.69k|}
_ZN5draco37SequentialAttributeDecodersController23CreateSequentialDecoderEh:
  126|  15.0k|    uint8_t decoder_type) {
  127|  15.0k|  switch (decoder_type) {
  128|  1.64k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_GENERIC:
  ------------------
  |  Branch (128:5): [True: 1.64k, False: 13.3k]
  ------------------
  129|  1.64k|      return std::unique_ptr<SequentialAttributeDecoder>(
  130|  1.64k|          new SequentialAttributeDecoder());
  131|  11.3k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_INTEGER:
  ------------------
  |  Branch (131:5): [True: 11.3k, False: 3.70k]
  ------------------
  132|  11.3k|      return std::unique_ptr<SequentialAttributeDecoder>(
  133|  11.3k|          new SequentialIntegerAttributeDecoder());
  134|    653|    case SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION:
  ------------------
  |  Branch (134:5): [True: 653, False: 14.3k]
  ------------------
  135|    653|      return std::unique_ptr<SequentialAttributeDecoder>(
  136|    653|          new SequentialQuantizationAttributeDecoder());
  137|      0|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
  138|  1.39k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS:
  ------------------
  |  Branch (138:5): [True: 1.39k, False: 13.6k]
  ------------------
  139|  1.39k|      return std::unique_ptr<SequentialNormalAttributeDecoder>(
  140|  1.39k|          new SequentialNormalAttributeDecoder());
  141|      0|#endif
  142|     16|    default:
  ------------------
  |  Branch (142:5): [True: 16, False: 15.0k]
  ------------------
  143|     16|      break;
  144|  15.0k|  }
  145|       |  // Unknown or unsupported decoder type.
  146|     16|  return nullptr;
  147|  15.0k|}

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

_ZN5draco33SequentialIntegerAttributeDecoderC2Ev:
   23|  13.3k|SequentialIntegerAttributeDecoder::SequentialIntegerAttributeDecoder() {}
_ZN5draco33SequentialIntegerAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   26|  13.3k|                                             int attribute_id) {
   27|  13.3k|  if (!SequentialAttributeDecoder::Init(decoder, attribute_id)) {
  ------------------
  |  Branch (27:7): [True: 0, False: 13.3k]
  ------------------
   28|      0|    return false;
   29|      0|  }
   30|  13.3k|  return true;
   31|  13.3k|}
_ZN5draco33SequentialIntegerAttributeDecoder34TransformAttributeToOriginalFormatERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEE:
   34|  2.64k|    const std::vector<PointIndex> &point_ids) {
   35|  2.64k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   36|  2.64k|  if (decoder() &&
  ------------------
  |  Branch (36:7): [True: 2.64k, False: 0]
  ------------------
   37|  2.64k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.64k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (37:7): [True: 0, False: 2.64k]
  ------------------
   38|      0|    return true;  // Don't revert the transform here for older files.
   39|      0|  }
   40|  2.64k|#endif
   41|  2.64k|  return StoreValues(static_cast<uint32_t>(point_ids.size()));
   42|  2.64k|}
_ZN5draco33SequentialIntegerAttributeDecoder12DecodeValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   45|  8.55k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   46|       |  // Decode prediction scheme.
   47|  8.55k|  int8_t prediction_scheme_method;
   48|  8.55k|  if (!in_buffer->Decode(&prediction_scheme_method)) {
  ------------------
  |  Branch (48:7): [True: 168, False: 8.38k]
  ------------------
   49|    168|    return false;
   50|    168|  }
   51|       |  // Check that decoded prediction scheme method type is valid.
   52|  8.38k|  if (prediction_scheme_method < PREDICTION_NONE ||
  ------------------
  |  Branch (52:7): [True: 69, False: 8.31k]
  ------------------
   53|  8.31k|      prediction_scheme_method >= NUM_PREDICTION_SCHEMES) {
  ------------------
  |  Branch (53:7): [True: 166, False: 8.15k]
  ------------------
   54|    235|    return false;
   55|    235|  }
   56|  8.15k|  if (prediction_scheme_method != PREDICTION_NONE) {
  ------------------
  |  Branch (56:7): [True: 8.05k, False: 98]
  ------------------
   57|  8.05k|    int8_t prediction_transform_type;
   58|  8.05k|    if (!in_buffer->Decode(&prediction_transform_type)) {
  ------------------
  |  Branch (58:9): [True: 46, False: 8.00k]
  ------------------
   59|     46|      return false;
   60|     46|    }
   61|       |    // Check that decoded prediction scheme transform type is valid.
   62|  8.00k|    if (prediction_transform_type < PREDICTION_TRANSFORM_NONE ||
  ------------------
  |  Branch (62:9): [True: 19, False: 7.98k]
  ------------------
   63|  7.98k|        prediction_transform_type >= NUM_PREDICTION_SCHEME_TRANSFORM_TYPES) {
  ------------------
  |  Branch (63:9): [True: 59, False: 7.92k]
  ------------------
   64|     78|      return false;
   65|     78|    }
   66|  7.92k|    prediction_scheme_ = CreateIntPredictionScheme(
   67|  7.92k|        static_cast<PredictionSchemeMethod>(prediction_scheme_method),
   68|  7.92k|        static_cast<PredictionSchemeTransformType>(prediction_transform_type));
   69|  7.92k|  }
   70|       |
   71|  8.02k|  if (prediction_scheme_) {
  ------------------
  |  Branch (71:7): [True: 5.30k, False: 2.71k]
  ------------------
   72|  5.30k|    if (!InitPredictionScheme(prediction_scheme_.get())) {
  ------------------
  |  Branch (72:9): [True: 33, False: 5.27k]
  ------------------
   73|     33|      return false;
   74|     33|    }
   75|  5.30k|  }
   76|       |
   77|  7.99k|  if (!DecodeIntegerValues(point_ids, in_buffer)) {
  ------------------
  |  Branch (77:7): [True: 1.44k, False: 6.54k]
  ------------------
   78|  1.44k|    return false;
   79|  1.44k|  }
   80|       |
   81|  6.54k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   82|  6.54k|  const int32_t num_values = static_cast<uint32_t>(point_ids.size());
   83|  6.54k|  if (decoder() &&
  ------------------
  |  Branch (83:7): [True: 6.54k, False: 0]
  ------------------
   84|  6.54k|      decoder()->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  6.54k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (84:7): [True: 1, False: 6.54k]
  ------------------
   85|       |    // For older files, revert the transform right after we decode the data.
   86|      1|    if (!StoreValues(num_values)) {
  ------------------
  |  Branch (86:9): [True: 1, False: 0]
  ------------------
   87|      1|      return false;
   88|      1|    }
   89|      1|  }
   90|  6.54k|#endif
   91|  6.54k|  return true;
   92|  6.54k|}
_ZN5draco33SequentialIntegerAttributeDecoder25CreateIntPredictionSchemeENS_22PredictionSchemeMethodENS_29PredictionSchemeTransformTypeE:
   97|  6.81k|    PredictionSchemeTransformType transform_type) {
   98|  6.81k|  if (transform_type != PREDICTION_TRANSFORM_WRAP) {
  ------------------
  |  Branch (98:7): [True: 2.54k, False: 4.26k]
  ------------------
   99|  2.54k|    return nullptr;  // For now we support only wrap transform.
  100|  2.54k|  }
  101|  4.26k|  return CreatePredictionSchemeForDecoder<
  102|  4.26k|      int32_t, PredictionSchemeWrapDecodingTransform<int32_t>>(
  103|  4.26k|      method, attribute_id(), decoder());
  104|  6.81k|}
_ZN5draco33SequentialIntegerAttributeDecoder19DecodeIntegerValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
  107|  7.99k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
  108|  7.99k|  const int num_components = GetNumValueComponents();
  109|  7.99k|  if (num_components <= 0) {
  ------------------
  |  Branch (109:7): [True: 0, False: 7.99k]
  ------------------
  110|      0|    return false;
  111|      0|  }
  112|  7.99k|  const size_t num_entries = point_ids.size();
  113|  7.99k|  const size_t num_values = num_entries * num_components;
  114|  7.99k|  PreparePortableAttribute(static_cast<int>(num_entries), num_components);
  115|  7.99k|  int32_t *const portable_attribute_data = GetPortableAttributeData();
  116|  7.99k|  if (portable_attribute_data == nullptr) {
  ------------------
  |  Branch (116:7): [True: 1, False: 7.99k]
  ------------------
  117|      1|    return false;
  118|      1|  }
  119|  7.99k|  uint8_t compressed;
  120|  7.99k|  if (!in_buffer->Decode(&compressed)) {
  ------------------
  |  Branch (120:7): [True: 28, False: 7.96k]
  ------------------
  121|     28|    return false;
  122|     28|  }
  123|  7.96k|  if (compressed > 0) {
  ------------------
  |  Branch (123:7): [True: 581, False: 7.38k]
  ------------------
  124|       |    // Decode compressed values.
  125|    581|    if (!DecodeSymbols(static_cast<uint32_t>(num_values), num_components,
  ------------------
  |  Branch (125:9): [True: 245, False: 336]
  ------------------
  126|    581|                       in_buffer,
  127|    581|                       reinterpret_cast<uint32_t *>(portable_attribute_data))) {
  128|    245|      return false;
  129|    245|    }
  130|  7.38k|  } else {
  131|       |    // Decode the integer data directly.
  132|       |    // Get the number of bytes for a given entry.
  133|  7.38k|    uint8_t num_bytes;
  134|  7.38k|    if (!in_buffer->Decode(&num_bytes)) {
  ------------------
  |  Branch (134:9): [True: 9, False: 7.37k]
  ------------------
  135|      9|      return false;
  136|      9|    }
  137|  7.37k|    if (num_bytes == DataTypeLength(DT_INT32)) {
  ------------------
  |  Branch (137:9): [True: 258, False: 7.11k]
  ------------------
  138|    258|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (138:11): [True: 0, False: 258]
  ------------------
  139|    258|          sizeof(int32_t) * num_values) {
  140|      0|        return false;
  141|      0|      }
  142|    258|      if (!in_buffer->Decode(portable_attribute_data,
  ------------------
  |  Branch (142:11): [True: 7, False: 251]
  ------------------
  143|    258|                             sizeof(int32_t) * num_values)) {
  144|      7|        return false;
  145|      7|      }
  146|  7.11k|    } else {
  147|  7.11k|      if (portable_attribute()->buffer()->data_size() <
  ------------------
  |  Branch (147:11): [True: 35, False: 7.08k]
  ------------------
  148|  7.11k|          num_bytes * num_values) {
  149|     35|        return false;
  150|     35|      }
  151|  7.08k|      if (in_buffer->remaining_size() <
  ------------------
  |  Branch (151:11): [True: 34, False: 7.04k]
  ------------------
  152|  7.08k|          static_cast<int64_t>(num_bytes) * static_cast<int64_t>(num_values)) {
  153|     34|        return false;
  154|     34|      }
  155|  2.34G|      for (size_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (155:26): [True: 2.34G, False: 7.04k]
  ------------------
  156|  2.34G|        if (!in_buffer->Decode(portable_attribute_data + i, num_bytes)) {
  ------------------
  |  Branch (156:13): [True: 0, False: 2.34G]
  ------------------
  157|      0|          return false;
  158|      0|        }
  159|  2.34G|      }
  160|  7.04k|    }
  161|  7.37k|  }
  162|       |
  163|  7.63k|  if (num_values > 0 && (prediction_scheme_ == nullptr ||
  ------------------
  |  Branch (163:7): [True: 7.63k, False: 0]
  |  Branch (163:26): [True: 2.57k, False: 5.05k]
  ------------------
  164|  6.65k|                         !prediction_scheme_->AreCorrectionsPositive())) {
  ------------------
  |  Branch (164:26): [True: 4.07k, False: 983]
  ------------------
  165|       |    // Convert the values back to the original signed format.
  166|  6.65k|    ConvertSymbolsToSignedInts(
  167|  6.65k|        reinterpret_cast<const uint32_t *>(portable_attribute_data),
  168|  6.65k|        static_cast<int>(num_values), portable_attribute_data);
  169|  6.65k|  }
  170|       |
  171|       |  // If the data was encoded with a prediction scheme, we must revert it.
  172|  7.63k|  if (prediction_scheme_) {
  ------------------
  |  Branch (172:7): [True: 5.05k, False: 2.57k]
  ------------------
  173|  5.05k|    if (!prediction_scheme_->DecodePredictionData(in_buffer)) {
  ------------------
  |  Branch (173:9): [True: 662, False: 4.39k]
  ------------------
  174|    662|      return false;
  175|    662|    }
  176|       |
  177|  4.39k|    if (num_values > 0) {
  ------------------
  |  Branch (177:9): [True: 4.39k, False: 0]
  ------------------
  178|  4.39k|      if (!prediction_scheme_->ComputeOriginalValues(
  ------------------
  |  Branch (178:11): [True: 424, False: 3.97k]
  ------------------
  179|  4.39k|              portable_attribute_data, portable_attribute_data,
  180|  4.39k|              static_cast<int>(num_values), num_components, point_ids.data())) {
  181|    424|        return false;
  182|    424|      }
  183|  4.39k|    }
  184|  4.39k|  }
  185|  6.54k|  return true;
  186|  7.63k|}
_ZN5draco33SequentialIntegerAttributeDecoder11StoreValuesEj:
  188|  2.18k|bool SequentialIntegerAttributeDecoder::StoreValues(uint32_t num_values) {
  189|  2.18k|  switch (attribute()->data_type()) {
  190|    284|    case DT_UINT8:
  ------------------
  |  Branch (190:5): [True: 284, False: 1.90k]
  ------------------
  191|    284|      StoreTypedValues<uint8_t>(num_values);
  192|    284|      break;
  193|    942|    case DT_INT8:
  ------------------
  |  Branch (193:5): [True: 942, False: 1.24k]
  ------------------
  194|    942|      StoreTypedValues<int8_t>(num_values);
  195|    942|      break;
  196|    147|    case DT_UINT16:
  ------------------
  |  Branch (196:5): [True: 147, False: 2.03k]
  ------------------
  197|    147|      StoreTypedValues<uint16_t>(num_values);
  198|    147|      break;
  199|    330|    case DT_INT16:
  ------------------
  |  Branch (199:5): [True: 330, False: 1.85k]
  ------------------
  200|    330|      StoreTypedValues<int16_t>(num_values);
  201|    330|      break;
  202|    215|    case DT_UINT32:
  ------------------
  |  Branch (202:5): [True: 215, False: 1.96k]
  ------------------
  203|    215|      StoreTypedValues<uint32_t>(num_values);
  204|    215|      break;
  205|     83|    case DT_INT32:
  ------------------
  |  Branch (205:5): [True: 83, False: 2.10k]
  ------------------
  206|     83|      StoreTypedValues<int32_t>(num_values);
  207|     83|      break;
  208|    183|    default:
  ------------------
  |  Branch (208:5): [True: 183, False: 2.00k]
  ------------------
  209|    183|      return false;
  210|  2.18k|  }
  211|  2.00k|  return true;
  212|  2.18k|}
_ZN5draco33SequentialIntegerAttributeDecoder24PreparePortableAttributeEii:
  236|  7.99k|    int num_entries, int num_components) {
  237|  7.99k|  GeometryAttribute ga;
  238|  7.99k|  ga.Init(attribute()->attribute_type(), nullptr, num_components, DT_INT32,
  239|  7.99k|          false, num_components * DataTypeLength(DT_INT32), 0);
  240|  7.99k|  std::unique_ptr<PointAttribute> port_att(new PointAttribute(ga));
  241|  7.99k|  port_att->SetIdentityMapping();
  242|  7.99k|  port_att->Reset(num_entries);
  243|  7.99k|  port_att->set_unique_id(attribute()->unique_id());
  244|  7.99k|  SetPortableAttribute(std::move(port_att));
  245|  7.99k|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIhEEvj:
  215|    284|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    284|  const int num_components = attribute()->num_components();
  217|    284|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    284|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    284|      new AttributeTypeT[num_components]);
  220|    284|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    284|  int val_id = 0;
  222|    284|  int out_byte_pos = 0;
  223|  69.1M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 69.1M, False: 284]
  ------------------
  224|   397M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 328M, False: 69.1M]
  ------------------
  225|   328M|      const AttributeTypeT value =
  226|   328M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|   328M|      att_val[c] = value;
  228|   328M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|  69.1M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|  69.1M|    out_byte_pos += entry_size;
  232|  69.1M|  }
  233|    284|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIaEEvj:
  215|    942|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    942|  const int num_components = attribute()->num_components();
  217|    942|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    942|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    942|      new AttributeTypeT[num_components]);
  220|    942|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    942|  int val_id = 0;
  222|    942|  int out_byte_pos = 0;
  223|  77.0M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 77.0M, False: 942]
  ------------------
  224|   332M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 254M, False: 77.0M]
  ------------------
  225|   254M|      const AttributeTypeT value =
  226|   254M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|   254M|      att_val[c] = value;
  228|   254M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|  77.0M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|  77.0M|    out_byte_pos += entry_size;
  232|  77.0M|  }
  233|    942|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesItEEvj:
  215|    147|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    147|  const int num_components = attribute()->num_components();
  217|    147|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    147|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    147|      new AttributeTypeT[num_components]);
  220|    147|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    147|  int val_id = 0;
  222|    147|  int out_byte_pos = 0;
  223|  51.0M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 51.0M, False: 147]
  ------------------
  224|   293M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 242M, False: 51.0M]
  ------------------
  225|   242M|      const AttributeTypeT value =
  226|   242M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|   242M|      att_val[c] = value;
  228|   242M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|  51.0M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|  51.0M|    out_byte_pos += entry_size;
  232|  51.0M|  }
  233|    147|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIsEEvj:
  215|    330|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    330|  const int num_components = attribute()->num_components();
  217|    330|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    330|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    330|      new AttributeTypeT[num_components]);
  220|    330|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    330|  int val_id = 0;
  222|    330|  int out_byte_pos = 0;
  223|  3.30M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 3.30M, False: 330]
  ------------------
  224|   237M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 234M, False: 3.30M]
  ------------------
  225|   234M|      const AttributeTypeT value =
  226|   234M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|   234M|      att_val[c] = value;
  228|   234M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|  3.30M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|  3.30M|    out_byte_pos += entry_size;
  232|  3.30M|  }
  233|    330|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIjEEvj:
  215|    215|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|    215|  const int num_components = attribute()->num_components();
  217|    215|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|    215|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|    215|      new AttributeTypeT[num_components]);
  220|    215|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|    215|  int val_id = 0;
  222|    215|  int out_byte_pos = 0;
  223|  50.6M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 50.6M, False: 215]
  ------------------
  224|   172M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 121M, False: 50.6M]
  ------------------
  225|   121M|      const AttributeTypeT value =
  226|   121M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|   121M|      att_val[c] = value;
  228|   121M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|  50.6M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|  50.6M|    out_byte_pos += entry_size;
  232|  50.6M|  }
  233|    215|}
_ZN5draco33SequentialIntegerAttributeDecoder16StoreTypedValuesIiEEvj:
  215|     83|void SequentialIntegerAttributeDecoder::StoreTypedValues(uint32_t num_values) {
  216|     83|  const int num_components = attribute()->num_components();
  217|     83|  const int entry_size = sizeof(AttributeTypeT) * num_components;
  218|     83|  const std::unique_ptr<AttributeTypeT[]> att_val(
  219|     83|      new AttributeTypeT[num_components]);
  220|     83|  const int32_t *const portable_attribute_data = GetPortableAttributeData();
  221|     83|  int val_id = 0;
  222|     83|  int out_byte_pos = 0;
  223|  56.5M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (223:24): [True: 56.5M, False: 83]
  ------------------
  224|   580M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (224:21): [True: 524M, False: 56.5M]
  ------------------
  225|   524M|      const AttributeTypeT value =
  226|   524M|          static_cast<AttributeTypeT>(portable_attribute_data[val_id++]);
  227|   524M|      att_val[c] = value;
  228|   524M|    }
  229|       |    // Store the integer value into the attribute buffer.
  230|  56.5M|    attribute()->buffer()->Write(out_byte_pos, att_val.get(), entry_size);
  231|  56.5M|    out_byte_pos += entry_size;
  232|  56.5M|  }
  233|     83|}

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

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

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

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

_ZN5draco16DirectBitDecoderC2Ev:
   19|  6.69k|DirectBitDecoder::DirectBitDecoder() : pos_(bits_.end()), num_used_bits_(0) {}
_ZN5draco16DirectBitDecoderD2Ev:
   21|  6.69k|DirectBitDecoder::~DirectBitDecoder() { Clear(); }
_ZN5draco16DirectBitDecoder13StartDecodingEPNS_13DecoderBufferE:
   23|  3.31k|bool DirectBitDecoder::StartDecoding(DecoderBuffer *source_buffer) {
   24|  3.31k|  Clear();
   25|  3.31k|  uint32_t size_in_bytes;
   26|  3.31k|  if (!source_buffer->Decode(&size_in_bytes)) {
  ------------------
  |  Branch (26:7): [True: 36, False: 3.27k]
  ------------------
   27|     36|    return false;
   28|     36|  }
   29|       |
   30|       |  // Check that size_in_bytes is > 0 and a multiple of 4 as the encoder always
   31|       |  // encodes 32 bit elements.
   32|  3.27k|  if (size_in_bytes == 0 || size_in_bytes & 0x3) {
  ------------------
  |  Branch (32:7): [True: 8, False: 3.26k]
  |  Branch (32:29): [True: 80, False: 3.18k]
  ------------------
   33|     88|    return false;
   34|     88|  }
   35|  3.18k|  if (size_in_bytes > source_buffer->remaining_size()) {
  ------------------
  |  Branch (35:7): [True: 88, False: 3.10k]
  ------------------
   36|     88|    return false;
   37|     88|  }
   38|  3.10k|  const uint32_t num_32bit_elements = size_in_bytes / 4;
   39|  3.10k|  bits_.resize(num_32bit_elements);
   40|  3.10k|  if (!source_buffer->Decode(bits_.data(), size_in_bytes)) {
  ------------------
  |  Branch (40:7): [True: 0, False: 3.10k]
  ------------------
   41|      0|    return false;
   42|      0|  }
   43|  3.10k|  pos_ = bits_.begin();
   44|  3.10k|  num_used_bits_ = 0;
   45|  3.10k|  return true;
   46|  3.10k|}
_ZN5draco16DirectBitDecoder5ClearEv:
   48|  10.0k|void DirectBitDecoder::Clear() {
   49|  10.0k|  bits_.clear();
   50|  10.0k|  num_used_bits_ = 0;
   51|  10.0k|  pos_ = bits_.end();
   52|  10.0k|}

_ZN5draco16DirectBitDecoder28DecodeLeastSignificantBits32EiPj:
   50|  7.26M|  bool DecodeLeastSignificantBits32(int nbits, uint32_t *value) {
   51|  7.26M|    DRACO_DCHECK_EQ(true, nbits <= 32);
   52|  7.26M|    DRACO_DCHECK_EQ(true, nbits > 0);
   53|  7.26M|    const int remaining = 32 - num_used_bits_;
   54|  7.26M|    if (nbits <= remaining) {
  ------------------
  |  Branch (54:9): [True: 6.88M, False: 376k]
  ------------------
   55|  6.88M|      if (pos_ == bits_.end()) {
  ------------------
  |  Branch (55:11): [True: 6.41M, False: 472k]
  ------------------
   56|  6.41M|        return false;
   57|  6.41M|      }
   58|   472k|      *value = (*pos_ << num_used_bits_) >> (32 - nbits);
   59|   472k|      num_used_bits_ += nbits;
   60|   472k|      if (num_used_bits_ == 32) {
  ------------------
  |  Branch (60:11): [True: 15.7k, False: 456k]
  ------------------
   61|  15.7k|        ++pos_;
   62|  15.7k|        num_used_bits_ = 0;
   63|  15.7k|      }
   64|   472k|    } else {
   65|   376k|      if (pos_ + 1 == bits_.end()) {
  ------------------
  |  Branch (65:11): [True: 364k, False: 11.9k]
  ------------------
   66|   364k|        return false;
   67|   364k|      }
   68|  11.9k|      const uint32_t value_l = ((*pos_) << num_used_bits_);
   69|  11.9k|      num_used_bits_ = nbits - remaining;
   70|  11.9k|      ++pos_;
   71|  11.9k|      const uint32_t value_r = (*pos_) >> (32 - num_used_bits_);
   72|  11.9k|      *value = (value_l >> (32 - num_used_bits_ - remaining)) | value_r;
   73|  11.9k|    }
   74|   484k|    return true;
   75|  7.26M|  }
_ZN5draco16DirectBitDecoder13DecodeNextBitEv:
   34|  8.45M|  bool DecodeNextBit() {
   35|  8.45M|    const uint32_t selector = 1 << (31 - num_used_bits_);
   36|  8.45M|    if (pos_ == bits_.end()) {
  ------------------
  |  Branch (36:9): [True: 8.08M, False: 374k]
  ------------------
   37|  8.08M|      return false;
   38|  8.08M|    }
   39|   374k|    const bool bit = *pos_ & selector;
   40|   374k|    ++num_used_bits_;
   41|   374k|    if (num_used_bits_ == 32) {
  ------------------
  |  Branch (41:9): [True: 11.4k, False: 362k]
  ------------------
   42|  11.4k|      ++pos_;
   43|  11.4k|      num_used_bits_ = 0;
   44|  11.4k|    }
   45|   374k|    return bit;
   46|  8.45M|  }
_ZN5draco16DirectBitDecoder11EndDecodingEv:
   77|    594|  void EndDecoding() {}

_ZN5draco18FoldedBit32DecoderINS_14RAnsBitDecoderEED2Ev:
   30|    670|  ~FoldedBit32Decoder() {}
_ZN5draco18FoldedBit32DecoderINS_14RAnsBitDecoderEE13StartDecodingEPNS_13DecoderBufferE:
   33|    442|  bool StartDecoding(DecoderBuffer *source_buffer) {
   34|  10.7k|    for (int i = 0; i < 32; i++) {
  ------------------
  |  Branch (34:21): [True: 10.4k, False: 296]
  ------------------
   35|  10.4k|      if (!folded_number_decoders_[i].StartDecoding(source_buffer)) {
  ------------------
  |  Branch (35:11): [True: 146, False: 10.2k]
  ------------------
   36|    146|        return false;
   37|    146|      }
   38|  10.4k|    }
   39|    296|    return bit_decoder_.StartDecoding(source_buffer);
   40|    442|  }
_ZN5draco18FoldedBit32DecoderINS_14RAnsBitDecoderEE28DecodeLeastSignificantBits32EiPj:
   47|  3.68M|  void DecodeLeastSignificantBits32(int nbits, uint32_t *value) {
   48|  3.68M|    uint32_t result = 0;
   49|  23.1M|    for (int i = 0; i < nbits; ++i) {
  ------------------
  |  Branch (49:21): [True: 19.5M, False: 3.68M]
  ------------------
   50|  19.5M|      const bool bit = folded_number_decoders_[i].DecodeNextBit();
   51|  19.5M|      result = (result << 1) + bit;
   52|  19.5M|    }
   53|  3.68M|    *value = result;
   54|  3.68M|  }
_ZN5draco18FoldedBit32DecoderINS_14RAnsBitDecoderEE11EndDecodingEv:
   56|     88|  void EndDecoding() {
   57|  2.90k|    for (int i = 0; i < 32; i++) {
  ------------------
  |  Branch (57:21): [True: 2.81k, False: 88]
  ------------------
   58|  2.81k|      folded_number_decoders_[i].EndDecoding();
   59|  2.81k|    }
   60|     88|    bit_decoder_.EndDecoding();
   61|     88|  }
_ZN5draco18FoldedBit32DecoderINS_14RAnsBitDecoderEEC2Ev:
   29|    670|  FoldedBit32Decoder() {}

_ZN5draco14RAnsBitDecoderC2Ev:
   23|  48.0k|RAnsBitDecoder::RAnsBitDecoder() : prob_zero_(0) {}
_ZN5draco14RAnsBitDecoderD2Ev:
   25|  48.0k|RAnsBitDecoder::~RAnsBitDecoder() { Clear(); }
_ZN5draco14RAnsBitDecoder13StartDecodingEPNS_13DecoderBufferE:
   27|  30.2k|bool RAnsBitDecoder::StartDecoding(DecoderBuffer *source_buffer) {
   28|  30.2k|  Clear();
   29|       |
   30|  30.2k|  if (!source_buffer->Decode(&prob_zero_)) {
  ------------------
  |  Branch (30:7): [True: 82, False: 30.1k]
  ------------------
   31|     82|    return false;
   32|     82|  }
   33|       |
   34|  30.1k|  uint32_t size_in_bytes;
   35|  30.1k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   36|  30.1k|  if (source_buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  30.1k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (36:7): [True: 1.20k, False: 28.9k]
  ------------------
   37|  1.20k|    if (!source_buffer->Decode(&size_in_bytes)) {
  ------------------
  |  Branch (37:9): [True: 21, False: 1.18k]
  ------------------
   38|     21|      return false;
   39|     21|    }
   40|       |
   41|  1.20k|  } else
   42|  28.9k|#endif
   43|  28.9k|  {
   44|  28.9k|    if (!DecodeVarint(&size_in_bytes, source_buffer)) {
  ------------------
  |  Branch (44:9): [True: 49, False: 28.9k]
  ------------------
   45|     49|      return false;
   46|     49|    }
   47|  28.9k|  }
   48|       |
   49|  30.1k|  if (size_in_bytes > source_buffer->remaining_size()) {
  ------------------
  |  Branch (49:7): [True: 217, False: 29.8k]
  ------------------
   50|    217|    return false;
   51|    217|  }
   52|       |
   53|  29.8k|  if (ans_read_init(&ans_decoder_,
  ------------------
  |  Branch (53:7): [True: 105, False: 29.7k]
  ------------------
   54|  29.8k|                    reinterpret_cast<uint8_t *>(
   55|  29.8k|                        const_cast<char *>(source_buffer->data_head())),
   56|  29.8k|                    size_in_bytes) != 0) {
   57|    105|    return false;
   58|    105|  }
   59|  29.7k|  source_buffer->Advance(size_in_bytes);
   60|  29.7k|  return true;
   61|  29.8k|}
_ZN5draco14RAnsBitDecoder13DecodeNextBitEv:
   63|  11.6G|bool RAnsBitDecoder::DecodeNextBit() {
   64|  11.6G|  const uint8_t bit = rabs_read(&ans_decoder_, prob_zero_);
  ------------------
  |  |  246|  11.6G|#define rabs_read rabs_desc_read
  ------------------
   65|  11.6G|  return bit > 0;
   66|  11.6G|}
_ZN5draco14RAnsBitDecoder28DecodeLeastSignificantBits32EiPj:
   68|  2.20M|void RAnsBitDecoder::DecodeLeastSignificantBits32(int nbits, uint32_t *value) {
   69|  2.20M|  DRACO_DCHECK_EQ(true, nbits <= 32);
   70|  2.20M|  DRACO_DCHECK_EQ(true, nbits > 0);
   71|       |
   72|  2.20M|  uint32_t result = 0;
   73|  8.92M|  while (nbits) {
  ------------------
  |  Branch (73:10): [True: 6.72M, False: 2.20M]
  ------------------
   74|  6.72M|    result = (result << 1) + DecodeNextBit();
   75|  6.72M|    --nbits;
   76|  6.72M|  }
   77|  2.20M|  *value = result;
   78|  2.20M|}
_ZN5draco14RAnsBitDecoder5ClearEv:
   80|  78.3k|void RAnsBitDecoder::Clear() { ans_read_end(&ans_decoder_); }

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

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

_ZN5draco23CreatePointCloudDecoderEa:
   33|  2.65k|    int8_t method) {
   34|  2.65k|  if (method == POINT_CLOUD_SEQUENTIAL_ENCODING) {
  ------------------
  |  Branch (34:7): [True: 279, False: 2.37k]
  ------------------
   35|    279|    return std::unique_ptr<PointCloudDecoder>(
   36|    279|        new PointCloudSequentialDecoder());
   37|  2.37k|  } else if (method == POINT_CLOUD_KD_TREE_ENCODING) {
  ------------------
  |  Branch (37:14): [True: 2.36k, False: 11]
  ------------------
   38|  2.36k|    return std::unique_ptr<PointCloudDecoder>(new PointCloudKdTreeDecoder());
   39|  2.36k|  }
   40|     11|  return Status(Status::DRACO_ERROR, "Unsupported encoding method.");
   41|  2.65k|}
_ZN5draco17CreateMeshDecoderEh:
   45|  13.7k|StatusOr<std::unique_ptr<MeshDecoder>> CreateMeshDecoder(uint8_t method) {
   46|  13.7k|  if (method == MESH_SEQUENTIAL_ENCODING) {
  ------------------
  |  Branch (46:7): [True: 4.75k, False: 8.94k]
  ------------------
   47|  4.75k|    return std::unique_ptr<MeshDecoder>(new MeshSequentialDecoder());
   48|  8.94k|  } else if (method == MESH_EDGEBREAKER_ENCODING) {
  ------------------
  |  Branch (48:14): [True: 8.93k, False: 9]
  ------------------
   49|  8.93k|    return std::unique_ptr<MeshDecoder>(new MeshEdgebreakerDecoder());
   50|  8.93k|  }
   51|      9|  return Status(Status::DRACO_ERROR, "Unsupported encoding method.");
   52|  13.7k|}
_ZN5draco7Decoder22GetEncodedGeometryTypeEPNS_13DecoderBufferE:
   56|  16.4k|    DecoderBuffer *in_buffer) {
   57|  16.4k|  DecoderBuffer temp_buffer(*in_buffer);
   58|  16.4k|  DracoHeader header;
   59|  16.4k|  DRACO_RETURN_IF_ERROR(PointCloudDecoder::DecodeHeader(&temp_buffer, &header));
  ------------------
  |  |   74|  16.4k|  {                                                   \
  |  |   75|  16.4k|    const draco::Status _local_status = (expression); \
  |  |   76|  16.4k|    if (!_local_status.ok()) {                        \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 49, False: 16.3k]
  |  |  ------------------
  |  |   77|     49|      return _local_status;                           \
  |  |   78|     49|    }                                                 \
  |  |   79|  16.4k|  }
  ------------------
   60|  16.3k|  if (header.encoder_type >= NUM_ENCODED_GEOMETRY_TYPES) {
  ------------------
  |  Branch (60:7): [True: 7, False: 16.3k]
  ------------------
   61|      7|    return Status(Status::DRACO_ERROR, "Unsupported geometry type.");
   62|      7|  }
   63|  16.3k|  return static_cast<EncodedGeometryType>(header.encoder_type);
   64|  16.3k|}
_ZN5draco7Decoder26DecodePointCloudFromBufferEPNS_13DecoderBufferE:
   67|  16.4k|    DecoderBuffer *in_buffer) {
   68|  16.4k|  DRACO_ASSIGN_OR_RETURN(EncodedGeometryType type,
  ------------------
  |  |   66|  16.4k|  DRACO_ASSIGN_OR_RETURN_IMPL_(DRACO_MACROS_IMPL_CONCAT_(_statusor, __LINE__), \
  |  |  ------------------
  |  |  |  |   71|  16.4k|  auto statusor = (expression);                                             \
  |  |  |  |   72|  16.4k|  if (!statusor.ok()) {                                                     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (72:7): [True: 56, False: 16.3k]
  |  |  |  |  ------------------
  |  |  |  |   73|     56|    auto _status = std::move(statusor.status());                            \
  |  |  |  |   74|     56|    (void)_status; /* error_expression may not use it */                    \
  |  |  |  |   75|     56|    return error_expr;                                                      \
  |  |  |  |   76|     56|  }                                                                         \
  |  |  |  |   77|  16.4k|  lhs = std::move(statusor).value();
  |  |  ------------------
  |  |   67|  16.3k|                               lhs, expression, _status)
  ------------------
   69|  16.3k|                         GetEncodedGeometryType(in_buffer))
   70|  16.3k|  if (type == POINT_CLOUD) {
  ------------------
  |  Branch (70:7): [True: 2.65k, False: 13.7k]
  ------------------
   71|  2.65k|#ifdef DRACO_POINT_CLOUD_COMPRESSION_SUPPORTED
   72|  2.65k|    std::unique_ptr<PointCloud> point_cloud(new PointCloud());
   73|  2.65k|    DRACO_RETURN_IF_ERROR(DecodeBufferToGeometry(in_buffer, point_cloud.get()))
  ------------------
  |  |   74|  2.65k|  {                                                   \
  |  |   75|  2.65k|    const draco::Status _local_status = (expression); \
  |  |   76|  2.65k|    if (!_local_status.ok()) {                        \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 2.53k, False: 125]
  |  |  ------------------
  |  |   77|  2.53k|      return _local_status;                           \
  |  |   78|  2.53k|    }                                                 \
  |  |   79|  2.65k|  }
  ------------------
   74|    125|    return std::move(point_cloud);
   75|  2.65k|#endif
   76|  13.7k|  } else if (type == TRIANGULAR_MESH) {
  ------------------
  |  Branch (76:14): [True: 13.7k, False: 0]
  ------------------
   77|  13.7k|#ifdef DRACO_MESH_COMPRESSION_SUPPORTED
   78|  13.7k|    std::unique_ptr<Mesh> mesh(new Mesh());
   79|  13.7k|    DRACO_RETURN_IF_ERROR(DecodeBufferToGeometry(in_buffer, mesh.get()))
  ------------------
  |  |   74|  13.7k|  {                                                   \
  |  |   75|  13.7k|    const draco::Status _local_status = (expression); \
  |  |   76|  13.7k|    if (!_local_status.ok()) {                        \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 12.7k, False: 996]
  |  |  ------------------
  |  |   77|  12.7k|      return _local_status;                           \
  |  |   78|  12.7k|    }                                                 \
  |  |   79|  13.7k|  }
  ------------------
   80|    996|    return static_cast<std::unique_ptr<PointCloud>>(std::move(mesh));
   81|  13.7k|#endif
   82|  13.7k|  }
   83|      0|  return Status(Status::DRACO_ERROR, "Unsupported geometry type.");
   84|  16.3k|}
_ZN5draco7Decoder22DecodeBufferToGeometryEPNS_13DecoderBufferEPNS_10PointCloudE:
   94|  2.65k|                                       PointCloud *out_geometry) {
   95|  2.65k|#ifdef DRACO_POINT_CLOUD_COMPRESSION_SUPPORTED
   96|  2.65k|  DecoderBuffer temp_buffer(*in_buffer);
   97|  2.65k|  DracoHeader header;
   98|  2.65k|  DRACO_RETURN_IF_ERROR(PointCloudDecoder::DecodeHeader(&temp_buffer, &header))
  ------------------
  |  |   74|  2.65k|  {                                                   \
  |  |   75|  2.65k|    const draco::Status _local_status = (expression); \
  |  |   76|  2.65k|    if (!_local_status.ok()) {                        \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 0, False: 2.65k]
  |  |  ------------------
  |  |   77|      0|      return _local_status;                           \
  |  |   78|      0|    }                                                 \
  |  |   79|  2.65k|  }
  ------------------
   99|  2.65k|  if (header.encoder_type != POINT_CLOUD) {
  ------------------
  |  Branch (99:7): [True: 0, False: 2.65k]
  ------------------
  100|      0|    return Status(Status::DRACO_ERROR, "Input is not a point cloud.");
  101|      0|  }
  102|  5.30k|  DRACO_ASSIGN_OR_RETURN(std::unique_ptr<PointCloudDecoder> decoder,
  ------------------
  |  |   66|  2.65k|  DRACO_ASSIGN_OR_RETURN_IMPL_(DRACO_MACROS_IMPL_CONCAT_(_statusor, __LINE__), \
  |  |  ------------------
  |  |  |  |   71|  2.65k|  auto statusor = (expression);                                             \
  |  |  |  |   72|  2.65k|  if (!statusor.ok()) {                                                     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (72:7): [True: 11, False: 2.64k]
  |  |  |  |  ------------------
  |  |  |  |   73|     11|    auto _status = std::move(statusor.status());                            \
  |  |  |  |   74|     11|    (void)_status; /* error_expression may not use it */                    \
  |  |  |  |   75|     11|    return error_expr;                                                      \
  |  |  |  |   76|     11|  }                                                                         \
  |  |  |  |   77|  2.65k|  lhs = std::move(statusor).value();
  |  |  ------------------
  |  |   67|  2.64k|                               lhs, expression, _status)
  ------------------
  103|  5.30k|                         CreatePointCloudDecoder(header.encoder_method))
  104|       |
  105|  5.30k|  DRACO_RETURN_IF_ERROR(decoder->Decode(options_, in_buffer, out_geometry))
  ------------------
  |  |   74|  2.64k|  {                                                   \
  |  |   75|  2.64k|    const draco::Status _local_status = (expression); \
  |  |   76|  2.64k|    if (!_local_status.ok()) {                        \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 2.52k, False: 125]
  |  |  ------------------
  |  |   77|  2.52k|      return _local_status;                           \
  |  |   78|  2.52k|    }                                                 \
  |  |   79|  2.64k|  }
  ------------------
  106|    125|  return OkStatus();
  107|       |#else
  108|       |  return Status(Status::DRACO_ERROR, "Unsupported geometry type.");
  109|       |#endif
  110|  5.30k|}
_ZN5draco7Decoder22DecodeBufferToGeometryEPNS_13DecoderBufferEPNS_4MeshE:
  113|  13.7k|                                       Mesh *out_geometry) {
  114|  13.7k|#ifdef DRACO_MESH_COMPRESSION_SUPPORTED
  115|  13.7k|  DecoderBuffer temp_buffer(*in_buffer);
  116|  13.7k|  DracoHeader header;
  117|  13.7k|  DRACO_RETURN_IF_ERROR(PointCloudDecoder::DecodeHeader(&temp_buffer, &header))
  ------------------
  |  |   74|  13.7k|  {                                                   \
  |  |   75|  13.7k|    const draco::Status _local_status = (expression); \
  |  |   76|  13.7k|    if (!_local_status.ok()) {                        \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 0, False: 13.7k]
  |  |  ------------------
  |  |   77|      0|      return _local_status;                           \
  |  |   78|      0|    }                                                 \
  |  |   79|  13.7k|  }
  ------------------
  118|  13.7k|  if (header.encoder_type != TRIANGULAR_MESH) {
  ------------------
  |  Branch (118:7): [True: 0, False: 13.7k]
  ------------------
  119|      0|    return Status(Status::DRACO_ERROR, "Input is not a mesh.");
  120|      0|  }
  121|  27.3k|  DRACO_ASSIGN_OR_RETURN(std::unique_ptr<MeshDecoder> decoder,
  ------------------
  |  |   66|  13.7k|  DRACO_ASSIGN_OR_RETURN_IMPL_(DRACO_MACROS_IMPL_CONCAT_(_statusor, __LINE__), \
  |  |  ------------------
  |  |  |  |   71|  13.7k|  auto statusor = (expression);                                             \
  |  |  |  |   72|  13.7k|  if (!statusor.ok()) {                                                     \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (72:7): [True: 9, False: 13.6k]
  |  |  |  |  ------------------
  |  |  |  |   73|      9|    auto _status = std::move(statusor.status());                            \
  |  |  |  |   74|      9|    (void)_status; /* error_expression may not use it */                    \
  |  |  |  |   75|      9|    return error_expr;                                                      \
  |  |  |  |   76|      9|  }                                                                         \
  |  |  |  |   77|  13.7k|  lhs = std::move(statusor).value();
  |  |  ------------------
  |  |   67|  13.6k|                               lhs, expression, _status)
  ------------------
  122|  27.3k|                         CreateMeshDecoder(header.encoder_method))
  123|       |
  124|  27.3k|  DRACO_RETURN_IF_ERROR(decoder->Decode(options_, in_buffer, out_geometry))
  ------------------
  |  |   74|  13.6k|  {                                                   \
  |  |   75|  13.6k|    const draco::Status _local_status = (expression); \
  |  |   76|  13.6k|    if (!_local_status.ok()) {                        \
  |  |  ------------------
  |  |  |  Branch (76:9): [True: 12.6k, False: 996]
  |  |  ------------------
  |  |   77|  12.6k|      return _local_status;                           \
  |  |   78|  12.6k|    }                                                 \
  |  |   79|  13.6k|  }
  ------------------
  125|    996|  return OkStatus();
  126|       |#else
  127|       |  return Status(Status::DRACO_ERROR, "Unsupported geometry type.");
  128|       |#endif
  129|  27.3k|}

_ZN5draco10AnsDecoderC2Ev:
   56|  57.1k|  AnsDecoder() : buf(nullptr), buf_offset(0), state(0) {}
rans_bit_decoder.cc:_ZN5dracoL13ans_read_initEPNS_10AnsDecoderEPKhi:
  300|  29.8k|                                const uint8_t *const buf, int offset) {
  301|  29.8k|  unsigned x;
  302|  29.8k|  if (offset < 1) {
  ------------------
  |  Branch (302:7): [True: 62, False: 29.8k]
  ------------------
  303|     62|    return 1;
  304|     62|  }
  305|  29.8k|  ans->buf = buf;
  306|  29.8k|  x = buf[offset - 1] >> 6;
  307|  29.8k|  if (x == 0) {
  ------------------
  |  Branch (307:7): [True: 26.5k, False: 3.25k]
  ------------------
  308|  26.5k|    ans->buf_offset = offset - 1;
  309|  26.5k|    ans->state = buf[offset - 1] & 0x3F;
  310|  26.5k|  } else if (x == 1) {
  ------------------
  |  Branch (310:14): [True: 2.90k, False: 355]
  ------------------
  311|  2.90k|    if (offset < 2) {
  ------------------
  |  Branch (311:9): [True: 5, False: 2.89k]
  ------------------
  312|      5|      return 1;
  313|      5|    }
  314|  2.89k|    ans->buf_offset = offset - 2;
  315|  2.89k|    ans->state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  316|  2.89k|  } else if (x == 2) {
  ------------------
  |  Branch (316:14): [True: 337, False: 18]
  ------------------
  317|    337|    if (offset < 3) {
  ------------------
  |  Branch (317:9): [True: 7, False: 330]
  ------------------
  318|      7|      return 1;
  319|      7|    }
  320|    330|    ans->buf_offset = offset - 3;
  321|    330|    ans->state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  322|    330|  } else {
  323|     18|    return 1;
  324|     18|  }
  325|  29.8k|  ans->state += DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  29.8k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  326|  29.8k|  if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   64|  29.8k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
                if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  29.8k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (326:7): [True: 13, False: 29.7k]
  ------------------
  327|     13|    return 1;
  328|     13|  }
  329|  29.7k|  return 0;
  330|  29.8k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|  2.89k|static uint32_t mem_get_le16(const void *vmem) {
   68|  2.89k|  uint32_t val;
   69|  2.89k|  const uint8_t *mem = (const uint8_t *)vmem;
   70|       |
   71|  2.89k|  val = mem[1] << 8;
   72|  2.89k|  val |= mem[0];
   73|  2.89k|  return val;
   74|  2.89k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    330|static uint32_t mem_get_le24(const void *vmem) {
   77|    330|  uint32_t val;
   78|    330|  const uint8_t *mem = (const uint8_t *)vmem;
   79|       |
   80|    330|  val = mem[2] << 16;
   81|    330|  val |= mem[1] << 8;
   82|    330|  val |= mem[0];
   83|    330|  return val;
   84|    330|}
rans_bit_decoder.cc:_ZN5dracoL14rabs_desc_readEPNS_10AnsDecoderEh:
  166|  11.6G|static inline int rabs_desc_read(struct AnsDecoder *ans, AnsP8 p0) {
  167|  11.6G|  int val;
  168|       |#if DRACO_ANS_IMPL1
  169|       |  unsigned l_s;
  170|       |#else
  171|  11.6G|  unsigned quot, rem, x, xn;
  172|  11.6G|#endif
  173|  11.6G|  const AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
  ------------------
  |  |   63|  11.6G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  174|  11.6G|  if (ans->state < DRACO_ANS_L_BASE && ans->buf_offset > 0) {
  ------------------
  |  |   64|  23.2G|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  |  Branch (174:7): [True: 10.6G, False: 981M]
  |  Branch (174:40): [True: 91.7k, False: 10.6G]
  ------------------
  175|  91.7k|    ans->state = ans->state * DRACO_ANS_IO_BASE + ans->buf[--ans->buf_offset];
  ------------------
  |  |   65|  91.7k|#define DRACO_ANS_IO_BASE 256
  ------------------
  176|  91.7k|  }
  177|       |#if DRACO_ANS_IMPL1
  178|       |  val = ans->state % DRACO_ANS_P8_PRECISION < p;
  179|       |  l_s = val ? p : p0;
  180|       |  ans->state = (ans->state / DRACO_ANS_P8_PRECISION) * l_s +
  181|       |               ans->state % DRACO_ANS_P8_PRECISION - (!val * p);
  182|       |#else
  183|  11.6G|  x = ans->state;
  184|  11.6G|  quot = x / DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|  11.6G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  185|  11.6G|  rem = x % DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|  11.6G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  186|  11.6G|  xn = quot * p;
  187|  11.6G|  val = rem < p;
  188|  11.6G|  if (UNPREDICTABLE(val)) {
  ------------------
  |  |  165|  23.2G|#define UNPREDICTABLE(x) x
  |  |  ------------------
  |  |  |  Branch (165:26): [True: 10.6G, False: 976M]
  |  |  ------------------
  ------------------
  189|  10.6G|    ans->state = xn + rem;
  190|  10.6G|  } else {
  191|       |    // ans->state = quot * p0 + rem - p;
  192|   976M|    ans->state = x - xn - p;
  193|   976M|  }
  194|  11.6G|#endif
  195|  11.6G|  return val;
  196|  11.6G|}
rans_bit_decoder.cc:_ZN5dracoL12ans_read_endEPNS_10AnsDecoderE:
  332|  78.3k|static inline int ans_read_end(struct AnsDecoder *const ans) {
  333|  78.3k|  return ans->state == DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  78.3k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  334|  78.3k|}
_ZN5draco11RAnsDecoderILi12EEC2Ev:
  416|  4.96k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi12EE24rans_build_look_up_tableEPKjj:
  481|  2.65k|                                       uint32_t num_symbols) {
  482|  2.65k|    lut_table_.resize(rans_precision);
  483|  2.65k|    probability_table_.resize(num_symbols);
  484|  2.65k|    uint32_t cum_prob = 0;
  485|  2.65k|    uint32_t act_prob = 0;
  486|  21.8k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 19.4k, False: 2.44k]
  ------------------
  487|  19.4k|      probability_table_[i].prob = token_probs[i];
  488|  19.4k|      probability_table_[i].cum_prob = cum_prob;
  489|  19.4k|      cum_prob += token_probs[i];
  490|  19.4k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 212, False: 19.2k]
  ------------------
  491|    212|        return false;
  492|    212|      }
  493|  9.11M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 9.09M, False: 19.2k]
  ------------------
  494|  9.09M|        lut_table_[j] = i;
  495|  9.09M|      }
  496|  19.2k|      act_prob = cum_prob;
  497|  19.2k|    }
  498|  2.44k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 268, False: 2.17k]
  ------------------
  499|    268|      return false;
  500|    268|    }
  501|  2.17k|    return true;
  502|  2.44k|  }
_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: 129, False: 1.61k]
  ------------------
  424|    129|      return 1;
  425|    129|    }
  426|  1.61k|    ans_.buf = buf;
  427|  1.61k|    x = buf[offset - 1] >> 6;
  428|  1.61k|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 979, False: 632]
  ------------------
  429|    979|      ans_.buf_offset = offset - 1;
  430|    979|      ans_.state = buf[offset - 1] & 0x3F;
  431|    979|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 252, False: 380]
  ------------------
  432|    252|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 54, False: 198]
  ------------------
  433|     54|        return 1;
  434|     54|      }
  435|    198|      ans_.buf_offset = offset - 2;
  436|    198|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    380|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 265, False: 115]
  ------------------
  438|    265|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 82, False: 183]
  ------------------
  439|     82|        return 1;
  440|     82|      }
  441|    183|      ans_.buf_offset = offset - 3;
  442|    183|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    183|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 115, False: 0]
  ------------------
  444|    115|      ans_.buf_offset = offset - 4;
  445|    115|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|    115|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|  1.47k|    ans_.state += l_rans_base;
  450|  1.47k|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  1.47k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 112, False: 1.36k]
  ------------------
  451|    112|      return 1;
  452|    112|    }
  453|  1.36k|    return 0;
  454|  1.47k|  }
symbol_decoding.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|    319|static uint32_t mem_get_le16(const void *vmem) {
   68|    319|  uint32_t val;
   69|    319|  const uint8_t *mem = (const uint8_t *)vmem;
   70|       |
   71|    319|  val = mem[1] << 8;
   72|    319|  val |= mem[0];
   73|    319|  return val;
   74|    319|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    272|static uint32_t mem_get_le24(const void *vmem) {
   77|    272|  uint32_t val;
   78|    272|  const uint8_t *mem = (const uint8_t *)vmem;
   79|       |
   80|    272|  val = mem[2] << 16;
   81|    272|  val |= mem[1] << 8;
   82|    272|  val |= mem[0];
   83|    272|  return val;
   84|    272|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le32EPKv:
   86|    408|static inline uint32_t mem_get_le32(const void *vmem) {
   87|    408|  uint32_t val;
   88|    408|  const uint8_t *mem = (const uint8_t *)vmem;
   89|       |
   90|    408|  val = mem[3] << 24;
   91|    408|  val |= mem[2] << 16;
   92|    408|  val |= mem[1] << 8;
   93|    408|  val |= mem[0];
   94|    408|  return val;
   95|    408|}
_ZN5draco11RAnsDecoderILi12EE9rans_readEv:
  462|   371M|  inline int rans_read() {
  463|   371M|    unsigned rem;
  464|   371M|    unsigned quo;
  465|   371M|    struct rans_dec_sym sym;
  466|   371M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 342M, False: 29.3M]
  |  Branch (466:40): [True: 22.2k, False: 342M]
  ------------------
  467|  22.2k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  22.2k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  22.2k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|   371M|    quo = ans_.state / rans_precision;
  472|   371M|    rem = ans_.state % rans_precision;
  473|   371M|    fetch_sym(&sym, rem);
  474|   371M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   371M|    return sym.val;
  476|   371M|  }
_ZN5draco11RAnsDecoderILi12EE9fetch_symEPNS_12rans_dec_symEj:
  505|   371M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   371M|    uint32_t symbol = lut_table_[rem];
  507|   371M|    out->val = symbol;
  508|   371M|    out->prob = probability_table_[symbol].prob;
  509|   371M|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   371M|  }
_ZN5draco11RAnsDecoderILi12EE8read_endEv:
  456|  1.30k|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi13EEC2Ev:
  416|    474|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi13EE24rans_build_look_up_tableEPKjj:
  481|    291|                                       uint32_t num_symbols) {
  482|    291|    lut_table_.resize(rans_precision);
  483|    291|    probability_table_.resize(num_symbols);
  484|    291|    uint32_t cum_prob = 0;
  485|    291|    uint32_t act_prob = 0;
  486|  5.36k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 5.10k, False: 260]
  ------------------
  487|  5.10k|      probability_table_[i].prob = token_probs[i];
  488|  5.10k|      probability_table_[i].cum_prob = cum_prob;
  489|  5.10k|      cum_prob += token_probs[i];
  490|  5.10k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 31, False: 5.07k]
  ------------------
  491|     31|        return false;
  492|     31|      }
  493|  1.87M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 1.87M, False: 5.07k]
  ------------------
  494|  1.87M|        lut_table_[j] = i;
  495|  1.87M|      }
  496|  5.07k|      act_prob = cum_prob;
  497|  5.07k|    }
  498|    260|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 46, False: 214]
  ------------------
  499|     46|      return false;
  500|     46|    }
  501|    214|    return true;
  502|    260|  }
_ZN5draco11RAnsDecoderILi13EE9read_initEPKhi:
  421|    132|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    132|    unsigned x;
  423|    132|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 6, False: 126]
  ------------------
  424|      6|      return 1;
  425|      6|    }
  426|    126|    ans_.buf = buf;
  427|    126|    x = buf[offset - 1] >> 6;
  428|    126|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 63, False: 63]
  ------------------
  429|     63|      ans_.buf_offset = offset - 1;
  430|     63|      ans_.state = buf[offset - 1] & 0x3F;
  431|     63|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 25, False: 38]
  ------------------
  432|     25|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 12, False: 13]
  ------------------
  433|     12|        return 1;
  434|     12|      }
  435|     13|      ans_.buf_offset = offset - 2;
  436|     13|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     38|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 16, False: 22]
  ------------------
  438|     16|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 6, False: 10]
  ------------------
  439|      6|        return 1;
  440|      6|      }
  441|     10|      ans_.buf_offset = offset - 3;
  442|     10|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     22|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 22, False: 0]
  ------------------
  444|     22|      ans_.buf_offset = offset - 4;
  445|     22|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     22|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|    108|    ans_.state += l_rans_base;
  450|    108|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    108|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 20, False: 88]
  ------------------
  451|     20|      return 1;
  452|     20|    }
  453|     88|    return 0;
  454|    108|  }
_ZN5draco11RAnsDecoderILi13EE9rans_readEv:
  462|  5.56M|  inline int rans_read() {
  463|  5.56M|    unsigned rem;
  464|  5.56M|    unsigned quo;
  465|  5.56M|    struct rans_dec_sym sym;
  466|  5.56M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 5.53M, False: 33.0k]
  |  Branch (466:40): [True: 2.85k, False: 5.53M]
  ------------------
  467|  2.85k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  2.85k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  2.85k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|  5.56M|    quo = ans_.state / rans_precision;
  472|  5.56M|    rem = ans_.state % rans_precision;
  473|  5.56M|    fetch_sym(&sym, rem);
  474|  5.56M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  5.56M|    return sym.val;
  476|  5.56M|  }
_ZN5draco11RAnsDecoderILi13EE9fetch_symEPNS_12rans_dec_symEj:
  505|  5.56M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  5.56M|    uint32_t symbol = lut_table_[rem];
  507|  5.56M|    out->val = symbol;
  508|  5.56M|    out->prob = probability_table_[symbol].prob;
  509|  5.56M|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  5.56M|  }
_ZN5draco11RAnsDecoderILi13EE8read_endEv:
  456|     88|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi15EEC2Ev:
  416|    454|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi15EE24rans_build_look_up_tableEPKjj:
  481|    273|                                       uint32_t num_symbols) {
  482|    273|    lut_table_.resize(rans_precision);
  483|    273|    probability_table_.resize(num_symbols);
  484|    273|    uint32_t cum_prob = 0;
  485|    273|    uint32_t act_prob = 0;
  486|  12.0k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 11.8k, False: 250]
  ------------------
  487|  11.8k|      probability_table_[i].prob = token_probs[i];
  488|  11.8k|      probability_table_[i].cum_prob = cum_prob;
  489|  11.8k|      cum_prob += token_probs[i];
  490|  11.8k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 23, False: 11.8k]
  ------------------
  491|     23|        return false;
  492|     23|      }
  493|  6.87M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 6.86M, False: 11.8k]
  ------------------
  494|  6.86M|        lut_table_[j] = i;
  495|  6.86M|      }
  496|  11.8k|      act_prob = cum_prob;
  497|  11.8k|    }
  498|    250|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 59, False: 191]
  ------------------
  499|     59|      return false;
  500|     59|    }
  501|    191|    return true;
  502|    250|  }
_ZN5draco11RAnsDecoderILi15EE9read_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: 10, False: 113]
  ------------------
  424|     10|      return 1;
  425|     10|    }
  426|    113|    ans_.buf = buf;
  427|    113|    x = buf[offset - 1] >> 6;
  428|    113|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 25, False: 88]
  ------------------
  429|     25|      ans_.buf_offset = offset - 1;
  430|     25|      ans_.state = buf[offset - 1] & 0x3F;
  431|     88|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 27, False: 61]
  ------------------
  432|     27|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 12, False: 15]
  ------------------
  433|     12|        return 1;
  434|     12|      }
  435|     15|      ans_.buf_offset = offset - 2;
  436|     15|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     61|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 21, False: 40]
  ------------------
  438|     21|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 4, False: 17]
  ------------------
  439|      4|        return 1;
  440|      4|      }
  441|     17|      ans_.buf_offset = offset - 3;
  442|     17|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     40|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 40, False: 0]
  ------------------
  444|     40|      ans_.buf_offset = offset - 4;
  445|     40|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     40|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     97|    ans_.state += l_rans_base;
  450|     97|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     97|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 39, False: 58]
  ------------------
  451|     39|      return 1;
  452|     39|    }
  453|     58|    return 0;
  454|     97|  }
_ZN5draco11RAnsDecoderILi15EE9rans_readEv:
  462|   369k|  inline int rans_read() {
  463|   369k|    unsigned rem;
  464|   369k|    unsigned quo;
  465|   369k|    struct rans_dec_sym sym;
  466|   374k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 269k, False: 104k]
  |  Branch (466:40): [True: 4.70k, False: 265k]
  ------------------
  467|  4.70k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  4.70k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  4.70k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|   369k|    quo = ans_.state / rans_precision;
  472|   369k|    rem = ans_.state % rans_precision;
  473|   369k|    fetch_sym(&sym, rem);
  474|   369k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   369k|    return sym.val;
  476|   369k|  }
_ZN5draco11RAnsDecoderILi15EE9fetch_symEPNS_12rans_dec_symEj:
  505|   369k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   369k|    uint32_t symbol = lut_table_[rem];
  507|   369k|    out->val = symbol;
  508|   369k|    out->prob = probability_table_[symbol].prob;
  509|   369k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   369k|  }
_ZN5draco11RAnsDecoderILi15EE8read_endEv:
  456|     58|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi16EEC2Ev:
  416|    423|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi16EE24rans_build_look_up_tableEPKjj:
  481|    228|                                       uint32_t num_symbols) {
  482|    228|    lut_table_.resize(rans_precision);
  483|    228|    probability_table_.resize(num_symbols);
  484|    228|    uint32_t cum_prob = 0;
  485|    228|    uint32_t act_prob = 0;
  486|  17.5k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 17.3k, False: 200]
  ------------------
  487|  17.3k|      probability_table_[i].prob = token_probs[i];
  488|  17.3k|      probability_table_[i].cum_prob = cum_prob;
  489|  17.3k|      cum_prob += token_probs[i];
  490|  17.3k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 28, False: 17.2k]
  ------------------
  491|     28|        return false;
  492|     28|      }
  493|  11.0M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 11.0M, False: 17.2k]
  ------------------
  494|  11.0M|        lut_table_[j] = i;
  495|  11.0M|      }
  496|  17.2k|      act_prob = cum_prob;
  497|  17.2k|    }
  498|    200|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 59, False: 141]
  ------------------
  499|     59|      return false;
  500|     59|    }
  501|    141|    return true;
  502|    200|  }
_ZN5draco11RAnsDecoderILi16EE9read_initEPKhi:
  421|     77|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     77|    unsigned x;
  423|     77|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 8, False: 69]
  ------------------
  424|      8|      return 1;
  425|      8|    }
  426|     69|    ans_.buf = buf;
  427|     69|    x = buf[offset - 1] >> 6;
  428|     69|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 29, False: 40]
  ------------------
  429|     29|      ans_.buf_offset = offset - 1;
  430|     29|      ans_.state = buf[offset - 1] & 0x3F;
  431|     40|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 10, False: 30]
  ------------------
  432|     10|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 1, False: 9]
  ------------------
  433|      1|        return 1;
  434|      1|      }
  435|      9|      ans_.buf_offset = offset - 2;
  436|      9|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     30|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 5, False: 25]
  ------------------
  438|      5|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 1, False: 4]
  ------------------
  439|      1|        return 1;
  440|      1|      }
  441|      4|      ans_.buf_offset = offset - 3;
  442|      4|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     25|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 25, False: 0]
  ------------------
  444|     25|      ans_.buf_offset = offset - 4;
  445|     25|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     25|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     67|    ans_.state += l_rans_base;
  450|     67|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     67|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 19, False: 48]
  ------------------
  451|     19|      return 1;
  452|     19|    }
  453|     48|    return 0;
  454|     67|  }
_ZN5draco11RAnsDecoderILi16EE9rans_readEv:
  462|   219k|  inline int rans_read() {
  463|   219k|    unsigned rem;
  464|   219k|    unsigned quo;
  465|   219k|    struct rans_dec_sym sym;
  466|   220k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 138k, False: 81.1k]
  |  Branch (466:40): [True: 542, False: 138k]
  ------------------
  467|    542|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    542|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|    542|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|   219k|    quo = ans_.state / rans_precision;
  472|   219k|    rem = ans_.state % rans_precision;
  473|   219k|    fetch_sym(&sym, rem);
  474|   219k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   219k|    return sym.val;
  476|   219k|  }
_ZN5draco11RAnsDecoderILi16EE9fetch_symEPNS_12rans_dec_symEj:
  505|   219k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   219k|    uint32_t symbol = lut_table_[rem];
  507|   219k|    out->val = symbol;
  508|   219k|    out->prob = probability_table_[symbol].prob;
  509|   219k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   219k|  }
_ZN5draco11RAnsDecoderILi16EE8read_endEv:
  456|     48|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi18EEC2Ev:
  416|    436|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi18EE24rans_build_look_up_tableEPKjj:
  481|    276|                                       uint32_t num_symbols) {
  482|    276|    lut_table_.resize(rans_precision);
  483|    276|    probability_table_.resize(num_symbols);
  484|    276|    uint32_t cum_prob = 0;
  485|    276|    uint32_t act_prob = 0;
  486|  5.54k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 5.28k, False: 255]
  ------------------
  487|  5.28k|      probability_table_[i].prob = token_probs[i];
  488|  5.28k|      probability_table_[i].cum_prob = cum_prob;
  489|  5.28k|      cum_prob += token_probs[i];
  490|  5.28k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 21, False: 5.26k]
  ------------------
  491|     21|        return false;
  492|     21|      }
  493|  52.3M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 52.3M, False: 5.26k]
  ------------------
  494|  52.3M|        lut_table_[j] = i;
  495|  52.3M|      }
  496|  5.26k|      act_prob = cum_prob;
  497|  5.26k|    }
  498|    255|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 74, False: 181]
  ------------------
  499|     74|      return false;
  500|     74|    }
  501|    181|    return true;
  502|    255|  }
_ZN5draco11RAnsDecoderILi18EE9read_initEPKhi:
  421|     88|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     88|    unsigned x;
  423|     88|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 10, False: 78]
  ------------------
  424|     10|      return 1;
  425|     10|    }
  426|     78|    ans_.buf = buf;
  427|     78|    x = buf[offset - 1] >> 6;
  428|     78|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 30, False: 48]
  ------------------
  429|     30|      ans_.buf_offset = offset - 1;
  430|     30|      ans_.state = buf[offset - 1] & 0x3F;
  431|     48|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 13, False: 35]
  ------------------
  432|     13|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 6, False: 7]
  ------------------
  433|      6|        return 1;
  434|      6|      }
  435|      7|      ans_.buf_offset = offset - 2;
  436|      7|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     35|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 8, False: 27]
  ------------------
  438|      8|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 1, False: 7]
  ------------------
  439|      1|        return 1;
  440|      1|      }
  441|      7|      ans_.buf_offset = offset - 3;
  442|      7|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     27|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 27, False: 0]
  ------------------
  444|     27|      ans_.buf_offset = offset - 4;
  445|     27|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     27|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     71|    ans_.state += l_rans_base;
  450|     71|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     71|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 14, False: 57]
  ------------------
  451|     14|      return 1;
  452|     14|    }
  453|     57|    return 0;
  454|     71|  }
_ZN5draco11RAnsDecoderILi18EE9rans_readEv:
  462|   141k|  inline int rans_read() {
  463|   141k|    unsigned rem;
  464|   141k|    unsigned quo;
  465|   141k|    struct rans_dec_sym sym;
  466|   141k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 136k, False: 5.73k]
  |  Branch (466:40): [True: 321, False: 135k]
  ------------------
  467|    321|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    321|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|    321|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|   141k|    quo = ans_.state / rans_precision;
  472|   141k|    rem = ans_.state % rans_precision;
  473|   141k|    fetch_sym(&sym, rem);
  474|   141k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   141k|    return sym.val;
  476|   141k|  }
_ZN5draco11RAnsDecoderILi18EE9fetch_symEPNS_12rans_dec_symEj:
  505|   141k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   141k|    uint32_t symbol = lut_table_[rem];
  507|   141k|    out->val = symbol;
  508|   141k|    out->prob = probability_table_[symbol].prob;
  509|   141k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   141k|  }
_ZN5draco11RAnsDecoderILi18EE8read_endEv:
  456|     57|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi19EEC2Ev:
  416|    351|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi19EE24rans_build_look_up_tableEPKjj:
  481|    188|                                       uint32_t num_symbols) {
  482|    188|    lut_table_.resize(rans_precision);
  483|    188|    probability_table_.resize(num_symbols);
  484|    188|    uint32_t cum_prob = 0;
  485|    188|    uint32_t act_prob = 0;
  486|  5.97k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 5.80k, False: 161]
  ------------------
  487|  5.80k|      probability_table_[i].prob = token_probs[i];
  488|  5.80k|      probability_table_[i].cum_prob = cum_prob;
  489|  5.80k|      cum_prob += token_probs[i];
  490|  5.80k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 27, False: 5.78k]
  ------------------
  491|     27|        return false;
  492|     27|      }
  493|  60.3M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 60.3M, False: 5.78k]
  ------------------
  494|  60.3M|        lut_table_[j] = i;
  495|  60.3M|      }
  496|  5.78k|      act_prob = cum_prob;
  497|  5.78k|    }
  498|    161|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 59, False: 102]
  ------------------
  499|     59|      return false;
  500|     59|    }
  501|    102|    return true;
  502|    161|  }
_ZN5draco11RAnsDecoderILi19EE9read_initEPKhi:
  421|     71|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     71|    unsigned x;
  423|     71|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 2, False: 69]
  ------------------
  424|      2|      return 1;
  425|      2|    }
  426|     69|    ans_.buf = buf;
  427|     69|    x = buf[offset - 1] >> 6;
  428|     69|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 28, False: 41]
  ------------------
  429|     28|      ans_.buf_offset = offset - 1;
  430|     28|      ans_.state = buf[offset - 1] & 0x3F;
  431|     41|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 9, False: 32]
  ------------------
  432|      9|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 3, False: 6]
  ------------------
  433|      3|        return 1;
  434|      3|      }
  435|      6|      ans_.buf_offset = offset - 2;
  436|      6|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     32|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 13, False: 19]
  ------------------
  438|     13|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 6, False: 7]
  ------------------
  439|      6|        return 1;
  440|      6|      }
  441|      7|      ans_.buf_offset = offset - 3;
  442|      7|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     19|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 19, False: 0]
  ------------------
  444|     19|      ans_.buf_offset = offset - 4;
  445|     19|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     19|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     60|    ans_.state += l_rans_base;
  450|     60|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     60|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 9, False: 51]
  ------------------
  451|      9|      return 1;
  452|      9|    }
  453|     51|    return 0;
  454|     60|  }
_ZN5draco11RAnsDecoderILi19EE9rans_readEv:
  462|   172k|  inline int rans_read() {
  463|   172k|    unsigned rem;
  464|   172k|    unsigned quo;
  465|   172k|    struct rans_dec_sym sym;
  466|   172k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 64.4k, False: 108k]
  |  Branch (466:40): [True: 294, False: 64.1k]
  ------------------
  467|    294|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    294|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|    294|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|   172k|    quo = ans_.state / rans_precision;
  472|   172k|    rem = ans_.state % rans_precision;
  473|   172k|    fetch_sym(&sym, rem);
  474|   172k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   172k|    return sym.val;
  476|   172k|  }
_ZN5draco11RAnsDecoderILi19EE9fetch_symEPNS_12rans_dec_symEj:
  505|   172k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   172k|    uint32_t symbol = lut_table_[rem];
  507|   172k|    out->val = symbol;
  508|   172k|    out->prob = probability_table_[symbol].prob;
  509|   172k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   172k|  }
_ZN5draco11RAnsDecoderILi19EE8read_endEv:
  456|     51|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi20EEC2Ev:
  416|  2.01k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi20EE24rans_build_look_up_tableEPKjj:
  481|  1.13k|                                       uint32_t num_symbols) {
  482|  1.13k|    lut_table_.resize(rans_precision);
  483|  1.13k|    probability_table_.resize(num_symbols);
  484|  1.13k|    uint32_t cum_prob = 0;
  485|  1.13k|    uint32_t act_prob = 0;
  486|  13.4k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 12.3k, False: 1.07k]
  ------------------
  487|  12.3k|      probability_table_[i].prob = token_probs[i];
  488|  12.3k|      probability_table_[i].cum_prob = cum_prob;
  489|  12.3k|      cum_prob += token_probs[i];
  490|  12.3k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 57, False: 12.2k]
  ------------------
  491|     57|        return false;
  492|     57|      }
  493|  1.02G|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 1.02G, False: 12.2k]
  ------------------
  494|  1.02G|        lut_table_[j] = i;
  495|  1.02G|      }
  496|  12.2k|      act_prob = cum_prob;
  497|  12.2k|    }
  498|  1.07k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 125, False: 949]
  ------------------
  499|    125|      return false;
  500|    125|    }
  501|    949|    return true;
  502|  1.07k|  }
_ZN5draco11RAnsDecoderILi20EE9read_initEPKhi:
  421|    498|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    498|    unsigned x;
  423|    498|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 37, False: 461]
  ------------------
  424|     37|      return 1;
  425|     37|    }
  426|    461|    ans_.buf = buf;
  427|    461|    x = buf[offset - 1] >> 6;
  428|    461|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 139, False: 322]
  ------------------
  429|    139|      ans_.buf_offset = offset - 1;
  430|    139|      ans_.state = buf[offset - 1] & 0x3F;
  431|    322|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 88, False: 234]
  ------------------
  432|     88|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 17, False: 71]
  ------------------
  433|     17|        return 1;
  434|     17|      }
  435|     71|      ans_.buf_offset = offset - 2;
  436|     71|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    234|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 74, False: 160]
  ------------------
  438|     74|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 30, False: 44]
  ------------------
  439|     30|        return 1;
  440|     30|      }
  441|     44|      ans_.buf_offset = offset - 3;
  442|     44|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    160|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 160, False: 0]
  ------------------
  444|    160|      ans_.buf_offset = offset - 4;
  445|    160|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|    160|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|    414|    ans_.state += l_rans_base;
  450|    414|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    414|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 54, False: 360]
  ------------------
  451|     54|      return 1;
  452|     54|    }
  453|    360|    return 0;
  454|    414|  }
_ZN5draco11RAnsDecoderILi20EE9rans_readEv:
  462|  29.0M|  inline int rans_read() {
  463|  29.0M|    unsigned rem;
  464|  29.0M|    unsigned quo;
  465|  29.0M|    struct rans_dec_sym sym;
  466|  29.0M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 23.3M, False: 5.70M]
  |  Branch (466:40): [True: 5.55k, False: 23.3M]
  ------------------
  467|  5.55k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  5.55k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  5.55k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|  29.0M|    quo = ans_.state / rans_precision;
  472|  29.0M|    rem = ans_.state % rans_precision;
  473|  29.0M|    fetch_sym(&sym, rem);
  474|  29.0M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  29.0M|    return sym.val;
  476|  29.0M|  }
_ZN5draco11RAnsDecoderILi20EE9fetch_symEPNS_12rans_dec_symEj:
  505|  29.0M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  29.0M|    uint32_t symbol = lut_table_[rem];
  507|  29.0M|    out->val = symbol;
  508|  29.0M|    out->prob = probability_table_[symbol].prob;
  509|  29.0M|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  29.0M|  }
_ZN5draco11RAnsDecoderILi20EE8read_endEv:
  456|    360|  inline int read_end() { return ans_.state == l_rans_base; }

_ZN5draco17RAnsSymbolDecoderILi5EEC2Ev:
   33|  1.41k|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi5EE6CreateEPNS_13DecoderBufferE:
   59|  1.41k|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|  1.41k|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 1.41k]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|  1.41k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|  1.41k|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.41k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 90, False: 1.32k]
  ------------------
   67|     90|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 12, False: 78]
  ------------------
   68|     12|      return false;
   69|     12|    }
   70|       |
   71|     90|  } else
   72|  1.32k|#endif
   73|  1.32k|  {
   74|  1.32k|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 46, False: 1.27k]
  ------------------
   75|     46|      return false;
   76|     46|    }
   77|  1.32k|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|  1.35k|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 85, False: 1.27k]
  ------------------
   83|     85|    return false;
   84|     85|  }
   85|  1.27k|  probability_table_.resize(num_symbols_);
   86|  1.27k|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 463, False: 807]
  ------------------
   87|    463|    return true;
   88|    463|  }
   89|       |  // Decode the table.
   90|  31.2k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 30.7k, False: 495]
  ------------------
   91|  30.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|  30.7k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 91, False: 30.6k]
  ------------------
   95|     91|      return false;
   96|     91|    }
   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|  30.6k|    const int token = prob_data & 3;
  102|  30.6k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 8.28k, False: 22.3k]
  ------------------
  103|  8.28k|      const uint32_t offset = prob_data >> 2;
  104|  8.28k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 171, False: 8.11k]
  ------------------
  105|    171|        return false;
  106|    171|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   302k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 294k, False: 8.11k]
  ------------------
  109|   294k|        probability_table_[i + j] = 0;
  110|   294k|      }
  111|  8.11k|      i += offset;
  112|  22.3k|    } else {
  113|  22.3k|      const int extra_bytes = token;
  114|  22.3k|      uint32_t prob = prob_data >> 2;
  115|  40.4k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 18.1k, False: 22.2k]
  ------------------
  116|  18.1k|        uint8_t eb;
  117|  18.1k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 50, False: 18.1k]
  ------------------
  118|     50|          return false;
  119|     50|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  18.1k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  18.1k|      }
  124|  22.2k|      probability_table_[i] = prob;
  125|  22.2k|    }
  126|  30.6k|  }
  127|    495|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 192, False: 303]
  ------------------
  128|    192|    return false;
  129|    192|  }
  130|    303|  return true;
  131|    495|}
_ZN5draco17RAnsSymbolDecoderILi5EE13StartDecodingEPNS_13DecoderBufferE:
  135|    653|    DecoderBuffer *buffer) {
  136|    653|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    653|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    653|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    653|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 42, False: 611]
  ------------------
  140|     42|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 6, False: 36]
  ------------------
  141|      6|      return false;
  142|      6|    }
  143|       |
  144|     42|  } else
  145|    611|#endif
  146|    611|  {
  147|    611|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 23, False: 588]
  ------------------
  148|     23|      return false;
  149|     23|    }
  150|    611|  }
  151|    624|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 132, False: 492]
  ------------------
  152|    132|    return false;
  153|    132|  }
  154|    492|  const uint8_t *const data_head =
  155|    492|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    492|  buffer->Advance(bytes_encoded);
  158|    492|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 140, False: 352]
  ------------------
  159|    140|    return false;
  160|    140|  }
  161|    352|  return true;
  162|    492|}
_ZNK5draco17RAnsSymbolDecoderILi5EE11num_symbolsEv:
   38|    473|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi5EE12DecodeSymbolEv:
   43|  6.03M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi5EE11EndDecodingEv:
  165|    290|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    290|  ans_.read_end();
  167|    290|}
_ZN5draco17RAnsSymbolDecoderILi1EEC2Ev:
   33|    643|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi1EE6CreateEPNS_13DecoderBufferE:
   59|    643|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    643|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 643]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    643|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    643|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    643|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 51, False: 592]
  ------------------
   67|     51|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 5, False: 46]
  ------------------
   68|      5|      return false;
   69|      5|    }
   70|       |
   71|     51|  } else
   72|    592|#endif
   73|    592|  {
   74|    592|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 11, False: 581]
  ------------------
   75|     11|      return false;
   76|     11|    }
   77|    592|  }
   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|    627|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 44, False: 583]
  ------------------
   83|     44|    return false;
   84|     44|  }
   85|    583|  probability_table_.resize(num_symbols_);
   86|    583|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 22, False: 561]
  ------------------
   87|     22|    return true;
   88|     22|  }
   89|       |  // Decode the table.
   90|   371k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 370k, False: 389]
  ------------------
   91|   370k|    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|   370k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 65, False: 370k]
  ------------------
   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|   370k|    const int token = prob_data & 3;
  102|   370k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 160k, False: 210k]
  ------------------
  103|   160k|      const uint32_t offset = prob_data >> 2;
  104|   160k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 77, False: 160k]
  ------------------
  105|     77|        return false;
  106|     77|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  9.51M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 9.35M, False: 160k]
  ------------------
  109|  9.35M|        probability_table_[i + j] = 0;
  110|  9.35M|      }
  111|   160k|      i += offset;
  112|   210k|    } else {
  113|   210k|      const int extra_bytes = token;
  114|   210k|      uint32_t prob = prob_data >> 2;
  115|   249k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 39.3k, False: 210k]
  ------------------
  116|  39.3k|        uint8_t eb;
  117|  39.3k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 30, False: 39.3k]
  ------------------
  118|     30|          return false;
  119|     30|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  39.3k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  39.3k|      }
  124|   210k|      probability_table_[i] = prob;
  125|   210k|    }
  126|   370k|  }
  127|    389|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 132, False: 257]
  ------------------
  128|    132|    return false;
  129|    132|  }
  130|    257|  return true;
  131|    389|}
_ZNK5draco17RAnsSymbolDecoderILi1EE11num_symbolsEv:
   38|    279|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi1EE13StartDecodingEPNS_13DecoderBufferE:
  135|    257|    DecoderBuffer *buffer) {
  136|    257|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    257|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    257|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    257|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 6, False: 251]
  ------------------
  140|      6|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 5]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|      6|  } else
  145|    251|#endif
  146|    251|  {
  147|    251|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 26, False: 225]
  ------------------
  148|     26|      return false;
  149|     26|    }
  150|    251|  }
  151|    230|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 49, False: 181]
  ------------------
  152|     49|    return false;
  153|     49|  }
  154|    181|  const uint8_t *const data_head =
  155|    181|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    181|  buffer->Advance(bytes_encoded);
  158|    181|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 21, False: 160]
  ------------------
  159|     21|    return false;
  160|     21|  }
  161|    160|  return true;
  162|    181|}
_ZN5draco17RAnsSymbolDecoderILi1EE12DecodeSymbolEv:
   43|   181M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi1EE11EndDecodingEv:
  165|    160|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    160|  ans_.read_end();
  167|    160|}
_ZN5draco17RAnsSymbolDecoderILi2EEC2Ev:
   33|    530|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi2EE6CreateEPNS_13DecoderBufferE:
   59|    530|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    530|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 530]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    530|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    530|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    530|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 98, False: 432]
  ------------------
   67|     98|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 3, False: 95]
  ------------------
   68|      3|      return false;
   69|      3|    }
   70|       |
   71|     98|  } else
   72|    432|#endif
   73|    432|  {
   74|    432|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 3, False: 429]
  ------------------
   75|      3|      return false;
   76|      3|    }
   77|    432|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    524|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 44, False: 480]
  ------------------
   83|     44|    return false;
   84|     44|  }
   85|    480|  probability_table_.resize(num_symbols_);
   86|    480|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 7, False: 473]
  ------------------
   87|      7|    return true;
   88|      7|  }
   89|       |  // Decode the table.
   90|   533k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 533k, False: 306]
  ------------------
   91|   533k|    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|   533k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 63, False: 533k]
  ------------------
   95|     63|      return false;
   96|     63|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   533k|    const int token = prob_data & 3;
  102|   533k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 78.0k, False: 455k]
  ------------------
  103|  78.0k|      const uint32_t offset = prob_data >> 2;
  104|  78.0k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 65, False: 78.0k]
  ------------------
  105|     65|        return false;
  106|     65|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  1.57M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 1.49M, False: 78.0k]
  ------------------
  109|  1.49M|        probability_table_[i + j] = 0;
  110|  1.49M|      }
  111|  78.0k|      i += offset;
  112|   455k|    } else {
  113|   455k|      const int extra_bytes = token;
  114|   455k|      uint32_t prob = prob_data >> 2;
  115|   872k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 416k, False: 455k]
  ------------------
  116|   416k|        uint8_t eb;
  117|   416k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 39, False: 416k]
  ------------------
  118|     39|          return false;
  119|     39|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   416k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   416k|      }
  124|   455k|      probability_table_[i] = prob;
  125|   455k|    }
  126|   533k|  }
  127|    306|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 25, False: 281]
  ------------------
  128|     25|    return false;
  129|     25|  }
  130|    281|  return true;
  131|    306|}
_ZNK5draco17RAnsSymbolDecoderILi2EE11num_symbolsEv:
   38|    288|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi2EE13StartDecodingEPNS_13DecoderBufferE:
  135|    281|    DecoderBuffer *buffer) {
  136|    281|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    281|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    281|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    281|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 61, False: 220]
  ------------------
  140|     61|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 59]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     61|  } else
  145|    220|#endif
  146|    220|  {
  147|    220|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 1, False: 219]
  ------------------
  148|      1|      return false;
  149|      1|    }
  150|    220|  }
  151|    278|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 99, False: 179]
  ------------------
  152|     99|    return false;
  153|     99|  }
  154|    179|  const uint8_t *const data_head =
  155|    179|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    179|  buffer->Advance(bytes_encoded);
  158|    179|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 35, False: 144]
  ------------------
  159|     35|    return false;
  160|     35|  }
  161|    144|  return true;
  162|    179|}
_ZN5draco17RAnsSymbolDecoderILi2EE12DecodeSymbolEv:
   43|   104M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi2EE11EndDecodingEv:
  165|    144|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    144|  ans_.read_end();
  167|    144|}
_ZN5draco17RAnsSymbolDecoderILi3EEC2Ev:
   33|    602|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi3EE6CreateEPNS_13DecoderBufferE:
   59|    602|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    602|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 602]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    602|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    602|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    602|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 81, False: 521]
  ------------------
   67|     81|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 80]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     81|  } else
   72|    521|#endif
   73|    521|  {
   74|    521|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 513]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    521|  }
   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|    593|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 18, False: 575]
  ------------------
   83|     18|    return false;
   84|     18|  }
   85|    575|  probability_table_.resize(num_symbols_);
   86|    575|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 14, False: 561]
  ------------------
   87|     14|    return true;
   88|     14|  }
   89|       |  // Decode the table.
   90|   259k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 259k, False: 420]
  ------------------
   91|   259k|    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|   259k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 79, False: 258k]
  ------------------
   95|     79|      return false;
   96|     79|    }
   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|   258k|    const int token = prob_data & 3;
  102|   258k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 218k, False: 40.7k]
  ------------------
  103|   218k|      const uint32_t offset = prob_data >> 2;
  104|   218k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 33, False: 218k]
  ------------------
  105|     33|        return false;
  106|     33|      }
  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.5M, False: 218k]
  ------------------
  109|  10.5M|        probability_table_[i + j] = 0;
  110|  10.5M|      }
  111|   218k|      i += offset;
  112|   218k|    } else {
  113|  40.7k|      const int extra_bytes = token;
  114|  40.7k|      uint32_t prob = prob_data >> 2;
  115|  63.8k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 23.1k, False: 40.6k]
  ------------------
  116|  23.1k|        uint8_t eb;
  117|  23.1k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 29, False: 23.1k]
  ------------------
  118|     29|          return false;
  119|     29|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  23.1k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  23.1k|      }
  124|  40.6k|      probability_table_[i] = prob;
  125|  40.6k|    }
  126|   258k|  }
  127|    420|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 33, False: 387]
  ------------------
  128|     33|    return false;
  129|     33|  }
  130|    387|  return true;
  131|    420|}
_ZNK5draco17RAnsSymbolDecoderILi3EE11num_symbolsEv:
   38|    401|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi3EE13StartDecodingEPNS_13DecoderBufferE:
  135|    387|    DecoderBuffer *buffer) {
  136|    387|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    387|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    387|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    387|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 62, False: 325]
  ------------------
  140|     62|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 4, False: 58]
  ------------------
  141|      4|      return false;
  142|      4|    }
  143|       |
  144|     62|  } else
  145|    325|#endif
  146|    325|  {
  147|    325|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 4, False: 321]
  ------------------
  148|      4|      return false;
  149|      4|    }
  150|    325|  }
  151|    379|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 121, False: 258]
  ------------------
  152|    121|    return false;
  153|    121|  }
  154|    258|  const uint8_t *const data_head =
  155|    258|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    258|  buffer->Advance(bytes_encoded);
  158|    258|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 39, False: 219]
  ------------------
  159|     39|    return false;
  160|     39|  }
  161|    219|  return true;
  162|    258|}
_ZN5draco17RAnsSymbolDecoderILi3EE12DecodeSymbolEv:
   43|  21.4M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi3EE11EndDecodingEv:
  165|    219|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    219|  ans_.read_end();
  167|    219|}
_ZN5draco17RAnsSymbolDecoderILi4EEC2Ev:
   33|    359|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi4EE6CreateEPNS_13DecoderBufferE:
   59|    359|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    359|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 359]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    359|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    359|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    359|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 11, False: 348]
  ------------------
   67|     11|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 10]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     11|  } else
   72|    348|#endif
   73|    348|  {
   74|    348|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 12, False: 336]
  ------------------
   75|     12|      return false;
   76|     12|    }
   77|    348|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    346|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 17, False: 329]
  ------------------
   83|     17|    return false;
   84|     17|  }
   85|    329|  probability_table_.resize(num_symbols_);
   86|    329|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 14, False: 315]
  ------------------
   87|     14|    return true;
   88|     14|  }
   89|       |  // Decode the table.
   90|  17.4k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 17.2k, False: 204]
  ------------------
   91|  17.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|  17.2k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 69, False: 17.2k]
  ------------------
   95|     69|      return false;
   96|     69|    }
   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|  17.2k|    const int token = prob_data & 3;
  102|  17.2k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 6.19k, False: 11.0k]
  ------------------
  103|  6.19k|      const uint32_t offset = prob_data >> 2;
  104|  6.19k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 23, False: 6.17k]
  ------------------
  105|     23|        return false;
  106|     23|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   253k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 246k, False: 6.17k]
  ------------------
  109|   246k|        probability_table_[i + j] = 0;
  110|   246k|      }
  111|  6.17k|      i += offset;
  112|  11.0k|    } else {
  113|  11.0k|      const int extra_bytes = token;
  114|  11.0k|      uint32_t prob = prob_data >> 2;
  115|  17.7k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 6.77k, False: 11.0k]
  ------------------
  116|  6.77k|        uint8_t eb;
  117|  6.77k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 19, False: 6.75k]
  ------------------
  118|     19|          return false;
  119|     19|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  6.75k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  6.75k|      }
  124|  11.0k|      probability_table_[i] = prob;
  125|  11.0k|    }
  126|  17.2k|  }
  127|    204|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 17, False: 187]
  ------------------
  128|     17|    return false;
  129|     17|  }
  130|    187|  return true;
  131|    204|}
_ZNK5draco17RAnsSymbolDecoderILi4EE11num_symbolsEv:
   38|    201|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi4EE13StartDecodingEPNS_13DecoderBufferE:
  135|    187|    DecoderBuffer *buffer) {
  136|    187|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    187|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    187|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    187|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 2, False: 185]
  ------------------
  140|      2|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 1]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|      2|  } else
  145|    185|#endif
  146|    185|  {
  147|    185|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 3, False: 182]
  ------------------
  148|      3|      return false;
  149|      3|    }
  150|    185|  }
  151|    183|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 19, False: 164]
  ------------------
  152|     19|    return false;
  153|     19|  }
  154|    164|  const uint8_t *const data_head =
  155|    164|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    164|  buffer->Advance(bytes_encoded);
  158|    164|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 25, False: 139]
  ------------------
  159|     25|    return false;
  160|     25|  }
  161|    139|  return true;
  162|    164|}
_ZN5draco17RAnsSymbolDecoderILi4EE12DecodeSymbolEv:
   43|  2.37M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi4EE11EndDecodingEv:
  165|    139|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    139|  ans_.read_end();
  167|    139|}
_ZN5draco17RAnsSymbolDecoderILi6EEC2Ev:
   33|    438|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi6EE6CreateEPNS_13DecoderBufferE:
   59|    438|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    438|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 438]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    438|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    438|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    438|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 65, False: 373]
  ------------------
   67|     65|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 64]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     65|  } else
   72|    373|#endif
   73|    373|  {
   74|    373|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 7, False: 366]
  ------------------
   75|      7|      return false;
   76|      7|    }
   77|    373|  }
   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|    430|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 44, False: 386]
  ------------------
   83|     44|    return false;
   84|     44|  }
   85|    386|  probability_table_.resize(num_symbols_);
   86|    386|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 10, False: 376]
  ------------------
   87|     10|    return true;
   88|     10|  }
   89|       |  // Decode the table.
   90|  12.4k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 12.1k, False: 255]
  ------------------
   91|  12.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|  12.1k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 64, False: 12.1k]
  ------------------
   95|     64|      return false;
   96|     64|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  12.1k|    const int token = prob_data & 3;
  102|  12.1k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 3.94k, False: 8.18k]
  ------------------
  103|  3.94k|      const uint32_t offset = prob_data >> 2;
  104|  3.94k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 32, False: 3.91k]
  ------------------
  105|     32|        return false;
  106|     32|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   137k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 133k, False: 3.91k]
  ------------------
  109|   133k|        probability_table_[i + j] = 0;
  110|   133k|      }
  111|  3.91k|      i += offset;
  112|  8.18k|    } else {
  113|  8.18k|      const int extra_bytes = token;
  114|  8.18k|      uint32_t prob = prob_data >> 2;
  115|  13.0k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 4.93k, False: 8.15k]
  ------------------
  116|  4.93k|        uint8_t eb;
  117|  4.93k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 25, False: 4.90k]
  ------------------
  118|     25|          return false;
  119|     25|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  4.90k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  4.90k|      }
  124|  8.15k|      probability_table_[i] = prob;
  125|  8.15k|    }
  126|  12.1k|  }
  127|    255|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 27, False: 228]
  ------------------
  128|     27|    return false;
  129|     27|  }
  130|    228|  return true;
  131|    255|}
_ZNK5draco17RAnsSymbolDecoderILi6EE11num_symbolsEv:
   38|    238|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi6EE13StartDecodingEPNS_13DecoderBufferE:
  135|    228|    DecoderBuffer *buffer) {
  136|    228|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    228|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    228|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    228|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 40, False: 188]
  ------------------
  140|     40|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 38]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     40|  } else
  145|    188|#endif
  146|    188|  {
  147|    188|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 1, False: 187]
  ------------------
  148|      1|      return false;
  149|      1|    }
  150|    188|  }
  151|    225|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 82, False: 143]
  ------------------
  152|     82|    return false;
  153|     82|  }
  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: 45, False: 98]
  ------------------
  159|     45|    return false;
  160|     45|  }
  161|     98|  return true;
  162|    143|}
_ZN5draco17RAnsSymbolDecoderILi6EE12DecodeSymbolEv:
   43|  35.3M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi6EE11EndDecodingEv:
  165|     98|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     98|  ans_.read_end();
  167|     98|}
_ZN5draco17RAnsSymbolDecoderILi7EEC2Ev:
   33|    488|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi7EE6CreateEPNS_13DecoderBufferE:
   59|    488|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    488|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 488]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    488|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    488|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    488|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 57, False: 431]
  ------------------
   67|     57|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 56]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     57|  } else
   72|    431|#endif
   73|    431|  {
   74|    431|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 9, False: 422]
  ------------------
   75|      9|      return false;
   76|      9|    }
   77|    431|  }
   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|    478|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 17, False: 461]
  ------------------
   83|     17|    return false;
   84|     17|  }
   85|    461|  probability_table_.resize(num_symbols_);
   86|    461|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 7, False: 454]
  ------------------
   87|      7|    return true;
   88|      7|  }
   89|       |  // Decode the table.
   90|  1.18M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.18M, False: 298]
  ------------------
   91|  1.18M|    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.18M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 82, False: 1.18M]
  ------------------
   95|     82|      return false;
   96|     82|    }
   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.18M|    const int token = prob_data & 3;
  102|  1.18M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 317k, False: 862k]
  ------------------
  103|   317k|      const uint32_t offset = prob_data >> 2;
  104|   317k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 41, False: 317k]
  ------------------
  105|     41|        return false;
  106|     41|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  13.1M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 12.8M, False: 317k]
  ------------------
  109|  12.8M|        probability_table_[i + j] = 0;
  110|  12.8M|      }
  111|   317k|      i += offset;
  112|   862k|    } else {
  113|   862k|      const int extra_bytes = token;
  114|   862k|      uint32_t prob = prob_data >> 2;
  115|  1.54M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 682k, False: 862k]
  ------------------
  116|   682k|        uint8_t eb;
  117|   682k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 33, False: 682k]
  ------------------
  118|     33|          return false;
  119|     33|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   682k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   682k|      }
  124|   862k|      probability_table_[i] = prob;
  125|   862k|    }
  126|  1.18M|  }
  127|    298|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 23, False: 275]
  ------------------
  128|     23|    return false;
  129|     23|  }
  130|    275|  return true;
  131|    298|}
_ZNK5draco17RAnsSymbolDecoderILi7EE11num_symbolsEv:
   38|    282|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi7EE13StartDecodingEPNS_13DecoderBufferE:
  135|    275|    DecoderBuffer *buffer) {
  136|    275|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    275|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    275|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    275|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 30, False: 245]
  ------------------
  140|     30|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 5, False: 25]
  ------------------
  141|      5|      return false;
  142|      5|    }
  143|       |
  144|     30|  } else
  145|    245|#endif
  146|    245|  {
  147|    245|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 7, False: 238]
  ------------------
  148|      7|      return false;
  149|      7|    }
  150|    245|  }
  151|    263|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 61, False: 202]
  ------------------
  152|     61|    return false;
  153|     61|  }
  154|    202|  const uint8_t *const data_head =
  155|    202|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    202|  buffer->Advance(bytes_encoded);
  158|    202|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 36, False: 166]
  ------------------
  159|     36|    return false;
  160|     36|  }
  161|    166|  return true;
  162|    202|}
_ZN5draco17RAnsSymbolDecoderILi7EE12DecodeSymbolEv:
   43|  9.32M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi7EE11EndDecodingEv:
  165|    166|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    166|  ans_.read_end();
  167|    166|}
_ZN5draco17RAnsSymbolDecoderILi8EEC2Ev:
   33|    493|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi8EE6CreateEPNS_13DecoderBufferE:
   59|    493|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    493|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 493]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    493|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    493|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    493|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 78, False: 415]
  ------------------
   67|     78|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 3, False: 75]
  ------------------
   68|      3|      return false;
   69|      3|    }
   70|       |
   71|     78|  } else
   72|    415|#endif
   73|    415|  {
   74|    415|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 16, False: 399]
  ------------------
   75|     16|      return false;
   76|     16|    }
   77|    415|  }
   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|    474|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 33, False: 441]
  ------------------
   83|     33|    return false;
   84|     33|  }
   85|    441|  probability_table_.resize(num_symbols_);
   86|    441|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 17, False: 424]
  ------------------
   87|     17|    return true;
   88|     17|  }
   89|       |  // Decode the table.
   90|   249k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 249k, False: 286]
  ------------------
   91|   249k|    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|   249k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 64, False: 249k]
  ------------------
   95|     64|      return false;
   96|     64|    }
   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|   249k|    const int token = prob_data & 3;
  102|   249k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 38.7k, False: 210k]
  ------------------
  103|  38.7k|      const uint32_t offset = prob_data >> 2;
  104|  38.7k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 38, False: 38.7k]
  ------------------
  105|     38|        return false;
  106|     38|      }
  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.44M, False: 38.7k]
  ------------------
  109|  1.44M|        probability_table_[i + j] = 0;
  110|  1.44M|      }
  111|  38.7k|      i += offset;
  112|   210k|    } else {
  113|   210k|      const int extra_bytes = token;
  114|   210k|      uint32_t prob = prob_data >> 2;
  115|   377k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 166k, False: 210k]
  ------------------
  116|   166k|        uint8_t eb;
  117|   166k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 36, False: 166k]
  ------------------
  118|     36|          return false;
  119|     36|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   166k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   166k|      }
  124|   210k|      probability_table_[i] = prob;
  125|   210k|    }
  126|   249k|  }
  127|    286|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 31, False: 255]
  ------------------
  128|     31|    return false;
  129|     31|  }
  130|    255|  return true;
  131|    286|}
_ZNK5draco17RAnsSymbolDecoderILi8EE11num_symbolsEv:
   38|    272|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi8EE13StartDecodingEPNS_13DecoderBufferE:
  135|    255|    DecoderBuffer *buffer) {
  136|    255|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    255|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    255|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    255|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 56, False: 199]
  ------------------
  140|     56|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 3, False: 53]
  ------------------
  141|      3|      return false;
  142|      3|    }
  143|       |
  144|     56|  } else
  145|    199|#endif
  146|    199|  {
  147|    199|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 18, False: 181]
  ------------------
  148|     18|      return false;
  149|     18|    }
  150|    199|  }
  151|    234|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 113, False: 121]
  ------------------
  152|    113|    return false;
  153|    113|  }
  154|    121|  const uint8_t *const data_head =
  155|    121|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    121|  buffer->Advance(bytes_encoded);
  158|    121|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 36, False: 85]
  ------------------
  159|     36|    return false;
  160|     36|  }
  161|     85|  return true;
  162|    121|}
_ZN5draco17RAnsSymbolDecoderILi8EE12DecodeSymbolEv:
   43|  11.3M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi8EE11EndDecodingEv:
  165|     85|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     85|  ans_.read_end();
  167|     85|}
_ZN5draco17RAnsSymbolDecoderILi9EEC2Ev:
   33|    474|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi9EE6CreateEPNS_13DecoderBufferE:
   59|    474|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    474|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 474]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    474|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    474|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    474|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 33, False: 441]
  ------------------
   67|     33|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 31]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     33|  } else
   72|    441|#endif
   73|    441|  {
   74|    441|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 7, False: 434]
  ------------------
   75|      7|      return false;
   76|      7|    }
   77|    441|  }
   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|    465|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 20, False: 445]
  ------------------
   83|     20|    return false;
   84|     20|  }
   85|    445|  probability_table_.resize(num_symbols_);
   86|    445|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 9, False: 436]
  ------------------
   87|      9|    return true;
   88|      9|  }
   89|       |  // Decode the table.
   90|  47.2k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 46.9k, False: 291]
  ------------------
   91|  46.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|  46.9k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 69, False: 46.8k]
  ------------------
   95|     69|      return false;
   96|     69|    }
   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|  46.8k|    const int token = prob_data & 3;
  102|  46.8k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 9.31k, False: 37.5k]
  ------------------
  103|  9.31k|      const uint32_t offset = prob_data >> 2;
  104|  9.31k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 46, False: 9.26k]
  ------------------
  105|     46|        return false;
  106|     46|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   302k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 293k, False: 9.26k]
  ------------------
  109|   293k|        probability_table_[i + j] = 0;
  110|   293k|      }
  111|  9.26k|      i += offset;
  112|  37.5k|    } else {
  113|  37.5k|      const int extra_bytes = token;
  114|  37.5k|      uint32_t prob = prob_data >> 2;
  115|  63.9k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 26.3k, False: 37.5k]
  ------------------
  116|  26.3k|        uint8_t eb;
  117|  26.3k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 30, False: 26.3k]
  ------------------
  118|     30|          return false;
  119|     30|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  26.3k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  26.3k|      }
  124|  37.5k|      probability_table_[i] = prob;
  125|  37.5k|    }
  126|  46.8k|  }
  127|    291|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 77, False: 214]
  ------------------
  128|     77|    return false;
  129|     77|  }
  130|    214|  return true;
  131|    291|}
_ZNK5draco17RAnsSymbolDecoderILi9EE11num_symbolsEv:
   38|    223|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi9EE13StartDecodingEPNS_13DecoderBufferE:
  135|    214|    DecoderBuffer *buffer) {
  136|    214|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    214|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    214|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    214|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 11, False: 203]
  ------------------
  140|     11|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 9]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     11|  } else
  145|    203|#endif
  146|    203|  {
  147|    203|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 1, False: 202]
  ------------------
  148|      1|      return false;
  149|      1|    }
  150|    203|  }
  151|    211|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 79, False: 132]
  ------------------
  152|     79|    return false;
  153|     79|  }
  154|    132|  const uint8_t *const data_head =
  155|    132|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    132|  buffer->Advance(bytes_encoded);
  158|    132|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 44, False: 88]
  ------------------
  159|     44|    return false;
  160|     44|  }
  161|     88|  return true;
  162|    132|}
_ZN5draco17RAnsSymbolDecoderILi9EE12DecodeSymbolEv:
   43|  5.56M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi9EE11EndDecodingEv:
  165|     88|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     88|  ans_.read_end();
  167|     88|}
_ZN5draco17RAnsSymbolDecoderILi10EEC2Ev:
   33|    454|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi10EE6CreateEPNS_13DecoderBufferE:
   59|    454|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    454|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 454]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    454|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    454|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    454|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 42, False: 412]
  ------------------
   67|     42|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 5, False: 37]
  ------------------
   68|      5|      return false;
   69|      5|    }
   70|       |
   71|     42|  } else
   72|    412|#endif
   73|    412|  {
   74|    412|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 17, False: 395]
  ------------------
   75|     17|      return false;
   76|     17|    }
   77|    412|  }
   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|    432|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 16, False: 416]
  ------------------
   83|     16|    return false;
   84|     16|  }
   85|    416|  probability_table_.resize(num_symbols_);
   86|    416|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 13, False: 403]
  ------------------
   87|     13|    return true;
   88|     13|  }
   89|       |  // Decode the table.
   90|   251k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 251k, False: 273]
  ------------------
   91|   251k|    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|   251k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 70, False: 251k]
  ------------------
   95|     70|      return false;
   96|     70|    }
   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|   251k|    const int token = prob_data & 3;
  102|   251k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 28.0k, False: 223k]
  ------------------
  103|  28.0k|      const uint32_t offset = prob_data >> 2;
  104|  28.0k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 33, False: 27.9k]
  ------------------
  105|     33|        return false;
  106|     33|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   469k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 441k, False: 27.9k]
  ------------------
  109|   441k|        probability_table_[i + j] = 0;
  110|   441k|      }
  111|  27.9k|      i += offset;
  112|   223k|    } else {
  113|   223k|      const int extra_bytes = token;
  114|   223k|      uint32_t prob = prob_data >> 2;
  115|   430k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 207k, False: 223k]
  ------------------
  116|   207k|        uint8_t eb;
  117|   207k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 27, False: 207k]
  ------------------
  118|     27|          return false;
  119|     27|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   207k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   207k|      }
  124|   223k|      probability_table_[i] = prob;
  125|   223k|    }
  126|   251k|  }
  127|    273|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 82, False: 191]
  ------------------
  128|     82|    return false;
  129|     82|  }
  130|    191|  return true;
  131|    273|}
_ZNK5draco17RAnsSymbolDecoderILi10EE11num_symbolsEv:
   38|    204|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi10EE13StartDecodingEPNS_13DecoderBufferE:
  135|    191|    DecoderBuffer *buffer) {
  136|    191|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    191|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    191|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    191|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 17, False: 174]
  ------------------
  140|     17|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 16]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     17|  } else
  145|    174|#endif
  146|    174|  {
  147|    174|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 3, False: 171]
  ------------------
  148|      3|      return false;
  149|      3|    }
  150|    174|  }
  151|    187|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 64, False: 123]
  ------------------
  152|     64|    return false;
  153|     64|  }
  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: 65, False: 58]
  ------------------
  159|     65|    return false;
  160|     65|  }
  161|     58|  return true;
  162|    123|}
_ZN5draco17RAnsSymbolDecoderILi10EE12DecodeSymbolEv:
   43|   369k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi10EE11EndDecodingEv:
  165|     58|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     58|  ans_.read_end();
  167|     58|}
_ZN5draco17RAnsSymbolDecoderILi11EEC2Ev:
   33|    423|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi11EE6CreateEPNS_13DecoderBufferE:
   59|    423|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    423|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 423]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    423|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    423|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    423|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 45, False: 378]
  ------------------
   67|     45|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 3, False: 42]
  ------------------
   68|      3|      return false;
   69|      3|    }
   70|       |
   71|     45|  } else
   72|    378|#endif
   73|    378|  {
   74|    378|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 15, False: 363]
  ------------------
   75|     15|      return false;
   76|     15|    }
   77|    378|  }
   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|    405|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 33, False: 372]
  ------------------
   83|     33|    return false;
   84|     33|  }
   85|    372|  probability_table_.resize(num_symbols_);
   86|    372|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 9, False: 363]
  ------------------
   87|      9|    return true;
   88|      9|  }
   89|       |  // Decode the table.
   90|   215k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 215k, False: 228]
  ------------------
   91|   215k|    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|   215k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 65, False: 215k]
  ------------------
   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|   215k|    const int token = prob_data & 3;
  102|   215k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 12.3k, False: 202k]
  ------------------
  103|  12.3k|      const uint32_t offset = prob_data >> 2;
  104|  12.3k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 37, False: 12.3k]
  ------------------
  105|     37|        return false;
  106|     37|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   409k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 396k, False: 12.3k]
  ------------------
  109|   396k|        probability_table_[i + j] = 0;
  110|   396k|      }
  111|  12.3k|      i += offset;
  112|   202k|    } else {
  113|   202k|      const int extra_bytes = token;
  114|   202k|      uint32_t prob = prob_data >> 2;
  115|   408k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 205k, False: 202k]
  ------------------
  116|   205k|        uint8_t eb;
  117|   205k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 33, False: 205k]
  ------------------
  118|     33|          return false;
  119|     33|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   205k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   205k|      }
  124|   202k|      probability_table_[i] = prob;
  125|   202k|    }
  126|   215k|  }
  127|    228|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 87, False: 141]
  ------------------
  128|     87|    return false;
  129|     87|  }
  130|    141|  return true;
  131|    228|}
_ZNK5draco17RAnsSymbolDecoderILi11EE11num_symbolsEv:
   38|    150|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi11EE13StartDecodingEPNS_13DecoderBufferE:
  135|    141|    DecoderBuffer *buffer) {
  136|    141|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    141|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    141|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    141|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 141]
  ------------------
  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|    141|#endif
  146|    141|  {
  147|    141|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 1, False: 140]
  ------------------
  148|      1|      return false;
  149|      1|    }
  150|    141|  }
  151|    140|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 63, False: 77]
  ------------------
  152|     63|    return false;
  153|     63|  }
  154|     77|  const uint8_t *const data_head =
  155|     77|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     77|  buffer->Advance(bytes_encoded);
  158|     77|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 29, False: 48]
  ------------------
  159|     29|    return false;
  160|     29|  }
  161|     48|  return true;
  162|     77|}
_ZN5draco17RAnsSymbolDecoderILi11EE12DecodeSymbolEv:
   43|   219k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi11EE11EndDecodingEv:
  165|     48|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     48|  ans_.read_end();
  167|     48|}
_ZN5draco17RAnsSymbolDecoderILi12EEC2Ev:
   33|    436|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi12EE6CreateEPNS_13DecoderBufferE:
   59|    436|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    436|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 436]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    436|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    436|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    436|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 21, False: 415]
  ------------------
   67|     21|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 20]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     21|  } else
   72|    415|#endif
   73|    415|  {
   74|    415|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 7, False: 408]
  ------------------
   75|      7|      return false;
   76|      7|    }
   77|    415|  }
   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|    428|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 10, False: 418]
  ------------------
   83|     10|    return false;
   84|     10|  }
   85|    418|  probability_table_.resize(num_symbols_);
   86|    418|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 16, False: 402]
  ------------------
   87|     16|    return true;
   88|     16|  }
   89|       |  // Decode the table.
   90|  73.7k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 73.4k, False: 276]
  ------------------
   91|  73.4k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  73.4k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 68, False: 73.3k]
  ------------------
   95|     68|      return false;
   96|     68|    }
   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|  73.3k|    const int token = prob_data & 3;
  102|  73.3k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 13.6k, False: 59.7k]
  ------------------
  103|  13.6k|      const uint32_t offset = prob_data >> 2;
  104|  13.6k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 31, False: 13.6k]
  ------------------
  105|     31|        return false;
  106|     31|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   461k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 448k, False: 13.6k]
  ------------------
  109|   448k|        probability_table_[i + j] = 0;
  110|   448k|      }
  111|  13.6k|      i += offset;
  112|  59.7k|    } else {
  113|  59.7k|      const int extra_bytes = token;
  114|  59.7k|      uint32_t prob = prob_data >> 2;
  115|   116k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 56.9k, False: 59.6k]
  ------------------
  116|  56.9k|        uint8_t eb;
  117|  56.9k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 27, False: 56.9k]
  ------------------
  118|     27|          return false;
  119|     27|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  56.9k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  56.9k|      }
  124|  59.6k|      probability_table_[i] = prob;
  125|  59.6k|    }
  126|  73.3k|  }
  127|    276|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 95, False: 181]
  ------------------
  128|     95|    return false;
  129|     95|  }
  130|    181|  return true;
  131|    276|}
_ZNK5draco17RAnsSymbolDecoderILi12EE11num_symbolsEv:
   38|    197|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi12EE13StartDecodingEPNS_13DecoderBufferE:
  135|    181|    DecoderBuffer *buffer) {
  136|    181|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    181|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    181|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    181|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 18, False: 163]
  ------------------
  140|     18|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 17]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     18|  } else
  145|    163|#endif
  146|    163|  {
  147|    163|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 1, False: 162]
  ------------------
  148|      1|      return false;
  149|      1|    }
  150|    163|  }
  151|    179|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 91, False: 88]
  ------------------
  152|     91|    return false;
  153|     91|  }
  154|     88|  const uint8_t *const data_head =
  155|     88|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     88|  buffer->Advance(bytes_encoded);
  158|     88|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 31, False: 57]
  ------------------
  159|     31|    return false;
  160|     31|  }
  161|     57|  return true;
  162|     88|}
_ZN5draco17RAnsSymbolDecoderILi12EE12DecodeSymbolEv:
   43|   141k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi12EE11EndDecodingEv:
  165|     57|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     57|  ans_.read_end();
  167|     57|}
_ZN5draco17RAnsSymbolDecoderILi13EEC2Ev:
   33|    351|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi13EE6CreateEPNS_13DecoderBufferE:
   59|    351|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    351|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 351]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    351|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    351|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    351|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 9, False: 342]
  ------------------
   67|      9|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 8]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|      9|  } else
   72|    342|#endif
   73|    342|  {
   74|    342|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 18, False: 324]
  ------------------
   75|     18|      return false;
   76|     18|    }
   77|    342|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    332|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 15, False: 317]
  ------------------
   83|     15|    return false;
   84|     15|  }
   85|    317|  probability_table_.resize(num_symbols_);
   86|    317|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 7, False: 310]
  ------------------
   87|      7|    return true;
   88|      7|  }
   89|       |  // Decode the table.
   90|   477k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 477k, False: 188]
  ------------------
   91|   477k|    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|   477k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 65, False: 477k]
  ------------------
   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|   477k|    const int token = prob_data & 3;
  102|   477k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 257k, False: 220k]
  ------------------
  103|   257k|      const uint32_t offset = prob_data >> 2;
  104|   257k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 33, False: 256k]
  ------------------
  105|     33|        return false;
  106|     33|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  8.69M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 8.43M, False: 256k]
  ------------------
  109|  8.43M|        probability_table_[i + j] = 0;
  110|  8.43M|      }
  111|   256k|      i += offset;
  112|   256k|    } else {
  113|   220k|      const int extra_bytes = token;
  114|   220k|      uint32_t prob = prob_data >> 2;
  115|   366k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 146k, False: 220k]
  ------------------
  116|   146k|        uint8_t eb;
  117|   146k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 24, False: 146k]
  ------------------
  118|     24|          return false;
  119|     24|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   146k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   146k|      }
  124|   220k|      probability_table_[i] = prob;
  125|   220k|    }
  126|   477k|  }
  127|    188|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 86, False: 102]
  ------------------
  128|     86|    return false;
  129|     86|  }
  130|    102|  return true;
  131|    188|}
_ZNK5draco17RAnsSymbolDecoderILi13EE11num_symbolsEv:
   38|    109|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi13EE13StartDecodingEPNS_13DecoderBufferE:
  135|    102|    DecoderBuffer *buffer) {
  136|    102|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    102|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    102|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    102|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 102]
  ------------------
  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|    102|#endif
  146|    102|  {
  147|    102|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 2, False: 100]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|    102|  }
  151|    100|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 29, False: 71]
  ------------------
  152|     29|    return false;
  153|     29|  }
  154|     71|  const uint8_t *const data_head =
  155|     71|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     71|  buffer->Advance(bytes_encoded);
  158|     71|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 20, False: 51]
  ------------------
  159|     20|    return false;
  160|     20|  }
  161|     51|  return true;
  162|     71|}
_ZN5draco17RAnsSymbolDecoderILi13EE12DecodeSymbolEv:
   43|   172k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi13EE11EndDecodingEv:
  165|     51|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     51|  ans_.read_end();
  167|     51|}
_ZN5draco17RAnsSymbolDecoderILi14EEC2Ev:
   33|    399|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi14EE6CreateEPNS_13DecoderBufferE:
   59|    399|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    399|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 399]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    399|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    399|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    399|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 49, False: 350]
  ------------------
   67|     49|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 4, False: 45]
  ------------------
   68|      4|      return false;
   69|      4|    }
   70|       |
   71|     49|  } else
   72|    350|#endif
   73|    350|  {
   74|    350|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 19, False: 331]
  ------------------
   75|     19|      return false;
   76|     19|    }
   77|    350|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    376|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 25, False: 351]
  ------------------
   83|     25|    return false;
   84|     25|  }
   85|    351|  probability_table_.resize(num_symbols_);
   86|    351|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 5, False: 346]
  ------------------
   87|      5|    return true;
   88|      5|  }
   89|       |  // Decode the table.
   90|   126k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 126k, False: 208]
  ------------------
   91|   126k|    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|   126k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 73, False: 126k]
  ------------------
   95|     73|      return false;
   96|     73|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   126k|    const int token = prob_data & 3;
  102|   126k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 47.7k, False: 78.4k]
  ------------------
  103|  47.7k|      const uint32_t offset = prob_data >> 2;
  104|  47.7k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 42, False: 47.6k]
  ------------------
  105|     42|        return false;
  106|     42|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  2.32M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 2.27M, False: 47.6k]
  ------------------
  109|  2.27M|        probability_table_[i + j] = 0;
  110|  2.27M|      }
  111|  47.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|   177k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 99.3k, False: 78.4k]
  ------------------
  116|  99.3k|        uint8_t eb;
  117|  99.3k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 23, False: 99.3k]
  ------------------
  118|     23|          return false;
  119|     23|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  99.3k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  99.3k|      }
  124|  78.4k|      probability_table_[i] = prob;
  125|  78.4k|    }
  126|   126k|  }
  127|    208|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 37, False: 171]
  ------------------
  128|     37|    return false;
  129|     37|  }
  130|    171|  return true;
  131|    208|}
_ZNK5draco17RAnsSymbolDecoderILi14EE11num_symbolsEv:
   38|    176|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi14EE13StartDecodingEPNS_13DecoderBufferE:
  135|    171|    DecoderBuffer *buffer) {
  136|    171|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    171|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    171|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    171|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 15, False: 156]
  ------------------
  140|     15|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 13]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     15|  } else
  145|    156|#endif
  146|    156|  {
  147|    156|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 3, False: 153]
  ------------------
  148|      3|      return false;
  149|      3|    }
  150|    156|  }
  151|    166|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 68, False: 98]
  ------------------
  152|     68|    return false;
  153|     68|  }
  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: 22, False: 76]
  ------------------
  159|     22|    return false;
  160|     22|  }
  161|     76|  return true;
  162|     98|}
_ZN5draco17RAnsSymbolDecoderILi14EE12DecodeSymbolEv:
   43|   194k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi14EE11EndDecodingEv:
  165|     76|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     76|  ans_.read_end();
  167|     76|}
_ZN5draco17RAnsSymbolDecoderILi15EEC2Ev:
   33|    368|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi15EE6CreateEPNS_13DecoderBufferE:
   59|    368|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    368|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 368]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    368|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    368|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    368|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 65, False: 303]
  ------------------
   67|     65|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 64]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     65|  } else
   72|    303|#endif
   73|    303|  {
   74|    303|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 11, False: 292]
  ------------------
   75|     11|      return false;
   76|     11|    }
   77|    303|  }
   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|    356|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 18, False: 338]
  ------------------
   83|     18|    return false;
   84|     18|  }
   85|    338|  probability_table_.resize(num_symbols_);
   86|    338|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 7, False: 331]
  ------------------
   87|      7|    return true;
   88|      7|  }
   89|       |  // Decode the table.
   90|  78.0k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 77.8k, False: 203]
  ------------------
   91|  77.8k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  77.8k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 72, False: 77.7k]
  ------------------
   95|     72|      return false;
   96|     72|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  77.7k|    const int token = prob_data & 3;
  102|  77.7k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 19.5k, False: 58.2k]
  ------------------
  103|  19.5k|      const uint32_t offset = prob_data >> 2;
  104|  19.5k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 30, False: 19.4k]
  ------------------
  105|     30|        return false;
  106|     30|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   843k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 823k, False: 19.4k]
  ------------------
  109|   823k|        probability_table_[i + j] = 0;
  110|   823k|      }
  111|  19.4k|      i += offset;
  112|  58.2k|    } else {
  113|  58.2k|      const int extra_bytes = token;
  114|  58.2k|      uint32_t prob = prob_data >> 2;
  115|   112k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 54.3k, False: 58.2k]
  ------------------
  116|  54.3k|        uint8_t eb;
  117|  54.3k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 26, False: 54.3k]
  ------------------
  118|     26|          return false;
  119|     26|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  54.3k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  54.3k|      }
  124|  58.2k|      probability_table_[i] = prob;
  125|  58.2k|    }
  126|  77.7k|  }
  127|    203|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 34, False: 169]
  ------------------
  128|     34|    return false;
  129|     34|  }
  130|    169|  return true;
  131|    203|}
_ZNK5draco17RAnsSymbolDecoderILi15EE11num_symbolsEv:
   38|    176|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi15EE13StartDecodingEPNS_13DecoderBufferE:
  135|    169|    DecoderBuffer *buffer) {
  136|    169|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    169|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    169|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    169|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 38, False: 131]
  ------------------
  140|     38|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 37]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     38|  } else
  145|    131|#endif
  146|    131|  {
  147|    131|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 1, False: 130]
  ------------------
  148|      1|      return false;
  149|      1|    }
  150|    131|  }
  151|    167|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 65, False: 102]
  ------------------
  152|     65|    return false;
  153|     65|  }
  154|    102|  const uint8_t *const data_head =
  155|    102|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    102|  buffer->Advance(bytes_encoded);
  158|    102|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 32, False: 70]
  ------------------
  159|     32|    return false;
  160|     32|  }
  161|     70|  return true;
  162|    102|}
_ZN5draco17RAnsSymbolDecoderILi15EE12DecodeSymbolEv:
   43|  6.20M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi15EE11EndDecodingEv:
  165|     70|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     70|  ans_.read_end();
  167|     70|}
_ZN5draco17RAnsSymbolDecoderILi16EEC2Ev:
   33|    397|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi16EE6CreateEPNS_13DecoderBufferE:
   59|    397|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    397|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 397]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    397|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    397|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    397|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 24, False: 373]
  ------------------
   67|     24|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 23]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     24|  } else
   72|    373|#endif
   73|    373|  {
   74|    373|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 4, False: 369]
  ------------------
   75|      4|      return false;
   76|      4|    }
   77|    373|  }
   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|    392|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 17, False: 375]
  ------------------
   83|     17|    return false;
   84|     17|  }
   85|    375|  probability_table_.resize(num_symbols_);
   86|    375|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 14, False: 361]
  ------------------
   87|     14|    return true;
   88|     14|  }
   89|       |  // Decode the table.
   90|  8.35k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 8.12k, False: 230]
  ------------------
   91|  8.12k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  8.12k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 65, False: 8.05k]
  ------------------
   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|  8.05k|    const int token = prob_data & 3;
  102|  8.05k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 3.93k, False: 4.12k]
  ------------------
  103|  3.93k|      const uint32_t offset = prob_data >> 2;
  104|  3.93k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 32, False: 3.90k]
  ------------------
  105|     32|        return false;
  106|     32|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   139k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 135k, False: 3.90k]
  ------------------
  109|   135k|        probability_table_[i + j] = 0;
  110|   135k|      }
  111|  3.90k|      i += offset;
  112|  4.12k|    } else {
  113|  4.12k|      const int extra_bytes = token;
  114|  4.12k|      uint32_t prob = prob_data >> 2;
  115|  7.81k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 3.73k, False: 4.08k]
  ------------------
  116|  3.73k|        uint8_t eb;
  117|  3.73k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 34, False: 3.69k]
  ------------------
  118|     34|          return false;
  119|     34|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  3.69k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  3.69k|      }
  124|  4.08k|      probability_table_[i] = prob;
  125|  4.08k|    }
  126|  8.05k|  }
  127|    230|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 38, False: 192]
  ------------------
  128|     38|    return false;
  129|     38|  }
  130|    192|  return true;
  131|    230|}
_ZNK5draco17RAnsSymbolDecoderILi16EE11num_symbolsEv:
   38|    206|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi16EE13StartDecodingEPNS_13DecoderBufferE:
  135|    192|    DecoderBuffer *buffer) {
  136|    192|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    192|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    192|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    192|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 5, False: 187]
  ------------------
  140|      5|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 3]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|      5|  } else
  145|    187|#endif
  146|    187|  {
  147|    187|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 16, False: 171]
  ------------------
  148|     16|      return false;
  149|     16|    }
  150|    187|  }
  151|    174|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 77, False: 97]
  ------------------
  152|     77|    return false;
  153|     77|  }
  154|     97|  const uint8_t *const data_head =
  155|     97|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     97|  buffer->Advance(bytes_encoded);
  158|     97|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 35, False: 62]
  ------------------
  159|     35|    return false;
  160|     35|  }
  161|     62|  return true;
  162|     97|}
_ZN5draco17RAnsSymbolDecoderILi16EE12DecodeSymbolEv:
   43|  14.4M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi16EE11EndDecodingEv:
  165|     62|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     62|  ans_.read_end();
  167|     62|}
_ZN5draco17RAnsSymbolDecoderILi17EEC2Ev:
   33|    425|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi17EE6CreateEPNS_13DecoderBufferE:
   59|    425|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    425|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 425]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    425|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    425|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    425|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 22, False: 403]
  ------------------
   67|     22|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 21]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     22|  } else
   72|    403|#endif
   73|    403|  {
   74|    403|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 22, False: 381]
  ------------------
   75|     22|      return false;
   76|     22|    }
   77|    403|  }
   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|    402|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 29, False: 373]
  ------------------
   83|     29|    return false;
   84|     29|  }
   85|    373|  probability_table_.resize(num_symbols_);
   86|    373|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 12, False: 361]
  ------------------
   87|     12|    return true;
   88|     12|  }
   89|       |  // Decode the table.
   90|   224k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 224k, False: 228]
  ------------------
   91|   224k|    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|   224k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 67, False: 224k]
  ------------------
   95|     67|      return false;
   96|     67|    }
   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|   224k|    const int token = prob_data & 3;
  102|   224k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 182k, False: 41.9k]
  ------------------
  103|   182k|      const uint32_t offset = prob_data >> 2;
  104|   182k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 41, False: 182k]
  ------------------
  105|     41|        return false;
  106|     41|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  9.02M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 8.84M, False: 182k]
  ------------------
  109|  8.84M|        probability_table_[i + j] = 0;
  110|  8.84M|      }
  111|   182k|      i += offset;
  112|   182k|    } else {
  113|  41.9k|      const int extra_bytes = token;
  114|  41.9k|      uint32_t prob = prob_data >> 2;
  115|  53.8k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 11.9k, False: 41.9k]
  ------------------
  116|  11.9k|        uint8_t eb;
  117|  11.9k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 25, False: 11.9k]
  ------------------
  118|     25|          return false;
  119|     25|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  11.9k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  11.9k|      }
  124|  41.9k|      probability_table_[i] = prob;
  125|  41.9k|    }
  126|   224k|  }
  127|    228|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 36, False: 192]
  ------------------
  128|     36|    return false;
  129|     36|  }
  130|    192|  return true;
  131|    228|}
_ZNK5draco17RAnsSymbolDecoderILi17EE11num_symbolsEv:
   38|    204|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi17EE13StartDecodingEPNS_13DecoderBufferE:
  135|    192|    DecoderBuffer *buffer) {
  136|    192|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    192|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    192|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    192|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 10, False: 182]
  ------------------
  140|     10|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 8]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     10|  } else
  145|    182|#endif
  146|    182|  {
  147|    182|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 8, False: 174]
  ------------------
  148|      8|      return false;
  149|      8|    }
  150|    182|  }
  151|    182|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 78, False: 104]
  ------------------
  152|     78|    return false;
  153|     78|  }
  154|    104|  const uint8_t *const data_head =
  155|    104|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    104|  buffer->Advance(bytes_encoded);
  158|    104|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 25, False: 79]
  ------------------
  159|     25|    return false;
  160|     25|  }
  161|     79|  return true;
  162|    104|}
_ZN5draco17RAnsSymbolDecoderILi17EE12DecodeSymbolEv:
   43|  8.10M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi17EE11EndDecodingEv:
  165|     79|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     79|  ans_.read_end();
  167|     79|}
_ZN5draco17RAnsSymbolDecoderILi18EEC2Ev:
   33|    424|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi18EE6CreateEPNS_13DecoderBufferE:
   59|    424|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    424|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 424]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    424|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    424|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    424|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 45, False: 379]
  ------------------
   67|     45|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 43]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     45|  } else
   72|    379|#endif
   73|    379|  {
   74|    379|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 10, False: 369]
  ------------------
   75|     10|      return false;
   76|     10|    }
   77|    379|  }
   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|    412|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 10, False: 402]
  ------------------
   83|     10|    return false;
   84|     10|  }
   85|    402|  probability_table_.resize(num_symbols_);
   86|    402|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 6, False: 396]
  ------------------
   87|      6|    return true;
   88|      6|  }
   89|       |  // Decode the table.
   90|  14.1k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 13.8k, False: 262]
  ------------------
   91|  13.8k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  13.8k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 81, False: 13.8k]
  ------------------
   95|     81|      return false;
   96|     81|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  13.8k|    const int token = prob_data & 3;
  102|  13.8k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 5.13k, False: 8.67k]
  ------------------
  103|  5.13k|      const uint32_t offset = prob_data >> 2;
  104|  5.13k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 35, False: 5.09k]
  ------------------
  105|     35|        return false;
  106|     35|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   183k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 177k, False: 5.09k]
  ------------------
  109|   177k|        probability_table_[i + j] = 0;
  110|   177k|      }
  111|  5.09k|      i += offset;
  112|  8.67k|    } else {
  113|  8.67k|      const int extra_bytes = token;
  114|  8.67k|      uint32_t prob = prob_data >> 2;
  115|  14.1k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 5.52k, False: 8.65k]
  ------------------
  116|  5.52k|        uint8_t eb;
  117|  5.52k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 18, False: 5.51k]
  ------------------
  118|     18|          return false;
  119|     18|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  5.51k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  5.51k|      }
  124|  8.65k|      probability_table_[i] = prob;
  125|  8.65k|    }
  126|  13.8k|  }
  127|    262|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 37, False: 225]
  ------------------
  128|     37|    return false;
  129|     37|  }
  130|    225|  return true;
  131|    262|}
_ZNK5draco17RAnsSymbolDecoderILi18EE11num_symbolsEv:
   38|    231|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi18EE13StartDecodingEPNS_13DecoderBufferE:
  135|    225|    DecoderBuffer *buffer) {
  136|    225|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    225|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    225|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    225|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 29, False: 196]
  ------------------
  140|     29|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 3, False: 26]
  ------------------
  141|      3|      return false;
  142|      3|    }
  143|       |
  144|     29|  } else
  145|    196|#endif
  146|    196|  {
  147|    196|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 17, False: 179]
  ------------------
  148|     17|      return false;
  149|     17|    }
  150|    196|  }
  151|    205|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 108, False: 97]
  ------------------
  152|    108|    return false;
  153|    108|  }
  154|     97|  const uint8_t *const data_head =
  155|     97|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     97|  buffer->Advance(bytes_encoded);
  158|     97|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 24, False: 73]
  ------------------
  159|     24|    return false;
  160|     24|  }
  161|     73|  return true;
  162|     97|}
_ZN5draco17RAnsSymbolDecoderILi18EE12DecodeSymbolEv:
   43|   107k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi18EE11EndDecodingEv:
  165|     73|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     73|  ans_.read_end();
  167|     73|}

_ZN5draco13DecodeSymbolsEjiPNS_13DecoderBufferEPj:
   33|  12.8k|                   DecoderBuffer *src_buffer, uint32_t *out_values) {
   34|  12.8k|  if (num_values == 0) {
  ------------------
  |  Branch (34:7): [True: 19, False: 12.7k]
  ------------------
   35|     19|    return true;
   36|     19|  }
   37|       |  // Decode which scheme to use.
   38|  12.7k|  uint8_t scheme;
   39|  12.7k|  if (!src_buffer->Decode(&scheme)) {
  ------------------
  |  Branch (39:7): [True: 178, False: 12.6k]
  ------------------
   40|    178|    return false;
   41|    178|  }
   42|  12.6k|  if (scheme == SYMBOL_CODING_TAGGED) {
  ------------------
  |  Branch (42:7): [True: 1.17k, False: 11.4k]
  ------------------
   43|  1.17k|    return DecodeTaggedSymbols<RAnsSymbolDecoder>(num_values, num_components,
   44|  1.17k|                                                  src_buffer, out_values);
   45|  11.4k|  } else if (scheme == SYMBOL_CODING_RAW) {
  ------------------
  |  Branch (45:14): [True: 8.34k, False: 3.09k]
  ------------------
   46|  8.34k|    return DecodeRawSymbols<RAnsSymbolDecoder>(num_values, src_buffer,
   47|  8.34k|                                               out_values);
   48|  8.34k|  }
   49|  3.09k|  return false;
   50|  12.6k|}
_ZN5draco19DecodeTaggedSymbolsINS_17RAnsSymbolDecoderEEEbjiPNS_13DecoderBufferEPj:
   54|  1.17k|                         DecoderBuffer *src_buffer, uint32_t *out_values) {
   55|       |  // Decode the encoded data.
   56|  1.17k|  SymbolDecoderT<5> tag_decoder;
   57|  1.17k|  if (!tag_decoder.Create(src_buffer)) {
  ------------------
  |  Branch (57:7): [True: 608, False: 567]
  ------------------
   58|    608|    return false;
   59|    608|  }
   60|       |
   61|    567|  if (!tag_decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (61:7): [True: 293, False: 274]
  ------------------
   62|    293|    return false;
   63|    293|  }
   64|       |
   65|    274|  if (num_values > 0 && tag_decoder.num_symbols() == 0) {
  ------------------
  |  Branch (65:7): [True: 274, False: 0]
  |  Branch (65:25): [True: 61, False: 213]
  ------------------
   66|     61|    return false;  // Wrong number of symbols.
   67|     61|  }
   68|       |
   69|       |  // src_buffer now points behind the encoded tag data (to the place where the
   70|       |  // values are encoded).
   71|    213|  src_buffer->StartBitDecoding(false, nullptr);
   72|    213|  int value_id = 0;
   73|   621k|  for (uint32_t i = 0; i < num_values; i += num_components) {
  ------------------
  |  Branch (73:24): [True: 621k, False: 212]
  ------------------
   74|       |    // Decode the tag.
   75|   621k|    const uint32_t bit_length = tag_decoder.DecodeSymbol();
   76|       |    // Decode the actual value.
   77|  1.25M|    for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (77:21): [True: 629k, False: 621k]
  ------------------
   78|   629k|      uint32_t val;
   79|   629k|      if (!src_buffer->DecodeLeastSignificantBits32(bit_length, &val)) {
  ------------------
  |  Branch (79:11): [True: 1, False: 629k]
  ------------------
   80|      1|        return false;
   81|      1|      }
   82|   629k|      out_values[value_id++] = val;
   83|   629k|    }
   84|   621k|  }
   85|    212|  tag_decoder.EndDecoding();
   86|    212|  src_buffer->EndBitDecoding();
   87|    212|  return true;
   88|    213|}
_ZN5draco16DecodeRawSymbolsINS_17RAnsSymbolDecoderEEEbjPNS_13DecoderBufferEPj:
  116|  8.34k|                      uint32_t *out_values) {
  117|  8.34k|  uint8_t max_bit_length;
  118|  8.34k|  if (!src_buffer->Decode(&max_bit_length)) {
  ------------------
  |  Branch (118:7): [True: 47, False: 8.30k]
  ------------------
  119|     47|    return false;
  120|     47|  }
  121|  8.30k|  switch (max_bit_length) {
  122|    643|    case 1:
  ------------------
  |  Branch (122:5): [True: 643, False: 7.65k]
  ------------------
  123|    643|      return DecodeRawSymbolsInternal<SymbolDecoderT<1>>(num_values, src_buffer,
  124|    643|                                                         out_values);
  125|    530|    case 2:
  ------------------
  |  Branch (125:5): [True: 530, False: 7.77k]
  ------------------
  126|    530|      return DecodeRawSymbolsInternal<SymbolDecoderT<2>>(num_values, src_buffer,
  127|    530|                                                         out_values);
  128|    602|    case 3:
  ------------------
  |  Branch (128:5): [True: 602, False: 7.69k]
  ------------------
  129|    602|      return DecodeRawSymbolsInternal<SymbolDecoderT<3>>(num_values, src_buffer,
  130|    602|                                                         out_values);
  131|    359|    case 4:
  ------------------
  |  Branch (131:5): [True: 359, False: 7.94k]
  ------------------
  132|    359|      return DecodeRawSymbolsInternal<SymbolDecoderT<4>>(num_values, src_buffer,
  133|    359|                                                         out_values);
  134|    238|    case 5:
  ------------------
  |  Branch (134:5): [True: 238, False: 8.06k]
  ------------------
  135|    238|      return DecodeRawSymbolsInternal<SymbolDecoderT<5>>(num_values, src_buffer,
  136|    238|                                                         out_values);
  137|    438|    case 6:
  ------------------
  |  Branch (137:5): [True: 438, False: 7.86k]
  ------------------
  138|    438|      return DecodeRawSymbolsInternal<SymbolDecoderT<6>>(num_values, src_buffer,
  139|    438|                                                         out_values);
  140|    488|    case 7:
  ------------------
  |  Branch (140:5): [True: 488, False: 7.81k]
  ------------------
  141|    488|      return DecodeRawSymbolsInternal<SymbolDecoderT<7>>(num_values, src_buffer,
  142|    488|                                                         out_values);
  143|    493|    case 8:
  ------------------
  |  Branch (143:5): [True: 493, False: 7.80k]
  ------------------
  144|    493|      return DecodeRawSymbolsInternal<SymbolDecoderT<8>>(num_values, src_buffer,
  145|    493|                                                         out_values);
  146|    474|    case 9:
  ------------------
  |  Branch (146:5): [True: 474, False: 7.82k]
  ------------------
  147|    474|      return DecodeRawSymbolsInternal<SymbolDecoderT<9>>(num_values, src_buffer,
  148|    474|                                                         out_values);
  149|    454|    case 10:
  ------------------
  |  Branch (149:5): [True: 454, False: 7.84k]
  ------------------
  150|    454|      return DecodeRawSymbolsInternal<SymbolDecoderT<10>>(
  151|    454|          num_values, src_buffer, out_values);
  152|    423|    case 11:
  ------------------
  |  Branch (152:5): [True: 423, False: 7.87k]
  ------------------
  153|    423|      return DecodeRawSymbolsInternal<SymbolDecoderT<11>>(
  154|    423|          num_values, src_buffer, out_values);
  155|    436|    case 12:
  ------------------
  |  Branch (155:5): [True: 436, False: 7.86k]
  ------------------
  156|    436|      return DecodeRawSymbolsInternal<SymbolDecoderT<12>>(
  157|    436|          num_values, src_buffer, out_values);
  158|    351|    case 13:
  ------------------
  |  Branch (158:5): [True: 351, False: 7.95k]
  ------------------
  159|    351|      return DecodeRawSymbolsInternal<SymbolDecoderT<13>>(
  160|    351|          num_values, src_buffer, out_values);
  161|    399|    case 14:
  ------------------
  |  Branch (161:5): [True: 399, False: 7.90k]
  ------------------
  162|    399|      return DecodeRawSymbolsInternal<SymbolDecoderT<14>>(
  163|    399|          num_values, src_buffer, out_values);
  164|    368|    case 15:
  ------------------
  |  Branch (164:5): [True: 368, False: 7.93k]
  ------------------
  165|    368|      return DecodeRawSymbolsInternal<SymbolDecoderT<15>>(
  166|    368|          num_values, src_buffer, out_values);
  167|    397|    case 16:
  ------------------
  |  Branch (167:5): [True: 397, False: 7.90k]
  ------------------
  168|    397|      return DecodeRawSymbolsInternal<SymbolDecoderT<16>>(
  169|    397|          num_values, src_buffer, out_values);
  170|    425|    case 17:
  ------------------
  |  Branch (170:5): [True: 425, False: 7.87k]
  ------------------
  171|    425|      return DecodeRawSymbolsInternal<SymbolDecoderT<17>>(
  172|    425|          num_values, src_buffer, out_values);
  173|    424|    case 18:
  ------------------
  |  Branch (173:5): [True: 424, False: 7.87k]
  ------------------
  174|    424|      return DecodeRawSymbolsInternal<SymbolDecoderT<18>>(
  175|    424|          num_values, src_buffer, out_values);
  176|    359|    default:
  ------------------
  |  Branch (176:5): [True: 359, False: 7.94k]
  ------------------
  177|    359|      return false;
  178|  8.30k|  }
  179|  8.30k|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi1EEEEEbjPNS_13DecoderBufferEPj:
   92|    643|                              uint32_t *out_values) {
   93|    643|  SymbolDecoderT decoder;
   94|    643|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 364, False: 279]
  ------------------
   95|    364|    return false;
   96|    364|  }
   97|       |
   98|    279|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 279, False: 0]
  |  Branch (98:25): [True: 22, False: 257]
  ------------------
   99|     22|    return false;  // Wrong number of symbols.
  100|     22|  }
  101|       |
  102|    257|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 97, False: 160]
  ------------------
  103|     97|    return false;
  104|     97|  }
  105|   181M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 181M, False: 160]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   181M|    const uint32_t value = decoder.DecodeSymbol();
  108|   181M|    out_values[i] = value;
  109|   181M|  }
  110|    160|  decoder.EndDecoding();
  111|    160|  return true;
  112|    257|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi2EEEEEbjPNS_13DecoderBufferEPj:
   92|    530|                              uint32_t *out_values) {
   93|    530|  SymbolDecoderT decoder;
   94|    530|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 242, False: 288]
  ------------------
   95|    242|    return false;
   96|    242|  }
   97|       |
   98|    288|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 288, False: 0]
  |  Branch (98:25): [True: 7, False: 281]
  ------------------
   99|      7|    return false;  // Wrong number of symbols.
  100|      7|  }
  101|       |
  102|    281|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 137, False: 144]
  ------------------
  103|    137|    return false;
  104|    137|  }
  105|   104M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 104M, False: 144]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   104M|    const uint32_t value = decoder.DecodeSymbol();
  108|   104M|    out_values[i] = value;
  109|   104M|  }
  110|    144|  decoder.EndDecoding();
  111|    144|  return true;
  112|    281|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi3EEEEEbjPNS_13DecoderBufferEPj:
   92|    602|                              uint32_t *out_values) {
   93|    602|  SymbolDecoderT decoder;
   94|    602|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 201, False: 401]
  ------------------
   95|    201|    return false;
   96|    201|  }
   97|       |
   98|    401|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 401, False: 0]
  |  Branch (98:25): [True: 14, False: 387]
  ------------------
   99|     14|    return false;  // Wrong number of symbols.
  100|     14|  }
  101|       |
  102|    387|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 168, False: 219]
  ------------------
  103|    168|    return false;
  104|    168|  }
  105|  21.4M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 21.4M, False: 219]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  21.4M|    const uint32_t value = decoder.DecodeSymbol();
  108|  21.4M|    out_values[i] = value;
  109|  21.4M|  }
  110|    219|  decoder.EndDecoding();
  111|    219|  return true;
  112|    387|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi4EEEEEbjPNS_13DecoderBufferEPj:
   92|    359|                              uint32_t *out_values) {
   93|    359|  SymbolDecoderT decoder;
   94|    359|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 158, False: 201]
  ------------------
   95|    158|    return false;
   96|    158|  }
   97|       |
   98|    201|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 201, False: 0]
  |  Branch (98:25): [True: 14, False: 187]
  ------------------
   99|     14|    return false;  // Wrong number of symbols.
  100|     14|  }
  101|       |
  102|    187|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 48, False: 139]
  ------------------
  103|     48|    return false;
  104|     48|  }
  105|  2.37M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 2.37M, False: 139]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  2.37M|    const uint32_t value = decoder.DecodeSymbol();
  108|  2.37M|    out_values[i] = value;
  109|  2.37M|  }
  110|    139|  decoder.EndDecoding();
  111|    139|  return true;
  112|    187|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi5EEEEEbjPNS_13DecoderBufferEPj:
   92|    238|                              uint32_t *out_values) {
   93|    238|  SymbolDecoderT decoder;
   94|    238|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 39, False: 199]
  ------------------
   95|     39|    return false;
   96|     39|  }
   97|       |
   98|    199|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 199, False: 0]
  |  Branch (98:25): [True: 113, False: 86]
  ------------------
   99|    113|    return false;  // Wrong number of symbols.
  100|    113|  }
  101|       |
  102|     86|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 8, False: 78]
  ------------------
  103|      8|    return false;
  104|      8|  }
  105|  5.41M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 5.41M, False: 78]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  5.41M|    const uint32_t value = decoder.DecodeSymbol();
  108|  5.41M|    out_values[i] = value;
  109|  5.41M|  }
  110|     78|  decoder.EndDecoding();
  111|     78|  return true;
  112|     86|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi6EEEEEbjPNS_13DecoderBufferEPj:
   92|    438|                              uint32_t *out_values) {
   93|    438|  SymbolDecoderT decoder;
   94|    438|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 200, False: 238]
  ------------------
   95|    200|    return false;
   96|    200|  }
   97|       |
   98|    238|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 238, False: 0]
  |  Branch (98:25): [True: 10, False: 228]
  ------------------
   99|     10|    return false;  // Wrong number of symbols.
  100|     10|  }
  101|       |
  102|    228|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 130, False: 98]
  ------------------
  103|    130|    return false;
  104|    130|  }
  105|  35.3M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 35.3M, False: 98]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  35.3M|    const uint32_t value = decoder.DecodeSymbol();
  108|  35.3M|    out_values[i] = value;
  109|  35.3M|  }
  110|     98|  decoder.EndDecoding();
  111|     98|  return true;
  112|    228|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi7EEEEEbjPNS_13DecoderBufferEPj:
   92|    488|                              uint32_t *out_values) {
   93|    488|  SymbolDecoderT decoder;
   94|    488|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 206, False: 282]
  ------------------
   95|    206|    return false;
   96|    206|  }
   97|       |
   98|    282|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 282, False: 0]
  |  Branch (98:25): [True: 7, False: 275]
  ------------------
   99|      7|    return false;  // Wrong number of symbols.
  100|      7|  }
  101|       |
  102|    275|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 109, False: 166]
  ------------------
  103|    109|    return false;
  104|    109|  }
  105|  9.32M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 9.32M, False: 166]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  9.32M|    const uint32_t value = decoder.DecodeSymbol();
  108|  9.32M|    out_values[i] = value;
  109|  9.32M|  }
  110|    166|  decoder.EndDecoding();
  111|    166|  return true;
  112|    275|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi8EEEEEbjPNS_13DecoderBufferEPj:
   92|    493|                              uint32_t *out_values) {
   93|    493|  SymbolDecoderT decoder;
   94|    493|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 221, False: 272]
  ------------------
   95|    221|    return false;
   96|    221|  }
   97|       |
   98|    272|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 272, False: 0]
  |  Branch (98:25): [True: 17, False: 255]
  ------------------
   99|     17|    return false;  // Wrong number of symbols.
  100|     17|  }
  101|       |
  102|    255|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 170, False: 85]
  ------------------
  103|    170|    return false;
  104|    170|  }
  105|  11.3M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 11.3M, False: 85]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  11.3M|    const uint32_t value = decoder.DecodeSymbol();
  108|  11.3M|    out_values[i] = value;
  109|  11.3M|  }
  110|     85|  decoder.EndDecoding();
  111|     85|  return true;
  112|    255|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi9EEEEEbjPNS_13DecoderBufferEPj:
   92|    474|                              uint32_t *out_values) {
   93|    474|  SymbolDecoderT decoder;
   94|    474|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 251, False: 223]
  ------------------
   95|    251|    return false;
   96|    251|  }
   97|       |
   98|    223|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 223, False: 0]
  |  Branch (98:25): [True: 9, False: 214]
  ------------------
   99|      9|    return false;  // Wrong number of symbols.
  100|      9|  }
  101|       |
  102|    214|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 126, False: 88]
  ------------------
  103|    126|    return false;
  104|    126|  }
  105|  5.56M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 5.56M, False: 88]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  5.56M|    const uint32_t value = decoder.DecodeSymbol();
  108|  5.56M|    out_values[i] = value;
  109|  5.56M|  }
  110|     88|  decoder.EndDecoding();
  111|     88|  return true;
  112|    214|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi10EEEEEbjPNS_13DecoderBufferEPj:
   92|    454|                              uint32_t *out_values) {
   93|    454|  SymbolDecoderT decoder;
   94|    454|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 250, False: 204]
  ------------------
   95|    250|    return false;
   96|    250|  }
   97|       |
   98|    204|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 204, False: 0]
  |  Branch (98:25): [True: 13, False: 191]
  ------------------
   99|     13|    return false;  // Wrong number of symbols.
  100|     13|  }
  101|       |
  102|    191|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 133, False: 58]
  ------------------
  103|    133|    return false;
  104|    133|  }
  105|   369k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 369k, False: 58]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   369k|    const uint32_t value = decoder.DecodeSymbol();
  108|   369k|    out_values[i] = value;
  109|   369k|  }
  110|     58|  decoder.EndDecoding();
  111|     58|  return true;
  112|    191|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi11EEEEEbjPNS_13DecoderBufferEPj:
   92|    423|                              uint32_t *out_values) {
   93|    423|  SymbolDecoderT decoder;
   94|    423|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 273, False: 150]
  ------------------
   95|    273|    return false;
   96|    273|  }
   97|       |
   98|    150|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 150, False: 0]
  |  Branch (98:25): [True: 9, False: 141]
  ------------------
   99|      9|    return false;  // Wrong number of symbols.
  100|      9|  }
  101|       |
  102|    141|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 93, False: 48]
  ------------------
  103|     93|    return false;
  104|     93|  }
  105|   219k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 219k, False: 48]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   219k|    const uint32_t value = decoder.DecodeSymbol();
  108|   219k|    out_values[i] = value;
  109|   219k|  }
  110|     48|  decoder.EndDecoding();
  111|     48|  return true;
  112|    141|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi12EEEEEbjPNS_13DecoderBufferEPj:
   92|    436|                              uint32_t *out_values) {
   93|    436|  SymbolDecoderT decoder;
   94|    436|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 239, False: 197]
  ------------------
   95|    239|    return false;
   96|    239|  }
   97|       |
   98|    197|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 197, False: 0]
  |  Branch (98:25): [True: 16, False: 181]
  ------------------
   99|     16|    return false;  // Wrong number of symbols.
  100|     16|  }
  101|       |
  102|    181|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 124, False: 57]
  ------------------
  103|    124|    return false;
  104|    124|  }
  105|   141k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 141k, False: 57]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   141k|    const uint32_t value = decoder.DecodeSymbol();
  108|   141k|    out_values[i] = value;
  109|   141k|  }
  110|     57|  decoder.EndDecoding();
  111|     57|  return true;
  112|    181|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi13EEEEEbjPNS_13DecoderBufferEPj:
   92|    351|                              uint32_t *out_values) {
   93|    351|  SymbolDecoderT decoder;
   94|    351|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 242, False: 109]
  ------------------
   95|    242|    return false;
   96|    242|  }
   97|       |
   98|    109|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 109, False: 0]
  |  Branch (98:25): [True: 7, False: 102]
  ------------------
   99|      7|    return false;  // Wrong number of symbols.
  100|      7|  }
  101|       |
  102|    102|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 51, False: 51]
  ------------------
  103|     51|    return false;
  104|     51|  }
  105|   172k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 172k, False: 51]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   172k|    const uint32_t value = decoder.DecodeSymbol();
  108|   172k|    out_values[i] = value;
  109|   172k|  }
  110|     51|  decoder.EndDecoding();
  111|     51|  return true;
  112|    102|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi14EEEEEbjPNS_13DecoderBufferEPj:
   92|    399|                              uint32_t *out_values) {
   93|    399|  SymbolDecoderT decoder;
   94|    399|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 223, False: 176]
  ------------------
   95|    223|    return false;
   96|    223|  }
   97|       |
   98|    176|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 176, False: 0]
  |  Branch (98:25): [True: 5, False: 171]
  ------------------
   99|      5|    return false;  // Wrong number of symbols.
  100|      5|  }
  101|       |
  102|    171|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 95, False: 76]
  ------------------
  103|     95|    return false;
  104|     95|  }
  105|   194k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 194k, False: 76]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   194k|    const uint32_t value = decoder.DecodeSymbol();
  108|   194k|    out_values[i] = value;
  109|   194k|  }
  110|     76|  decoder.EndDecoding();
  111|     76|  return true;
  112|    171|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi15EEEEEbjPNS_13DecoderBufferEPj:
   92|    368|                              uint32_t *out_values) {
   93|    368|  SymbolDecoderT decoder;
   94|    368|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 192, False: 176]
  ------------------
   95|    192|    return false;
   96|    192|  }
   97|       |
   98|    176|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 176, False: 0]
  |  Branch (98:25): [True: 7, False: 169]
  ------------------
   99|      7|    return false;  // Wrong number of symbols.
  100|      7|  }
  101|       |
  102|    169|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 99, False: 70]
  ------------------
  103|     99|    return false;
  104|     99|  }
  105|  6.20M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 6.20M, False: 70]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  6.20M|    const uint32_t value = decoder.DecodeSymbol();
  108|  6.20M|    out_values[i] = value;
  109|  6.20M|  }
  110|     70|  decoder.EndDecoding();
  111|     70|  return true;
  112|    169|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi16EEEEEbjPNS_13DecoderBufferEPj:
   92|    397|                              uint32_t *out_values) {
   93|    397|  SymbolDecoderT decoder;
   94|    397|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 191, False: 206]
  ------------------
   95|    191|    return false;
   96|    191|  }
   97|       |
   98|    206|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 206, False: 0]
  |  Branch (98:25): [True: 14, False: 192]
  ------------------
   99|     14|    return false;  // Wrong number of symbols.
  100|     14|  }
  101|       |
  102|    192|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 130, False: 62]
  ------------------
  103|    130|    return false;
  104|    130|  }
  105|  14.4M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 14.4M, False: 62]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  14.4M|    const uint32_t value = decoder.DecodeSymbol();
  108|  14.4M|    out_values[i] = value;
  109|  14.4M|  }
  110|     62|  decoder.EndDecoding();
  111|     62|  return true;
  112|    192|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi17EEEEEbjPNS_13DecoderBufferEPj:
   92|    425|                              uint32_t *out_values) {
   93|    425|  SymbolDecoderT decoder;
   94|    425|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 221, False: 204]
  ------------------
   95|    221|    return false;
   96|    221|  }
   97|       |
   98|    204|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 204, False: 0]
  |  Branch (98:25): [True: 12, False: 192]
  ------------------
   99|     12|    return false;  // Wrong number of symbols.
  100|     12|  }
  101|       |
  102|    192|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 113, False: 79]
  ------------------
  103|    113|    return false;
  104|    113|  }
  105|  8.10M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 8.10M, False: 79]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  8.10M|    const uint32_t value = decoder.DecodeSymbol();
  108|  8.10M|    out_values[i] = value;
  109|  8.10M|  }
  110|     79|  decoder.EndDecoding();
  111|     79|  return true;
  112|    192|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi18EEEEEbjPNS_13DecoderBufferEPj:
   92|    424|                              uint32_t *out_values) {
   93|    424|  SymbolDecoderT decoder;
   94|    424|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 193, False: 231]
  ------------------
   95|    193|    return false;
   96|    193|  }
   97|       |
   98|    231|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 231, False: 0]
  |  Branch (98:25): [True: 6, False: 225]
  ------------------
   99|      6|    return false;  // Wrong number of symbols.
  100|      6|  }
  101|       |
  102|    225|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 152, False: 73]
  ------------------
  103|    152|    return false;
  104|    152|  }
  105|   107k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 107k, False: 73]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   107k|    const uint32_t value = decoder.DecodeSymbol();
  108|   107k|    out_values[i] = value;
  109|   107k|  }
  110|     73|  decoder.EndDecoding();
  111|     73|  return true;
  112|    225|}

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

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

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

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

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

_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE10GetDecoderEv:
   65|  8.65k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE14GetCornerTableEv:
   66|  2.83k|  const CornerTable *GetCornerTable() const override {
   67|  2.83k|    return corner_table_.get();
   68|  2.83k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  2.91M|                       int *out_encoder_split_symbol_id) {
   87|  2.91M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 2.58M, False: 332k]
  ------------------
   88|  2.58M|      return false;
   89|  2.58M|    }
   90|   332k|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 21, False: 331k]
  ------------------
   91|   332k|        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|     21|      *out_encoder_split_symbol_id = -1;
   98|     21|      return true;
   99|     21|    }
  100|   331k|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 330k, False: 1.25k]
  ------------------
  101|   330k|      return false;
  102|   330k|    }
  103|  1.25k|    *out_face_edge =
  104|  1.25k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  1.25k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  1.25k|    topology_split_data_.pop_back();
  108|  1.25k|    return true;
  109|   331k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  12.1M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  12.1M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  12.1M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  12.1M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE13AttributeDataC2Ev:
  210|  16.2k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE10GetDecoderEv:
   65|  4.96k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE14GetCornerTableEv:
   66|  3.14k|  const CornerTable *GetCornerTable() const override {
   67|  3.14k|    return corner_table_.get();
   68|  3.14k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  26.6M|                       int *out_encoder_split_symbol_id) {
   87|  26.6M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 23.3M, False: 3.28M]
  ------------------
   88|  23.3M|      return false;
   89|  23.3M|    }
   90|  3.28M|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 37, False: 3.28M]
  ------------------
   91|  3.28M|        static_cast<uint32_t>(encoder_symbol_id)) {
   92|       |      // Something is wrong; if the desired source symbol is greater than the
   93|       |      // current encoder_symbol_id, we missed it, or the input was tampered
   94|       |      // (|encoder_symbol_id| keeps decreasing).
   95|       |      // Return invalid symbol id to notify the decoder that there was an
   96|       |      // error.
   97|     37|      *out_encoder_split_symbol_id = -1;
   98|     37|      return true;
   99|     37|    }
  100|  3.28M|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 3.27M, False: 1.11k]
  ------------------
  101|  3.27M|      return false;
  102|  3.27M|    }
  103|  1.11k|    *out_face_edge =
  104|  1.11k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  1.11k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  1.11k|    topology_split_data_.pop_back();
  108|  1.11k|    return true;
  109|  3.28M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  79.3M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  79.3M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  79.3M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  79.3M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE13AttributeDataC2Ev:
  210|  9.54k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE10GetDecoderEv:
   65|  13.9k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE14GetCornerTableEv:
   66|  2.78k|  const CornerTable *GetCornerTable() const override {
   67|  2.78k|    return corner_table_.get();
   68|  2.78k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  61.7M|                       int *out_encoder_split_symbol_id) {
   87|  61.7M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 61.2M, False: 488k]
  ------------------
   88|  61.2M|      return false;
   89|  61.2M|    }
   90|   488k|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 38, False: 488k]
  ------------------
   91|   488k|        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|     38|      *out_encoder_split_symbol_id = -1;
   98|     38|      return true;
   99|     38|    }
  100|   488k|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 487k, False: 958]
  ------------------
  101|   487k|      return false;
  102|   487k|    }
  103|    958|    *out_face_edge =
  104|    958|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|    958|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|    958|    topology_split_data_.pop_back();
  108|    958|    return true;
  109|   488k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  66.4M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  66.4M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  66.4M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  66.4M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE13AttributeDataC2Ev:
  210|  10.5k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}

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

_ZN5draco13HoleEventDataC2Ev:
  118|   475k|  HoleEventData() : symbol_id(0) {}

_ZN5draco31MeshEdgebreakerTraversalDecoderC2Ev:
   33|  8.55k|      : attribute_connectivity_decoders_(nullptr),
   34|  8.55k|        num_attribute_data_(0),
   35|  8.55k|        decoder_impl_(nullptr) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder4InitEPNS_35MeshEdgebreakerDecoderImplInterfaceE:
   36|  7.11k|  void Init(MeshEdgebreakerDecoderImplInterface *decoder) {
   37|  7.11k|    decoder_impl_ = decoder;
   38|  7.11k|    buffer_.Init(decoder->GetDecoder()->buffer()->data_head(),
   39|  7.11k|                 decoder->GetDecoder()->buffer()->remaining_size(),
   40|  7.11k|                 decoder->GetDecoder()->buffer()->bitstream_version());
   41|  7.11k|  }
_ZNK5draco31MeshEdgebreakerTraversalDecoder16BitstreamVersionEv:
   44|  6.19k|  uint16_t BitstreamVersion() const {
   45|  6.19k|    return decoder_impl_->GetDecoder()->bitstream_version();
   46|  6.19k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder21SetNumEncodedVerticesEi:
   50|  2.88k|  void SetNumEncodedVertices(int /* num_vertices */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19SetNumAttributeDataEi:
   54|  7.11k|  void SetNumAttributeData(int num_data) { num_attribute_data_ = num_data; }
_ZN5draco31MeshEdgebreakerTraversalDecoder5StartEPNS_13DecoderBufferE:
   59|  4.53k|  bool Start(DecoderBuffer *out_buffer) {
   60|       |    // Decode symbols from the main buffer decoder and face configurations from
   61|       |    // the start_face_buffer decoder.
   62|  4.53k|    if (!DecodeTraversalSymbols()) {
  ------------------
  |  Branch (62:9): [True: 157, False: 4.38k]
  ------------------
   63|    157|      return false;
   64|    157|    }
   65|       |
   66|  4.38k|    if (!DecodeStartFaces()) {
  ------------------
  |  Branch (66:9): [True: 130, False: 4.25k]
  ------------------
   67|    130|      return false;
   68|    130|    }
   69|       |
   70|  4.25k|    if (!DecodeAttributeSeams()) {
  ------------------
  |  Branch (70:9): [True: 31, False: 4.22k]
  ------------------
   71|     31|      return false;
   72|     31|    }
   73|  4.22k|    *out_buffer = buffer_;
   74|  4.22k|    return true;
   75|  4.25k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder28DecodeStartFaceConfigurationEv:
   78|  2.57M|  inline bool DecodeStartFaceConfiguration() {
   79|  2.57M|    uint32_t face_configuration;
   80|  2.57M|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   81|  2.57M|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  2.57M|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (81:9): [True: 735, False: 2.57M]
  ------------------
   82|    735|      start_face_buffer_.DecodeLeastSignificantBits32(1, &face_configuration);
   83|       |
   84|    735|    } else
   85|  2.57M|#endif
   86|  2.57M|    {
   87|  2.57M|      face_configuration = start_face_decoder_.DecodeNextBit();
   88|  2.57M|    }
   89|  2.57M|    return face_configuration;
   90|  2.57M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder12DecodeSymbolEv:
   93|  8.36M|  inline uint32_t DecodeSymbol() {
   94|  8.36M|    uint32_t symbol;
   95|  8.36M|    symbol_buffer_.DecodeLeastSignificantBits32(1, &symbol);
   96|  8.36M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (96:9): [True: 4.08M, False: 4.27M]
  ------------------
   97|  4.08M|      return symbol;
   98|  4.08M|    }
   99|       |    // Else decode two additional bits.
  100|  4.27M|    uint32_t symbol_suffix;
  101|  4.27M|    symbol_buffer_.DecodeLeastSignificantBits32(2, &symbol_suffix);
  102|  4.27M|    symbol |= (symbol_suffix << 1);
  103|  4.27M|    return symbol;
  104|  8.36M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder22NewActiveCornerReachedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  8.28M|  inline void NewActiveCornerReached(CornerIndex /* corner */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder13MergeVerticesENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_:
  111|  1.32M|  inline void MergeVertices(VertexIndex /* dest */, VertexIndex /* source */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19DecodeAttributeSeamEi:
  117|  17.1M|  inline bool DecodeAttributeSeam(int attribute) {
  118|  17.1M|    return attribute_connectivity_decoders_[attribute].DecodeNextBit();
  119|  17.1M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder4DoneEv:
  122|  3.97k|  void Done() {
  123|  3.97k|    if (symbol_buffer_.bit_decoder_active()) {
  ------------------
  |  Branch (123:9): [True: 3.72k, False: 243]
  ------------------
  124|  3.72k|      symbol_buffer_.EndBitDecoding();
  125|  3.72k|    }
  126|  3.97k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  127|  3.97k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  3.97k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (127:9): [True: 338, False: 3.63k]
  ------------------
  128|    338|      start_face_buffer_.EndBitDecoding();
  129|       |
  130|    338|    } else
  131|  3.63k|#endif
  132|  3.63k|    {
  133|  3.63k|      start_face_decoder_.EndDecoding();
  134|  3.63k|    }
  135|  3.97k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder6bufferEv:
  138|  2.35k|  DecoderBuffer *buffer() { return &buffer_; }
_ZN5draco31MeshEdgebreakerTraversalDecoder22DecodeTraversalSymbolsEv:
  140|  4.83k|  bool DecodeTraversalSymbols() {
  141|  4.83k|    uint64_t traversal_size;
  142|  4.83k|    symbol_buffer_ = buffer_;
  143|  4.83k|    if (!symbol_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (143:9): [True: 47, False: 4.79k]
  ------------------
  144|     47|      return false;
  145|     47|    }
  146|  4.79k|    buffer_ = symbol_buffer_;
  147|  4.79k|    if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (147:9): [True: 193, False: 4.59k]
  ------------------
  148|    193|      return false;
  149|    193|    }
  150|  4.59k|    buffer_.Advance(traversal_size);
  151|  4.59k|    return true;
  152|  4.79k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder16DecodeStartFacesEv:
  154|  6.87k|  bool DecodeStartFaces() {
  155|       |    // Create a decoder that is set to the end of the encoded traversal data.
  156|  6.87k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  157|  6.87k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  6.87k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (157:9): [True: 686, False: 6.18k]
  ------------------
  158|    686|      start_face_buffer_ = buffer_;
  159|    686|      uint64_t traversal_size;
  160|    686|      if (!start_face_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (160:11): [True: 6, False: 680]
  ------------------
  161|      6|        return false;
  162|      6|      }
  163|    680|      buffer_ = start_face_buffer_;
  164|    680|      if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (164:11): [True: 182, False: 498]
  ------------------
  165|    182|        return false;
  166|    182|      }
  167|    498|      buffer_.Advance(traversal_size);
  168|    498|      return true;
  169|    680|    }
  170|  6.18k|#endif
  171|  6.18k|    return start_face_decoder_.StartDecoding(&buffer_);
  172|  6.87k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder20DecodeAttributeSeamsEv:
  174|  6.62k|  bool DecodeAttributeSeams() {
  175|       |    // Prepare attribute decoding.
  176|  6.62k|    if (num_attribute_data_ > 0) {
  ------------------
  |  Branch (176:9): [True: 4.12k, False: 2.50k]
  ------------------
  177|  4.12k|      attribute_connectivity_decoders_ = std::unique_ptr<BinaryDecoder[]>(
  178|  4.12k|          new BinaryDecoder[num_attribute_data_]);
  179|  12.6k|      for (int i = 0; i < num_attribute_data_; ++i) {
  ------------------
  |  Branch (179:23): [True: 8.53k, False: 4.06k]
  ------------------
  180|  8.53k|        if (!attribute_connectivity_decoders_[i].StartDecoding(&buffer_)) {
  ------------------
  |  Branch (180:13): [True: 52, False: 8.48k]
  ------------------
  181|     52|          return false;
  182|     52|        }
  183|  8.53k|      }
  184|  4.12k|    }
  185|  6.57k|    return true;
  186|  6.62k|  }

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

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

_ZN5draco21MeshSequentialDecoderC2Ev:
   27|  4.75k|MeshSequentialDecoder::MeshSequentialDecoder() {}
_ZN5draco21MeshSequentialDecoder18DecodeConnectivityEv:
   29|  4.47k|bool MeshSequentialDecoder::DecodeConnectivity() {
   30|  4.47k|  uint32_t num_faces;
   31|  4.47k|  uint32_t num_points;
   32|  4.47k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   33|  4.47k|  if (bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  4.47k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (33:7): [True: 698, False: 3.78k]
  ------------------
   34|    698|    if (!buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (34:9): [True: 12, False: 686]
  ------------------
   35|     12|      return false;
   36|     12|    }
   37|    686|    if (!buffer()->Decode(&num_points)) {
  ------------------
  |  Branch (37:9): [True: 3, False: 683]
  ------------------
   38|      3|      return false;
   39|      3|    }
   40|       |
   41|    686|  } else
   42|  3.78k|#endif
   43|  3.78k|  {
   44|  3.78k|    if (!DecodeVarint(&num_faces, buffer())) {
  ------------------
  |  Branch (44:9): [True: 9, False: 3.77k]
  ------------------
   45|      9|      return false;
   46|      9|    }
   47|  3.77k|    if (!DecodeVarint(&num_points, buffer())) {
  ------------------
  |  Branch (47:9): [True: 8, False: 3.76k]
  ------------------
   48|      8|      return false;
   49|      8|    }
   50|  3.77k|  }
   51|       |
   52|       |  // Check that num_faces and num_points are valid values.
   53|  4.44k|  const uint64_t faces_64 = static_cast<uint64_t>(num_faces);
   54|       |  // Compressed sequential encoding can only handle (2^32 - 1) / 3 indices.
   55|  4.44k|  if (faces_64 > 0xffffffff / 3) {
  ------------------
  |  Branch (55:7): [True: 3, False: 4.44k]
  ------------------
   56|      3|    return false;
   57|      3|  }
   58|  4.44k|  if (faces_64 > buffer()->remaining_size() / 3) {
  ------------------
  |  Branch (58:7): [True: 30, False: 4.41k]
  ------------------
   59|       |    // The number of faces is unreasonably high, because face indices do not
   60|       |    // fit in the remaining size of the buffer.
   61|     30|    return false;
   62|     30|  }
   63|  4.41k|  uint8_t connectivity_method;
   64|  4.41k|  if (!buffer()->Decode(&connectivity_method)) {
  ------------------
  |  Branch (64:7): [True: 2, False: 4.41k]
  ------------------
   65|      2|    return false;
   66|      2|  }
   67|  4.41k|  if (connectivity_method == 0) {
  ------------------
  |  Branch (67:7): [True: 3.56k, False: 849]
  ------------------
   68|  3.56k|    if (!DecodeAndDecompressIndices(num_faces)) {
  ------------------
  |  Branch (68:9): [True: 3.38k, False: 178]
  ------------------
   69|  3.38k|      return false;
   70|  3.38k|    }
   71|  3.56k|  } else {
   72|    849|    if (num_points < 256) {
  ------------------
  |  Branch (72:9): [True: 548, False: 301]
  ------------------
   73|       |      // Decode indices as uint8_t.
   74|  2.76k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (74:28): [True: 2.22k, False: 542]
  ------------------
   75|  2.22k|        Mesh::Face face;
   76|  8.87k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (76:25): [True: 6.66k, False: 2.21k]
  ------------------
   77|  6.66k|          uint8_t val;
   78|  6.66k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (78:15): [True: 6, False: 6.65k]
  ------------------
   79|      6|            return false;
   80|      6|          }
   81|  6.65k|          face[j] = val;
   82|  6.65k|        }
   83|  2.21k|        mesh()->AddFace(face);
   84|  2.21k|      }
   85|    548|    } else if (num_points < (1 << 16)) {
  ------------------
  |  Branch (85:16): [True: 112, False: 189]
  ------------------
   86|       |      // Decode indices as uint16_t.
   87|  1.12k|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (87:28): [True: 1.04k, False: 80]
  ------------------
   88|  1.04k|        Mesh::Face face;
   89|  4.10k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (89:25): [True: 3.09k, False: 1.01k]
  ------------------
   90|  3.09k|          uint16_t val;
   91|  3.09k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (91:15): [True: 32, False: 3.06k]
  ------------------
   92|     32|            return false;
   93|     32|          }
   94|  3.06k|          face[j] = val;
   95|  3.06k|        }
   96|  1.01k|        mesh()->AddFace(face);
   97|  1.01k|      }
   98|    189|    } else if (num_points < (1 << 21) &&
  ------------------
  |  Branch (98:16): [True: 112, False: 77]
  ------------------
   99|    112|               bitstream_version() >= DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    112|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (99:16): [True: 104, False: 8]
  ------------------
  100|       |      // Decode indices as uint32_t.
  101|    635|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (101:28): [True: 550, False: 85]
  ------------------
  102|    550|        Mesh::Face face;
  103|  2.15k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (103:25): [True: 1.62k, False: 531]
  ------------------
  104|  1.62k|          uint32_t val;
  105|  1.62k|          if (!DecodeVarint(&val, buffer())) {
  ------------------
  |  Branch (105:15): [True: 19, False: 1.60k]
  ------------------
  106|     19|            return false;
  107|     19|          }
  108|  1.60k|          face[j] = val;
  109|  1.60k|        }
  110|    531|        mesh()->AddFace(face);
  111|    531|      }
  112|    104|    } else {
  113|       |      // Decode faces as uint32_t (default).
  114|    720|      for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (114:28): [True: 672, False: 48]
  ------------------
  115|    672|        Mesh::Face face;
  116|  2.59k|        for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (116:25): [True: 1.96k, False: 635]
  ------------------
  117|  1.96k|          uint32_t val;
  118|  1.96k|          if (!buffer()->Decode(&val)) {
  ------------------
  |  Branch (118:15): [True: 37, False: 1.92k]
  ------------------
  119|     37|            return false;
  120|     37|          }
  121|  1.92k|          face[j] = val;
  122|  1.92k|        }
  123|    635|        mesh()->AddFace(face);
  124|    635|      }
  125|     85|    }
  126|    849|  }
  127|    933|  point_cloud()->set_num_points(num_points);
  128|    933|  return true;
  129|  4.41k|}
_ZN5draco21MeshSequentialDecoder23CreateAttributesDecoderEi:
  131|  22.7k|bool MeshSequentialDecoder::CreateAttributesDecoder(int32_t att_decoder_id) {
  132|       |  // Always create the basic attribute decoder.
  133|  22.7k|  return SetAttributesDecoder(
  134|  22.7k|      att_decoder_id,
  135|  22.7k|      std::unique_ptr<AttributesDecoder>(
  136|  22.7k|          new SequentialAttributeDecodersController(
  137|  22.7k|              std::unique_ptr<PointsSequencer>(
  138|  22.7k|                  new LinearSequencer(point_cloud()->num_points())))));
  139|  22.7k|}
_ZN5draco21MeshSequentialDecoder26DecodeAndDecompressIndicesEj:
  141|  3.56k|bool MeshSequentialDecoder::DecodeAndDecompressIndices(uint32_t num_faces) {
  142|       |  // Get decoded indices differences that were encoded with an entropy code.
  143|  3.56k|  std::vector<uint32_t> indices_buffer(num_faces * 3);
  144|  3.56k|  if (!DecodeSymbols(num_faces * 3, 1, buffer(), indices_buffer.data())) {
  ------------------
  |  Branch (144:7): [True: 3.31k, False: 244]
  ------------------
  145|  3.31k|    return false;
  146|  3.31k|  }
  147|       |  // Reconstruct the indices from the differences.
  148|       |  // See MeshSequentialEncoder::CompressAndEncodeIndices() for more details.
  149|    244|  int32_t last_index_value = 0;  // This will always be >= 0.
  150|    244|  int vertex_index = 0;
  151|  1.35k|  for (uint32_t i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (151:24): [True: 1.17k, False: 178]
  ------------------
  152|  1.17k|    Mesh::Face face;
  153|  4.53k|    for (int j = 0; j < 3; ++j) {
  ------------------
  |  Branch (153:21): [True: 3.42k, False: 1.10k]
  ------------------
  154|  3.42k|      const uint32_t encoded_val = indices_buffer[vertex_index++];
  155|  3.42k|      int32_t index_diff = (encoded_val >> 1);
  156|  3.42k|      if (encoded_val & 1) {
  ------------------
  |  Branch (156:11): [True: 1.12k, False: 2.29k]
  ------------------
  157|  1.12k|        if (index_diff > last_index_value) {
  ------------------
  |  Branch (157:13): [True: 46, False: 1.08k]
  ------------------
  158|       |          // Subtracting index_diff would result in a negative index.
  159|     46|          return false;
  160|     46|        }
  161|  1.08k|        index_diff = -index_diff;
  162|  2.29k|      } else {
  163|  2.29k|        if (index_diff >
  ------------------
  |  Branch (163:13): [True: 20, False: 2.27k]
  ------------------
  164|  2.29k|            (std::numeric_limits<int32_t>::max() - last_index_value)) {
  165|       |          // Adding index_diff to last_index_value would overflow.
  166|     20|          return false;
  167|     20|        }
  168|  2.29k|      }
  169|  3.35k|      const int32_t index_value = index_diff + last_index_value;
  170|  3.35k|      face[j] = index_value;
  171|  3.35k|      last_index_value = index_value;
  172|  3.35k|    }
  173|  1.10k|    mesh()->AddFace(face);
  174|  1.10k|  }
  175|    178|  return true;
  176|    244|}

_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  1.23k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  1.99M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  1.99M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 1.94M, False: 54.5k]
  ------------------
   61|  1.94M|      return true;  // Already traversed.
   62|  1.94M|    }
   63|       |
   64|  54.5k|    corner_traversal_stack_.clear();
   65|  54.5k|    corner_traversal_stack_.push_back(corner_id);
   66|       |    // For the first face, check the remaining corners as they may not be
   67|       |    // processed yet.
   68|  54.5k|    const VertexIndex next_vert =
   69|  54.5k|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  54.5k|    const VertexIndex prev_vert =
   71|  54.5k|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  54.5k|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 54.5k]
  |  Branch (72:45): [True: 0, False: 54.5k]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  54.5k|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 53.7k, False: 747]
  ------------------
   76|  53.7k|      this->MarkVertexVisited(next_vert);
   77|  53.7k|      this->traversal_observer().OnNewVertexVisited(
   78|  53.7k|          next_vert, this->corner_table()->Next(corner_id));
   79|  53.7k|    }
   80|  54.5k|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 4.06k, False: 50.4k]
  ------------------
   81|  4.06k|      this->MarkVertexVisited(prev_vert);
   82|  4.06k|      this->traversal_observer().OnNewVertexVisited(
   83|  4.06k|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  4.06k|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|   122k|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 68.0k, False: 54.5k]
  ------------------
   88|       |      // Currently processed corner.
   89|  68.0k|      corner_id = corner_traversal_stack_.back();
   90|  68.0k|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  68.0k|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 68.0k]
  |  Branch (92:47): [True: 731, False: 67.3k]
  ------------------
   93|       |        // This face has been already traversed.
   94|    731|        corner_traversal_stack_.pop_back();
   95|    731|        continue;
   96|    731|      }
   97|  1.99M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 1.99M, Folded]
  ------------------
   98|  1.99M|        this->MarkFaceVisited(face_id);
   99|  1.99M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  1.99M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  1.99M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 1.99M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  1.99M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 986k, False: 1.00M]
  ------------------
  105|   986k|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|   986k|          this->MarkVertexVisited(vert_id);
  107|   986k|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|   986k|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 956k, False: 30.0k]
  ------------------
  109|   956k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   956k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   956k|            continue;
  112|   956k|          }
  113|   986k|        }
  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.03M|        const CornerIndex right_corner_id =
  118|  1.03M|            this->corner_table()->GetRightCorner(corner_id);
  119|  1.03M|        const CornerIndex left_corner_id =
  120|  1.03M|            this->corner_table()->GetLeftCorner(corner_id);
  121|  1.03M|        const FaceIndex right_face_id(
  122|  1.03M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 21.7k, False: 1.01M]
  ------------------
  123|  1.03M|                 ? kInvalidFaceIndex
  124|  1.03M|                 : FaceIndex(right_corner_id.value() / 3)));
  125|  1.03M|        const FaceIndex left_face_id(
  126|  1.03M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 61.6k, False: 977k]
  ------------------
  127|  1.03M|                 ? kInvalidFaceIndex
  128|  1.03M|                 : FaceIndex(left_corner_id.value() / 3)));
  129|  1.03M|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 977k, False: 61.6k]
  ------------------
  130|       |          // Right face has been already visited.
  131|   977k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 60.5k, False: 917k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  60.5k|            corner_traversal_stack_.pop_back();
  134|  60.5k|            break;  // Break from the while (true) loop.
  135|   917k|          } else {
  136|       |            // Go to the left face.
  137|   917k|            corner_id = left_corner_id;
  138|   917k|            face_id = left_face_id;
  139|   917k|          }
  140|   977k|        } else {
  141|       |          // Right face was not visited.
  142|  61.6k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 54.9k, False: 6.76k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  54.9k|            corner_id = right_corner_id;
  145|  54.9k|            face_id = right_face_id;
  146|  54.9k|          } else {
  147|       |            // Both neighboring faces are unvisited, we need to visit both of
  148|       |            // them.
  149|       |
  150|       |            // Split the traversal.
  151|       |            // First make the top of the current corner stack point to the left
  152|       |            // face (this one will be processed second).
  153|  6.76k|            corner_traversal_stack_.back() = left_corner_id;
  154|       |            // Add a new corner to the top of the stack (right face needs to
  155|       |            // be traversed first).
  156|  6.76k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  6.76k|            break;
  159|  6.76k|          }
  160|  61.6k|        }
  161|  1.03M|      }
  162|  67.3k|    }
  163|  54.5k|    return true;
  164|  54.5k|  }
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  1.23k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  2.62k|  DepthFirstTraverser() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  1.66k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  2.87M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  2.87M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 1.03M, False: 1.84M]
  ------------------
   61|  1.03M|      return true;  // Already traversed.
   62|  1.03M|    }
   63|       |
   64|  1.84M|    corner_traversal_stack_.clear();
   65|  1.84M|    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|  1.84M|    const VertexIndex next_vert =
   69|  1.84M|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  1.84M|    const VertexIndex prev_vert =
   71|  1.84M|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  1.84M|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 1.84M]
  |  Branch (72:45): [True: 0, False: 1.84M]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  1.84M|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 1.84M, False: 963]
  ------------------
   76|  1.84M|      this->MarkVertexVisited(next_vert);
   77|  1.84M|      this->traversal_observer().OnNewVertexVisited(
   78|  1.84M|          next_vert, this->corner_table()->Next(corner_id));
   79|  1.84M|    }
   80|  1.84M|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 1.82M, False: 20.3k]
  ------------------
   81|  1.82M|      this->MarkVertexVisited(prev_vert);
   82|  1.82M|      this->traversal_observer().OnNewVertexVisited(
   83|  1.82M|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  1.82M|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|  3.73M|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 1.89M, False: 1.84M]
  ------------------
   88|       |      // Currently processed corner.
   89|  1.89M|      corner_id = corner_traversal_stack_.back();
   90|  1.89M|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  1.89M|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 1.89M]
  |  Branch (92:47): [True: 3.30k, False: 1.88M]
  ------------------
   93|       |        // This face has been already traversed.
   94|  3.30k|        corner_traversal_stack_.pop_back();
   95|  3.30k|        continue;
   96|  3.30k|      }
   97|  2.87M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 2.87M, Folded]
  ------------------
   98|  2.87M|        this->MarkFaceVisited(face_id);
   99|  2.87M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  2.87M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  2.87M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 2.87M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  2.87M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 2.35M, False: 518k]
  ------------------
  105|  2.35M|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|  2.35M|          this->MarkVertexVisited(vert_id);
  107|  2.35M|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|  2.35M|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 489k, False: 1.87M]
  ------------------
  109|   489k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   489k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   489k|            continue;
  112|   489k|          }
  113|  2.35M|        }
  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|  2.38M|        const CornerIndex right_corner_id =
  118|  2.38M|            this->corner_table()->GetRightCorner(corner_id);
  119|  2.38M|        const CornerIndex left_corner_id =
  120|  2.38M|            this->corner_table()->GetLeftCorner(corner_id);
  121|  2.38M|        const FaceIndex right_face_id(
  122|  2.38M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 1.85M, False: 537k]
  ------------------
  123|  2.38M|                 ? kInvalidFaceIndex
  124|  2.38M|                 : FaceIndex(right_corner_id.value() / 3)));
  125|  2.38M|        const FaceIndex left_face_id(
  126|  2.38M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 1.86M, False: 526k]
  ------------------
  127|  2.38M|                 ? kInvalidFaceIndex
  128|  2.38M|                 : FaceIndex(left_corner_id.value() / 3)));
  129|  2.38M|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 2.33M, False: 54.4k]
  ------------------
  130|       |          // Right face has been already visited.
  131|  2.33M|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 1.86M, False: 469k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  1.86M|            corner_traversal_stack_.pop_back();
  134|  1.86M|            break;  // Break from the while (true) loop.
  135|  1.86M|          } else {
  136|       |            // Go to the left face.
  137|   469k|            corner_id = left_corner_id;
  138|   469k|            face_id = left_face_id;
  139|   469k|          }
  140|  2.33M|        } else {
  141|       |          // Right face was not visited.
  142|  54.4k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 30.6k, False: 23.8k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  30.6k|            corner_id = right_corner_id;
  145|  30.6k|            face_id = right_face_id;
  146|  30.6k|          } else {
  147|       |            // Both neighboring faces are unvisited, we need to visit both of
  148|       |            // them.
  149|       |
  150|       |            // Split the traversal.
  151|       |            // First make the top of the current corner stack point to the left
  152|       |            // face (this one will be processed second).
  153|  23.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|  23.8k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  23.8k|            break;
  159|  23.8k|          }
  160|  54.4k|        }
  161|  2.38M|      }
  162|  1.88M|    }
  163|  1.84M|    return true;
  164|  1.84M|  }
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  1.66k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  3.45k|  DepthFirstTraverser() {}

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

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

_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|    495|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|    902|  bool UpdatePointToAttributeIndexMapping(PointAttribute *attribute) override {
   49|    902|    const auto *corner_table = traverser_.corner_table();
   50|    902|    attribute->SetExplicitMapping(mesh_->num_points());
   51|    902|    const size_t num_faces = mesh_->num_faces();
   52|    902|    const size_t num_points = mesh_->num_points();
   53|  4.55M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 4.54M, False: 902]
  ------------------
   54|  4.54M|      const auto &face = mesh_->face(f);
   55|  18.1M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 13.6M, False: 4.54M]
  ------------------
   56|  13.6M|        const PointIndex point_id = face[p];
   57|  13.6M|        const VertexIndex vert_id =
   58|  13.6M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  13.6M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 13.6M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  13.6M|        const AttributeValueIndex att_entry_id(
   63|  13.6M|            encoding_data_
   64|  13.6M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  13.6M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 13.6M]
  |  Branch (65:13): [True: 0, False: 13.6M]
  |  Branch (65:39): [True: 0, False: 13.6M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|  13.6M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  13.6M|      }
   71|  4.54M|    }
   72|    902|    return true;
   73|    902|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|    443|  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|    443|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|    443|    traverser_.OnTraversalStart();
   82|    443|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 443]
  ------------------
   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|    443|    } else {
   89|    443|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  2.46M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 2.46M, False: 443]
  ------------------
   91|  2.46M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 2.46M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  2.46M|      }
   95|    443|    }
   96|    443|    traverser_.OnTraversalEnd();
   97|    443|    return true;
   98|    443|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  2.46M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  2.46M|    return traverser_.TraverseFromCorner(corner_id);
  103|  2.46M|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|    495|  void SetTraverser(const TraverserT &t) { traverser_ = t; }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|  1.31k|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  5.80k|  bool UpdatePointToAttributeIndexMapping(PointAttribute *attribute) override {
   49|  5.80k|    const auto *corner_table = traverser_.corner_table();
   50|  5.80k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  5.80k|    const size_t num_faces = mesh_->num_faces();
   52|  5.80k|    const size_t num_points = mesh_->num_points();
   53|  3.63M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 3.63M, False: 5.80k]
  ------------------
   54|  3.63M|      const auto &face = mesh_->face(f);
   55|  14.5M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 10.8M, False: 3.63M]
  ------------------
   56|  10.8M|        const PointIndex point_id = face[p];
   57|  10.8M|        const VertexIndex vert_id =
   58|  10.8M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  10.8M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 10.8M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  10.8M|        const AttributeValueIndex att_entry_id(
   63|  10.8M|            encoding_data_
   64|  10.8M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  10.8M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 10.8M]
  |  Branch (65:13): [True: 0, False: 10.8M]
  |  Branch (65:39): [True: 0, False: 10.8M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|  10.8M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  10.8M|      }
   71|  3.63M|    }
   72|  5.80k|    return true;
   73|  5.80k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|  1.23k|  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.23k|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|  1.23k|    traverser_.OnTraversalStart();
   82|  1.23k|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 1.23k]
  ------------------
   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.23k|    } else {
   89|  1.23k|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  1.99M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 1.99M, False: 1.23k]
  ------------------
   91|  1.99M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 1.99M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  1.99M|      }
   95|  1.23k|    }
   96|  1.23k|    traverser_.OnTraversalEnd();
   97|  1.23k|    return true;
   98|  1.23k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  1.99M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  1.99M|    return traverser_.TraverseFromCorner(corner_id);
  103|  1.99M|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|  1.31k|  void SetTraverser(const TraverserT &t) { traverser_ = t; }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|  1.72k|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  4.85k|  bool UpdatePointToAttributeIndexMapping(PointAttribute *attribute) override {
   49|  4.85k|    const auto *corner_table = traverser_.corner_table();
   50|  4.85k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  4.85k|    const size_t num_faces = mesh_->num_faces();
   52|  4.85k|    const size_t num_points = mesh_->num_points();
   53|  4.63M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 4.62M, False: 4.85k]
  ------------------
   54|  4.62M|      const auto &face = mesh_->face(f);
   55|  18.5M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 13.8M, False: 4.62M]
  ------------------
   56|  13.8M|        const PointIndex point_id = face[p];
   57|  13.8M|        const VertexIndex vert_id =
   58|  13.8M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  13.8M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 13.8M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  13.8M|        const AttributeValueIndex att_entry_id(
   63|  13.8M|            encoding_data_
   64|  13.8M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  13.8M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 13.8M]
  |  Branch (65:13): [True: 1, False: 13.8M]
  |  Branch (65:39): [True: 1, False: 13.8M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      1|          return false;
   68|      1|        }
   69|  13.8M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  13.8M|      }
   71|  4.62M|    }
   72|  4.85k|    return true;
   73|  4.85k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|  1.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|  1.66k|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|  1.66k|    traverser_.OnTraversalStart();
   82|  1.66k|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 1.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|  1.66k|    } else {
   89|  1.66k|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  2.87M|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 2.87M, False: 1.66k]
  ------------------
   91|  2.87M|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 2.87M]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  2.87M|      }
   95|  1.66k|    }
   96|  1.66k|    traverser_.OnTraversalEnd();
   97|  1.66k|    return true;
   98|  1.66k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  2.87M|  bool ProcessCorner(CornerIndex corner_id) {
  102|  2.87M|    return traverser_.TraverseFromCorner(corner_id);
  103|  2.87M|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|  1.72k|  void SetTraverser(const TraverserT &t) { traverser_ = t; }

_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  3.45k|  virtual ~TraverserBase() = default;
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  29.6M|  inline const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  15.5M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  15.5M|    return is_vertex_visited_[vert_id.value()];
   65|  15.5M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  2.32M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  2.32M|    is_vertex_visited_[vert_id.value()] = true;
   68|  2.32M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  6.78M|  inline TraversalObserverT &traversal_observer() {
   75|  6.78M|    return traversal_observer_;
   76|  6.78M|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  11.7M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  11.7M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 177k, False: 11.6M]
  ------------------
   47|   177k|      return true;  // Invalid faces are always considered as visited.
   48|   177k|    }
   49|  11.6M|    return is_face_visited_[face_id.value()];
   50|  11.7M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  4.45M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  4.45M|    is_face_visited_[face_id.value()] = true;
   62|  4.45M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  3.61k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  3.61k|  virtual ~TraverserBase() = default;
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  1.80k|                    TraversalObserver traversal_observer) {
   37|  1.80k|    corner_table_ = corner_table;
   38|  1.80k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  1.80k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  1.80k|    traversal_observer_ = traversal_observer;
   41|  1.80k|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  1.99M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  1.99M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 1.99M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  1.99M|    return is_face_visited_[corner_id.value() / 3];
   58|  1.99M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  21.5M|  inline const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  2.87M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  2.87M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 2.87M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  2.87M|    return is_face_visited_[corner_id.value() / 3];
   58|  2.87M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  6.56M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  6.56M|    return is_vertex_visited_[vert_id.value()];
   65|  6.56M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  6.02M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  6.02M|    is_vertex_visited_[vert_id.value()] = true;
   68|  6.02M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  8.90M|  inline TraversalObserverT &traversal_observer() {
   75|  8.90M|    return traversal_observer_;
   76|  8.90M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  6.66M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  6.66M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 3.71M, False: 2.95M]
  ------------------
   47|  3.71M|      return true;  // Invalid faces are always considered as visited.
   48|  3.71M|    }
   49|  2.95M|    return is_face_visited_[face_id.value()];
   50|  6.66M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  2.87M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  2.87M|    is_face_visited_[face_id.value()] = true;
   62|  2.87M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  3.45k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  1.72k|                    TraversalObserver traversal_observer) {
   37|  1.72k|    corner_table_ = corner_table;
   38|  1.72k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  1.72k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  1.72k|    traversal_observer_ = traversal_observer;
   41|  1.72k|  }

_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_j:
  185|    271|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|    271|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 20, False: 251]
  ------------------
  187|     20|    return false;
  188|     20|  }
  189|    251|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 21, False: 230]
  ------------------
  190|     21|    return false;
  191|     21|  }
  192|    230|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 2, False: 228]
  ------------------
  193|      2|    return false;
  194|      2|  }
  195|    228|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 67, False: 161]
  ------------------
  196|     67|    return true;
  197|     67|  }
  198|    161|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 36, False: 125]
  ------------------
  199|     36|    return false;
  200|     36|  }
  201|    125|  num_decoded_points_ = 0;
  202|       |
  203|    125|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 32, False: 93]
  ------------------
  204|     32|    return false;
  205|     32|  }
  206|     93|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 5, False: 88]
  ------------------
  207|      5|    return false;
  208|      5|  }
  209|     88|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 3, False: 85]
  ------------------
  210|      3|    return false;
  211|      3|  }
  212|     85|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 2, False: 83]
  ------------------
  213|      2|    return false;
  214|      2|  }
  215|       |
  216|     83|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 62, False: 21]
  ------------------
  217|     62|    return false;
  218|     62|  }
  219|       |
  220|     21|  numbers_decoder_.EndDecoding();
  221|     21|  remaining_bits_decoder_.EndDecoding();
  222|     21|  axis_decoder_.EndDecoding();
  223|     21|  half_decoder_.EndDecoding();
  224|       |
  225|     21|  return true;
  226|     83|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE14DecodeInternalINS_34PointAttributeVectorOutputIteratorIjEEEEbjRT_:
  253|     83|    uint32_t num_points, OutputIteratorT &oit) {
  254|     83|  typedef DecodingStatus Status;
  255|     83|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|     83|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|     83|  DecodingStatus init_status(num_points, 0, 0);
  258|     83|  std::stack<Status> status_stack;
  259|     83|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|   672k|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 672k, False: 21]
  ------------------
  263|   672k|    const DecodingStatus status = status_stack.top();
  264|   672k|    status_stack.pop();
  265|       |
  266|   672k|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|   672k|    const uint32_t last_axis = status.last_axis;
  268|   672k|    const uint32_t stack_pos = status.stack_pos;
  269|   672k|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|   672k|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|   672k|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 672k]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|   672k|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|   672k|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 0, False: 672k]
  ------------------
  278|      0|      return false;
  279|      0|    }
  280|       |
  281|   672k|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|   672k|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 332k, False: 340k]
  ------------------
  285|  98.9M|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 98.5M, False: 332k]
  ------------------
  286|  98.5M|        *oit = old_base;
  287|  98.5M|        ++oit;
  288|  98.5M|        ++num_decoded_points_;
  289|  98.5M|      }
  290|   332k|      continue;
  291|   332k|    }
  292|       |
  293|   340k|    DRACO_DCHECK_EQ(true, num_remaining_points != 0);
  294|       |
  295|       |    // Fast decoding of remaining bits if number of points is 1 or 2.
  296|   340k|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 3.72k, False: 336k]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|  3.72k|      axes_[0] = axis;
  300|  11.3k|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 7.59k, False: 3.72k]
  ------------------
  301|  7.59k|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|  7.59k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 2.14k, False: 5.45k]
  |  |  ------------------
  ------------------
  302|  7.59k|      }
  303|  9.91k|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 6.21k, False: 3.69k]
  ------------------
  304|  24.6k|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 18.4k, False: 6.18k]
  ------------------
  305|  18.4k|          p_[axes_[j]] = 0;
  306|  18.4k|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|  18.4k|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 15.7k, False: 2.72k]
  ------------------
  308|  15.7k|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 28, False: 15.7k]
  ------------------
  309|  15.7k|                    num_remaining_bits, &p_[axes_[j]])) {
  310|     28|              return false;
  311|     28|            }
  312|  15.7k|          }
  313|  18.4k|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|  18.4k|        }
  315|  6.18k|        *oit = p_;
  316|  6.18k|        ++oit;
  317|  6.18k|        ++num_decoded_points_;
  318|  6.18k|      }
  319|  3.69k|      continue;
  320|  3.72k|    }
  321|       |
  322|   336k|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 336k]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|   336k|    const int num_remaining_bits = bit_length_ - level;
  327|   336k|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|   336k|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|   336k|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|   336k|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|   336k|    uint32_t number = 0;
  334|   336k|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|   336k|    uint32_t first_half = num_remaining_points / 2;
  337|   336k|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 34, False: 336k]
  ------------------
  338|       |      // Invalid |number|.
  339|     34|      return false;
  340|     34|    }
  341|   336k|    first_half -= number;
  342|   336k|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|   336k|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 189k, False: 147k]
  ------------------
  345|   189k|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 186k, False: 2.89k]
  ------------------
  346|   186k|        std::swap(first_half, second_half);
  347|   186k|      }
  348|   189k|    }
  349|       |
  350|   336k|    levels_stack_[stack_pos][axis] += 1;
  351|   336k|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|   336k|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 336k, False: 112]
  ------------------
  353|   336k|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|   336k|    }
  355|   336k|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 336k, False: 330]
  ------------------
  356|   336k|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|   336k|    }
  358|   336k|  }
  359|     21|  return true;
  360|     83|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE14DecodingStatusC2Ejjj:
  134|  2.66M|        : num_remaining_points(num_remaining_points_),
  135|  2.66M|          last_axis(last_axis_),
  136|  2.66M|          stack_pos(stack_pos_) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE12DecodeNumberEiPj:
  127|  1.33M|  void DecodeNumber(int nbits, uint32_t *value) {
  128|  1.33M|    numbers_decoder_.DecodeLeastSignificantBits32(nbits, value);
  129|  1.33M|  }
_ZNK5draco33DynamicIntegerPointsKdTreeDecoderILi0EE18num_decoded_pointsEv:
  118|     62|  uint32_t num_decoded_points() const { return num_decoded_points_; }
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EEC2Ej:
   86|    401|      : bit_length_(0),
   87|    401|        num_points_(0),
   88|    401|        num_decoded_points_(0),
   89|    401|        dimension_(dimension),
   90|    401|        p_(dimension, 0),
   91|    401|        axes_(dimension, 0),
   92|       |        // Init the stack with the maximum depth of the tree.
   93|       |        // +1 for a second leaf.
   94|    401|        base_stack_(32 * dimension + 1, VectorUint32(dimension, 0)),
   95|    401|        levels_stack_(32 * dimension + 1, VectorUint32(dimension, 0)) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_j:
  185|    201|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|    201|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 9, False: 192]
  ------------------
  187|      9|    return false;
  188|      9|  }
  189|    192|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 20, False: 172]
  ------------------
  190|     20|    return false;
  191|     20|  }
  192|    172|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 4, False: 168]
  ------------------
  193|      4|    return false;
  194|      4|  }
  195|    168|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 33, False: 135]
  ------------------
  196|     33|    return true;
  197|     33|  }
  198|    135|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 16, False: 119]
  ------------------
  199|     16|    return false;
  200|     16|  }
  201|    119|  num_decoded_points_ = 0;
  202|       |
  203|    119|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 25, False: 94]
  ------------------
  204|     25|    return false;
  205|     25|  }
  206|     94|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 7, False: 87]
  ------------------
  207|      7|    return false;
  208|      7|  }
  209|     87|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 3, False: 84]
  ------------------
  210|      3|    return false;
  211|      3|  }
  212|     84|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 2, False: 82]
  ------------------
  213|      2|    return false;
  214|      2|  }
  215|       |
  216|     82|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 60, False: 22]
  ------------------
  217|     60|    return false;
  218|     60|  }
  219|       |
  220|     22|  numbers_decoder_.EndDecoding();
  221|     22|  remaining_bits_decoder_.EndDecoding();
  222|     22|  axis_decoder_.EndDecoding();
  223|     22|  half_decoder_.EndDecoding();
  224|       |
  225|     22|  return true;
  226|     82|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EE14DecodeInternalINS_34PointAttributeVectorOutputIteratorIjEEEEbjRT_:
  253|     82|    uint32_t num_points, OutputIteratorT &oit) {
  254|     82|  typedef DecodingStatus Status;
  255|     82|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|     82|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|     82|  DecodingStatus init_status(num_points, 0, 0);
  258|     82|  std::stack<Status> status_stack;
  259|     82|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|  3.44M|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 3.44M, False: 22]
  ------------------
  263|  3.44M|    const DecodingStatus status = status_stack.top();
  264|  3.44M|    status_stack.pop();
  265|       |
  266|  3.44M|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|  3.44M|    const uint32_t last_axis = status.last_axis;
  268|  3.44M|    const uint32_t stack_pos = status.stack_pos;
  269|  3.44M|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|  3.44M|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|  3.44M|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 3.44M]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|  3.44M|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|  3.44M|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 0, False: 3.44M]
  ------------------
  278|      0|      return false;
  279|      0|    }
  280|       |
  281|  3.44M|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|  3.44M|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 1.72M, False: 1.72M]
  ------------------
  285|   251M|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 250M, False: 1.72M]
  ------------------
  286|   250M|        *oit = old_base;
  287|   250M|        ++oit;
  288|   250M|        ++num_decoded_points_;
  289|   250M|      }
  290|  1.72M|      continue;
  291|  1.72M|    }
  292|       |
  293|  1.72M|    DRACO_DCHECK_EQ(true, num_remaining_points != 0);
  294|       |
  295|       |    // Fast decoding of remaining bits if number of points is 1 or 2.
  296|  1.72M|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 2.16k, False: 1.72M]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|  2.16k|      axes_[0] = axis;
  300|  13.4k|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 11.2k, False: 2.16k]
  ------------------
  301|  11.2k|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|  11.2k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 711, False: 10.5k]
  |  |  ------------------
  ------------------
  302|  11.2k|      }
  303|  5.93k|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 3.79k, False: 2.13k]
  ------------------
  304|  25.8k|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 22.0k, False: 3.76k]
  ------------------
  305|  22.0k|          p_[axes_[j]] = 0;
  306|  22.0k|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|  22.0k|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 8.25k, False: 13.8k]
  ------------------
  308|  8.25k|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 32, False: 8.22k]
  ------------------
  309|  8.25k|                    num_remaining_bits, &p_[axes_[j]])) {
  310|     32|              return false;
  311|     32|            }
  312|  8.25k|          }
  313|  22.0k|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|  22.0k|        }
  315|  3.76k|        *oit = p_;
  316|  3.76k|        ++oit;
  317|  3.76k|        ++num_decoded_points_;
  318|  3.76k|      }
  319|  2.13k|      continue;
  320|  2.16k|    }
  321|       |
  322|  1.72M|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 1.72M]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|  1.72M|    const int num_remaining_bits = bit_length_ - level;
  327|  1.72M|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|  1.72M|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|  1.72M|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|  1.72M|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|  1.72M|    uint32_t number = 0;
  334|  1.72M|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|  1.72M|    uint32_t first_half = num_remaining_points / 2;
  337|  1.72M|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 28, False: 1.72M]
  ------------------
  338|       |      // Invalid |number|.
  339|     28|      return false;
  340|     28|    }
  341|  1.72M|    first_half -= number;
  342|  1.72M|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|  1.72M|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 860k, False: 862k]
  ------------------
  345|   860k|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 853k, False: 7.10k]
  ------------------
  346|   853k|        std::swap(first_half, second_half);
  347|   853k|      }
  348|   860k|    }
  349|       |
  350|  1.72M|    levels_stack_[stack_pos][axis] += 1;
  351|  1.72M|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|  1.72M|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 1.72M, False: 232]
  ------------------
  353|  1.72M|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|  1.72M|    }
  355|  1.72M|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 1.72M, False: 161]
  ------------------
  356|  1.72M|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|  1.72M|    }
  358|  1.72M|  }
  359|     22|  return true;
  360|     82|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EE14DecodingStatusC2Ejjj:
  134|  10.9M|        : num_remaining_points(num_remaining_points_),
  135|  10.9M|          last_axis(last_axis_),
  136|  10.9M|          stack_pos(stack_pos_) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EE7GetAxisEjRKNSt3__16vectorIjNS2_9allocatorIjEEEEj:
  231|  10.9M|    uint32_t last_axis) {
  232|  10.9M|  if (!Policy::select_axis) {
  ------------------
  |  Branch (232:7): [True: 10.9M, Folded]
  ------------------
  233|  10.9M|    return DRACO_INCREMENT_MOD(last_axis, dimension_);
  ------------------
  |  |   24|  10.9M|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 4.61M, False: 6.30M]
  |  |  ------------------
  ------------------
  234|  10.9M|  }
  235|       |
  236|      0|  uint32_t best_axis = 0;
  237|      0|  if (num_remaining_points < 64) {
  ------------------
  |  Branch (237:7): [True: 0, False: 0]
  ------------------
  238|      0|    for (uint32_t axis = 1; axis < dimension_; ++axis) {
  ------------------
  |  Branch (238:29): [True: 0, False: 0]
  ------------------
  239|      0|      if (levels[best_axis] > levels[axis]) {
  ------------------
  |  Branch (239:11): [True: 0, False: 0]
  ------------------
  240|      0|        best_axis = axis;
  241|      0|      }
  242|      0|    }
  243|      0|  } else {
  244|      0|    axis_decoder_.DecodeLeastSignificantBits32(4, &best_axis);
  245|      0|  }
  246|       |
  247|      0|  return best_axis;
  248|  10.9M|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EE12DecodeNumberEiPj:
  127|  5.46M|  void DecodeNumber(int nbits, uint32_t *value) {
  128|  5.46M|    numbers_decoder_.DecodeLeastSignificantBits32(nbits, value);
  129|  5.46M|  }
_ZNK5draco33DynamicIntegerPointsKdTreeDecoderILi1EE18num_decoded_pointsEv:
  118|     29|  uint32_t num_decoded_points() const { return num_decoded_points_; }
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_j:
  185|    190|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|    190|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 4, False: 186]
  ------------------
  187|      4|    return false;
  188|      4|  }
  189|    186|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 20, False: 166]
  ------------------
  190|     20|    return false;
  191|     20|  }
  192|    166|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 3, False: 163]
  ------------------
  193|      3|    return false;
  194|      3|  }
  195|    163|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 27, False: 136]
  ------------------
  196|     27|    return true;
  197|     27|  }
  198|    136|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 23, False: 113]
  ------------------
  199|     23|    return false;
  200|     23|  }
  201|    113|  num_decoded_points_ = 0;
  202|       |
  203|    113|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 16, False: 97]
  ------------------
  204|     16|    return false;
  205|     16|  }
  206|     97|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 10, False: 87]
  ------------------
  207|     10|    return false;
  208|     10|  }
  209|     87|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 4, False: 83]
  ------------------
  210|      4|    return false;
  211|      4|  }
  212|     83|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 1, False: 82]
  ------------------
  213|      1|    return false;
  214|      1|  }
  215|       |
  216|     82|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 77, False: 5]
  ------------------
  217|     77|    return false;
  218|     77|  }
  219|       |
  220|      5|  numbers_decoder_.EndDecoding();
  221|      5|  remaining_bits_decoder_.EndDecoding();
  222|      5|  axis_decoder_.EndDecoding();
  223|      5|  half_decoder_.EndDecoding();
  224|       |
  225|      5|  return true;
  226|     82|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE14DecodeInternalINS_34PointAttributeVectorOutputIteratorIjEEEEbjRT_:
  253|     82|    uint32_t num_points, OutputIteratorT &oit) {
  254|     82|  typedef DecodingStatus Status;
  255|     82|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|     82|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|     82|  DecodingStatus init_status(num_points, 0, 0);
  258|     82|  std::stack<Status> status_stack;
  259|     82|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|  26.7k|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 26.7k, False: 5]
  ------------------
  263|  26.7k|    const DecodingStatus status = status_stack.top();
  264|  26.7k|    status_stack.pop();
  265|       |
  266|  26.7k|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|  26.7k|    const uint32_t last_axis = status.last_axis;
  268|  26.7k|    const uint32_t stack_pos = status.stack_pos;
  269|  26.7k|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|  26.7k|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|  26.7k|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 26.7k]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|  26.7k|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|  26.7k|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 0, False: 26.7k]
  ------------------
  278|      0|      return false;
  279|      0|    }
  280|       |
  281|  26.7k|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|  26.7k|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 6.16k, False: 20.5k]
  ------------------
  285|  13.4M|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 13.3M, False: 6.16k]
  ------------------
  286|  13.3M|        *oit = old_base;
  287|  13.3M|        ++oit;
  288|  13.3M|        ++num_decoded_points_;
  289|  13.3M|      }
  290|  6.16k|      continue;
  291|  6.16k|    }
  292|       |
  293|  20.5k|    DRACO_DCHECK_EQ(true, num_remaining_points != 0);
  294|       |
  295|       |    // Fast decoding of remaining bits if number of points is 1 or 2.
  296|  20.5k|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 603, False: 19.9k]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|    603|      axes_[0] = axis;
  300|  1.43k|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 830, False: 603]
  ------------------
  301|    830|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|    830|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 99, False: 731]
  |  |  ------------------
  ------------------
  302|    830|      }
  303|  1.63k|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 1.05k, False: 583]
  ------------------
  304|  3.40k|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 2.37k, False: 1.03k]
  ------------------
  305|  2.37k|          p_[axes_[j]] = 0;
  306|  2.37k|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|  2.37k|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 1.68k, False: 690]
  ------------------
  308|  1.68k|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 20, False: 1.66k]
  ------------------
  309|  1.68k|                    num_remaining_bits, &p_[axes_[j]])) {
  310|     20|              return false;
  311|     20|            }
  312|  1.68k|          }
  313|  2.35k|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|  2.35k|        }
  315|  1.03k|        *oit = p_;
  316|  1.03k|        ++oit;
  317|  1.03k|        ++num_decoded_points_;
  318|  1.03k|      }
  319|    583|      continue;
  320|    603|    }
  321|       |
  322|  19.9k|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 19.9k]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|  19.9k|    const int num_remaining_bits = bit_length_ - level;
  327|  19.9k|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|  19.9k|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|  19.9k|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|  19.9k|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|  19.9k|    uint32_t number = 0;
  334|  19.9k|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|  19.9k|    uint32_t first_half = num_remaining_points / 2;
  337|  19.9k|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 57, False: 19.9k]
  ------------------
  338|       |      // Invalid |number|.
  339|     57|      return false;
  340|     57|    }
  341|  19.9k|    first_half -= number;
  342|  19.9k|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|  19.9k|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 16.5k, False: 3.31k]
  ------------------
  345|  16.5k|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 14.1k, False: 2.40k]
  ------------------
  346|  14.1k|        std::swap(first_half, second_half);
  347|  14.1k|      }
  348|  16.5k|    }
  349|       |
  350|  19.9k|    levels_stack_[stack_pos][axis] += 1;
  351|  19.9k|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|  19.9k|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 18.2k, False: 1.65k]
  ------------------
  353|  18.2k|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|  18.2k|    }
  355|  19.9k|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 8.81k, False: 11.0k]
  ------------------
  356|  8.81k|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|  8.81k|    }
  358|  19.9k|  }
  359|      5|  return true;
  360|     82|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE14DecodingStatusC2Ejjj:
  134|  4.26M|        : num_remaining_points(num_remaining_points_),
  135|  4.26M|          last_axis(last_axis_),
  136|  4.26M|          stack_pos(stack_pos_) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE12DecodeNumberEiPj:
  127|  2.14M|  void DecodeNumber(int nbits, uint32_t *value) {
  128|  2.14M|    numbers_decoder_.DecodeLeastSignificantBits32(nbits, value);
  129|  2.14M|  }
_ZNK5draco33DynamicIntegerPointsKdTreeDecoderILi2EE18num_decoded_pointsEv:
  118|     30|  uint32_t num_decoded_points() const { return num_decoded_points_; }
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EEC2Ej:
   86|    303|      : bit_length_(0),
   87|    303|        num_points_(0),
   88|    303|        num_decoded_points_(0),
   89|    303|        dimension_(dimension),
   90|    303|        p_(dimension, 0),
   91|    303|        axes_(dimension, 0),
   92|       |        // Init the stack with the maximum depth of the tree.
   93|       |        // +1 for a second leaf.
   94|    303|        base_stack_(32 * dimension + 1, VectorUint32(dimension, 0)),
   95|    303|        levels_stack_(32 * dimension + 1, VectorUint32(dimension, 0)) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi3EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_j:
  185|    176|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|    176|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 6, False: 170]
  ------------------
  187|      6|    return false;
  188|      6|  }
  189|    170|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 17, False: 153]
  ------------------
  190|     17|    return false;
  191|     17|  }
  192|    153|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 3, False: 150]
  ------------------
  193|      3|    return false;
  194|      3|  }
  195|    150|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 15, False: 135]
  ------------------
  196|     15|    return true;
  197|     15|  }
  198|    135|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 16, False: 119]
  ------------------
  199|     16|    return false;
  200|     16|  }
  201|    119|  num_decoded_points_ = 0;
  202|       |
  203|    119|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 8, False: 111]
  ------------------
  204|      8|    return false;
  205|      8|  }
  206|    111|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 1, False: 110]
  ------------------
  207|      1|    return false;
  208|      1|  }
  209|    110|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 3, False: 107]
  ------------------
  210|      3|    return false;
  211|      3|  }
  212|    107|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 2, False: 105]
  ------------------
  213|      2|    return false;
  214|      2|  }
  215|       |
  216|    105|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 98, False: 7]
  ------------------
  217|     98|    return false;
  218|     98|  }
  219|       |
  220|      7|  numbers_decoder_.EndDecoding();
  221|      7|  remaining_bits_decoder_.EndDecoding();
  222|      7|  axis_decoder_.EndDecoding();
  223|      7|  half_decoder_.EndDecoding();
  224|       |
  225|      7|  return true;
  226|    105|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi3EE14DecodeInternalINS_34PointAttributeVectorOutputIteratorIjEEEEbjRT_:
  253|    105|    uint32_t num_points, OutputIteratorT &oit) {
  254|    105|  typedef DecodingStatus Status;
  255|    105|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|    105|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|    105|  DecodingStatus init_status(num_points, 0, 0);
  258|    105|  std::stack<Status> status_stack;
  259|    105|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|  31.7k|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 31.7k, False: 7]
  ------------------
  263|  31.7k|    const DecodingStatus status = status_stack.top();
  264|  31.7k|    status_stack.pop();
  265|       |
  266|  31.7k|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|  31.7k|    const uint32_t last_axis = status.last_axis;
  268|  31.7k|    const uint32_t stack_pos = status.stack_pos;
  269|  31.7k|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|  31.7k|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|  31.7k|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 31.7k]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|  31.7k|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|  31.7k|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 0, False: 31.7k]
  ------------------
  278|      0|      return false;
  279|      0|    }
  280|       |
  281|  31.7k|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|  31.7k|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 2.61k, False: 29.1k]
  ------------------
  285|  49.8M|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 49.8M, False: 2.61k]
  ------------------
  286|  49.8M|        *oit = old_base;
  287|  49.8M|        ++oit;
  288|  49.8M|        ++num_decoded_points_;
  289|  49.8M|      }
  290|  2.61k|      continue;
  291|  2.61k|    }
  292|       |
  293|  29.1k|    DRACO_DCHECK_EQ(true, num_remaining_points != 0);
  294|       |
  295|       |    // Fast decoding of remaining bits if number of points is 1 or 2.
  296|  29.1k|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 1.78k, False: 27.3k]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|  1.78k|      axes_[0] = axis;
  300|  4.47k|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 2.68k, False: 1.78k]
  ------------------
  301|  2.68k|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|  2.68k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 674, False: 2.01k]
  |  |  ------------------
  ------------------
  302|  2.68k|      }
  303|  4.66k|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 2.89k, False: 1.76k]
  ------------------
  304|  9.86k|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 6.98k, False: 2.88k]
  ------------------
  305|  6.98k|          p_[axes_[j]] = 0;
  306|  6.98k|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|  6.98k|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 5.05k, False: 1.92k]
  ------------------
  308|  5.05k|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 18, False: 5.04k]
  ------------------
  309|  5.05k|                    num_remaining_bits, &p_[axes_[j]])) {
  310|     18|              return false;
  311|     18|            }
  312|  5.05k|          }
  313|  6.96k|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|  6.96k|        }
  315|  2.88k|        *oit = p_;
  316|  2.88k|        ++oit;
  317|  2.88k|        ++num_decoded_points_;
  318|  2.88k|      }
  319|  1.76k|      continue;
  320|  1.78k|    }
  321|       |
  322|  27.3k|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 27.3k]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|  27.3k|    const int num_remaining_bits = bit_length_ - level;
  327|  27.3k|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|  27.3k|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|  27.3k|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|  27.3k|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|  27.3k|    uint32_t number = 0;
  334|  27.3k|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|  27.3k|    uint32_t first_half = num_remaining_points / 2;
  337|  27.3k|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 80, False: 27.2k]
  ------------------
  338|       |      // Invalid |number|.
  339|     80|      return false;
  340|     80|    }
  341|  27.2k|    first_half -= number;
  342|  27.2k|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|  27.2k|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 24.7k, False: 2.52k]
  ------------------
  345|  24.7k|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 21.0k, False: 3.64k]
  ------------------
  346|  21.0k|        std::swap(first_half, second_half);
  347|  21.0k|      }
  348|  24.7k|    }
  349|       |
  350|  27.2k|    levels_stack_[stack_pos][axis] += 1;
  351|  27.2k|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|  27.2k|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 24.1k, False: 3.08k]
  ------------------
  353|  24.1k|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|  24.1k|    }
  355|  27.2k|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 8.12k, False: 19.1k]
  ------------------
  356|  8.12k|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|  8.12k|    }
  358|  27.2k|  }
  359|      7|  return true;
  360|    105|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi3EE14DecodingStatusC2Ejjj:
  134|   100k|        : num_remaining_points(num_remaining_points_),
  135|   100k|          last_axis(last_axis_),
  136|   100k|          stack_pos(stack_pos_) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi3EE7GetAxisEjRKNSt3__16vectorIjNS2_9allocatorIjEEEEj:
  231|  98.2k|    uint32_t last_axis) {
  232|  98.2k|  if (!Policy::select_axis) {
  ------------------
  |  Branch (232:7): [True: 98.2k, Folded]
  ------------------
  233|  98.2k|    return DRACO_INCREMENT_MOD(last_axis, dimension_);
  ------------------
  |  |   24|  98.2k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 25.4k, False: 72.8k]
  |  |  ------------------
  ------------------
  234|  98.2k|  }
  235|       |
  236|      0|  uint32_t best_axis = 0;
  237|      0|  if (num_remaining_points < 64) {
  ------------------
  |  Branch (237:7): [True: 0, False: 0]
  ------------------
  238|      0|    for (uint32_t axis = 1; axis < dimension_; ++axis) {
  ------------------
  |  Branch (238:29): [True: 0, False: 0]
  ------------------
  239|      0|      if (levels[best_axis] > levels[axis]) {
  ------------------
  |  Branch (239:11): [True: 0, False: 0]
  ------------------
  240|      0|        best_axis = axis;
  241|      0|      }
  242|      0|    }
  243|      0|  } else {
  244|      0|    axis_decoder_.DecodeLeastSignificantBits32(4, &best_axis);
  245|      0|  }
  246|       |
  247|      0|  return best_axis;
  248|  98.2k|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi3EE12DecodeNumberEiPj:
  127|  61.3k|  void DecodeNumber(int nbits, uint32_t *value) {
  128|  61.3k|    numbers_decoder_.DecodeLeastSignificantBits32(nbits, value);
  129|  61.3k|  }
_ZNK5draco33DynamicIntegerPointsKdTreeDecoderILi3EE18num_decoded_pointsEv:
  118|     19|  uint32_t num_decoded_points() const { return num_decoded_points_; }
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_j:
  185|    203|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|    203|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 5, False: 198]
  ------------------
  187|      5|    return false;
  188|      5|  }
  189|    198|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 12, False: 186]
  ------------------
  190|     12|    return false;
  191|     12|  }
  192|    186|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 3, False: 183]
  ------------------
  193|      3|    return false;
  194|      3|  }
  195|    183|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 28, False: 155]
  ------------------
  196|     28|    return true;
  197|     28|  }
  198|    155|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 33, False: 122]
  ------------------
  199|     33|    return false;
  200|     33|  }
  201|    122|  num_decoded_points_ = 0;
  202|       |
  203|    122|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 18, False: 104]
  ------------------
  204|     18|    return false;
  205|     18|  }
  206|    104|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 4, False: 100]
  ------------------
  207|      4|    return false;
  208|      4|  }
  209|    100|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 2, False: 98]
  ------------------
  210|      2|    return false;
  211|      2|  }
  212|     98|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 1, False: 97]
  ------------------
  213|      1|    return false;
  214|      1|  }
  215|       |
  216|     97|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 63, False: 34]
  ------------------
  217|     63|    return false;
  218|     63|  }
  219|       |
  220|     34|  numbers_decoder_.EndDecoding();
  221|     34|  remaining_bits_decoder_.EndDecoding();
  222|     34|  axis_decoder_.EndDecoding();
  223|     34|  half_decoder_.EndDecoding();
  224|       |
  225|     34|  return true;
  226|     97|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EE14DecodeInternalINS_34PointAttributeVectorOutputIteratorIjEEEEbjRT_:
  253|     97|    uint32_t num_points, OutputIteratorT &oit) {
  254|     97|  typedef DecodingStatus Status;
  255|     97|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|     97|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|     97|  DecodingStatus init_status(num_points, 0, 0);
  258|     97|  std::stack<Status> status_stack;
  259|     97|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|  4.23M|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 4.23M, False: 34]
  ------------------
  263|  4.23M|    const DecodingStatus status = status_stack.top();
  264|  4.23M|    status_stack.pop();
  265|       |
  266|  4.23M|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|  4.23M|    const uint32_t last_axis = status.last_axis;
  268|  4.23M|    const uint32_t stack_pos = status.stack_pos;
  269|  4.23M|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|  4.23M|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|  4.23M|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 4.23M]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|  4.23M|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|  4.23M|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 0, False: 4.23M]
  ------------------
  278|      0|      return false;
  279|      0|    }
  280|       |
  281|  4.23M|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|  4.23M|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 2.00M, False: 2.22M]
  ------------------
  285|  86.0M|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 84.0M, False: 2.00M]
  ------------------
  286|  84.0M|        *oit = old_base;
  287|  84.0M|        ++oit;
  288|  84.0M|        ++num_decoded_points_;
  289|  84.0M|      }
  290|  2.00M|      continue;
  291|  2.00M|    }
  292|       |
  293|  2.22M|    DRACO_DCHECK_EQ(true, num_remaining_points != 0);
  294|       |
  295|       |    // Fast decoding of remaining bits if number of points is 1 or 2.
  296|  2.22M|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 97.2k, False: 2.13M]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|  97.2k|      axes_[0] = axis;
  300|   145k|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 47.7k, False: 97.2k]
  ------------------
  301|  47.7k|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|  47.7k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 16.4k, False: 31.3k]
  |  |  ------------------
  ------------------
  302|  47.7k|      }
  303|   251k|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 154k, False: 97.2k]
  ------------------
  304|   373k|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 219k, False: 154k]
  ------------------
  305|   219k|          p_[axes_[j]] = 0;
  306|   219k|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|   219k|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 198k, False: 21.2k]
  ------------------
  308|   198k|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 52, False: 198k]
  ------------------
  309|   198k|                    num_remaining_bits, &p_[axes_[j]])) {
  310|     52|              return false;
  311|     52|            }
  312|   198k|          }
  313|   219k|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|   219k|        }
  315|   154k|        *oit = p_;
  316|   154k|        ++oit;
  317|   154k|        ++num_decoded_points_;
  318|   154k|      }
  319|  97.2k|      continue;
  320|  97.2k|    }
  321|       |
  322|  2.13M|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 2.13M]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|  2.13M|    const int num_remaining_bits = bit_length_ - level;
  327|  2.13M|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|  2.13M|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|  2.13M|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|  2.13M|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|  2.13M|    uint32_t number = 0;
  334|  2.13M|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|  2.13M|    uint32_t first_half = num_remaining_points / 2;
  337|  2.13M|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 11, False: 2.13M]
  ------------------
  338|       |      // Invalid |number|.
  339|     11|      return false;
  340|     11|    }
  341|  2.13M|    first_half -= number;
  342|  2.13M|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|  2.13M|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 2.04M, False: 82.3k]
  ------------------
  345|  2.04M|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 2.01M, False: 32.4k]
  ------------------
  346|  2.01M|        std::swap(first_half, second_half);
  347|  2.01M|      }
  348|  2.04M|    }
  349|       |
  350|  2.13M|    levels_stack_[stack_pos][axis] += 1;
  351|  2.13M|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|  2.13M|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 2.11M, False: 11.8k]
  ------------------
  353|  2.11M|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|  2.11M|    }
  355|  2.13M|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 2.11M, False: 19.0k]
  ------------------
  356|  2.11M|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|  2.11M|    }
  358|  2.13M|  }
  359|     34|  return true;
  360|     97|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EE14DecodingStatusC2Ejjj:
  134|  4.23M|        : num_remaining_points(num_remaining_points_),
  135|  4.23M|          last_axis(last_axis_),
  136|  4.23M|          stack_pos(stack_pos_) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EE12DecodeNumberEiPj:
  127|  2.13M|  void DecodeNumber(int nbits, uint32_t *value) {
  128|  2.13M|    numbers_decoder_.DecodeLeastSignificantBits32(nbits, value);
  129|  2.13M|  }
_ZNK5draco33DynamicIntegerPointsKdTreeDecoderILi4EE18num_decoded_pointsEv:
  118|     61|  uint32_t num_decoded_points() const { return num_decoded_points_; }
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EEC2Ej:
   86|    266|      : bit_length_(0),
   87|    266|        num_points_(0),
   88|    266|        num_decoded_points_(0),
   89|    266|        dimension_(dimension),
   90|    266|        p_(dimension, 0),
   91|    266|        axes_(dimension, 0),
   92|       |        // Init the stack with the maximum depth of the tree.
   93|       |        // +1 for a second leaf.
   94|    266|        base_stack_(32 * dimension + 1, VectorUint32(dimension, 0)),
   95|    266|        levels_stack_(32 * dimension + 1, VectorUint32(dimension, 0)) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi5EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_j:
  185|    204|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|    204|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 5, False: 199]
  ------------------
  187|      5|    return false;
  188|      5|  }
  189|    199|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 10, False: 189]
  ------------------
  190|     10|    return false;
  191|     10|  }
  192|    189|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 2, False: 187]
  ------------------
  193|      2|    return false;
  194|      2|  }
  195|    187|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 13, False: 174]
  ------------------
  196|     13|    return true;
  197|     13|  }
  198|    174|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 23, False: 151]
  ------------------
  199|     23|    return false;
  200|     23|  }
  201|    151|  num_decoded_points_ = 0;
  202|       |
  203|    151|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 47, False: 104]
  ------------------
  204|     47|    return false;
  205|     47|  }
  206|    104|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 6, False: 98]
  ------------------
  207|      6|    return false;
  208|      6|  }
  209|     98|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 5, False: 93]
  ------------------
  210|      5|    return false;
  211|      5|  }
  212|     93|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 3, False: 90]
  ------------------
  213|      3|    return false;
  214|      3|  }
  215|       |
  216|     90|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 53, False: 37]
  ------------------
  217|     53|    return false;
  218|     53|  }
  219|       |
  220|     37|  numbers_decoder_.EndDecoding();
  221|     37|  remaining_bits_decoder_.EndDecoding();
  222|     37|  axis_decoder_.EndDecoding();
  223|     37|  half_decoder_.EndDecoding();
  224|       |
  225|     37|  return true;
  226|     90|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi5EE14DecodeInternalINS_34PointAttributeVectorOutputIteratorIjEEEEbjRT_:
  253|     90|    uint32_t num_points, OutputIteratorT &oit) {
  254|     90|  typedef DecodingStatus Status;
  255|     90|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|     90|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|     90|  DecodingStatus init_status(num_points, 0, 0);
  258|     90|  std::stack<Status> status_stack;
  259|     90|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|  2.73M|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 2.73M, False: 37]
  ------------------
  263|  2.73M|    const DecodingStatus status = status_stack.top();
  264|  2.73M|    status_stack.pop();
  265|       |
  266|  2.73M|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|  2.73M|    const uint32_t last_axis = status.last_axis;
  268|  2.73M|    const uint32_t stack_pos = status.stack_pos;
  269|  2.73M|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|  2.73M|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|  2.73M|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 2.73M]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|  2.73M|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|  2.73M|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 0, False: 2.73M]
  ------------------
  278|      0|      return false;
  279|      0|    }
  280|       |
  281|  2.73M|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|  2.73M|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 1.27M, False: 1.45M]
  ------------------
  285|   115M|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 114M, False: 1.27M]
  ------------------
  286|   114M|        *oit = old_base;
  287|   114M|        ++oit;
  288|   114M|        ++num_decoded_points_;
  289|   114M|      }
  290|  1.27M|      continue;
  291|  1.27M|    }
  292|       |
  293|  1.45M|    DRACO_DCHECK_EQ(true, num_remaining_points != 0);
  294|       |
  295|       |    // Fast decoding of remaining bits if number of points is 1 or 2.
  296|  1.45M|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 76.6k, False: 1.38M]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|  76.6k|      axes_[0] = axis;
  300|   253k|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 176k, False: 76.6k]
  ------------------
  301|   176k|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|   176k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 23.9k, False: 152k]
  |  |  ------------------
  ------------------
  302|   176k|      }
  303|   189k|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 113k, False: 76.6k]
  ------------------
  304|   516k|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 403k, False: 113k]
  ------------------
  305|   403k|          p_[axes_[j]] = 0;
  306|   403k|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|   403k|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 172k, False: 231k]
  ------------------
  308|   172k|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 51, False: 172k]
  ------------------
  309|   172k|                    num_remaining_bits, &p_[axes_[j]])) {
  310|     51|              return false;
  311|     51|            }
  312|   172k|          }
  313|   403k|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|   403k|        }
  315|   113k|        *oit = p_;
  316|   113k|        ++oit;
  317|   113k|        ++num_decoded_points_;
  318|   113k|      }
  319|  76.6k|      continue;
  320|  76.6k|    }
  321|       |
  322|  1.38M|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 1.38M]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|  1.38M|    const int num_remaining_bits = bit_length_ - level;
  327|  1.38M|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|  1.38M|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|  1.38M|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|  1.38M|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|  1.38M|    uint32_t number = 0;
  334|  1.38M|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|  1.38M|    uint32_t first_half = num_remaining_points / 2;
  337|  1.38M|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 2, False: 1.38M]
  ------------------
  338|       |      // Invalid |number|.
  339|      2|      return false;
  340|      2|    }
  341|  1.38M|    first_half -= number;
  342|  1.38M|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|  1.38M|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 1.34M, False: 37.0k]
  ------------------
  345|  1.34M|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 1.30M, False: 42.0k]
  ------------------
  346|  1.30M|        std::swap(first_half, second_half);
  347|  1.30M|      }
  348|  1.34M|    }
  349|       |
  350|  1.38M|    levels_stack_[stack_pos][axis] += 1;
  351|  1.38M|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|  1.38M|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 1.37M, False: 9.94k]
  ------------------
  353|  1.37M|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|  1.37M|    }
  355|  1.38M|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 1.36M, False: 15.0k]
  ------------------
  356|  1.36M|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|  1.36M|    }
  358|  1.38M|  }
  359|     37|  return true;
  360|     90|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi5EE14DecodingStatusC2Ejjj:
  134|  2.73M|        : num_remaining_points(num_remaining_points_),
  135|  2.73M|          last_axis(last_axis_),
  136|  2.73M|          stack_pos(stack_pos_) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi5EE7GetAxisEjRKNSt3__16vectorIjNS2_9allocatorIjEEEEj:
  231|  2.73M|    uint32_t last_axis) {
  232|  2.73M|  if (!Policy::select_axis) {
  ------------------
  |  Branch (232:7): [True: 2.73M, Folded]
  ------------------
  233|  2.73M|    return DRACO_INCREMENT_MOD(last_axis, dimension_);
  ------------------
  |  |   24|  2.73M|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 1.10M, False: 1.62M]
  |  |  ------------------
  ------------------
  234|  2.73M|  }
  235|       |
  236|      0|  uint32_t best_axis = 0;
  237|      0|  if (num_remaining_points < 64) {
  ------------------
  |  Branch (237:7): [True: 0, False: 0]
  ------------------
  238|      0|    for (uint32_t axis = 1; axis < dimension_; ++axis) {
  ------------------
  |  Branch (238:29): [True: 0, False: 0]
  ------------------
  239|      0|      if (levels[best_axis] > levels[axis]) {
  ------------------
  |  Branch (239:11): [True: 0, False: 0]
  ------------------
  240|      0|        best_axis = axis;
  241|      0|      }
  242|      0|    }
  243|      0|  } else {
  244|      0|    axis_decoder_.DecodeLeastSignificantBits32(4, &best_axis);
  245|      0|  }
  246|       |
  247|      0|  return best_axis;
  248|  2.73M|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi5EE12DecodeNumberEiPj:
  127|  1.38M|  void DecodeNumber(int nbits, uint32_t *value) {
  128|  1.38M|    numbers_decoder_.DecodeLeastSignificantBits32(nbits, value);
  129|  1.38M|  }
_ZNK5draco33DynamicIntegerPointsKdTreeDecoderILi5EE18num_decoded_pointsEv:
  118|     49|  uint32_t num_decoded_points() const { return num_decoded_points_; }
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi6EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_j:
  185|    146|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|    146|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 2, False: 144]
  ------------------
  187|      2|    return false;
  188|      2|  }
  189|    144|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 10, False: 134]
  ------------------
  190|     10|    return false;
  191|     10|  }
  192|    134|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 2, False: 132]
  ------------------
  193|      2|    return false;
  194|      2|  }
  195|    132|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 22, False: 110]
  ------------------
  196|     22|    return true;
  197|     22|  }
  198|    110|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 11, False: 99]
  ------------------
  199|     11|    return false;
  200|     11|  }
  201|     99|  num_decoded_points_ = 0;
  202|       |
  203|     99|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 12, False: 87]
  ------------------
  204|     12|    return false;
  205|     12|  }
  206|     87|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 2, False: 85]
  ------------------
  207|      2|    return false;
  208|      2|  }
  209|     85|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 3, False: 82]
  ------------------
  210|      3|    return false;
  211|      3|  }
  212|     82|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 2, False: 80]
  ------------------
  213|      2|    return false;
  214|      2|  }
  215|       |
  216|     80|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 63, False: 17]
  ------------------
  217|     63|    return false;
  218|     63|  }
  219|       |
  220|     17|  numbers_decoder_.EndDecoding();
  221|     17|  remaining_bits_decoder_.EndDecoding();
  222|     17|  axis_decoder_.EndDecoding();
  223|     17|  half_decoder_.EndDecoding();
  224|       |
  225|     17|  return true;
  226|     80|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi6EE14DecodeInternalINS_34PointAttributeVectorOutputIteratorIjEEEEbjRT_:
  253|     80|    uint32_t num_points, OutputIteratorT &oit) {
  254|     80|  typedef DecodingStatus Status;
  255|     80|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|     80|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|     80|  DecodingStatus init_status(num_points, 0, 0);
  258|     80|  std::stack<Status> status_stack;
  259|     80|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|   173k|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 173k, False: 17]
  ------------------
  263|   173k|    const DecodingStatus status = status_stack.top();
  264|   173k|    status_stack.pop();
  265|       |
  266|   173k|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|   173k|    const uint32_t last_axis = status.last_axis;
  268|   173k|    const uint32_t stack_pos = status.stack_pos;
  269|   173k|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|   173k|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|   173k|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 173k]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|   173k|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|   173k|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 4, False: 173k]
  ------------------
  278|      4|      return false;
  279|      4|    }
  280|       |
  281|   173k|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|   173k|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 487, False: 173k]
  ------------------
  285|  70.9k|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 70.5k, False: 487]
  ------------------
  286|  70.5k|        *oit = old_base;
  287|  70.5k|        ++oit;
  288|  70.5k|        ++num_decoded_points_;
  289|  70.5k|      }
  290|    487|      continue;
  291|    487|    }
  292|       |
  293|   173k|    DRACO_DCHECK_EQ(true, num_remaining_points != 0);
  294|       |
  295|       |    // Fast decoding of remaining bits if number of points is 1 or 2.
  296|   173k|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 587, False: 172k]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|    587|      axes_[0] = axis;
  300|  40.3k|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 39.7k, False: 587]
  ------------------
  301|  39.7k|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|  39.7k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 570, False: 39.1k]
  |  |  ------------------
  ------------------
  302|  39.7k|      }
  303|  1.33k|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 784, False: 553]
  ------------------
  304|  51.5k|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 50.7k, False: 750]
  ------------------
  305|  50.7k|          p_[axes_[j]] = 0;
  306|  50.7k|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|  50.7k|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 50.5k, False: 242]
  ------------------
  308|  50.5k|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 34, False: 50.4k]
  ------------------
  309|  50.5k|                    num_remaining_bits, &p_[axes_[j]])) {
  310|     34|              return false;
  311|     34|            }
  312|  50.5k|          }
  313|  50.7k|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|  50.7k|        }
  315|    750|        *oit = p_;
  316|    750|        ++oit;
  317|    750|        ++num_decoded_points_;
  318|    750|      }
  319|    553|      continue;
  320|    587|    }
  321|       |
  322|   172k|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 172k]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|   172k|    const int num_remaining_bits = bit_length_ - level;
  327|   172k|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|   172k|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|   172k|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|   172k|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|   172k|    uint32_t number = 0;
  334|   172k|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|   172k|    uint32_t first_half = num_remaining_points / 2;
  337|   172k|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 25, False: 172k]
  ------------------
  338|       |      // Invalid |number|.
  339|     25|      return false;
  340|     25|    }
  341|   172k|    first_half -= number;
  342|   172k|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|   172k|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 172k, False: 72]
  ------------------
  345|   172k|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 134k, False: 38.3k]
  ------------------
  346|   134k|        std::swap(first_half, second_half);
  347|   134k|      }
  348|   172k|    }
  349|       |
  350|   172k|    levels_stack_[stack_pos][axis] += 1;
  351|   172k|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|   172k|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 134k, False: 37.9k]
  ------------------
  353|   134k|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|   134k|    }
  355|   172k|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 39.1k, False: 133k]
  ------------------
  356|  39.1k|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|  39.1k|    }
  358|   172k|  }
  359|     17|  return true;
  360|     80|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi6EE14DecodingStatusC2Ejjj:
  134|   173k|        : num_remaining_points(num_remaining_points_),
  135|   173k|          last_axis(last_axis_),
  136|   173k|          stack_pos(stack_pos_) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi6EE12DecodeNumberEiPj:
  127|   172k|  void DecodeNumber(int nbits, uint32_t *value) {
  128|   172k|    numbers_decoder_.DecodeLeastSignificantBits32(nbits, value);
  129|   172k|  }
_ZNK5draco33DynamicIntegerPointsKdTreeDecoderILi6EE18num_decoded_pointsEv:
  118|     36|  uint32_t num_decoded_points() const { return num_decoded_points_; }
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi6EEC2Ej:
   86|    172|      : bit_length_(0),
   87|    172|        num_points_(0),
   88|    172|        num_decoded_points_(0),
   89|    172|        dimension_(dimension),
   90|    172|        p_(dimension, 0),
   91|    172|        axes_(dimension, 0),
   92|       |        // Init the stack with the maximum depth of the tree.
   93|       |        // +1 for a second leaf.
   94|    172|        base_stack_(32 * dimension + 1, VectorUint32(dimension, 0)),
   95|    172|        levels_stack_(32 * dimension + 1, VectorUint32(dimension, 0)) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_:
  178|    126|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|    126|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|    126|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EEC2Ej:
   86|    304|      : bit_length_(0),
   87|    304|        num_points_(0),
   88|    304|        num_decoded_points_(0),
   89|    304|        dimension_(dimension),
   90|    304|        p_(dimension, 0),
   91|    304|        axes_(dimension, 0),
   92|       |        // Init the stack with the maximum depth of the tree.
   93|       |        // +1 for a second leaf.
   94|    304|        base_stack_(32 * dimension + 1, VectorUint32(dimension, 0)),
   95|    304|        levels_stack_(32 * dimension + 1, VectorUint32(dimension, 0)) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_:
  178|    129|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|    129|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|    129|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_:
  178|     49|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|     49|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|     49|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi3EEC2Ej:
   86|    318|      : bit_length_(0),
   87|    318|        num_points_(0),
   88|    318|        num_decoded_points_(0),
   89|    318|        dimension_(dimension),
   90|    318|        p_(dimension, 0),
   91|    318|        axes_(dimension, 0),
   92|       |        // Init the stack with the maximum depth of the tree.
   93|       |        // +1 for a second leaf.
   94|    318|        base_stack_(32 * dimension + 1, VectorUint32(dimension, 0)),
   95|    318|        levels_stack_(32 * dimension + 1, VectorUint32(dimension, 0)) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi3EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_:
  178|     55|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|     55|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|     55|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_:
  178|     10|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|     10|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|     10|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi5EEC2Ej:
   86|    232|      : bit_length_(0),
   87|    232|        num_points_(0),
   88|    232|        num_decoded_points_(0),
   89|    232|        dimension_(dimension),
   90|    232|        p_(dimension, 0),
   91|    232|        axes_(dimension, 0),
   92|       |        // Init the stack with the maximum depth of the tree.
   93|       |        // +1 for a second leaf.
   94|    232|        base_stack_(32 * dimension + 1, VectorUint32(dimension, 0)),
   95|    232|        levels_stack_(32 * dimension + 1, VectorUint32(dimension, 0)) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi5EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_:
  178|      3|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|      3|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|      3|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi6EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_:
  178|      4|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|      4|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|      4|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE7GetAxisEjRKNSt3__16vectorIjNS2_9allocatorIjEEEEj:
  231|  2.66M|    uint32_t last_axis) {
  232|  2.66M|  if (!Policy::select_axis) {
  ------------------
  |  Branch (232:7): [True: 2.66M, Folded]
  ------------------
  233|  2.66M|    return DRACO_INCREMENT_MOD(last_axis, dimension_);
  ------------------
  |  |   24|  2.66M|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 766k, False: 1.89M]
  |  |  ------------------
  ------------------
  234|  2.66M|  }
  235|       |
  236|      0|  uint32_t best_axis = 0;
  237|      0|  if (num_remaining_points < 64) {
  ------------------
  |  Branch (237:7): [True: 0, False: 0]
  ------------------
  238|      0|    for (uint32_t axis = 1; axis < dimension_; ++axis) {
  ------------------
  |  Branch (238:29): [True: 0, False: 0]
  ------------------
  239|      0|      if (levels[best_axis] > levels[axis]) {
  ------------------
  |  Branch (239:11): [True: 0, False: 0]
  ------------------
  240|      0|        best_axis = axis;
  241|      0|      }
  242|      0|    }
  243|      0|  } else {
  244|      0|    axis_decoder_.DecodeLeastSignificantBits32(4, &best_axis);
  245|      0|  }
  246|       |
  247|      0|  return best_axis;
  248|  2.66M|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE7GetAxisEjRKNSt3__16vectorIjNS2_9allocatorIjEEEEj:
  231|  4.26M|    uint32_t last_axis) {
  232|  4.26M|  if (!Policy::select_axis) {
  ------------------
  |  Branch (232:7): [True: 4.26M, Folded]
  ------------------
  233|  4.26M|    return DRACO_INCREMENT_MOD(last_axis, dimension_);
  ------------------
  |  |   24|  4.26M|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 1.21M, False: 3.04M]
  |  |  ------------------
  ------------------
  234|  4.26M|  }
  235|       |
  236|      0|  uint32_t best_axis = 0;
  237|      0|  if (num_remaining_points < 64) {
  ------------------
  |  Branch (237:7): [True: 0, False: 0]
  ------------------
  238|      0|    for (uint32_t axis = 1; axis < dimension_; ++axis) {
  ------------------
  |  Branch (238:29): [True: 0, False: 0]
  ------------------
  239|      0|      if (levels[best_axis] > levels[axis]) {
  ------------------
  |  Branch (239:11): [True: 0, False: 0]
  ------------------
  240|      0|        best_axis = axis;
  241|      0|      }
  242|      0|    }
  243|      0|  } else {
  244|      0|    axis_decoder_.DecodeLeastSignificantBits32(4, &best_axis);
  245|      0|  }
  246|       |
  247|      0|  return best_axis;
  248|  4.26M|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EE7GetAxisEjRKNSt3__16vectorIjNS2_9allocatorIjEEEEj:
  231|  4.23M|    uint32_t last_axis) {
  232|  4.23M|  if (!Policy::select_axis) {
  ------------------
  |  Branch (232:7): [True: 4.23M, Folded]
  ------------------
  233|  4.23M|    return DRACO_INCREMENT_MOD(last_axis, dimension_);
  ------------------
  |  |   24|  4.23M|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 4.10M, False: 124k]
  |  |  ------------------
  ------------------
  234|  4.23M|  }
  235|       |
  236|      0|  uint32_t best_axis = 0;
  237|      0|  if (num_remaining_points < 64) {
  ------------------
  |  Branch (237:7): [True: 0, False: 0]
  ------------------
  238|      0|    for (uint32_t axis = 1; axis < dimension_; ++axis) {
  ------------------
  |  Branch (238:29): [True: 0, False: 0]
  ------------------
  239|      0|      if (levels[best_axis] > levels[axis]) {
  ------------------
  |  Branch (239:11): [True: 0, False: 0]
  ------------------
  240|      0|        best_axis = axis;
  241|      0|      }
  242|      0|    }
  243|      0|  } else {
  244|      0|    axis_decoder_.DecodeLeastSignificantBits32(4, &best_axis);
  245|      0|  }
  246|       |
  247|      0|  return best_axis;
  248|  4.23M|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi6EE7GetAxisEjRKNSt3__16vectorIjNS2_9allocatorIjEEEEj:
  231|   173k|    uint32_t last_axis) {
  232|   173k|  if (!Policy::select_axis) {
  ------------------
  |  Branch (232:7): [Folded, False: 173k]
  ------------------
  233|      0|    return DRACO_INCREMENT_MOD(last_axis, dimension_);
  ------------------
  |  |   24|      0|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  234|      0|  }
  235|       |
  236|   173k|  uint32_t best_axis = 0;
  237|   173k|  if (num_remaining_points < 64) {
  ------------------
  |  Branch (237:7): [True: 172k, False: 707]
  ------------------
  238|  18.9M|    for (uint32_t axis = 1; axis < dimension_; ++axis) {
  ------------------
  |  Branch (238:29): [True: 18.7M, False: 172k]
  ------------------
  239|  18.7M|      if (levels[best_axis] > levels[axis]) {
  ------------------
  |  Branch (239:11): [True: 206k, False: 18.5M]
  ------------------
  240|   206k|        best_axis = axis;
  241|   206k|      }
  242|  18.7M|    }
  243|   172k|  } else {
  244|    707|    axis_decoder_.DecodeLeastSignificantBits32(4, &best_axis);
  245|    707|  }
  246|       |
  247|   173k|  return best_axis;
  248|   173k|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_:
  178|    130|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|    130|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|    130|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_j:
  185|    130|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|    130|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 1, False: 129]
  ------------------
  187|      1|    return false;
  188|      1|  }
  189|    129|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 19, False: 110]
  ------------------
  190|     19|    return false;
  191|     19|  }
  192|    110|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 1, False: 109]
  ------------------
  193|      1|    return false;
  194|      1|  }
  195|    109|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 1, False: 108]
  ------------------
  196|      1|    return true;
  197|      1|  }
  198|    108|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 0, False: 108]
  ------------------
  199|      0|    return false;
  200|      0|  }
  201|    108|  num_decoded_points_ = 0;
  202|       |
  203|    108|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 29, False: 79]
  ------------------
  204|     29|    return false;
  205|     29|  }
  206|     79|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 7, False: 72]
  ------------------
  207|      7|    return false;
  208|      7|  }
  209|     72|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 3, False: 69]
  ------------------
  210|      3|    return false;
  211|      3|  }
  212|     69|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 1, False: 68]
  ------------------
  213|      1|    return false;
  214|      1|  }
  215|       |
  216|     68|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 57, False: 11]
  ------------------
  217|     57|    return false;
  218|     57|  }
  219|       |
  220|     11|  numbers_decoder_.EndDecoding();
  221|     11|  remaining_bits_decoder_.EndDecoding();
  222|     11|  axis_decoder_.EndDecoding();
  223|     11|  half_decoder_.EndDecoding();
  224|       |
  225|     11|  return true;
  226|     68|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE14DecodeInternalINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbjRT_:
  253|     68|    uint32_t num_points, OutputIteratorT &oit) {
  254|     68|  typedef DecodingStatus Status;
  255|     68|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|     68|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|     68|  DecodingStatus init_status(num_points, 0, 0);
  258|     68|  std::stack<Status> status_stack;
  259|     68|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|  1.98M|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 1.98M, False: 11]
  ------------------
  263|  1.98M|    const DecodingStatus status = status_stack.top();
  264|  1.98M|    status_stack.pop();
  265|       |
  266|  1.98M|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|  1.98M|    const uint32_t last_axis = status.last_axis;
  268|  1.98M|    const uint32_t stack_pos = status.stack_pos;
  269|  1.98M|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|  1.98M|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|  1.98M|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 1.98M]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|  1.98M|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|  1.98M|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 0, False: 1.98M]
  ------------------
  278|      0|      return false;
  279|      0|    }
  280|       |
  281|  1.98M|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|  1.98M|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 991k, False: 996k]
  ------------------
  285|   102M|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 101M, False: 991k]
  ------------------
  286|   101M|        *oit = old_base;
  287|   101M|        ++oit;
  288|   101M|        ++num_decoded_points_;
  289|   101M|      }
  290|   991k|      continue;
  291|   991k|    }
  292|       |
  293|   996k|    DRACO_DCHECK_EQ(true, num_remaining_points != 0);
  294|       |
  295|       |    // Fast decoding of remaining bits if number of points is 1 or 2.
  296|   996k|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 2.02k, False: 994k]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|  2.02k|      axes_[0] = axis;
  300|  6.07k|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 4.04k, False: 2.02k]
  ------------------
  301|  4.04k|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|  4.04k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 483, False: 3.56k]
  |  |  ------------------
  ------------------
  302|  4.04k|      }
  303|  5.54k|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 3.54k, False: 1.99k]
  ------------------
  304|  14.1k|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 10.6k, False: 3.51k]
  ------------------
  305|  10.6k|          p_[axes_[j]] = 0;
  306|  10.6k|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|  10.6k|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 4.88k, False: 5.72k]
  ------------------
  308|  4.88k|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 31, False: 4.85k]
  ------------------
  309|  4.88k|                    num_remaining_bits, &p_[axes_[j]])) {
  310|     31|              return false;
  311|     31|            }
  312|  4.88k|          }
  313|  10.5k|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|  10.5k|        }
  315|  3.51k|        *oit = p_;
  316|  3.51k|        ++oit;
  317|  3.51k|        ++num_decoded_points_;
  318|  3.51k|      }
  319|  1.99k|      continue;
  320|  2.02k|    }
  321|       |
  322|   994k|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 994k]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|   994k|    const int num_remaining_bits = bit_length_ - level;
  327|   994k|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|   994k|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|   994k|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|   994k|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|   994k|    uint32_t number = 0;
  334|   994k|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|   994k|    uint32_t first_half = num_remaining_points / 2;
  337|   994k|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 26, False: 994k]
  ------------------
  338|       |      // Invalid |number|.
  339|     26|      return false;
  340|     26|    }
  341|   994k|    first_half -= number;
  342|   994k|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|   994k|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 445k, False: 548k]
  ------------------
  345|   445k|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 433k, False: 12.2k]
  ------------------
  346|   433k|        std::swap(first_half, second_half);
  347|   433k|      }
  348|   445k|    }
  349|       |
  350|   994k|    levels_stack_[stack_pos][axis] += 1;
  351|   994k|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|   994k|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 994k, False: 73]
  ------------------
  353|   994k|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|   994k|    }
  355|   994k|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 994k, False: 140]
  ------------------
  356|   994k|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|   994k|    }
  358|   994k|  }
  359|     11|  return true;
  360|     68|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_:
  178|    103|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|    103|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|    103|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_j:
  185|    103|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|    103|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 1, False: 102]
  ------------------
  187|      1|    return false;
  188|      1|  }
  189|    102|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 10, False: 92]
  ------------------
  190|     10|    return false;
  191|     10|  }
  192|     92|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 1, False: 91]
  ------------------
  193|      1|    return false;
  194|      1|  }
  195|     91|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 1, False: 90]
  ------------------
  196|      1|    return true;
  197|      1|  }
  198|     90|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 0, False: 90]
  ------------------
  199|      0|    return false;
  200|      0|  }
  201|     90|  num_decoded_points_ = 0;
  202|       |
  203|     90|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 23, False: 67]
  ------------------
  204|     23|    return false;
  205|     23|  }
  206|     67|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 4, False: 63]
  ------------------
  207|      4|    return false;
  208|      4|  }
  209|     63|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 3, False: 60]
  ------------------
  210|      3|    return false;
  211|      3|  }
  212|     60|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 1, False: 59]
  ------------------
  213|      1|    return false;
  214|      1|  }
  215|       |
  216|     59|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 47, False: 12]
  ------------------
  217|     47|    return false;
  218|     47|  }
  219|       |
  220|     12|  numbers_decoder_.EndDecoding();
  221|     12|  remaining_bits_decoder_.EndDecoding();
  222|     12|  axis_decoder_.EndDecoding();
  223|     12|  half_decoder_.EndDecoding();
  224|       |
  225|     12|  return true;
  226|     59|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EE14DecodeInternalINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbjRT_:
  253|     59|    uint32_t num_points, OutputIteratorT &oit) {
  254|     59|  typedef DecodingStatus Status;
  255|     59|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|     59|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|     59|  DecodingStatus init_status(num_points, 0, 0);
  258|     59|  std::stack<Status> status_stack;
  259|     59|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|  7.47M|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 7.47M, False: 12]
  ------------------
  263|  7.47M|    const DecodingStatus status = status_stack.top();
  264|  7.47M|    status_stack.pop();
  265|       |
  266|  7.47M|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|  7.47M|    const uint32_t last_axis = status.last_axis;
  268|  7.47M|    const uint32_t stack_pos = status.stack_pos;
  269|  7.47M|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|  7.47M|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|  7.47M|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 7.47M]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|  7.47M|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|  7.47M|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 0, False: 7.47M]
  ------------------
  278|      0|      return false;
  279|      0|    }
  280|       |
  281|  7.47M|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|  7.47M|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 3.73M, False: 3.74M]
  ------------------
  285|  61.0M|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 57.3M, False: 3.73M]
  ------------------
  286|  57.3M|        *oit = old_base;
  287|  57.3M|        ++oit;
  288|  57.3M|        ++num_decoded_points_;
  289|  57.3M|      }
  290|  3.73M|      continue;
  291|  3.73M|    }
  292|       |
  293|  3.74M|    DRACO_DCHECK_EQ(true, num_remaining_points != 0);
  294|       |
  295|       |    // Fast decoding of remaining bits if number of points is 1 or 2.
  296|  3.74M|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 1.33k, False: 3.73M]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|  1.33k|      axes_[0] = axis;
  300|  4.01k|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 2.67k, False: 1.33k]
  ------------------
  301|  2.67k|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|  2.67k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 379, False: 2.29k]
  |  |  ------------------
  ------------------
  302|  2.67k|      }
  303|  3.71k|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 2.40k, False: 1.31k]
  ------------------
  304|  9.56k|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 7.18k, False: 2.37k]
  ------------------
  305|  7.18k|          p_[axes_[j]] = 0;
  306|  7.18k|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|  7.18k|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 3.59k, False: 3.59k]
  ------------------
  308|  3.59k|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 28, False: 3.56k]
  ------------------
  309|  3.59k|                    num_remaining_bits, &p_[axes_[j]])) {
  310|     28|              return false;
  311|     28|            }
  312|  3.59k|          }
  313|  7.15k|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|  7.15k|        }
  315|  2.37k|        *oit = p_;
  316|  2.37k|        ++oit;
  317|  2.37k|        ++num_decoded_points_;
  318|  2.37k|      }
  319|  1.31k|      continue;
  320|  1.33k|    }
  321|       |
  322|  3.73M|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 3.73M]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|  3.73M|    const int num_remaining_bits = bit_length_ - level;
  327|  3.73M|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|  3.73M|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|  3.73M|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|  3.73M|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|  3.73M|    uint32_t number = 0;
  334|  3.73M|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|  3.73M|    uint32_t first_half = num_remaining_points / 2;
  337|  3.73M|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 19, False: 3.73M]
  ------------------
  338|       |      // Invalid |number|.
  339|     19|      return false;
  340|     19|    }
  341|  3.73M|    first_half -= number;
  342|  3.73M|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|  3.73M|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 2.33M, False: 1.40M]
  ------------------
  345|  2.33M|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 2.33M, False: 2.33k]
  ------------------
  346|  2.33M|        std::swap(first_half, second_half);
  347|  2.33M|      }
  348|  2.33M|    }
  349|       |
  350|  3.73M|    levels_stack_[stack_pos][axis] += 1;
  351|  3.73M|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|  3.73M|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 3.73M, False: 154]
  ------------------
  353|  3.73M|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|  3.73M|    }
  355|  3.73M|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 3.73M, False: 77]
  ------------------
  356|  3.73M|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|  3.73M|    }
  358|  3.73M|  }
  359|     12|  return true;
  360|     59|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_:
  178|    113|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|    113|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|    113|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_j:
  185|    113|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|    113|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 2, False: 111]
  ------------------
  187|      2|    return false;
  188|      2|  }
  189|    111|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 3, False: 108]
  ------------------
  190|      3|    return false;
  191|      3|  }
  192|    108|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 1, False: 107]
  ------------------
  193|      1|    return false;
  194|      1|  }
  195|    107|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 1, False: 106]
  ------------------
  196|      1|    return true;
  197|      1|  }
  198|    106|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 0, False: 106]
  ------------------
  199|      0|    return false;
  200|      0|  }
  201|    106|  num_decoded_points_ = 0;
  202|       |
  203|    106|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 31, False: 75]
  ------------------
  204|     31|    return false;
  205|     31|  }
  206|     75|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 2, False: 73]
  ------------------
  207|      2|    return false;
  208|      2|  }
  209|     73|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 2, False: 71]
  ------------------
  210|      2|    return false;
  211|      2|  }
  212|     71|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 1, False: 70]
  ------------------
  213|      1|    return false;
  214|      1|  }
  215|       |
  216|     70|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 65, False: 5]
  ------------------
  217|     65|    return false;
  218|     65|  }
  219|       |
  220|      5|  numbers_decoder_.EndDecoding();
  221|      5|  remaining_bits_decoder_.EndDecoding();
  222|      5|  axis_decoder_.EndDecoding();
  223|      5|  half_decoder_.EndDecoding();
  224|       |
  225|      5|  return true;
  226|     70|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE14DecodeInternalINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbjRT_:
  253|     70|    uint32_t num_points, OutputIteratorT &oit) {
  254|     70|  typedef DecodingStatus Status;
  255|     70|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|     70|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|     70|  DecodingStatus init_status(num_points, 0, 0);
  258|     70|  std::stack<Status> status_stack;
  259|     70|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|  4.23M|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 4.23M, False: 5]
  ------------------
  263|  4.23M|    const DecodingStatus status = status_stack.top();
  264|  4.23M|    status_stack.pop();
  265|       |
  266|  4.23M|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|  4.23M|    const uint32_t last_axis = status.last_axis;
  268|  4.23M|    const uint32_t stack_pos = status.stack_pos;
  269|  4.23M|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|  4.23M|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|  4.23M|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 4.23M]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|  4.23M|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|  4.23M|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 0, False: 4.23M]
  ------------------
  278|      0|      return false;
  279|      0|    }
  280|       |
  281|  4.23M|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|  4.23M|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 2.11M, False: 2.12M]
  ------------------
  285|  17.8M|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 15.7M, False: 2.11M]
  ------------------
  286|  15.7M|        *oit = old_base;
  287|  15.7M|        ++oit;
  288|  15.7M|        ++num_decoded_points_;
  289|  15.7M|      }
  290|  2.11M|      continue;
  291|  2.11M|    }
  292|       |
  293|  2.12M|    DRACO_DCHECK_EQ(true, num_remaining_points != 0);
  294|       |
  295|       |    // Fast decoding of remaining bits if number of points is 1 or 2.
  296|  2.12M|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 1.17k, False: 2.12M]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|  1.17k|      axes_[0] = axis;
  300|  3.51k|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 2.34k, False: 1.17k]
  ------------------
  301|  2.34k|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|  2.34k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 287, False: 2.05k]
  |  |  ------------------
  ------------------
  302|  2.34k|      }
  303|  3.17k|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 2.02k, False: 1.15k]
  ------------------
  304|  8.04k|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 6.04k, False: 2.00k]
  ------------------
  305|  6.04k|          p_[axes_[j]] = 0;
  306|  6.04k|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|  6.04k|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 2.96k, False: 3.07k]
  ------------------
  308|  2.96k|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 19, False: 2.94k]
  ------------------
  309|  2.96k|                    num_remaining_bits, &p_[axes_[j]])) {
  310|     19|              return false;
  311|     19|            }
  312|  2.96k|          }
  313|  6.02k|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|  6.02k|        }
  315|  2.00k|        *oit = p_;
  316|  2.00k|        ++oit;
  317|  2.00k|        ++num_decoded_points_;
  318|  2.00k|      }
  319|  1.15k|      continue;
  320|  1.17k|    }
  321|       |
  322|  2.12M|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 2.12M]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|  2.12M|    const int num_remaining_bits = bit_length_ - level;
  327|  2.12M|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|  2.12M|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|  2.12M|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|  2.12M|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|  2.12M|    uint32_t number = 0;
  334|  2.12M|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|  2.12M|    uint32_t first_half = num_remaining_points / 2;
  337|  2.12M|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 46, False: 2.12M]
  ------------------
  338|       |      // Invalid |number|.
  339|     46|      return false;
  340|     46|    }
  341|  2.12M|    first_half -= number;
  342|  2.12M|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|  2.12M|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 996k, False: 1.12M]
  ------------------
  345|   996k|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 991k, False: 5.13k]
  ------------------
  346|   991k|        std::swap(first_half, second_half);
  347|   991k|      }
  348|   996k|    }
  349|       |
  350|  2.12M|    levels_stack_[stack_pos][axis] += 1;
  351|  2.12M|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|  2.12M|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 2.12M, False: 117]
  ------------------
  353|  2.12M|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|  2.12M|    }
  355|  2.12M|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 2.12M, False: 164]
  ------------------
  356|  2.12M|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|  2.12M|    }
  358|  2.12M|  }
  359|      5|  return true;
  360|     70|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi3EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_:
  178|    142|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|    142|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|    142|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi3EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_j:
  185|    142|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|    142|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 1, False: 141]
  ------------------
  187|      1|    return false;
  188|      1|  }
  189|    141|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 16, False: 125]
  ------------------
  190|     16|    return false;
  191|     16|  }
  192|    125|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 1, False: 124]
  ------------------
  193|      1|    return false;
  194|      1|  }
  195|    124|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 1, False: 123]
  ------------------
  196|      1|    return true;
  197|      1|  }
  198|    123|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 0, False: 123]
  ------------------
  199|      0|    return false;
  200|      0|  }
  201|    123|  num_decoded_points_ = 0;
  202|       |
  203|    123|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 32, False: 91]
  ------------------
  204|     32|    return false;
  205|     32|  }
  206|     91|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 3, False: 88]
  ------------------
  207|      3|    return false;
  208|      3|  }
  209|     88|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 3, False: 85]
  ------------------
  210|      3|    return false;
  211|      3|  }
  212|     85|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 2, False: 83]
  ------------------
  213|      2|    return false;
  214|      2|  }
  215|       |
  216|     83|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 78, False: 5]
  ------------------
  217|     78|    return false;
  218|     78|  }
  219|       |
  220|      5|  numbers_decoder_.EndDecoding();
  221|      5|  remaining_bits_decoder_.EndDecoding();
  222|      5|  axis_decoder_.EndDecoding();
  223|      5|  half_decoder_.EndDecoding();
  224|       |
  225|      5|  return true;
  226|     83|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi3EE14DecodeInternalINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbjRT_:
  253|     83|    uint32_t num_points, OutputIteratorT &oit) {
  254|     83|  typedef DecodingStatus Status;
  255|     83|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|     83|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|     83|  DecodingStatus init_status(num_points, 0, 0);
  258|     83|  std::stack<Status> status_stack;
  259|     83|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|  66.5k|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 66.5k, False: 5]
  ------------------
  263|  66.5k|    const DecodingStatus status = status_stack.top();
  264|  66.5k|    status_stack.pop();
  265|       |
  266|  66.5k|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|  66.5k|    const uint32_t last_axis = status.last_axis;
  268|  66.5k|    const uint32_t stack_pos = status.stack_pos;
  269|  66.5k|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|  66.5k|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|  66.5k|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 66.5k]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|  66.5k|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|  66.5k|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 0, False: 66.5k]
  ------------------
  278|      0|      return false;
  279|      0|    }
  280|       |
  281|  66.5k|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|  66.5k|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 30.1k, False: 36.3k]
  ------------------
  285|  18.0M|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 18.0M, False: 30.1k]
  ------------------
  286|  18.0M|        *oit = old_base;
  287|  18.0M|        ++oit;
  288|  18.0M|        ++num_decoded_points_;
  289|  18.0M|      }
  290|  30.1k|      continue;
  291|  30.1k|    }
  292|       |
  293|  36.3k|    DRACO_DCHECK_EQ(true, num_remaining_points != 0);
  294|       |
  295|       |    // Fast decoding of remaining bits if number of points is 1 or 2.
  296|  36.3k|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 2.34k, False: 34.0k]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|  2.34k|      axes_[0] = axis;
  300|  7.02k|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 4.68k, False: 2.34k]
  ------------------
  301|  4.68k|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|  4.68k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 708, False: 3.97k]
  |  |  ------------------
  ------------------
  302|  4.68k|      }
  303|  6.52k|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 4.19k, False: 2.32k]
  ------------------
  304|  16.7k|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 12.5k, False: 4.17k]
  ------------------
  305|  12.5k|          p_[axes_[j]] = 0;
  306|  12.5k|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|  12.5k|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 7.36k, False: 5.20k]
  ------------------
  308|  7.36k|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 17, False: 7.34k]
  ------------------
  309|  7.36k|                    num_remaining_bits, &p_[axes_[j]])) {
  310|     17|              return false;
  311|     17|            }
  312|  7.36k|          }
  313|  12.5k|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|  12.5k|        }
  315|  4.17k|        *oit = p_;
  316|  4.17k|        ++oit;
  317|  4.17k|        ++num_decoded_points_;
  318|  4.17k|      }
  319|  2.32k|      continue;
  320|  2.34k|    }
  321|       |
  322|  34.0k|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 34.0k]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|  34.0k|    const int num_remaining_bits = bit_length_ - level;
  327|  34.0k|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|  34.0k|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|  34.0k|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|  34.0k|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|  34.0k|    uint32_t number = 0;
  334|  34.0k|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|  34.0k|    uint32_t first_half = num_remaining_points / 2;
  337|  34.0k|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 61, False: 33.9k]
  ------------------
  338|       |      // Invalid |number|.
  339|     61|      return false;
  340|     61|    }
  341|  33.9k|    first_half -= number;
  342|  33.9k|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|  33.9k|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 20.9k, False: 13.0k]
  ------------------
  345|  20.9k|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 13.5k, False: 7.34k]
  ------------------
  346|  13.5k|        std::swap(first_half, second_half);
  347|  13.5k|      }
  348|  20.9k|    }
  349|       |
  350|  33.9k|    levels_stack_[stack_pos][axis] += 1;
  351|  33.9k|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|  33.9k|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 33.8k, False: 92]
  ------------------
  353|  33.8k|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|  33.8k|    }
  355|  33.9k|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 33.8k, False: 166]
  ------------------
  356|  33.8k|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|  33.8k|    }
  358|  33.9k|  }
  359|      5|  return true;
  360|     83|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_:
  178|     63|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|     63|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|     63|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_j:
  185|     63|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|     63|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 2, False: 61]
  ------------------
  187|      2|    return false;
  188|      2|  }
  189|     61|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 21, False: 40]
  ------------------
  190|     21|    return false;
  191|     21|  }
  192|     40|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 2, False: 38]
  ------------------
  193|      2|    return false;
  194|      2|  }
  195|     38|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 1, False: 37]
  ------------------
  196|      1|    return true;
  197|      1|  }
  198|     37|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 0, False: 37]
  ------------------
  199|      0|    return false;
  200|      0|  }
  201|     37|  num_decoded_points_ = 0;
  202|       |
  203|     37|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 37, False: 0]
  ------------------
  204|     37|    return false;
  205|     37|  }
  206|      0|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 0, False: 0]
  ------------------
  207|      0|    return false;
  208|      0|  }
  209|      0|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 0, False: 0]
  ------------------
  210|      0|    return false;
  211|      0|  }
  212|      0|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 0, False: 0]
  ------------------
  213|      0|    return false;
  214|      0|  }
  215|       |
  216|      0|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 0, False: 0]
  ------------------
  217|      0|    return false;
  218|      0|  }
  219|       |
  220|      0|  numbers_decoder_.EndDecoding();
  221|      0|  remaining_bits_decoder_.EndDecoding();
  222|      0|  axis_decoder_.EndDecoding();
  223|      0|  half_decoder_.EndDecoding();
  224|       |
  225|      0|  return true;
  226|      0|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi5EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_:
  178|     28|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|     28|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|     28|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi5EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_j:
  185|     28|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|     28|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 1, False: 27]
  ------------------
  187|      1|    return false;
  188|      1|  }
  189|     27|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 7, False: 20]
  ------------------
  190|      7|    return false;
  191|      7|  }
  192|     20|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 1, False: 19]
  ------------------
  193|      1|    return false;
  194|      1|  }
  195|     19|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 1, False: 18]
  ------------------
  196|      1|    return true;
  197|      1|  }
  198|     18|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 0, False: 18]
  ------------------
  199|      0|    return false;
  200|      0|  }
  201|     18|  num_decoded_points_ = 0;
  202|       |
  203|     18|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 18, False: 0]
  ------------------
  204|     18|    return false;
  205|     18|  }
  206|      0|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 0, False: 0]
  ------------------
  207|      0|    return false;
  208|      0|  }
  209|      0|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 0, False: 0]
  ------------------
  210|      0|    return false;
  211|      0|  }
  212|      0|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 0, False: 0]
  ------------------
  213|      0|    return false;
  214|      0|  }
  215|       |
  216|      0|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 0, False: 0]
  ------------------
  217|      0|    return false;
  218|      0|  }
  219|       |
  220|      0|  numbers_decoder_.EndDecoding();
  221|      0|  remaining_bits_decoder_.EndDecoding();
  222|      0|  axis_decoder_.EndDecoding();
  223|      0|  half_decoder_.EndDecoding();
  224|       |
  225|      0|  return true;
  226|      0|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi6EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_:
  178|     26|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|     26|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|     26|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi6EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_j:
  185|     26|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|     26|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 1, False: 25]
  ------------------
  187|      1|    return false;
  188|      1|  }
  189|     25|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 8, False: 17]
  ------------------
  190|      8|    return false;
  191|      8|  }
  192|     17|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 1, False: 16]
  ------------------
  193|      1|    return false;
  194|      1|  }
  195|     16|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 1, False: 15]
  ------------------
  196|      1|    return true;
  197|      1|  }
  198|     15|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 0, False: 15]
  ------------------
  199|      0|    return false;
  200|      0|  }
  201|     15|  num_decoded_points_ = 0;
  202|       |
  203|     15|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 15, False: 0]
  ------------------
  204|     15|    return false;
  205|     15|  }
  206|      0|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 0, False: 0]
  ------------------
  207|      0|    return false;
  208|      0|  }
  209|      0|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 0, False: 0]
  ------------------
  210|      0|    return false;
  211|      0|  }
  212|      0|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 0, False: 0]
  ------------------
  213|      0|    return false;
  214|      0|  }
  215|       |
  216|      0|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 0, False: 0]
  ------------------
  217|      0|    return false;
  218|      0|  }
  219|       |
  220|      0|  numbers_decoder_.EndDecoding();
  221|      0|  remaining_bits_decoder_.EndDecoding();
  222|      0|  axis_decoder_.EndDecoding();
  223|      0|  half_decoder_.EndDecoding();
  224|       |
  225|      0|  return true;
  226|      0|}

_ZN5draco22FloatPointsTreeDecoderC2Ev:
   65|    702|    : num_points_(0), compression_level_(0), num_points_from_header_(0) {
   66|    702|  qinfo_.quantization_bits = 0;
   67|    702|  qinfo_.range = 0;
   68|    702|}
_ZN5draco22FloatPointsTreeDecoder30DecodePointCloudKdTreeInternalEPNS_13DecoderBufferEPNSt3__16vectorINS_7VectorDIjLi3EEENS3_9allocatorIS6_EEEE:
   71|    650|    DecoderBuffer *buffer, std::vector<Point3ui> *qpoints) {
   72|    650|  if (!buffer->Decode(&qinfo_.quantization_bits)) {
  ------------------
  |  Branch (72:7): [True: 1, False: 649]
  ------------------
   73|      1|    return false;
   74|      1|  }
   75|    649|  if (qinfo_.quantization_bits > 31) {
  ------------------
  |  Branch (75:7): [True: 2, False: 647]
  ------------------
   76|      2|    return false;
   77|      2|  }
   78|    647|  if (!buffer->Decode(&qinfo_.range)) {
  ------------------
  |  Branch (78:7): [True: 1, False: 646]
  ------------------
   79|      1|    return false;
   80|      1|  }
   81|    646|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (81:7): [True: 1, False: 645]
  ------------------
   82|      1|    return false;
   83|      1|  }
   84|    645|  if (num_points_from_header_ > 0 && num_points_ != num_points_from_header_) {
  ------------------
  |  Branch (84:7): [True: 43, False: 602]
  |  Branch (84:38): [True: 28, False: 15]
  ------------------
   85|     28|    return false;
   86|     28|  }
   87|    617|  if (!buffer->Decode(&compression_level_)) {
  ------------------
  |  Branch (87:7): [True: 1, False: 616]
  ------------------
   88|      1|    return false;
   89|      1|  }
   90|       |
   91|       |  // Only allow compression level in [0..6].
   92|    616|  if (6 < compression_level_) {
  ------------------
  |  Branch (92:7): [True: 8, False: 608]
  ------------------
   93|      8|    DRACO_LOGE("FloatPointsTreeDecoder: compression level %i not supported.\n",
  ------------------
  |  |   31|      8|#define DRACO_LOGE printf
  ------------------
   94|      8|               compression_level_);
   95|      8|    return false;
   96|      8|  }
   97|       |
   98|    608|  std::back_insert_iterator<std::vector<Point3ui>> oit_qpoints =
   99|    608|      std::back_inserter(*qpoints);
  100|    608|  ConversionOutputIterator<std::back_insert_iterator<std::vector<Point3ui>>,
  101|    608|                           Converter>
  102|    608|      oit(oit_qpoints);
  103|    608|  if (num_points_ > 0) {
  ------------------
  |  Branch (103:7): [True: 605, False: 3]
  ------------------
  104|    605|    qpoints->reserve(num_points_);
  105|    605|    switch (compression_level_) {
  106|    130|      case 0: {
  ------------------
  |  Branch (106:7): [True: 130, False: 475]
  ------------------
  107|    130|        DynamicIntegerPointsKdTreeDecoder<0> qpoints_decoder(3);
  108|    130|        qpoints_decoder.DecodePoints(buffer, oit);
  109|    130|        break;
  110|      0|      }
  111|    103|      case 1: {
  ------------------
  |  Branch (111:7): [True: 103, False: 502]
  ------------------
  112|    103|        DynamicIntegerPointsKdTreeDecoder<1> qpoints_decoder(3);
  113|    103|        qpoints_decoder.DecodePoints(buffer, oit);
  114|    103|        break;
  115|      0|      }
  116|    113|      case 2: {
  ------------------
  |  Branch (116:7): [True: 113, False: 492]
  ------------------
  117|    113|        DynamicIntegerPointsKdTreeDecoder<2> qpoints_decoder(3);
  118|    113|        qpoints_decoder.DecodePoints(buffer, oit);
  119|    113|        break;
  120|      0|      }
  121|    142|      case 3: {
  ------------------
  |  Branch (121:7): [True: 142, False: 463]
  ------------------
  122|    142|        DynamicIntegerPointsKdTreeDecoder<3> qpoints_decoder(3);
  123|    142|        qpoints_decoder.DecodePoints(buffer, oit);
  124|    142|        break;
  125|      0|      }
  126|     63|      case 4: {
  ------------------
  |  Branch (126:7): [True: 63, False: 542]
  ------------------
  127|     63|        DynamicIntegerPointsKdTreeDecoder<4> qpoints_decoder(3);
  128|     63|        qpoints_decoder.DecodePoints(buffer, oit);
  129|     63|        break;
  130|      0|      }
  131|     28|      case 5: {
  ------------------
  |  Branch (131:7): [True: 28, False: 577]
  ------------------
  132|     28|        DynamicIntegerPointsKdTreeDecoder<5> qpoints_decoder(3);
  133|     28|        qpoints_decoder.DecodePoints(buffer, oit);
  134|     28|        break;
  135|      0|      }
  136|     26|      case 6: {
  ------------------
  |  Branch (136:7): [True: 26, False: 579]
  ------------------
  137|     26|        DynamicIntegerPointsKdTreeDecoder<6> qpoints_decoder(3);
  138|     26|        qpoints_decoder.DecodePoints(buffer, oit);
  139|     26|        break;
  140|      0|      }
  141|      0|      default:
  ------------------
  |  Branch (141:7): [True: 0, False: 605]
  ------------------
  142|      0|        return false;
  143|    605|    }
  144|    605|  }
  145|       |
  146|    608|  if (qpoints->size() != num_points_) {
  ------------------
  |  Branch (146:7): [True: 599, False: 9]
  ------------------
  147|    599|    return false;
  148|    599|  }
  149|      9|  return true;
  150|    608|}
_ZN5draco24ConversionOutputIteratorINSt3__120back_insert_iteratorINS1_6vectorINS_7VectorDIjLi3EEENS1_9allocatorIS5_EEEEEENS_9ConverterEEC2ES9_:
   43|    608|  explicit ConversionOutputIterator(OutputIterator oit) : oit_(oit) {}
_ZN5draco24ConversionOutputIteratorINSt3__120back_insert_iteratorINS1_6vectorINS_7VectorDIjLi3EEENS1_9allocatorIS5_EEEEEENS_9ConverterEEdeEv:
   54|   192M|  Self &operator*() { return *this; }
_ZN5draco24ConversionOutputIteratorINSt3__120back_insert_iteratorINS1_6vectorINS_7VectorDIjLi3EEENS1_9allocatorIS5_EEEEEENS_9ConverterEEaSERKNS3_IjNS6_IjEEEE:
   55|   192M|  const Self &operator=(const SourceType &source) {
   56|   192M|    *oit_ = Converter()(source);
   57|   192M|    return *this;
   58|   192M|  }
_ZN5draco9ConverterclERKNSt3__16vectorIjNS1_9allocatorIjEEEE:
   29|   192M|  Point3ui operator()(const std::vector<uint32_t> &v) {
   30|   192M|    return Point3ui(v[0], v[1], v[2]);
   31|   192M|  }
_ZN5draco24ConversionOutputIteratorINSt3__120back_insert_iteratorINS1_6vectorINS_7VectorDIjLi3EEENS1_9allocatorIS5_EEEEEENS_9ConverterEEppEv:
   45|   192M|  const Self &operator++() {
   46|   192M|    ++oit_;
   47|   192M|    return *this;
   48|   192M|  }

_ZN5draco22FloatPointsTreeDecoder26set_num_points_from_headerEj:
   69|    702|  void set_num_points_from_header(uint32_t num_points) {
   70|    702|    num_points_from_header_ = num_points;
   71|    702|  }
_ZN5draco22FloatPointsTreeDecoder16DecodePointCloudINS_34PointAttributeVectorOutputIteratorIfEEEEbPNS_13DecoderBufferERT_:
  102|    702|                                              OutputIteratorT &out) {
  103|    702|  std::vector<Point3ui> qpoints;
  104|       |
  105|    702|  uint32_t decoded_version;
  106|    702|  if (!buffer->Decode(&decoded_version)) {
  ------------------
  |  Branch (106:7): [True: 4, False: 698]
  ------------------
  107|      4|    return false;
  108|      4|  }
  109|       |
  110|    698|  if (decoded_version == 3) {
  ------------------
  |  Branch (110:7): [True: 5, False: 693]
  ------------------
  111|      5|    int8_t method_number;
  112|      5|    if (!buffer->Decode(&method_number)) {
  ------------------
  |  Branch (112:9): [True: 1, False: 4]
  ------------------
  113|      1|      return false;
  114|      1|    }
  115|       |
  116|      4|    method_ = method_number;
  117|       |
  118|      4|    if (method_ == KDTREE) {
  ------------------
  |  Branch (118:9): [True: 1, False: 3]
  ------------------
  119|      1|      if (!DecodePointCloudKdTreeInternal(buffer, &qpoints)) {
  ------------------
  |  Branch (119:11): [True: 1, False: 0]
  ------------------
  120|      1|        return false;
  121|      1|      }
  122|      3|    } else {  // Unsupported method.
  123|      3|      fprintf(stderr, "Method not supported. \n");
  124|      3|      return false;
  125|      3|    }
  126|    693|  } else if (decoded_version == 2) {  // Version 2 only uses KDTREE method.
  ------------------
  |  Branch (126:14): [True: 649, False: 44]
  ------------------
  127|    649|    if (!DecodePointCloudKdTreeInternal(buffer, &qpoints)) {
  ------------------
  |  Branch (127:9): [True: 640, False: 9]
  ------------------
  128|    640|      return false;
  129|    640|    }
  130|    649|  } else {  // Unsupported version.
  131|     44|    fprintf(stderr, "Version not supported. \n");
  132|     44|    return false;
  133|     44|  }
  134|       |
  135|      9|  DequantizePoints3(qpoints.begin(), qpoints.end(), qinfo_, out);
  136|      9|  return true;
  137|    698|}

_ZN5draco17DequantizePoints3INSt3__111__wrap_iterIPNS_7VectorDIjLi3EEEEENS_34PointAttributeVectorOutputIteratorIfEEEEvRKT_SB_RKNS_16QuantizationInfoERT0_:
   63|      9|                       const QuantizationInfo &info, OutputIterator &oit) {
   64|      9|  DRACO_DCHECK_GE(info.quantization_bits, 0);
   65|      9|  DRACO_DCHECK_GE(info.range, 0);
   66|       |
   67|      9|  const uint32_t quantization_bits = info.quantization_bits;
   68|      9|  const float range = info.range;
   69|      9|  const uint32_t max_quantized_value((1u << quantization_bits) - 1);
   70|      9|  Dequantizer dequantize;
   71|      9|  dequantize.Init(range, max_quantized_value);
   72|       |
   73|  8.97M|  for (auto it = begin; it != end; ++it) {
  ------------------
  |  Branch (73:25): [True: 8.97M, False: 9]
  ------------------
   74|  8.97M|    const float x = dequantize((*it)[0] - max_quantized_value);
   75|  8.97M|    const float y = dequantize((*it)[1] - max_quantized_value);
   76|  8.97M|    const float z = dequantize((*it)[2] - max_quantized_value);
   77|  8.97M|    *oit = Point3f(x, y, z);
   78|  8.97M|    ++oit;
   79|  8.97M|  }
   80|      9|}

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

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

_ZN5draco23PointCloudKdTreeDecoder18DecodeGeometryDataEv:
   21|  2.17k|bool PointCloudKdTreeDecoder::DecodeGeometryData() {
   22|  2.17k|  int32_t num_points;
   23|  2.17k|  if (!buffer()->Decode(&num_points)) {
  ------------------
  |  Branch (23:7): [True: 3, False: 2.16k]
  ------------------
   24|      3|    return false;
   25|      3|  }
   26|  2.16k|  if (num_points < 0) {
  ------------------
  |  Branch (26:7): [True: 30, False: 2.13k]
  ------------------
   27|     30|    return false;
   28|     30|  }
   29|  2.13k|  point_cloud()->set_num_points(num_points);
   30|  2.13k|  return true;
   31|  2.16k|}
_ZN5draco23PointCloudKdTreeDecoder23CreateAttributesDecoderEi:
   33|  14.4k|bool PointCloudKdTreeDecoder::CreateAttributesDecoder(int32_t att_decoder_id) {
   34|       |  // Always create the basic attribute decoder.
   35|  14.4k|  return SetAttributesDecoder(
   36|  14.4k|      att_decoder_id,
   37|  14.4k|      std::unique_ptr<AttributesDecoder>(new KdTreeAttributesDecoder()));
   38|  14.4k|}

_ZN5draco27PointCloudSequentialDecoder18DecodeGeometryDataEv:
   22|    213|bool PointCloudSequentialDecoder::DecodeGeometryData() {
   23|    213|  int32_t num_points;
   24|    213|  if (!buffer()->Decode(&num_points)) {
  ------------------
  |  Branch (24:7): [True: 2, False: 211]
  ------------------
   25|      2|    return false;
   26|      2|  }
   27|    211|  point_cloud()->set_num_points(num_points);
   28|    211|  return true;
   29|    213|}
_ZN5draco27PointCloudSequentialDecoder23CreateAttributesDecoderEi:
   32|  6.44k|    int32_t att_decoder_id) {
   33|       |  // Always create the basic attribute decoder.
   34|  6.44k|  return SetAttributesDecoder(
   35|  6.44k|      att_decoder_id,
   36|  6.44k|      std::unique_ptr<AttributesDecoder>(
   37|  6.44k|          new SequentialAttributeDecodersController(
   38|  6.44k|              std::unique_ptr<PointsSequencer>(
   39|  6.44k|                  new LinearSequencer(point_cloud()->num_points())))));
   40|  6.44k|}

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

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

_ZN5draco10DataBufferC2Ev:
   21|  21.1k|DataBuffer::DataBuffer() {}
_ZN5draco10DataBuffer6UpdateEPKvl:
   23|  20.5k|bool DataBuffer::Update(const void *data, int64_t size) {
   24|  20.5k|  const int64_t offset = 0;
   25|  20.5k|  return this->Update(data, size, offset);
   26|  20.5k|}
_ZN5draco10DataBuffer6UpdateEPKvll:
   28|  20.5k|bool DataBuffer::Update(const void *data, int64_t size, int64_t offset) {
   29|  20.5k|  if (data == nullptr) {
  ------------------
  |  Branch (29:7): [True: 20.5k, False: 0]
  ------------------
   30|  20.5k|    if (size + offset < 0) {
  ------------------
  |  Branch (30:9): [True: 0, False: 20.5k]
  ------------------
   31|      0|      return false;
   32|      0|    }
   33|       |    // If no data is provided, just resize the buffer.
   34|  20.5k|    data_.resize(size + offset);
   35|  20.5k|  } 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|  20.5k|  descriptor_.buffer_update_count++;
   46|  20.5k|  return true;
   47|  20.5k|}
_ZN5draco10DataBuffer6ResizeEl:
   49|  5.56k|void DataBuffer::Resize(int64_t size) {
   50|  5.56k|  data_.resize(size);
   51|  5.56k|  descriptor_.buffer_update_count++;
   52|  5.56k|}

_ZN5draco20DataBufferDescriptorC2Ev:
   28|  56.8k|  DataBufferDescriptor() : buffer_id(0), buffer_update_count(0) {}
_ZNK5draco10DataBuffer4ReadElPvm:
   47|     97|  void Read(int64_t byte_pos, void *out_data, size_t data_size) const {
   48|     97|    memcpy(out_data, data() + byte_pos, data_size);
   49|     97|  }
_ZN5draco10DataBuffer5WriteElPKvm:
   53|   680M|  void Write(int64_t byte_pos, const void *in_data, size_t data_size) {
   54|   680M|    memcpy(const_cast<uint8_t *>(data()) + byte_pos, in_data, data_size);
   55|   680M|  }
_ZNK5draco10DataBuffer12update_countEv:
   67|  20.5k|  int64_t update_count() const { return descriptor_.buffer_update_count; }
_ZNK5draco10DataBuffer9data_sizeEv:
   68|  35.3M|  size_t data_size() const { return data_.size(); }
_ZNK5draco10DataBuffer4dataEv:
   69|     97|  const uint8_t *data() const { return data_.data(); }
_ZN5draco10DataBuffer4dataEv:
   70|   727M|  uint8_t *data() { return data_.data(); }
_ZNK5draco10DataBuffer9buffer_idEv:
   71|  20.5k|  int64_t buffer_id() const { return descriptor_.buffer_id; }

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

_ZN5draco13DecoderBuffer28DecodeLeastSignificantBits32EjPj:
   57|  13.2M|  bool DecodeLeastSignificantBits32(uint32_t nbits, uint32_t *out_value) {
   58|  13.2M|    if (!bit_decoder_active()) {
  ------------------
  |  Branch (58:9): [True: 0, False: 13.2M]
  ------------------
   59|      0|      return false;
   60|      0|    }
   61|  13.2M|    return bit_decoder_.GetBits(nbits, out_value);
   62|  13.2M|  }
_ZN5draco13DecoderBuffer6DecodeEPvm:
   76|  2.34G|  bool Decode(void *out_data, size_t size_to_decode) {
   77|  2.34G|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (77:9): [True: 509, False: 2.34G]
  ------------------
   78|    509|      return false;  // Buffer overflow.
   79|    509|    }
   80|  2.34G|    memcpy(out_data, (data_ + pos_), size_to_decode);
   81|  2.34G|    pos_ += size_to_decode;
   82|  2.34G|    return true;
   83|  2.34G|  }
_ZN5draco13DecoderBuffer7AdvanceEl:
  105|  37.9k|  void Advance(int64_t bytes) { pos_ += bytes; }
_ZN5draco13DecoderBuffer21set_bitstream_versionEt:
  111|  16.3k|  void set_bitstream_version(uint16_t version) { bitstream_version_ = version; }
_ZNK5draco13DecoderBuffer9data_headEv:
  114|  52.6k|  const char *data_head() const { return data_ + pos_; }
_ZNK5draco13DecoderBuffer14remaining_sizeEv:
  115|   248k|  int64_t remaining_size() const { return data_size_ - pos_; }
_ZNK5draco13DecoderBuffer12decoded_sizeEv:
  116|  7.11k|  int64_t decoded_size() const { return pos_; }
_ZNK5draco13DecoderBuffer18bit_decoder_activeEv:
  117|  13.2M|  bool bit_decoder_active() const { return bit_mode_; }
_ZNK5draco13DecoderBuffer17bitstream_versionEv:
  120|  2.65M|  uint16_t bitstream_version() const { return bitstream_version_; }
_ZN5draco13DecoderBuffer10BitDecoder5resetEPKvm:
  130|  7.75k|    inline void reset(const void *b, size_t s) {
  131|  7.75k|      bit_offset_ = 0;
  132|  7.75k|      bit_buffer_ = static_cast<const uint8_t *>(b);
  133|  7.75k|      bit_buffer_end_ = bit_buffer_ + s;
  134|  7.75k|    }
_ZNK5draco13DecoderBuffer10BitDecoder11BitsDecodedEv:
  137|  6.34k|    inline uint64_t BitsDecoded() const {
  138|  6.34k|      return static_cast<uint64_t>(bit_offset_);
  139|  6.34k|    }
_ZN5draco13DecoderBuffer10BitDecoder7GetBitsEjPj:
  160|  13.2M|    inline bool GetBits(uint32_t nbits, uint32_t *x) {
  161|  13.2M|      if (nbits > 32) {
  ------------------
  |  Branch (161:11): [True: 1, False: 13.2M]
  ------------------
  162|      1|        return false;
  163|      1|      }
  164|  13.2M|      uint32_t value = 0;
  165|  31.5M|      for (uint32_t bit = 0; bit < nbits; ++bit) {
  ------------------
  |  Branch (165:30): [True: 18.2M, False: 13.2M]
  ------------------
  166|  18.2M|        value |= GetBit() << bit;
  167|  18.2M|      }
  168|  13.2M|      *x = value;
  169|  13.2M|      return true;
  170|  13.2M|    }
_ZN5draco13DecoderBuffer10BitDecoder6GetBitEv:
  175|  18.2M|    inline int GetBit() {
  176|  18.2M|      const size_t off = bit_offset_;
  177|  18.2M|      const size_t byte_offset = off >> 3;
  178|  18.2M|      const int bit_shift = static_cast<int>(off & 0x7);
  179|  18.2M|      if (bit_buffer_ + byte_offset < bit_buffer_end_) {
  ------------------
  |  Branch (179:11): [True: 16.8M, False: 1.40M]
  ------------------
  180|  16.8M|        const int bit = (bit_buffer_[byte_offset] >> bit_shift) & 1;
  181|  16.8M|        bit_offset_ = off + 1;
  182|  16.8M|        return bit;
  183|  16.8M|      }
  184|  1.40M|      return 0;
  185|  18.2M|    }
_ZN5draco13DecoderBuffer6DecodeIhEEbPT_:
   68|  7.50M|  bool Decode(T *out_val) {
   69|  7.50M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 4.86k, False: 7.50M]
  ------------------
   70|  4.86k|      return false;
   71|  4.86k|    }
   72|  7.50M|    pos_ += sizeof(T);
   73|  7.50M|    return true;
   74|  7.50M|  }
_ZN5draco13DecoderBuffer4PeekIhEEbPT_:
   87|  7.50M|  bool Peek(T *out_val) {
   88|  7.50M|    const size_t size_to_decode = sizeof(T);
   89|  7.50M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 4.86k, False: 7.50M]
  ------------------
   90|  4.86k|      return false;  // Buffer overflow.
   91|  4.86k|    }
   92|  7.50M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  7.50M|    return true;
   94|  7.50M|  }
_ZN5draco13DecoderBuffer6DecodeIiEEbPT_:
   68|  13.5k|  bool Decode(T *out_val) {
   69|  13.5k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 146, False: 13.4k]
  ------------------
   70|    146|      return false;
   71|    146|    }
   72|  13.4k|    pos_ += sizeof(T);
   73|  13.4k|    return true;
   74|  13.5k|  }
_ZN5draco13DecoderBuffer4PeekIiEEbPT_:
   87|  13.5k|  bool Peek(T *out_val) {
   88|  13.5k|    const size_t size_to_decode = sizeof(T);
   89|  13.5k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 146, False: 13.4k]
  ------------------
   90|    146|      return false;  // Buffer overflow.
   91|    146|    }
   92|  13.4k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  13.4k|    return true;
   94|  13.5k|  }
_ZN5draco13DecoderBuffer6DecodeIjEEbPT_:
   68|   175k|  bool Decode(T *out_val) {
   69|   175k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 468, False: 175k]
  ------------------
   70|    468|      return false;
   71|    468|    }
   72|   175k|    pos_ += sizeof(T);
   73|   175k|    return true;
   74|   175k|  }
_ZN5draco13DecoderBuffer4PeekIjEEbPT_:
   87|   175k|  bool Peek(T *out_val) {
   88|   175k|    const size_t size_to_decode = sizeof(T);
   89|   175k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 468, False: 175k]
  ------------------
   90|    468|      return false;  // Buffer overflow.
   91|    468|    }
   92|   175k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|   175k|    return true;
   94|   175k|  }
_ZN5draco13DecoderBuffer6DecodeIaEEbPT_:
   68|  20.6k|  bool Decode(T *out_val) {
   69|  20.6k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 272, False: 20.4k]
  ------------------
   70|    272|      return false;
   71|    272|    }
   72|  20.4k|    pos_ += sizeof(T);
   73|  20.4k|    return true;
   74|  20.6k|  }
_ZN5draco13DecoderBuffer4PeekIaEEbPT_:
   87|  20.6k|  bool Peek(T *out_val) {
   88|  20.6k|    const size_t size_to_decode = sizeof(T);
   89|  20.6k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 272, False: 20.4k]
  ------------------
   90|    272|      return false;  // Buffer overflow.
   91|    272|    }
   92|  20.4k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  20.4k|    return true;
   94|  20.6k|  }
_ZN5draco13DecoderBuffer6DecodeINS_13HoleEventDataEEEbPT_:
   68|   427k|  bool Decode(T *out_val) {
   69|   427k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 99, False: 427k]
  ------------------
   70|     99|      return false;
   71|     99|    }
   72|   427k|    pos_ += sizeof(T);
   73|   427k|    return true;
   74|   427k|  }
_ZN5draco13DecoderBuffer4PeekINS_13HoleEventDataEEEbPT_:
   87|   427k|  bool Peek(T *out_val) {
   88|   427k|    const size_t size_to_decode = sizeof(T);
   89|   427k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 99, False: 427k]
  ------------------
   90|     99|      return false;  // Buffer overflow.
   91|     99|    }
   92|   427k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|   427k|    return true;
   94|   427k|  }
_ZN5draco13DecoderBuffer6DecodeItEEbPT_:
   68|  52.4k|  bool Decode(T *out_val) {
   69|  52.4k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 36, False: 52.4k]
  ------------------
   70|     36|      return false;
   71|     36|    }
   72|  52.4k|    pos_ += sizeof(T);
   73|  52.4k|    return true;
   74|  52.4k|  }
_ZN5draco13DecoderBuffer4PeekItEEbPT_:
   87|  52.4k|  bool Peek(T *out_val) {
   88|  52.4k|    const size_t size_to_decode = sizeof(T);
   89|  52.4k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 36, False: 52.4k]
  ------------------
   90|     36|      return false;  // Buffer overflow.
   91|     36|    }
   92|  52.4k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  52.4k|    return true;
   94|  52.4k|  }
_ZN5draco13DecoderBuffer6DecodeImEEbPT_:
   68|  1.93k|  bool Decode(T *out_val) {
   69|  1.93k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 48, False: 1.88k]
  ------------------
   70|     48|      return false;
   71|     48|    }
   72|  1.88k|    pos_ += sizeof(T);
   73|  1.88k|    return true;
   74|  1.93k|  }
_ZN5draco13DecoderBuffer4PeekImEEbPT_:
   87|  1.93k|  bool Peek(T *out_val) {
   88|  1.93k|    const size_t size_to_decode = sizeof(T);
   89|  1.93k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 48, False: 1.88k]
  ------------------
   90|     48|      return false;  // Buffer overflow.
   91|     48|    }
   92|  1.88k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.88k|    return true;
   94|  1.93k|  }
_ZN5draco13DecoderBuffer6DecodeIfEEbPT_:
   68|    856|  bool Decode(T *out_val) {
   69|    856|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 11, False: 845]
  ------------------
   70|     11|      return false;
   71|     11|    }
   72|    845|    pos_ += sizeof(T);
   73|    845|    return true;
   74|    856|  }
_ZN5draco13DecoderBuffer4PeekIfEEbPT_:
   87|    856|  bool Peek(T *out_val) {
   88|    856|    const size_t size_to_decode = sizeof(T);
   89|    856|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 11, False: 845]
  ------------------
   90|     11|      return false;  // Buffer overflow.
   91|     11|    }
   92|    845|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|    845|    return true;
   94|    856|  }

_ZNK5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EE5valueEv:
   73|   375M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EE5valueEv:
   73|   758M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEgeERKj:
   98|  9.60M|  constexpr bool operator>=(const ValueTypeT &val) const {
   99|  9.60M|    return value_ >= val;
  100|  9.60M|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EE5valueEv:
   73|   245M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EE5valueEv:
   73|  3.10G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKj:
   90|  22.4M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEaSERKS2_:
  151|  79.9M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  79.9M|    value_ = i.value_;
  153|  79.9M|    return *this;
  154|  79.9M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKS2_:
  151|  2.52G|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  2.52G|    value_ = i.value_;
  153|  2.52G|    return *this;
  154|  2.52G|  }
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEppEv:
  102|  22.4M|  inline ThisIndexType &operator++() {
  103|  22.4M|    ++value_;
  104|  22.4M|    return *this;
  105|  22.4M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEeqERKS2_:
   75|  2.28G|  constexpr bool operator==(const IndexType &i) const {
   76|  2.28G|    return value_ == i.value_;
   77|  2.28G|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EE5valueEv:
   73|   950M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKS2_:
   87|  7.71k|  constexpr bool operator<(const IndexType &i) const {
   88|  7.71k|    return value_ < i.value_;
   89|  7.71k|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEeqERKS2_:
   75|   114M|  constexpr bool operator==(const IndexType &i) const {
   76|   114M|    return value_ == i.value_;
   77|   114M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEmiERKj:
  131|   160M|  constexpr ThisIndexType operator-(const ValueTypeT &val) const {
  132|   160M|    return ThisIndexType(value_ - val);
  133|   160M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEplERKj:
  125|   714M|  constexpr ThisIndexType operator+(const ValueTypeT &val) const {
  126|   714M|    return ThisIndexType(value_ + val);
  127|   714M|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEeqERKS2_:
   75|  18.4M|  constexpr bool operator==(const IndexType &i) const {
   76|  18.4M|    return value_ == i.value_;
   77|  18.4M|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEneERKS2_:
   81|   254M|  constexpr bool operator!=(const IndexType &i) const {
   82|   254M|    return value_ != i.value_;
   83|   254M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEneERKS2_:
   81|   321M|  constexpr bool operator!=(const IndexType &i) const {
   82|   321M|    return value_ != i.value_;
   83|   321M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEppEv:
  102|   489M|  inline ThisIndexType &operator++() {
  103|   489M|    ++value_;
  104|   489M|    return *this;
  105|   489M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEaSERKS2_:
  151|   425M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|   425M|    value_ = i.value_;
  153|   425M|    return *this;
  154|   425M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEaSERKS2_:
  151|  1.04G|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  1.04G|    value_ = i.value_;
  153|  1.04G|    return *this;
  154|  1.04G|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEgeERKj:
   98|  38.4M|  constexpr bool operator>=(const ValueTypeT &val) const {
   99|  38.4M|    return value_ >= val;
  100|  38.4M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEltERKj:
   90|  8.39M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ej:
   71|  1.06G|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2ERKS2_:
   70|  21.5G|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2Ej:
   71|   186M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2ERKS2_:
   70|  16.7G|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ev:
   69|   252M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEplERKj:
  125|  20.2M|  constexpr ThisIndexType operator+(const ValueTypeT &val) const {
  126|  20.2M|    return ThisIndexType(value_ + val);
  127|  20.2M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2Ej:
   71|   170M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKS2_:
   87|  23.0M|  constexpr bool operator<(const IndexType &i) const {
   88|  23.0M|    return value_ < i.value_;
   89|  23.0M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2ERKS2_:
   70|   863M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ev:
   69|  2.52G|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2ERKS2_:
   70|  59.4M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2Ej:
   71|   734M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2ERKS2_:
   70|   532M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEaSERKS2_:
  151|  5.37M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  5.37M|    value_ = i.value_;
  153|  5.37M|    return *this;
  154|  5.37M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEpLERKj:
  139|  8.38M|  inline ThisIndexType operator+=(const ValueTypeT &val) {
  140|  8.38M|    value_ += val;
  141|  8.38M|    return *this;
  142|  8.38M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKj:
  155|  28.8M|  inline ThisIndexType &operator=(const ValueTypeT &val) {
  156|  28.8M|    value_ = val;
  157|  28.8M|    return *this;
  158|  28.8M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ej:
   71|  2.49G|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKj:
   90|  6.21M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEppEv:
  102|  6.20M|  inline ThisIndexType &operator++() {
  103|  6.20M|    ++value_;
  104|  6.20M|    return *this;
  105|  6.20M|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEltERKj:
   90|  19.9M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZNK5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEltERKj:
   90|    232|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEppEv:
  102|   639M|  inline ThisIndexType &operator++() {
  103|   639M|    ++value_;
  104|   639M|    return *this;
  105|   639M|  }
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEppEv:
  102|     97|  inline ThisIndexType &operator++() {
  103|     97|    ++value_;
  104|     97|    return *this;
  105|     97|  }
_ZNK5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEgeERKj:
   98|   668M|  constexpr bool operator>=(const ValueTypeT &val) const {
   99|   668M|    return value_ >= val;
  100|   668M|  }

_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   73|  31.7M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  31.7M|    return vector_[index.value()];
   75|  31.7M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE4sizeEv:
   59|  19.9M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE5clearEv:
   48|  12.9k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE6resizeEmRKS5_:
   51|  14.9k|  void resize(size_t size, const ValueTypeT &val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   70|  58.3M|  inline reference operator[](const IndexTypeT &index) {
   71|  58.3M|    return vector_[index.value()];
   72|  58.3M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE9push_backERKS8_:
   62|  5.50k|  void push_back(const ValueTypeT &val) { vector_.push_back(val); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE4sizeEv:
   59|  19.2M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE6resizeEmRKS8_:
   51|  3.97k|  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|  9.60M|  inline reference operator[](const IndexTypeT &index) {
   71|  9.60M|    return vector_[index.value()];
   72|  9.60M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEixERKS3_:
   73|  21.1M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  21.1M|    return vector_[index.value()];
   75|  21.1M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE4sizeEv:
   59|   213M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE4sizeEv:
   59|  10.6M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   73|   293M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|   293M|    return vector_[index.value()];
   75|   293M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   73|   853M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|   853M|    return vector_[index.value()];
   75|   853M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   70|   391M|  inline reference operator[](const IndexTypeT &index) {
   71|   391M|    return vector_[index.value()];
   72|   391M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   73|  51.1M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  51.1M|    return vector_[index.value()];
   75|  51.1M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   70|   315M|  inline reference operator[](const IndexTypeT &index) {
   71|   315M|    return vector_[index.value()];
   72|   315M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE9push_backERKS5_:
   62|   111M|  void push_back(const ValueTypeT &val) { vector_.push_back(val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   70|   230M|  inline reference operator[](const IndexTypeT &index) {
   71|   230M|    return vector_[index.value()];
   72|   230M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE6resizeEmRKi:
   51|  2.78k|  void resize(size_t size, const ValueTypeT &val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEixERKS3_:
   70|   259M|  inline reference operator[](const IndexTypeT &index) {
   71|   259M|    return vector_[index.value()];
   72|   259M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEC2Ev:
   39|  63.6k|  IndexTypeVector() {}
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4sizeEv:
   59|  2.46M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaEC2Ev:
   39|  59.5k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEC2Ev:
   39|  7.85k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EC2Ev:
   39|  7.85k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEC2Ev:
   39|  7.85k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_EC2Ev:
   39|  7.85k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE5clearEv:
   48|  15.4k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4swapERS4_:
   55|  15.4k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT> &arg) {
   56|  15.4k|    vector_.swap(arg.vector_);
   57|  15.4k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE5clearEv:
   48|  15.4k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE4swapERS4_:
   55|  15.4k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT> &arg) {
   56|  15.4k|    vector_.swap(arg.vector_);
   57|  15.4k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE6assignEmRKS5_:
   52|  7.85k|  void assign(size_t size, const ValueTypeT &val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_E6assignEmRKS3_:
   52|  7.85k|  void assign(size_t size, const ValueTypeT &val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE7reserveEm:
   49|  7.85k|  void reserve(size_t size) { vector_.reserve(size); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEC2Ev:
   39|  13.7k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEC2Ev:
   39|  35.7k|  IndexTypeVector() {}

_ZN5draco14DataTypeLengthENS_8DataTypeE:
   19|  66.7k|int32_t DataTypeLength(DataType dt) {
   20|  66.7k|  switch (dt) {
   21|  17.1k|    case DT_INT8:
  ------------------
  |  Branch (21:5): [True: 17.1k, False: 49.5k]
  ------------------
   22|  21.5k|    case DT_UINT8:
  ------------------
  |  Branch (22:5): [True: 4.41k, False: 62.2k]
  ------------------
   23|  21.5k|      return 1;
   24|  3.85k|    case DT_INT16:
  ------------------
  |  Branch (24:5): [True: 3.85k, False: 62.8k]
  ------------------
   25|  10.8k|    case DT_UINT16:
  ------------------
  |  Branch (25:5): [True: 7.03k, False: 59.6k]
  ------------------
   26|  10.8k|      return 2;
   27|  25.5k|    case DT_INT32:
  ------------------
  |  Branch (27:5): [True: 25.5k, False: 41.2k]
  ------------------
   28|  27.4k|    case DT_UINT32:
  ------------------
  |  Branch (28:5): [True: 1.92k, False: 64.7k]
  ------------------
   29|  27.4k|      return 4;
   30|    719|    case DT_INT64:
  ------------------
  |  Branch (30:5): [True: 719, False: 65.9k]
  ------------------
   31|  1.16k|    case DT_UINT64:
  ------------------
  |  Branch (31:5): [True: 445, False: 66.2k]
  ------------------
   32|  1.16k|      return 8;
   33|  5.09k|    case DT_FLOAT32:
  ------------------
  |  Branch (33:5): [True: 5.09k, False: 61.6k]
  ------------------
   34|  5.09k|      return 4;
   35|     96|    case DT_FLOAT64:
  ------------------
  |  Branch (35:5): [True: 96, False: 66.6k]
  ------------------
   36|     96|      return 8;
   37|    453|    case DT_BOOL:
  ------------------
  |  Branch (37:5): [True: 453, False: 66.2k]
  ------------------
   38|    453|      return 1;
   39|      0|    default:
  ------------------
  |  Branch (39:5): [True: 0, False: 66.7k]
  ------------------
   40|      0|      return -1;
   41|  66.7k|  }
   42|  66.7k|}

_ZN5draco7IntSqrtEm:
   31|  2.84k|inline uint64_t IntSqrt(uint64_t number) {
   32|  2.84k|  if (number == 0) {
  ------------------
  |  Branch (32:7): [True: 361, False: 2.48k]
  ------------------
   33|    361|    return 0;
   34|    361|  }
   35|       |  // First estimate good initial value of the square root as log2(number).
   36|  2.48k|  uint64_t act_number = number;
   37|  2.48k|  uint64_t square_root = 1;
   38|  44.0k|  while (act_number >= 2) {
  ------------------
  |  Branch (38:10): [True: 41.5k, False: 2.48k]
  ------------------
   39|       |    // Double the square root until |square_root * square_root > number|.
   40|  41.5k|    square_root *= 2;
   41|  41.5k|    act_number /= 4;
   42|  41.5k|  }
   43|       |  // Perform Newton's (or Babylonian) method to find the true floor(sqrt()).
   44|  6.67k|  do {
   45|       |    // New |square_root| estimate is computed as the average between
   46|       |    // |square_root| and |number / square_root|.
   47|  6.67k|    square_root = (square_root + number / square_root) / 2;
   48|       |
   49|       |    // Note that after the first iteration, the estimate is always going to be
   50|       |    // larger or equal to the true square root value. Therefore to check
   51|       |    // convergence, we can simply detect condition when the square of the
   52|       |    // estimated square root is larger than the input.
   53|  6.67k|  } while (square_root * square_root > number);
  ------------------
  |  Branch (53:12): [True: 4.19k, False: 2.48k]
  ------------------
   54|  2.48k|  return square_root;
   55|  2.84k|}
_ZN5draco13AddAsUnsignedIiTnPNSt3__19enable_ifIXaasr3std11is_integralIT_EE5valuesr3std9is_signedIS3_EE5valueEvE4typeELPv0EEES3_S3_S3_:
   63|  70.0M|inline DataTypeT AddAsUnsigned(DataTypeT a, DataTypeT b) {
   64|  70.0M|  typedef typename std::make_unsigned<DataTypeT>::type DataTypeUT;
   65|  70.0M|  return static_cast<DataTypeT>(static_cast<DataTypeUT>(a) +
   66|  70.0M|                                static_cast<DataTypeUT>(b));
   67|  70.0M|}

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

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

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

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

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

_ZN5draco8StatusOrINSt3__110unique_ptrINS_17PointCloudDecoderENS1_14default_deleteIS3_EEEEEC2EOS6_:
   39|  2.64k|  StatusOr(T &&value) : status_(OkStatus()), value_(std::move(value)) {}
_ZN5draco8StatusOrINSt3__110unique_ptrINS_17PointCloudDecoderENS1_14default_deleteIS3_EEEEEC2ERKNS_6StatusE:
   37|     11|  StatusOr(const Status &status) : status_(status) {}
_ZN5draco8StatusOrINSt3__110unique_ptrINS_11MeshDecoderENS1_14default_deleteIS3_EEEEEC2EOS6_:
   39|  13.6k|  StatusOr(T &&value) : status_(OkStatus()), value_(std::move(value)) {}
_ZN5draco8StatusOrINSt3__110unique_ptrINS_11MeshDecoderENS1_14default_deleteIS3_EEEEEC2ERKNS_6StatusE:
   37|      9|  StatusOr(const Status &status) : status_(status) {}
_ZN5draco8StatusOrINS_19EncodedGeometryTypeEEC2ERKNS_6StatusE:
   37|     56|  StatusOr(const Status &status) : status_(status) {}
_ZN5draco8StatusOrINS_19EncodedGeometryTypeEEC2EOS1_:
   39|  16.3k|  StatusOr(T &&value) : status_(OkStatus()), value_(std::move(value)) {}
_ZNK5draco8StatusOrINS_19EncodedGeometryTypeEE2okEv:
   53|  16.4k|  bool ok() const { return status_.ok(); }
_ZNK5draco8StatusOrINS_19EncodedGeometryTypeEE6statusEv:
   43|     56|  const Status &status() const { return status_; }
_ZN5draco8StatusOrINSt3__110unique_ptrINS_10PointCloudENS1_14default_deleteIS3_EEEEEC2ERKNS_6StatusE:
   37|  15.2k|  StatusOr(const Status &status) : status_(status) {}
_ZNO5draco8StatusOrINS_19EncodedGeometryTypeEE5valueEv:
   46|  16.3k|  T &&value() && { return std::move(value_); }
_ZN5draco8StatusOrINSt3__110unique_ptrINS_10PointCloudENS1_14default_deleteIS3_EEEEEC2EOS6_:
   39|  1.12k|  StatusOr(T &&value) : status_(OkStatus()), value_(std::move(value)) {}
_ZNK5draco8StatusOrINSt3__110unique_ptrINS_17PointCloudDecoderENS1_14default_deleteIS3_EEEEE2okEv:
   53|  2.65k|  bool ok() const { return status_.ok(); }
_ZNK5draco8StatusOrINSt3__110unique_ptrINS_17PointCloudDecoderENS1_14default_deleteIS3_EEEEE6statusEv:
   43|     11|  const Status &status() const { return status_; }
_ZNO5draco8StatusOrINSt3__110unique_ptrINS_17PointCloudDecoderENS1_14default_deleteIS3_EEEEE5valueEv:
   46|  2.64k|  T &&value() && { return std::move(value_); }
_ZNK5draco8StatusOrINSt3__110unique_ptrINS_11MeshDecoderENS1_14default_deleteIS3_EEEEE2okEv:
   53|  13.7k|  bool ok() const { return status_.ok(); }
_ZNK5draco8StatusOrINSt3__110unique_ptrINS_11MeshDecoderENS1_14default_deleteIS3_EEEEE6statusEv:
   43|      9|  const Status &status() const { return status_; }
_ZNO5draco8StatusOrINSt3__110unique_ptrINS_11MeshDecoderENS1_14default_deleteIS3_EEEEE5valueEv:
   46|  13.6k|  T &&value() && { return std::move(value_); }

_ZN5draco12DecodeVarintIjEEbPT_PNS_13DecoderBufferE:
   63|   446k|bool DecodeVarint(IntTypeT *out_val, DecoderBuffer *buffer) {
   64|   446k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 446k, Folded]
  ------------------
   65|   446k|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 1.93k, False: 444k]
  ------------------
   66|  1.93k|      return false;
   67|  1.93k|    }
   68|   446k|  } 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|   444k|  return true;
   77|   446k|}
mesh_edgebreaker_decoder_impl.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   143k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|   143k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   143k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 138, False: 143k]
  ------------------
   33|    138|    return false;
   34|    138|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   143k|  uint8_t in;
   39|   143k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 1.15k, False: 142k]
  ------------------
   40|  1.15k|    return false;
   41|  1.15k|  }
   42|   142k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 23.3k, False: 119k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  23.3k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 873, False: 22.4k]
  ------------------
   45|    873|      return false;
   46|    873|    }
   47|       |    // Append decoded info from this byte.
   48|  22.4k|    *out_val <<= 7;
   49|  22.4k|    *out_val |= in & ((1 << 7) - 1);
   50|   119k|  } else {
   51|       |    // Last byte reached
   52|   119k|    *out_val = in;
   53|   119k|  }
   54|   141k|  return true;
   55|   142k|}
mesh_sequential_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  10.2k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  10.2k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  10.2k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 2, False: 10.2k]
  ------------------
   33|      2|    return false;
   34|      2|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  10.2k|  uint8_t in;
   39|  10.2k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 34, False: 10.2k]
  ------------------
   40|     34|    return false;
   41|     34|  }
   42|  10.2k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.07k, False: 9.14k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.07k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 40, False: 1.03k]
  ------------------
   45|     40|      return false;
   46|     40|    }
   47|       |    // Append decoded info from this byte.
   48|  1.03k|    *out_val <<= 7;
   49|  1.03k|    *out_val |= in & ((1 << 7) - 1);
   50|  9.14k|  } else {
   51|       |    // Last byte reached
   52|  9.14k|    *out_val = in;
   53|  9.14k|  }
   54|  10.1k|  return true;
   55|  10.2k|}
_ZN5draco12DecodeVarintImEEbPT_PNS_13DecoderBufferE:
   63|  7.89k|bool DecodeVarint(IntTypeT *out_val, DecoderBuffer *buffer) {
   64|  7.89k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 7.89k, Folded]
  ------------------
   65|  7.89k|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 179, False: 7.71k]
  ------------------
   66|    179|      return false;
   67|    179|    }
   68|  7.89k|  } 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|  7.71k|  return true;
   77|  7.89k|}
decoder_buffer.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  4.35k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  4.35k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  4.35k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 1, False: 4.35k]
  ------------------
   33|      1|    return false;
   34|      1|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  4.35k|  uint8_t in;
   39|  4.35k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 42, False: 4.31k]
  ------------------
   40|     42|    return false;
   41|     42|  }
   42|  4.31k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 321, False: 3.99k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    321|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 28, False: 293]
  ------------------
   45|     28|      return false;
   46|     28|    }
   47|       |    // Append decoded info from this byte.
   48|    293|    *out_val <<= 7;
   49|    293|    *out_val |= in & ((1 << 7) - 1);
   50|  3.99k|  } else {
   51|       |    // Last byte reached
   52|  3.99k|    *out_val = in;
   53|  3.99k|  }
   54|  4.28k|  return true;
   55|  4.31k|}
metadata_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   240k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|   240k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   240k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 14, False: 240k]
  ------------------
   33|     14|    return false;
   34|     14|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   240k|  uint8_t in;
   39|   240k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 186, False: 240k]
  ------------------
   40|    186|    return false;
   41|    186|  }
   42|   240k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.74k, False: 238k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.74k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 105, False: 1.64k]
  ------------------
   45|    105|      return false;
   46|    105|    }
   47|       |    // Append decoded info from this byte.
   48|  1.64k|    *out_val <<= 7;
   49|  1.64k|    *out_val |= in & ((1 << 7) - 1);
   50|   238k|  } else {
   51|       |    // Last byte reached
   52|   238k|    *out_val = in;
   53|   238k|  }
   54|   240k|  return true;
   55|   240k|}
_ZN5draco12DecodeVarintIiEEbPT_PNS_13DecoderBufferE:
   63|  3.50k|bool DecodeVarint(IntTypeT *out_val, DecoderBuffer *buffer) {
   64|  3.50k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [Folded, False: 3.50k]
  ------------------
   65|      0|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 0, False: 0]
  ------------------
   66|      0|      return false;
   67|      0|    }
   68|  3.50k|  } else {
   69|       |    // IntTypeT is a signed value. Decode the symbol and convert to signed.
   70|  3.50k|    typename std::make_unsigned<IntTypeT>::type symbol;
   71|  3.50k|    if (!DecodeVarintUnsigned(1, &symbol, buffer)) {
  ------------------
  |  Branch (71:9): [True: 37, False: 3.46k]
  ------------------
   72|     37|      return false;
   73|     37|    }
   74|  3.46k|    *out_val = ConvertSymbolToSignedInt(symbol);
   75|  3.46k|  }
   76|  3.46k|  return true;
   77|  3.50k|}
kd_tree_attributes_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  3.92k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  3.92k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  3.92k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 4, False: 3.92k]
  ------------------
   33|      4|    return false;
   34|      4|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  3.92k|  uint8_t in;
   39|  3.92k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 33, False: 3.89k]
  ------------------
   40|     33|    return false;
   41|     33|  }
   42|  3.89k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 421, False: 3.46k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    421|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 36, False: 385]
  ------------------
   45|     36|      return false;
   46|     36|    }
   47|       |    // Append decoded info from this byte.
   48|    385|    *out_val <<= 7;
   49|    385|    *out_val |= in & ((1 << 7) - 1);
   50|  3.46k|  } else {
   51|       |    // Last byte reached
   52|  3.46k|    *out_val = in;
   53|  3.46k|  }
   54|  3.85k|  return true;
   55|  3.89k|}
sequential_integer_attribute_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  3.44k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  3.44k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  3.44k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 1, False: 3.44k]
  ------------------
   33|      1|    return false;
   34|      1|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  3.44k|  uint8_t in;
   39|  3.44k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 27, False: 3.41k]
  ------------------
   40|     27|    return false;
   41|     27|  }
   42|  3.41k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 517, False: 2.89k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    517|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 15, False: 502]
  ------------------
   45|     15|      return false;
   46|     15|    }
   47|       |    // Append decoded info from this byte.
   48|    502|    *out_val <<= 7;
   49|    502|    *out_val |= in & ((1 << 7) - 1);
   50|  2.89k|  } else {
   51|       |    // Last byte reached
   52|  2.89k|    *out_val = in;
   53|  2.89k|  }
   54|  3.40k|  return true;
   55|  3.41k|}
rans_bit_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  29.6k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  29.6k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  29.6k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 5, False: 29.6k]
  ------------------
   33|      5|    return false;
   34|      5|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  29.6k|  uint8_t in;
   39|  29.6k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 44, False: 29.5k]
  ------------------
   40|     44|    return false;
   41|     44|  }
   42|  29.5k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 665, False: 28.9k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    665|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 37, False: 628]
  ------------------
   45|     37|      return false;
   46|     37|    }
   47|       |    // Append decoded info from this byte.
   48|    628|    *out_val <<= 7;
   49|    628|    *out_val |= in & ((1 << 7) - 1);
   50|  28.9k|  } else {
   51|       |    // Last byte reached
   52|  28.9k|    *out_val = in;
   53|  28.9k|  }
   54|  29.5k|  return true;
   55|  29.5k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  10.9k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  10.9k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  10.9k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 127, False: 10.8k]
  ------------------
   33|    127|    return false;
   34|    127|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  10.8k|  uint8_t in;
   39|  10.8k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 115, False: 10.7k]
  ------------------
   40|    115|    return false;
   41|    115|  }
   42|  10.7k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 2.75k, False: 7.98k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  2.75k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 678, False: 2.08k]
  ------------------
   45|    678|      return false;
   46|    678|    }
   47|       |    // Append decoded info from this byte.
   48|  2.08k|    *out_val <<= 7;
   49|  2.08k|    *out_val |= in & ((1 << 7) - 1);
   50|  7.98k|  } else {
   51|       |    // Last byte reached
   52|  7.98k|    *out_val = in;
   53|  7.98k|  }
   54|  10.0k|  return true;
   55|  10.7k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  9.25k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  9.25k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  9.25k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 76, False: 9.17k]
  ------------------
   33|     76|    return false;
   34|     76|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  9.17k|  uint8_t in;
   39|  9.17k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 60, False: 9.11k]
  ------------------
   40|     60|    return false;
   41|     60|  }
   42|  9.11k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 5.39k, False: 3.72k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  5.39k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 918, False: 4.47k]
  ------------------
   45|    918|      return false;
   46|    918|    }
   47|       |    // Append decoded info from this byte.
   48|  4.47k|    *out_val <<= 7;
   49|  4.47k|    *out_val |= in & ((1 << 7) - 1);
   50|  4.47k|  } else {
   51|       |    // Last byte reached
   52|  3.72k|    *out_val = in;
   53|  3.72k|  }
   54|  8.19k|  return true;
   55|  9.11k|}
attributes_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  41.7k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  41.7k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  41.7k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 8, False: 41.7k]
  ------------------
   33|      8|    return false;
   34|      8|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  41.7k|  uint8_t in;
   39|  41.7k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 85, False: 41.6k]
  ------------------
   40|     85|    return false;
   41|     85|  }
   42|  41.6k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 3.85k, False: 37.8k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  3.85k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 74, False: 3.78k]
  ------------------
   45|     74|      return false;
   46|     74|    }
   47|       |    // Append decoded info from this byte.
   48|  3.78k|    *out_val <<= 7;
   49|  3.78k|    *out_val |= in & ((1 << 7) - 1);
   50|  37.8k|  } else {
   51|       |    // Last byte reached
   52|  37.8k|    *out_val = in;
   53|  37.8k|  }
   54|  41.6k|  return true;
   55|  41.6k|}

_ZNK5draco7VectorDIfLi3EEixEi:
  113|  84.6k|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIfLi3EEixEi:
  112|   107k|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIfLi3EEmiERKS1_:
  137|  8.94k|  Self operator-(const Self &o) const {
  138|  8.94k|    Self ret;
  139|  35.7k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 26.8k, False: 8.94k]
  ------------------
  140|  26.8k|      ret[i] = (*this)[i] - o[i];
  141|  26.8k|    }
  142|  8.94k|    return ret;
  143|  8.94k|  }
_ZN5draco7VectorDIfLi3EEC2Ev:
   40|  22.1k|  VectorD() {
   41|  88.7k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 66.5k, False: 22.1k]
  ------------------
   42|  66.5k|      (*this)[i] = Scalar(0);
   43|  66.5k|    }
   44|  22.1k|  }
_ZN5draco7VectorDIjLi3EEixEi:
  112|  1.31G|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIfLi3EEC2ERKfS3_S3_:
   59|  8.97M|      : v_({{c0, c1, c2}}) {
   60|  8.97M|    DRACO_DCHECK_EQ(dimension, 3);
   61|  8.97M|  }
_ZNK5draco7VectorDIlLi3EEixEi:
  113|   121M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIlLi3EEmiERKS1_:
  137|  10.1M|  Self operator-(const Self &o) const {
  138|  10.1M|    Self ret;
  139|  40.4M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 30.3M, False: 10.1M]
  ------------------
  140|  30.3M|      ret[i] = (*this)[i] - o[i];
  141|  30.3M|    }
  142|  10.1M|    return ret;
  143|  10.1M|  }
_ZN5draco12CrossProductIlEENS_7VectorDIT_Li3EEERKS3_S5_:
  318|  5.04M|                                 const VectorD<ScalarT, 3> &v) {
  319|       |  // Preventing accidental use with uint32_t and the like.
  320|  5.04M|  static_assert(std::is_signed<ScalarT>::value,
  321|  5.04M|                "ScalarT must be a signed type. ");
  322|  5.04M|  VectorD<ScalarT, 3> r;
  323|  5.04M|  r[0] = (u[1] * v[2]) - (u[2] * v[1]);
  324|  5.04M|  r[1] = (u[2] * v[0]) - (u[0] * v[2]);
  325|  5.04M|  r[2] = (u[0] * v[1]) - (u[1] * v[0]);
  326|  5.04M|  return r;
  327|  5.04M|}
_ZN5draco7VectorDIlLi3EE4dataEv:
  282|  5.04M|  Scalar *data() { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE4dataEv:
  283|  5.04M|  const Scalar *data() const { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE6AbsSumEv:
  237|  1.60M|  Scalar AbsSum() const {
  238|  1.60M|    Scalar result(0);
  239|  6.42M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (239:21): [True: 4.82M, False: 1.59M]
  ------------------
  240|  4.82M|      Scalar next_value = std::abs(v_[i]);
  241|  4.82M|      if (result > std::numeric_limits<Scalar>::max() - next_value) {
  ------------------
  |  Branch (241:11): [True: 9.26k, False: 4.81M]
  ------------------
  242|       |        // Return the max if adding would have caused an overflow.
  243|  9.26k|        return std::numeric_limits<Scalar>::max();
  244|  9.26k|      }
  245|  4.81M|      result += next_value;
  246|  4.81M|    }
  247|  1.59M|    return result;
  248|  1.60M|  }
_ZNK5draco7VectorDIlLi3EEdvERKl:
  182|   172k|  Self operator/(const Scalar &o) const {
  183|   172k|    Self ret;
  184|   689k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (184:21): [True: 516k, False: 172k]
  ------------------
  185|   516k|      ret[i] = (*this)[i] / o;
  186|   516k|    }
  187|   172k|    return ret;
  188|   172k|  }
_ZN5draco7VectorDIlLi3EEixEi:
  112|   148M|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEixEi:
  112|  9.05M|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EE4dataEv:
  282|  4.82M|  Scalar *data() { return &(v_[0]); }
_ZNK5draco7VectorDIiLi3EEngEv:
  120|  1.50M|  Self operator-() const {
  121|  1.50M|    Self ret;
  122|  6.03M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (122:21): [True: 4.52M, False: 1.50M]
  ------------------
  123|  4.52M|      ret[i] = -(*this)[i];
  124|  4.52M|    }
  125|  1.50M|    return ret;
  126|  1.50M|  }
_ZNK5draco7VectorDIiLi3EEixEi:
  113|  4.52M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEmiERKS1_:
  137|  41.4M|  Self operator-(const Self &o) const {
  138|  41.4M|    Self ret;
  139|   124M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 82.8M, False: 41.4M]
  ------------------
  140|  82.8M|      ret[i] = (*this)[i] - o[i];
  141|  82.8M|    }
  142|  41.4M|    return ret;
  143|  41.4M|  }
_ZN5draco7VectorDIjLi2EEixEi:
  112|   497M|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEixEi:
  113|   745M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIiLi2EEixEi:
  112|   669M|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEplERKS1_:
  129|  82.8M|  Self operator+(const Self &o) const {
  130|  82.8M|    Self ret;
  131|   248M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 165M, False: 82.8M]
  ------------------
  132|   165M|      ret[i] = (*this)[i] + o[i];
  133|   165M|    }
  134|  82.8M|    return ret;
  135|  82.8M|  }
_ZNK5draco7VectorDIiLi2EEixEi:
  113|   831M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIiLi2EEmiERKS1_:
  137|  7.94M|  Self operator-(const Self &o) const {
  138|  7.94M|    Self ret;
  139|  23.8M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 15.8M, False: 7.94M]
  ------------------
  140|  15.8M|      ret[i] = (*this)[i] - o[i];
  141|  15.8M|    }
  142|  7.94M|    return ret;
  143|  7.94M|  }
_ZNK5draco7VectorDIiLi2EEplERKS1_:
  129|  7.94M|  Self operator+(const Self &o) const {
  130|  7.94M|    Self ret;
  131|  23.8M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 15.8M, False: 7.94M]
  ------------------
  132|  15.8M|      ret[i] = (*this)[i] + o[i];
  133|  15.8M|    }
  134|  7.94M|    return ret;
  135|  7.94M|  }
_ZNK5draco7VectorDIfLi2EEeqERKS1_:
  206|   351k|  bool operator==(const Self &o) const {
  207|  1.04M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (207:21): [True: 698k, False: 346k]
  ------------------
  208|   698k|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (208:11): [True: 4.30k, False: 694k]
  ------------------
  209|  4.30k|        return false;
  210|  4.30k|      }
  211|   698k|    }
  212|   346k|    return true;
  213|   351k|  }
_ZNK5draco7VectorDIfLi2EEixEi:
  113|  4.21M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIfLi3EE11SquaredNormEv:
  234|  4.64k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIfLi3EE3DotERKS1_:
  250|  4.99k|  Scalar Dot(const Self &o) const {
  251|  4.99k|    Scalar ret(0);
  252|  19.9k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (252:21): [True: 14.9k, False: 4.99k]
  ------------------
  253|  14.9k|      ret += (*this)[i] * o[i];
  254|  14.9k|    }
  255|  4.99k|    return ret;
  256|  4.99k|  }
_ZNK5draco7VectorDIfLi3EEmlERKf:
  174|    347|  Self operator*(const Scalar &o) const {
  175|    347|    Self ret;
  176|  1.38k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 1.04k, False: 347]
  ------------------
  177|  1.04k|      ret[i] = (*this)[i] * o;
  178|  1.04k|    }
  179|    347|    return ret;
  180|    347|  }
_ZNK5draco7VectorDIfLi2EEmiERKS1_:
  137|  4.30k|  Self operator-(const Self &o) const {
  138|  4.30k|    Self ret;
  139|  12.9k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 8.60k, False: 4.30k]
  ------------------
  140|  8.60k|      ret[i] = (*this)[i] - o[i];
  141|  8.60k|    }
  142|  4.30k|    return ret;
  143|  4.30k|  }
_ZN5draco7VectorDIfLi2EEC2Ev:
   40|  8.60k|  VectorD() {
   41|  25.8k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 17.2k, False: 8.60k]
  ------------------
   42|  17.2k|      (*this)[i] = Scalar(0);
   43|  17.2k|    }
   44|  8.60k|  }
_ZN5draco7VectorDIfLi2EEC2ERKfS3_:
   52|   706k|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|   706k|    DRACO_DCHECK_EQ(dimension, 2);
   54|   706k|    v_[0] = c0;
   55|   706k|    v_[1] = c1;
   56|   706k|  }
_ZN5draco7VectorDIfLi2EEixEi:
  112|  34.3k|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIlLi2EEeqERKS1_:
  206|   358k|  bool operator==(const Self &o) const {
  207|  1.03M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (207:21): [True: 697k, False: 338k]
  ------------------
  208|   697k|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (208:11): [True: 20.4k, False: 677k]
  ------------------
  209|  20.4k|        return false;
  210|  20.4k|      }
  211|   697k|    }
  212|   338k|    return true;
  213|   358k|  }
_ZNK5draco7VectorDIlLi2EEixEi:
  113|  2.14M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIlLi3EEC2Ev:
   40|  28.6M|  VectorD() {
   41|   114M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 86.0M, False: 28.6M]
  ------------------
   42|  86.0M|      (*this)[i] = Scalar(0);
   43|  86.0M|    }
   44|  28.6M|  }
_ZNK5draco7VectorDIlLi3EE11SquaredNormEv:
  234|  23.3k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIlLi3EE3DotERKS1_:
  250|  26.2k|  Scalar Dot(const Self &o) const {
  251|  26.2k|    Scalar ret(0);
  252|   105k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (252:21): [True: 78.7k, False: 26.2k]
  ------------------
  253|  78.7k|      ret += (*this)[i] * o[i];
  254|  78.7k|    }
  255|  26.2k|    return ret;
  256|  26.2k|  }
_ZNK5draco7VectorDIlLi2EEmiERKS1_:
  137|  2.94k|  Self operator-(const Self &o) const {
  138|  2.94k|    Self ret;
  139|  8.84k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 5.89k, False: 2.94k]
  ------------------
  140|  5.89k|      ret[i] = (*this)[i] - o[i];
  141|  5.89k|    }
  142|  2.94k|    return ret;
  143|  2.94k|  }
_ZNK5draco7VectorDIlLi2EEmlERKl:
  174|  8.58k|  Self operator*(const Scalar &o) const {
  175|  8.58k|    Self ret;
  176|  25.7k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 17.1k, False: 8.58k]
  ------------------
  177|  17.1k|      ret[i] = (*this)[i] * o;
  178|  17.1k|    }
  179|  8.58k|    return ret;
  180|  8.58k|  }
_ZNK5draco7VectorDIlLi2EEplERKS1_:
  129|  2.86k|  Self operator+(const Self &o) const {
  130|  2.86k|    Self ret;
  131|  8.60k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 5.73k, False: 2.86k]
  ------------------
  132|  5.73k|      ret[i] = (*this)[i] + o[i];
  133|  5.73k|    }
  134|  2.86k|    return ret;
  135|  2.86k|  }
_ZN5dracomlIlLi2EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  292|  2.86k|    const ScalarT &o, const VectorD<ScalarT, dimension_t> &v) {
  293|  2.86k|  return v * o;
  294|  2.86k|}
_ZNK5draco7VectorDIlLi3EEplERKS1_:
  129|  2.84k|  Self operator+(const Self &o) const {
  130|  2.84k|    Self ret;
  131|  11.3k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 8.54k, False: 2.84k]
  ------------------
  132|  8.54k|      ret[i] = (*this)[i] + o[i];
  133|  8.54k|    }
  134|  2.84k|    return ret;
  135|  2.84k|  }
_ZN5dracomlIlLi3EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  292|  2.84k|    const ScalarT &o, const VectorD<ScalarT, dimension_t> &v) {
  293|  2.84k|  return v * o;
  294|  2.84k|}
_ZNK5draco7VectorDIlLi3EEmlERKl:
  174|  2.84k|  Self operator*(const Scalar &o) const {
  175|  2.84k|    Self ret;
  176|  11.3k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 8.54k, False: 2.84k]
  ------------------
  177|  8.54k|      ret[i] = (*this)[i] * o;
  178|  8.54k|    }
  179|  2.84k|    return ret;
  180|  2.84k|  }
_ZN5draco7VectorDIlLi2EEC2ERKlS3_:
   52|   719k|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|   719k|    DRACO_DCHECK_EQ(dimension, 2);
   54|   719k|    v_[0] = c0;
   55|   719k|    v_[1] = c1;
   56|   719k|  }
_ZN5draco7VectorDIlLi2EEC2Ev:
   40|  20.0k|  VectorD() {
   41|  60.2k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 40.1k, False: 20.0k]
  ------------------
   42|  40.1k|      (*this)[i] = Scalar(0);
   43|  40.1k|    }
   44|  20.0k|  }
_ZN5draco7VectorDImLi2EEC2IlLi2EEERKNS0_IT_XT0_EEE:
  102|  5.64k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  16.9k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 11.2k, False: 5.64k]
  ------------------
  104|  11.2k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 11.2k, False: 0]
  ------------------
  105|  11.2k|        v_[i] = Scalar(src_vector[i]);
  106|  11.2k|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  11.2k|    }
  110|  5.64k|  }
_ZNK5draco7VectorDImLi2EEplERKS1_:
  129|  1.37k|  Self operator+(const Self &o) const {
  130|  1.37k|    Self ret;
  131|  4.11k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 2.74k, False: 1.37k]
  ------------------
  132|  2.74k|      ret[i] = (*this)[i] + o[i];
  133|  2.74k|    }
  134|  1.37k|    return ret;
  135|  1.37k|  }
_ZN5draco7VectorDImLi2EEC2Ev:
   40|  2.82k|  VectorD() {
   41|  8.46k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 5.64k, False: 2.82k]
  ------------------
   42|  5.64k|      (*this)[i] = Scalar(0);
   43|  5.64k|    }
   44|  2.82k|  }
_ZNK5draco7VectorDImLi2EEixEi:
  113|  16.9k|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDImLi2EEixEi:
  112|  11.2k|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIlLi2EEC2ImLi2EEERKNS0_IT_XT0_EEE:
  102|  2.82k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  8.46k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 5.64k, False: 2.82k]
  ------------------
  104|  5.64k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 5.64k, False: 0]
  ------------------
  105|  5.64k|        v_[i] = Scalar(src_vector[i]);
  106|  5.64k|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  5.64k|    }
  110|  2.82k|  }
_ZNK5draco7VectorDIlLi2EEdvERKl:
  182|  2.82k|  Self operator/(const Scalar &o) const {
  183|  2.82k|    Self ret;
  184|  8.46k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (184:21): [True: 5.64k, False: 2.82k]
  ------------------
  185|  5.64k|      ret[i] = (*this)[i] / o;
  186|  5.64k|    }
  187|  2.82k|    return ret;
  188|  2.82k|  }
_ZNK5draco7VectorDImLi2EEmiERKS1_:
  137|  1.44k|  Self operator-(const Self &o) const {
  138|  1.44k|    Self ret;
  139|  4.34k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 2.89k, False: 1.44k]
  ------------------
  140|  2.89k|      ret[i] = (*this)[i] - o[i];
  141|  2.89k|    }
  142|  1.44k|    return ret;
  143|  1.44k|  }
_ZN5draco7VectorDIlLi2EEixEi:
  112|  80.2k|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEC2Ev:
   40|  1.50M|  VectorD() {
   41|  6.03M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 4.52M, False: 1.50M]
  ------------------
   42|  4.52M|      (*this)[i] = Scalar(0);
   43|  4.52M|    }
   44|  1.50M|  }
_ZN5draco7VectorDIiLi2EEC2ERKiS3_:
   52|   167M|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|   167M|    DRACO_DCHECK_EQ(dimension, 2);
   54|   167M|    v_[0] = c0;
   55|   167M|    v_[1] = c1;
   56|   167M|  }
_ZN5draco7VectorDIjLi2EEC2IiLi2EEERKNS0_IT_XT0_EEE:
  102|   248M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|   745M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 497M, False: 248M]
  ------------------
  104|   497M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 497M, False: 0]
  ------------------
  105|   497M|        v_[i] = Scalar(src_vector[i]);
  106|   497M|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|   497M|    }
  110|   248M|  }
_ZN5draco7VectorDIjLi2EEC2Ev:
   40|   124M|  VectorD() {
   41|   372M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 248M, False: 124M]
  ------------------
   42|   248M|      (*this)[i] = Scalar(0);
   43|   248M|    }
   44|   124M|  }
_ZN5draco7VectorDIiLi2EEC2IjLi2EEERKNS0_IT_XT0_EEE:
  102|   124M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|   372M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 248M, False: 124M]
  ------------------
  104|   248M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 248M, False: 0]
  ------------------
  105|   248M|        v_[i] = Scalar(src_vector[i]);
  106|   248M|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|   248M|    }
  110|   124M|  }
_ZN5draco7VectorDIiLi2EEC2ERKS1_:
   88|  76.7M|  VectorD(const Self &o) {
   89|   230M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (89:21): [True: 153M, False: 76.7M]
  ------------------
   90|   153M|      (*this)[i] = o[i];
   91|   153M|    }
   92|  76.7M|  }
_ZN5draco7VectorDIiLi2EEC2Ev:
   40|  15.8M|  VectorD() {
   41|  47.6M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 31.7M, False: 15.8M]
  ------------------
   42|  31.7M|      (*this)[i] = Scalar(0);
   43|  31.7M|    }
   44|  15.8M|  }
_ZN5draco7VectorDIjLi3EEC2ERKS1_:
   88|   428M|  VectorD(const Self &o) {
   89|  1.71G|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (89:21): [True: 1.28G, False: 428M]
  ------------------
   90|  1.28G|      (*this)[i] = o[i];
   91|  1.28G|    }
   92|   428M|  }
_ZNK5draco7VectorDIjLi3EEixEi:
  113|  1.28G|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIjLi3EEC2ERKjS3_S3_:
   59|   192M|      : v_({{c0, c1, c2}}) {
   60|   192M|    DRACO_DCHECK_EQ(dimension, 3);
   61|   192M|  }

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

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

_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  228|  7.24k|      : corner_table_(table),
  229|  7.24k|        start_corner_(table->LeftMostCorner(vert_id)),
  230|  7.24k|        corner_(start_corner_),
  231|  7.24k|        left_traversal_(true) {}
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE3EndEv:
  244|  4.23M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEppEv:
  267|  23.7k|  VertexCornersIterator &operator++() {
  268|  23.7k|    Next();
  269|  23.7k|    return *this;
  270|  23.7k|  }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEE4NextEv:
  247|  3.61M|  void Next() {
  248|  3.61M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 3.57M, False: 32.4k]
  ------------------
  249|  3.57M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  3.57M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 26.7k, False: 3.55M]
  ------------------
  251|       |        // Open boundary reached.
  252|  26.7k|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  26.7k|        left_traversal_ = false;
  254|  3.55M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 591k, False: 2.96M]
  ------------------
  255|       |        // End reached.
  256|   591k|        corner_ = kInvalidCornerIndex;
  257|   591k|      }
  258|  3.57M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  32.4k|      corner_ = corner_table_->SwingRight(corner_);
  262|  32.4k|    }
  263|  3.61M|  }
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE6CornerEv:
  241|  6.38M|  CornerIndex Corner() const { return corner_; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE3EndEv:
  244|  2.45M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE6CornerEv:
  241|  2.49M|  CornerIndex Corner() const { return corner_; }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE4NextEv:
  247|  1.45M|  void Next() {
  248|  1.45M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 1.43M, False: 15.5k]
  ------------------
  249|  1.43M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  1.43M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 909k, False: 528k]
  ------------------
  251|       |        // Open boundary reached.
  252|   909k|        corner_ = corner_table_->SwingRight(start_corner_);
  253|   909k|        left_traversal_ = false;
  254|   909k|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 86.8k, False: 441k]
  ------------------
  255|       |        // End reached.
  256|  86.8k|        corner_ = kInvalidCornerIndex;
  257|  86.8k|      }
  258|  1.43M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  15.5k|      corner_ = corner_table_->SwingRight(corner_);
  262|  15.5k|    }
  263|  1.45M|  }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|   996k|      : corner_table_(table),
  236|   996k|        start_corner_(corner_id),
  237|   996k|        corner_(start_corner_),
  238|   996k|        left_traversal_(true) {}
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|   611k|      : corner_table_(table),
  236|   611k|        start_corner_(corner_id),
  237|   611k|        corner_(start_corner_),
  238|   611k|        left_traversal_(true) {}

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

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

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

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

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

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

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

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

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

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

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

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

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

