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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

_ZN5draco17OctahedronToolBoxC2Ev:
   53|    467|      : quantization_bits_(-1),
   54|    467|        max_quantized_value_(-1),
   55|    467|        max_value_(-1),
   56|    467|        dequantization_scale_(1.f),
   57|    467|        center_value_(-1) {}
_ZN5draco17OctahedronToolBox19SetQuantizationBitsEi:
   59|    434|  bool SetQuantizationBits(int32_t q) {
   60|    434|    if (q < 2 || q > 30) {
  ------------------
  |  Branch (60:9): [True: 257, False: 177]
  |  Branch (60:18): [True: 37, False: 140]
  ------------------
   61|    294|      return false;
   62|    294|    }
   63|    140|    quantization_bits_ = q;
   64|    140|    max_quantized_value_ = (1u << quantization_bits_) - 1;
   65|    140|    max_value_ = max_quantized_value_ - 1;
   66|    140|    dequantization_scale_ = 2.f / max_value_;
   67|    140|    center_value_ = max_value_ / 2;
   68|    140|    return true;
   69|    434|  }
_ZNK5draco17OctahedronToolBox28CanonicalizeOctahedralCoordsEiiPiS1_:
   76|   378k|                                           int32_t *out_t) const {
   77|   378k|    if ((s == 0 && t == 0) || (s == 0 && t == max_value_) ||
  ------------------
  |  Branch (77:10): [True: 3.57k, False: 375k]
  |  Branch (77:20): [True: 0, False: 3.57k]
  |  Branch (77:32): [True: 3.57k, False: 375k]
  |  Branch (77:42): [True: 0, False: 3.57k]
  ------------------
   78|   378k|        (s == max_value_ && t == 0)) {
  ------------------
  |  Branch (78:10): [True: 107k, False: 271k]
  |  Branch (78:29): [True: 2.67k, False: 104k]
  ------------------
   79|  2.67k|      s = max_value_;
   80|  2.67k|      t = max_value_;
   81|   376k|    } else if (s == 0 && t > center_value_) {
  ------------------
  |  Branch (81:16): [True: 3.57k, False: 372k]
  |  Branch (81:26): [True: 1.13k, False: 2.44k]
  ------------------
   82|  1.13k|      t = center_value_ - (t - center_value_);
   83|   374k|    } else if (s == max_value_ && t < center_value_) {
  ------------------
  |  Branch (83:16): [True: 104k, False: 270k]
  |  Branch (83:35): [True: 2.89k, False: 101k]
  ------------------
   84|  2.89k|      t = center_value_ + (center_value_ - t);
   85|   372k|    } else if (t == max_value_ && s < center_value_) {
  ------------------
  |  Branch (85:16): [True: 103k, False: 268k]
  |  Branch (85:35): [True: 391, False: 102k]
  ------------------
   86|    391|      s = center_value_ + (center_value_ - s);
   87|   371k|    } else if (t == 0 && s > center_value_) {
  ------------------
  |  Branch (87:16): [True: 4.14k, False: 367k]
  |  Branch (87:26): [True: 1.51k, False: 2.63k]
  ------------------
   88|  1.51k|      s = center_value_ - (s - center_value_);
   89|  1.51k|    }
   90|       |
   91|   378k|    *out_s = s;
   92|   378k|    *out_t = t;
   93|   378k|  }
_ZNK5draco17OctahedronToolBox40IntegerVectorToQuantizedOctahedralCoordsEPKiPiS3_:
   99|   378k|                                                       int32_t *out_t) const {
  100|   378k|    DRACO_DCHECK_EQ(
  101|   378k|        std::abs(int_vec[0]) + std::abs(int_vec[1]) + std::abs(int_vec[2]),
  102|   378k|        center_value_);
  103|   378k|    int32_t s, t;
  104|   378k|    if (int_vec[0] >= 0) {
  ------------------
  |  Branch (104:9): [True: 226k, False: 151k]
  ------------------
  105|       |      // Right hemisphere.
  106|   226k|      s = (int_vec[1] + center_value_);
  107|   226k|      t = (int_vec[2] + center_value_);
  108|   226k|    } else {
  109|       |      // Left hemisphere.
  110|   151k|      if (int_vec[1] < 0) {
  ------------------
  |  Branch (110:11): [True: 53.6k, False: 98.2k]
  ------------------
  111|  53.6k|        s = std::abs(int_vec[2]);
  112|  98.2k|      } else {
  113|  98.2k|        s = (max_value_ - std::abs(int_vec[2]));
  114|  98.2k|      }
  115|   151k|      if (int_vec[2] < 0) {
  ------------------
  |  Branch (115:11): [True: 58.0k, False: 93.8k]
  ------------------
  116|  58.0k|        t = std::abs(int_vec[1]);
  117|  93.8k|      } else {
  118|  93.8k|        t = (max_value_ - std::abs(int_vec[1]));
  119|  93.8k|      }
  120|   151k|    }
  121|   378k|    CanonicalizeOctahedralCoords(s, t, out_s, out_t);
  122|   378k|  }
_ZNK5draco17OctahedronToolBox37QuantizedOctahedralCoordsToUnitVectorEiiPf:
  198|  1.61k|                                                    float *out_vector) const {
  199|  1.61k|    OctahedralCoordsToUnitVector(in_s * dequantization_scale_ - 1.f,
  200|  1.61k|                                 in_t * dequantization_scale_ - 1.f,
  201|  1.61k|                                 out_vector);
  202|  1.61k|  }
_ZNK5draco17OctahedronToolBox11IsInDiamondERKiS2_:
  205|   337k|  inline bool IsInDiamond(const int32_t &s, const int32_t &t) const {
  206|       |    // Expect center already at origin.
  207|   337k|    DRACO_DCHECK_LE(s, center_value_);
  208|   337k|    DRACO_DCHECK_LE(t, center_value_);
  209|   337k|    DRACO_DCHECK_GE(s, -center_value_);
  210|   337k|    DRACO_DCHECK_GE(t, -center_value_);
  211|   337k|    const uint32_t st =
  212|   337k|        static_cast<uint32_t>(std::abs(s)) + static_cast<uint32_t>(std::abs(t));
  213|   337k|    return st <= center_value_;
  214|   337k|  }
_ZNK5draco17OctahedronToolBox13InvertDiamondEPiS1_:
  216|   364k|  void InvertDiamond(int32_t *s, int32_t *t) const {
  217|       |    // Expect center already at origin.
  218|   364k|    DRACO_DCHECK_LE(*s, center_value_);
  219|   364k|    DRACO_DCHECK_LE(*t, center_value_);
  220|   364k|    DRACO_DCHECK_GE(*s, -center_value_);
  221|   364k|    DRACO_DCHECK_GE(*t, -center_value_);
  222|   364k|    int32_t sign_s = 0;
  223|   364k|    int32_t sign_t = 0;
  224|   364k|    if (*s >= 0 && *t >= 0) {
  ------------------
  |  Branch (224:9): [True: 250k, False: 113k]
  |  Branch (224:20): [True: 180k, False: 70.4k]
  ------------------
  225|   180k|      sign_s = 1;
  226|   180k|      sign_t = 1;
  227|   183k|    } else if (*s <= 0 && *t <= 0) {
  ------------------
  |  Branch (227:16): [True: 115k, False: 68.6k]
  |  Branch (227:27): [True: 53.8k, False: 61.4k]
  ------------------
  228|  53.8k|      sign_s = -1;
  229|  53.8k|      sign_t = -1;
  230|   130k|    } else {
  231|   130k|      sign_s = (*s > 0) ? 1 : -1;
  ------------------
  |  Branch (231:16): [True: 68.6k, False: 61.4k]
  ------------------
  232|   130k|      sign_t = (*t > 0) ? 1 : -1;
  ------------------
  |  Branch (232:16): [True: 61.4k, False: 68.6k]
  ------------------
  233|   130k|    }
  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|   364k|    const uint32_t corner_point_s = sign_s * center_value_;
  239|   364k|    const uint32_t corner_point_t = sign_t * center_value_;
  240|   364k|    uint32_t us = *s;
  241|   364k|    uint32_t ut = *t;
  242|   364k|    us = us + us - corner_point_s;
  243|   364k|    ut = ut + ut - corner_point_t;
  244|   364k|    if (sign_s * sign_t >= 0) {
  ------------------
  |  Branch (244:9): [True: 234k, False: 130k]
  ------------------
  245|   234k|      uint32_t temp = us;
  246|   234k|      us = -ut;
  247|   234k|      ut = -temp;
  248|   234k|    } else {
  249|   130k|      std::swap(us, ut);
  250|   130k|    }
  251|   364k|    us = us + corner_point_s;
  252|   364k|    ut = ut + corner_point_t;
  253|       |
  254|   364k|    *s = us;
  255|   364k|    *t = ut;
  256|   364k|    *s /= 2;
  257|   364k|    *t /= 2;
  258|   364k|  }
_ZNK5draco17OctahedronToolBox6ModMaxEi:
  272|   675k|  int32_t ModMax(int32_t x) const {
  273|   675k|    if (x > this->center_value()) {
  ------------------
  |  Branch (273:9): [True: 4.03k, False: 671k]
  ------------------
  274|  4.03k|      return x - this->max_quantized_value();
  275|  4.03k|    }
  276|   671k|    if (x < -this->center_value()) {
  ------------------
  |  Branch (276:9): [True: 2.94k, False: 668k]
  ------------------
  277|  2.94k|      return x + this->max_quantized_value();
  278|  2.94k|    }
  279|   668k|    return x;
  280|   671k|  }
_ZNK5draco17OctahedronToolBox17quantization_bitsEv:
  291|    122|  int32_t quantization_bits() const { return quantization_bits_; }
_ZNK5draco17OctahedronToolBox19max_quantized_valueEv:
  292|  6.97k|  int32_t max_quantized_value() const { return max_quantized_value_; }
_ZNK5draco17OctahedronToolBox12center_valueEv:
  294|  2.02M|  int32_t center_value() const { return center_value_; }
_ZNK5draco17OctahedronToolBox28OctahedralCoordsToUnitVectorEffPf:
  298|  1.61k|                                           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|  1.61k|    float y = in_s_scaled;
  329|  1.61k|    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|  1.61k|    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|  1.61k|    float x_offset = -x;
  342|  1.61k|    x_offset = x_offset < 0 ? 0 : x_offset;
  ------------------
  |  Branch (342:16): [True: 0, False: 1.61k]
  ------------------
  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|  1.61k|    y += y < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (347:10): [True: 623, False: 989]
  ------------------
  348|  1.61k|    z += z < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (348:10): [True: 735, False: 877]
  ------------------
  349|       |
  350|       |    // Normalize the computed vector.
  351|  1.61k|    const float norm_squared = x * x + y * y + z * z;
  352|  1.61k|    if (norm_squared < 1e-6) {
  ------------------
  |  Branch (352:9): [True: 0, False: 1.61k]
  ------------------
  353|      0|      out_vector[0] = 0;
  354|      0|      out_vector[1] = 0;
  355|      0|      out_vector[2] = 0;
  356|  1.61k|    } else {
  357|  1.61k|      const float d = 1.0f / std::sqrt(norm_squared);
  358|  1.61k|      out_vector[0] = x * d;
  359|  1.61k|      out_vector[1] = y * d;
  360|  1.61k|      out_vector[2] = z * d;
  361|  1.61k|    }
  362|  1.61k|  }
_ZNK5draco17OctahedronToolBox25CanonicalizeIntegerVectorIiEEvPT_:
  173|   378k|  void CanonicalizeIntegerVector(T *vec) const {
  174|   378k|    static_assert(std::is_integral<T>::value, "T must be an integral type.");
  175|   378k|    static_assert(std::is_signed<T>::value, "T must be a signed type.");
  176|   378k|    const int64_t abs_sum = static_cast<int64_t>(std::abs(vec[0])) +
  177|   378k|                            static_cast<int64_t>(std::abs(vec[1])) +
  178|   378k|                            static_cast<int64_t>(std::abs(vec[2]));
  179|       |
  180|   378k|    if (abs_sum == 0) {
  ------------------
  |  Branch (180:9): [True: 96.8k, False: 281k]
  ------------------
  181|  96.8k|      vec[0] = center_value_;  // vec[1] == v[2] == 0
  182|   281k|    } else {
  183|   281k|      vec[0] =
  184|   281k|          (static_cast<int64_t>(vec[0]) * static_cast<int64_t>(center_value_)) /
  185|   281k|          abs_sum;
  186|   281k|      vec[1] =
  187|   281k|          (static_cast<int64_t>(vec[1]) * static_cast<int64_t>(center_value_)) /
  188|   281k|          abs_sum;
  189|   281k|      if (vec[2] >= 0) {
  ------------------
  |  Branch (189:11): [True: 149k, False: 132k]
  ------------------
  190|   149k|        vec[2] = center_value_ - std::abs(vec[0]) - std::abs(vec[1]);
  191|   149k|      } else {
  192|   132k|        vec[2] = -(center_value_ - std::abs(vec[0]) - std::abs(vec[1]));
  193|   132k|      }
  194|   281k|    }
  195|   378k|  }

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

_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|     55|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|     55|            attribute, transform, mesh_data),
   52|     55|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  193|     42|                                                                *buffer) {
  194|     42|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  195|     42|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|     42|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (195:7): [True: 6, False: 36]
  ------------------
  196|       |    // Decode prediction mode.
  197|      6|    uint8_t mode;
  198|      6|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (198:9): [True: 0, False: 6]
  ------------------
  199|      0|      return false;
  200|      0|    }
  201|       |
  202|      6|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (202:9): [True: 5, False: 1]
  ------------------
  203|       |      // Unsupported mode.
  204|      5|      return false;
  205|      5|    }
  206|      6|  }
  207|     37|#endif
  208|       |
  209|       |  // Encode selected edges using separate rans bit coder for each context.
  210|    171|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (210:19): [True: 138, False: 33]
  ------------------
  211|    138|    uint32_t num_flags;
  212|    138|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (212:9): [True: 1, False: 137]
  ------------------
  213|      1|      return false;
  214|      1|    }
  215|    137|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (215:9): [True: 3, False: 134]
  ------------------
  216|      3|      return false;
  217|      3|    }
  218|    134|    if (num_flags > 0) {
  ------------------
  |  Branch (218:9): [True: 85, False: 49]
  ------------------
  219|     85|      is_crease_edge_[i].resize(num_flags);
  220|     85|      RAnsBitDecoder decoder;
  221|     85|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (221:11): [True: 0, False: 85]
  ------------------
  222|      0|        return false;
  223|      0|      }
  224|  14.0k|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (224:28): [True: 13.9k, False: 85]
  ------------------
  225|  13.9k|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  226|  13.9k|      }
  227|     85|      decoder.EndDecoding();
  228|     85|    }
  229|    134|  }
  230|     33|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  231|     33|                                     MeshDataT>::DecodePredictionData(buffer);
  232|     37|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|     33|                          const PointIndex * /* entry_to_point_id_map */) {
   87|     33|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|     33|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|    165|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 132, False: 33]
  ------------------
   93|    132|    pred_vals[i].resize(num_components, 0);
   94|    132|  }
   95|     33|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|     33|                                         out_data);
   97|       |
   98|     33|  const CornerTable *const table = this->mesh_data().corner_table();
   99|     33|  const std::vector<int32_t> *const vertex_to_data_map =
  100|     33|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|     33|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|     33|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|     33|  const int corner_map_size =
  109|     33|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|  3.75k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 3.73k, False: 17]
  ------------------
  111|  3.73k|    const CornerIndex start_corner_id =
  112|  3.73k|        this->mesh_data().data_to_corner_map()->at(p);
  113|       |
  114|  3.73k|    CornerIndex corner_id(start_corner_id);
  115|  3.73k|    int num_parallelograms = 0;
  116|  3.73k|    bool first_pass = true;
  117|  8.98k|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (117:12): [True: 5.36k, False: 3.62k]
  ------------------
  118|  5.36k|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (118:11): [True: 540, False: 4.82k]
  ------------------
  119|  5.36k|              p, corner_id, table, *vertex_to_data_map, out_data,
  120|  5.36k|              num_components, &(pred_vals[num_parallelograms][0]))) {
  121|       |        // Parallelogram prediction applied and stored in
  122|       |        // |pred_vals[num_parallelograms]|
  123|    540|        ++num_parallelograms;
  124|       |        // Stop processing when we reach the maximum number of allowed
  125|       |        // parallelograms.
  126|    540|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (126:13): [True: 0, False: 540]
  ------------------
  127|      0|          break;
  128|      0|        }
  129|    540|      }
  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|  5.36k|      if (first_pass) {
  ------------------
  |  Branch (133:11): [True: 4.64k, False: 715]
  ------------------
  134|  4.64k|        corner_id = table->SwingLeft(corner_id);
  135|  4.64k|      } else {
  136|    715|        corner_id = table->SwingRight(corner_id);
  137|    715|      }
  138|  5.36k|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (138:11): [True: 112, False: 5.24k]
  ------------------
  139|    112|        break;
  140|    112|      }
  141|  5.24k|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (141:11): [True: 4.20k, False: 1.04k]
  |  Branch (141:47): [True: 3.62k, False: 584]
  ------------------
  142|  3.62k|        first_pass = false;
  143|  3.62k|        corner_id = table->SwingRight(start_corner_id);
  144|  3.62k|      }
  145|  5.24k|    }
  146|       |
  147|       |    // Check which of the available parallelograms are actually used and compute
  148|       |    // the final predicted value.
  149|  3.73k|    int num_used_parallelograms = 0;
  150|  3.73k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (150:9): [True: 537, False: 3.19k]
  ------------------
  151|  4.07k|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (151:23): [True: 3.54k, False: 537]
  ------------------
  152|  3.54k|        multi_pred_vals[i] = 0;
  153|  3.54k|      }
  154|       |      // Check which parallelograms are actually used.
  155|  1.05k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (155:23): [True: 537, False: 521]
  ------------------
  156|    537|        const int context = num_parallelograms - 1;
  157|    537|        const int pos = is_crease_edge_pos[context]++;
  158|    537|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (158:13): [True: 16, False: 521]
  ------------------
  159|     16|          return false;
  160|     16|        }
  161|    521|        const bool is_crease = is_crease_edge_[context][pos];
  162|    521|        if (!is_crease) {
  ------------------
  |  Branch (162:13): [True: 9, False: 512]
  ------------------
  163|      9|          ++num_used_parallelograms;
  164|    828|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (164:27): [True: 819, False: 9]
  ------------------
  165|    819|            multi_pred_vals[j] =
  166|    819|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  167|    819|          }
  168|      9|        }
  169|    521|      }
  170|    537|    }
  171|  3.71k|    const int dst_offset = p * num_components;
  172|  3.71k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (172:9): [True: 3.71k, False: 9]
  ------------------
  173|       |      // No parallelogram was valid.
  174|       |      // We use the last decoded point as a reference.
  175|  3.71k|      const int src_offset = (p - 1) * num_components;
  176|  3.71k|      this->transform().ComputeOriginalValue(
  177|  3.71k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  178|  3.71k|    } else {
  179|       |      // Compute the correction from the predicted value.
  180|    828|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (180:23): [True: 819, False: 9]
  ------------------
  181|    819|        multi_pred_vals[c] /= num_used_parallelograms;
  182|    819|      }
  183|      9|      this->transform().ComputeOriginalValue(
  184|      9|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  185|      9|    }
  186|  3.71k|  }
  187|     17|  return true;
  188|     33|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|     63|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|     63|            attribute, transform, mesh_data),
   52|     63|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  193|     62|                                                                *buffer) {
  194|     62|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  195|     62|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|     62|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (195:7): [True: 0, False: 62]
  ------------------
  196|       |    // Decode prediction mode.
  197|      0|    uint8_t mode;
  198|      0|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (198:9): [True: 0, False: 0]
  ------------------
  199|      0|      return false;
  200|      0|    }
  201|       |
  202|      0|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (202:9): [True: 0, False: 0]
  ------------------
  203|       |      // Unsupported mode.
  204|      0|      return false;
  205|      0|    }
  206|      0|  }
  207|     62|#endif
  208|       |
  209|       |  // Encode selected edges using separate rans bit coder for each context.
  210|    275|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (210:19): [True: 225, False: 50]
  ------------------
  211|    225|    uint32_t num_flags;
  212|    225|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (212:9): [True: 2, False: 223]
  ------------------
  213|      2|      return false;
  214|      2|    }
  215|    223|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (215:9): [True: 7, False: 216]
  ------------------
  216|      7|      return false;
  217|      7|    }
  218|    216|    if (num_flags > 0) {
  ------------------
  |  Branch (218:9): [True: 172, False: 44]
  ------------------
  219|    172|      is_crease_edge_[i].resize(num_flags);
  220|    172|      RAnsBitDecoder decoder;
  221|    172|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (221:11): [True: 3, False: 169]
  ------------------
  222|      3|        return false;
  223|      3|      }
  224|  9.82k|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (224:28): [True: 9.66k, False: 169]
  ------------------
  225|  9.66k|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  226|  9.66k|      }
  227|    169|      decoder.EndDecoding();
  228|    169|    }
  229|    216|  }
  230|     50|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  231|     50|                                     MeshDataT>::DecodePredictionData(buffer);
  232|     62|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|     45|                          const PointIndex * /* entry_to_point_id_map */) {
   87|     45|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|     45|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|    225|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 180, False: 45]
  ------------------
   93|    180|    pred_vals[i].resize(num_components, 0);
   94|    180|  }
   95|     45|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|     45|                                         out_data);
   97|       |
   98|     45|  const CornerTable *const table = this->mesh_data().corner_table();
   99|     45|  const std::vector<int32_t> *const vertex_to_data_map =
  100|     45|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|     45|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|     45|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|     45|  const int corner_map_size =
  109|     45|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|  3.12k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 3.10k, False: 27]
  ------------------
  111|  3.10k|    const CornerIndex start_corner_id =
  112|  3.10k|        this->mesh_data().data_to_corner_map()->at(p);
  113|       |
  114|  3.10k|    CornerIndex corner_id(start_corner_id);
  115|  3.10k|    int num_parallelograms = 0;
  116|  3.10k|    bool first_pass = true;
  117|  11.0k|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (117:12): [True: 9.27k, False: 1.79k]
  ------------------
  118|  9.27k|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (118:11): [True: 1.37k, False: 7.89k]
  ------------------
  119|  9.27k|              p, corner_id, table, *vertex_to_data_map, out_data,
  120|  9.27k|              num_components, &(pred_vals[num_parallelograms][0]))) {
  121|       |        // Parallelogram prediction applied and stored in
  122|       |        // |pred_vals[num_parallelograms]|
  123|  1.37k|        ++num_parallelograms;
  124|       |        // Stop processing when we reach the maximum number of allowed
  125|       |        // parallelograms.
  126|  1.37k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (126:13): [True: 3, False: 1.37k]
  ------------------
  127|      3|          break;
  128|      3|        }
  129|  1.37k|      }
  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|  9.26k|      if (first_pass) {
  ------------------
  |  Branch (133:11): [True: 7.83k, False: 1.43k]
  ------------------
  134|  7.83k|        corner_id = table->SwingLeft(corner_id);
  135|  7.83k|      } else {
  136|  1.43k|        corner_id = table->SwingRight(corner_id);
  137|  1.43k|      }
  138|  9.26k|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (138:11): [True: 1.30k, False: 7.96k]
  ------------------
  139|  1.30k|        break;
  140|  1.30k|      }
  141|  7.96k|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (141:11): [True: 2.40k, False: 5.55k]
  |  Branch (141:47): [True: 1.79k, False: 610]
  ------------------
  142|  1.79k|        first_pass = false;
  143|  1.79k|        corner_id = table->SwingRight(start_corner_id);
  144|  1.79k|      }
  145|  7.96k|    }
  146|       |
  147|       |    // Check which of the available parallelograms are actually used and compute
  148|       |    // the final predicted value.
  149|  3.10k|    int num_used_parallelograms = 0;
  150|  3.10k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (150:9): [True: 1.05k, False: 2.04k]
  ------------------
  151|  27.3k|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (151:23): [True: 26.2k, False: 1.05k]
  ------------------
  152|  26.2k|        multi_pred_vals[i] = 0;
  153|  26.2k|      }
  154|       |      // Check which parallelograms are actually used.
  155|  2.40k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (155:23): [True: 1.35k, False: 1.04k]
  ------------------
  156|  1.35k|        const int context = num_parallelograms - 1;
  157|  1.35k|        const int pos = is_crease_edge_pos[context]++;
  158|  1.35k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (158:13): [True: 18, False: 1.34k]
  ------------------
  159|     18|          return false;
  160|     18|        }
  161|  1.34k|        const bool is_crease = is_crease_edge_[context][pos];
  162|  1.34k|        if (!is_crease) {
  ------------------
  |  Branch (162:13): [True: 698, False: 643]
  ------------------
  163|    698|          ++num_used_parallelograms;
  164|  8.96k|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (164:27): [True: 8.27k, False: 698]
  ------------------
  165|  8.27k|            multi_pred_vals[j] =
  166|  8.27k|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  167|  8.27k|          }
  168|    698|        }
  169|  1.34k|      }
  170|  1.05k|    }
  171|  3.08k|    const int dst_offset = p * num_components;
  172|  3.08k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (172:9): [True: 2.39k, False: 686]
  ------------------
  173|       |      // No parallelogram was valid.
  174|       |      // We use the last decoded point as a reference.
  175|  2.39k|      const int src_offset = (p - 1) * num_components;
  176|  2.39k|      this->transform().ComputeOriginalValue(
  177|  2.39k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  178|  2.39k|    } else {
  179|       |      // Compute the correction from the predicted value.
  180|  8.25k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (180:23): [True: 7.57k, False: 686]
  ------------------
  181|  7.57k|        multi_pred_vals[c] /= num_used_parallelograms;
  182|  7.57k|      }
  183|    686|      this->transform().ComputeOriginalValue(
  184|    686|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  185|    686|    }
  186|  3.08k|  }
  187|     27|  return true;
  188|     45|}

_ZN5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE3SetEPKNS_4MeshEPKS1_PKNSt3__16vectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS8_9allocatorISC_EEEEPKNS9_IiNSD_IiEEEE:
   37|    250|           const std::vector<int32_t> *vertex_to_data_map) {
   38|    250|    mesh_ = mesh;
   39|    250|    corner_table_ = table;
   40|    250|    data_to_corner_map_ = data_to_corner_map;
   41|    250|    vertex_to_data_map_ = vertex_to_data_map;
   42|    250|  }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE12corner_tableEv:
   45|   641k|  const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE18vertex_to_data_mapEv:
   46|   383k|  const std::vector<int32_t> *vertex_to_data_map() const {
   47|   383k|    return vertex_to_data_map_;
   48|   383k|  }
_ZNK5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEE18data_to_corner_mapEv:
   49|   189k|  const std::vector<CornerIndex> *data_to_corner_map() const {
   50|   189k|    return data_to_corner_map_;
   51|   189k|  }
_ZN5draco24MeshPredictionSchemeDataINS_11CornerTableEE3SetEPKNS_4MeshEPKS1_PKNSt3__16vectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS8_9allocatorISC_EEEEPKNS9_IiNSD_IiEEEE:
   37|    393|           const std::vector<int32_t> *vertex_to_data_map) {
   38|    393|    mesh_ = mesh;
   39|    393|    corner_table_ = table;
   40|    393|    data_to_corner_map_ = data_to_corner_map;
   41|    393|    vertex_to_data_map_ = vertex_to_data_map;
   42|    393|  }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE12corner_tableEv:
   45|  4.45M|  const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE18vertex_to_data_mapEv:
   46|  4.13M|  const std::vector<int32_t> *vertex_to_data_map() const {
   47|  4.13M|    return vertex_to_data_map_;
   48|  4.13M|  }
_ZNK5draco24MeshPredictionSchemeDataINS_11CornerTableEE18data_to_corner_mapEv:
   49|   651k|  const std::vector<CornerIndex> *data_to_corner_map() const {
   50|   651k|    return data_to_corner_map_;
   51|   651k|  }
_ZN5draco24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEC2Ev:
   30|    250|      : mesh_(nullptr),
   31|    250|        corner_table_(nullptr),
   32|    250|        vertex_to_data_map_(nullptr),
   33|    250|        data_to_corner_map_(nullptr) {}
_ZN5draco24MeshPredictionSchemeDataINS_11CornerTableEEC2Ev:
   30|    393|      : mesh_(nullptr),
   31|    393|        corner_table_(nullptr),
   32|    393|        vertex_to_data_map_(nullptr),
   33|    393|        data_to_corner_map_(nullptr) {}

_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|     42|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   178k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   123k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    231|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    231|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|   784k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    344|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    344|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   349k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|      9|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|      9|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|     26|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|     26|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|      8|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|      8|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|     21|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|     21|        mesh_data_(mesh_data) {}

_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|     18|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|      9|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|      9|    DRACO_DCHECK_EQ(i, 0);
   70|      9|    (void)i;
   71|      9|    return GeometryAttribute::POSITION;
   72|      9|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|      9|  bool SetParentAttribute(const PointAttribute *att) override {
   75|      9|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 9]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|      9|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 0, False: 9]
  ------------------
   79|      0|      return false;  // Currently works only for 3 component positions.
   80|      0|    }
   81|      9|    predictor_.SetPositionAttribute(*att);
   82|      9|    return true;
   83|      9|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|      9|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|      9|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 0, False: 9]
  ------------------
  145|      0|    return false;
  146|      0|  }
  147|       |
  148|      9|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|      9|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|      9|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 3, False: 6]
  ------------------
  150|      3|    uint8_t prediction_mode;
  151|      3|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 0, False: 3]
  ------------------
  152|      0|      return false;
  153|      0|    }
  154|      3|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 0, False: 3]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      0|      return false;
  157|      0|    }
  158|       |
  159|      3|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 3]
  ------------------
  160|      3|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|      3|  }
  164|      9|#endif
  165|       |
  166|       |  // Init normal flips.
  167|      9|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 3, False: 6]
  ------------------
  168|      3|    return false;
  169|      3|  }
  170|       |
  171|      6|  return true;
  172|      9|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|      6|                                      const PointIndex *entry_to_point_id_map) {
  103|      6|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|      6|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|      6|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|      6|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|      6|  const int corner_map_size =
  111|      6|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|      6|  VectorD<int32_t, 3> pred_normal_3d;
  114|      6|  int32_t pred_normal_oct[2];
  115|       |
  116|     42|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 36, False: 6]
  ------------------
  117|     36|    const CornerIndex corner_id =
  118|     36|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|     36|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|     36|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|     36|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|     36|                    octahedron_tool_box_.center_value());
  125|     36|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 12, False: 24]
  ------------------
  126|     12|      pred_normal_3d = -pred_normal_3d;
  127|     12|    }
  128|     36|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|     36|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|     36|    const int data_offset = data_id * 2;
  132|     36|    this->transform().ComputeOriginalValue(
  133|     36|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|     36|  }
  135|      6|  flip_normal_bit_decoder_.EndDecoding();
  136|      6|  return true;
  137|      6|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|      6|  void SetQuantizationBits(int q) {
   85|      6|    octahedron_tool_box_.SetQuantizationBits(q);
   86|      6|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|     52|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|     26|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|     26|    DRACO_DCHECK_EQ(i, 0);
   70|     26|    (void)i;
   71|     26|    return GeometryAttribute::POSITION;
   72|     26|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|     26|  bool SetParentAttribute(const PointAttribute *att) override {
   75|     26|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 26]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|     26|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 0, False: 26]
  ------------------
   79|      0|      return false;  // Currently works only for 3 component positions.
   80|      0|    }
   81|     26|    predictor_.SetPositionAttribute(*att);
   82|     26|    return true;
   83|     26|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|     26|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|     26|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 0, False: 26]
  ------------------
  145|      0|    return false;
  146|      0|  }
  147|       |
  148|     26|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|     26|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|     26|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 0, False: 26]
  ------------------
  150|      0|    uint8_t prediction_mode;
  151|      0|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 0, False: 0]
  ------------------
  152|      0|      return false;
  153|      0|    }
  154|      0|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 0, False: 0]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      0|      return false;
  157|      0|    }
  158|       |
  159|      0|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 0]
  ------------------
  160|      0|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|      0|  }
  164|     26|#endif
  165|       |
  166|       |  // Init normal flips.
  167|     26|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 0, False: 26]
  ------------------
  168|      0|    return false;
  169|      0|  }
  170|       |
  171|     26|  return true;
  172|     26|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|     26|                                      const PointIndex *entry_to_point_id_map) {
  103|     26|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|     26|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|     26|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|     26|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|     26|  const int corner_map_size =
  111|     26|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|     26|  VectorD<int32_t, 3> pred_normal_3d;
  114|     26|  int32_t pred_normal_oct[2];
  115|       |
  116|   178k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 178k, False: 26]
  ------------------
  117|   178k|    const CornerIndex corner_id =
  118|   178k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   178k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   178k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   178k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   178k|                    octahedron_tool_box_.center_value());
  125|   178k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 164k, False: 13.7k]
  ------------------
  126|   164k|      pred_normal_3d = -pred_normal_3d;
  127|   164k|    }
  128|   178k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   178k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   178k|    const int data_offset = data_id * 2;
  132|   178k|    this->transform().ComputeOriginalValue(
  133|   178k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   178k|  }
  135|     26|  flip_normal_bit_decoder_.EndDecoding();
  136|     26|  return true;
  137|     26|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|     26|  void SetQuantizationBits(int q) {
   85|     26|    octahedron_tool_box_.SetQuantizationBits(q);
   86|     26|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|     16|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|      8|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|      8|    DRACO_DCHECK_EQ(i, 0);
   70|      8|    (void)i;
   71|      8|    return GeometryAttribute::POSITION;
   72|      8|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|      8|  bool SetParentAttribute(const PointAttribute *att) override {
   75|      8|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 8]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|      8|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 0, False: 8]
  ------------------
   79|      0|      return false;  // Currently works only for 3 component positions.
   80|      0|    }
   81|      8|    predictor_.SetPositionAttribute(*att);
   82|      8|    return true;
   83|      8|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|      8|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|      8|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 0, False: 8]
  ------------------
  145|      0|    return false;
  146|      0|  }
  147|       |
  148|      8|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|      8|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|      8|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 8, False: 0]
  ------------------
  150|      8|    uint8_t prediction_mode;
  151|      8|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 0, False: 8]
  ------------------
  152|      0|      return false;
  153|      0|    }
  154|      8|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 7, False: 1]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      7|      return false;
  157|      7|    }
  158|       |
  159|      1|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 1]
  ------------------
  160|      1|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|      1|  }
  164|      1|#endif
  165|       |
  166|       |  // Init normal flips.
  167|      1|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 1, False: 0]
  ------------------
  168|      1|    return false;
  169|      1|  }
  170|       |
  171|      0|  return true;
  172|      1|}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|     42|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|     21|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|     21|    DRACO_DCHECK_EQ(i, 0);
   70|     21|    (void)i;
   71|     21|    return GeometryAttribute::POSITION;
   72|     21|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|     21|  bool SetParentAttribute(const PointAttribute *att) override {
   75|     21|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 21]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|     21|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 0, False: 21]
  ------------------
   79|      0|      return false;  // Currently works only for 3 component positions.
   80|      0|    }
   81|     21|    predictor_.SetPositionAttribute(*att);
   82|     21|    return true;
   83|     21|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|     21|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|     21|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 1, False: 20]
  ------------------
  145|      1|    return false;
  146|      1|  }
  147|       |
  148|     20|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|     20|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|     20|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 0, False: 20]
  ------------------
  150|      0|    uint8_t prediction_mode;
  151|      0|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 0, False: 0]
  ------------------
  152|      0|      return false;
  153|      0|    }
  154|      0|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 0, False: 0]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      0|      return false;
  157|      0|    }
  158|       |
  159|      0|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 0]
  ------------------
  160|      0|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|      0|  }
  164|     20|#endif
  165|       |
  166|       |  // Init normal flips.
  167|     20|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 0, False: 20]
  ------------------
  168|      0|    return false;
  169|      0|  }
  170|       |
  171|     20|  return true;
  172|     20|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|     20|                                      const PointIndex *entry_to_point_id_map) {
  103|     20|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|     20|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|     20|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|     20|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|     20|  const int corner_map_size =
  111|     20|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|     20|  VectorD<int32_t, 3> pred_normal_3d;
  114|     20|  int32_t pred_normal_oct[2];
  115|       |
  116|   123k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 123k, False: 20]
  ------------------
  117|   123k|    const CornerIndex corner_id =
  118|   123k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   123k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   123k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   123k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   123k|                    octahedron_tool_box_.center_value());
  125|   123k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 123k, False: 57]
  ------------------
  126|   123k|      pred_normal_3d = -pred_normal_3d;
  127|   123k|    }
  128|   123k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   123k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   123k|    const int data_offset = data_id * 2;
  132|   123k|    this->transform().ComputeOriginalValue(
  133|   123k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   123k|  }
  135|     20|  flip_normal_bit_decoder_.EndDecoding();
  136|     20|  return true;
  137|     20|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|     20|  void SetQuantizationBits(int q) {
   85|     20|    octahedron_tool_box_.SetQuantizationBits(q);
   86|     20|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|     79|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|     79|            attribute, transform, mesh_data),
   37|     79|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    158|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|     79|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|     79|    DRACO_DCHECK_EQ(i, 0);
   70|     79|    (void)i;
   71|     79|    return GeometryAttribute::POSITION;
   72|     79|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|     79|  bool SetParentAttribute(const PointAttribute *att) override {
   75|     79|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 79]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|     79|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 0, False: 79]
  ------------------
   79|      0|      return false;  // Currently works only for 3 component positions.
   80|      0|    }
   81|     79|    predictor_.SetPositionAttribute(*att);
   82|     79|    return true;
   83|     79|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|     78|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|     78|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 1, False: 77]
  ------------------
  145|      1|    return false;
  146|      1|  }
  147|       |
  148|     77|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|     77|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|     77|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 9, False: 68]
  ------------------
  150|      9|    uint8_t prediction_mode;
  151|      9|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 0, False: 9]
  ------------------
  152|      0|      return false;
  153|      0|    }
  154|      9|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 0, False: 9]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      0|      return false;
  157|      0|    }
  158|       |
  159|      9|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 9]
  ------------------
  160|      9|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|      9|  }
  164|     77|#endif
  165|       |
  166|       |  // Init normal flips.
  167|     77|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 1, False: 76]
  ------------------
  168|      1|    return false;
  169|      1|  }
  170|       |
  171|     76|  return true;
  172|     77|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|     76|                                      const PointIndex *entry_to_point_id_map) {
  103|     76|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|     76|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|     76|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|     76|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|     76|  const int corner_map_size =
  111|     76|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|     76|  VectorD<int32_t, 3> pred_normal_3d;
  114|     76|  int32_t pred_normal_oct[2];
  115|       |
  116|  55.2k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 55.1k, False: 76]
  ------------------
  117|  55.1k|    const CornerIndex corner_id =
  118|  55.1k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|  55.1k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|  55.1k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|  55.1k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|  55.1k|                    octahedron_tool_box_.center_value());
  125|  55.1k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 54.1k, False: 985]
  ------------------
  126|  54.1k|      pred_normal_3d = -pred_normal_3d;
  127|  54.1k|    }
  128|  55.1k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|  55.1k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|  55.1k|    const int data_offset = data_id * 2;
  132|  55.1k|    this->transform().ComputeOriginalValue(
  133|  55.1k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|  55.1k|  }
  135|     76|  flip_normal_bit_decoder_.EndDecoding();
  136|     76|  return true;
  137|     76|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|     76|  void SetQuantizationBits(int q) {
   85|     76|    octahedron_tool_box_.SetQuantizationBits(q);
   86|     76|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    174|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    174|            attribute, transform, mesh_data),
   37|    174|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    348|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    174|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    174|    DRACO_DCHECK_EQ(i, 0);
   70|    174|    (void)i;
   71|    174|    return GeometryAttribute::POSITION;
   72|    174|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    174|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    174|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 174]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    174|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 0, False: 174]
  ------------------
   79|      0|      return false;  // Currently works only for 3 component positions.
   80|      0|    }
   81|    174|    predictor_.SetPositionAttribute(*att);
   82|    174|    return true;
   83|    174|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    174|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    174|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 1, False: 173]
  ------------------
  145|      1|    return false;
  146|      1|  }
  147|       |
  148|    173|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    173|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    173|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 7, False: 166]
  ------------------
  150|      7|    uint8_t prediction_mode;
  151|      7|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 0, False: 7]
  ------------------
  152|      0|      return false;
  153|      0|    }
  154|      7|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 0, False: 7]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      0|      return false;
  157|      0|    }
  158|       |
  159|      7|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 7]
  ------------------
  160|      7|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|      7|  }
  164|    173|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    173|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 4, False: 169]
  ------------------
  168|      4|    return false;
  169|      4|  }
  170|       |
  171|    169|  return true;
  172|    173|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    169|                                      const PointIndex *entry_to_point_id_map) {
  103|    169|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    169|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    169|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    169|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    169|  const int corner_map_size =
  111|    169|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    169|  VectorD<int32_t, 3> pred_normal_3d;
  114|    169|  int32_t pred_normal_oct[2];
  115|       |
  116|  21.6k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 21.4k, False: 169]
  ------------------
  117|  21.4k|    const CornerIndex corner_id =
  118|  21.4k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|  21.4k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|  21.4k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|  21.4k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|  21.4k|                    octahedron_tool_box_.center_value());
  125|  21.4k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 20.4k, False: 1.05k]
  ------------------
  126|  20.4k|      pred_normal_3d = -pred_normal_3d;
  127|  20.4k|    }
  128|  21.4k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|  21.4k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|  21.4k|    const int data_offset = data_id * 2;
  132|  21.4k|    this->transform().ComputeOriginalValue(
  133|  21.4k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|  21.4k|  }
  135|    169|  flip_normal_bit_decoder_.EndDecoding();
  136|    169|  return true;
  137|    169|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    169|  void SetQuantizationBits(int q) {
   85|    169|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    169|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|      9|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|      9|            attribute, transform, mesh_data),
   37|      9|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|     26|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|     26|            attribute, transform, mesh_data),
   37|     26|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|      8|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|      8|            attribute, transform, mesh_data),
   37|      8|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|     21|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|     21|            attribute, transform, mesh_data),
   37|     21|        predictor_(mesh_data) {}

_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|     12|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|     12|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 3, False: 9]
  ------------------
  105|      3|      this->normal_prediction_mode_ = mode;
  106|      3|      return true;
  107|      9|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 9, False: 0]
  ------------------
  108|      9|      this->normal_prediction_mode_ = mode;
  109|      9|      return true;
  110|      9|    }
  111|      0|    return false;
  112|     12|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|     36|                             DataTypeT *prediction) override {
   42|     36|    DRACO_DCHECK(this->IsInitialized());
   43|     36|    typedef typename MeshDataT::CornerTable CornerTable;
   44|     36|    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|     36|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|     36|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|     36|    VectorD<int64_t, 3> normal;
   53|     36|    CornerIndex c_next, c_prev;
   54|    180|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 144, False: 36]
  ------------------
   55|       |      // Getting corners.
   56|    144|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 0, False: 144]
  ------------------
   57|      0|        c_next = corner_table->Next(corner_id);
   58|      0|        c_prev = corner_table->Previous(corner_id);
   59|    144|      } else {
   60|    144|        c_next = corner_table->Next(cit.Corner());
   61|    144|        c_prev = corner_table->Previous(cit.Corner());
   62|    144|      }
   63|    144|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|    144|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|    144|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|    144|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|    144|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|    144|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|    144|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|    144|      normal_data[0] = normal_data[0] + cross_data[0];
   77|    144|      normal_data[1] = normal_data[1] + cross_data[1];
   78|    144|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|    144|      cit.Next();
   81|    144|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|     36|    constexpr int64_t upper_bound = 1 << 29;
   85|     36|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 0, False: 36]
  ------------------
   86|      0|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|      0|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 0, False: 0]
  ------------------
   88|      0|        const int64_t quotient = abs_sum / upper_bound;
   89|      0|        normal = normal / quotient;
   90|      0|      }
   91|     36|    } else {
   92|     36|      const int64_t abs_sum = normal.AbsSum();
   93|     36|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 0, False: 36]
  ------------------
   94|      0|        const int64_t quotient = abs_sum / upper_bound;
   95|      0|        normal = normal / quotient;
   96|      0|      }
   97|     36|    }
   98|     36|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|     36|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|     36|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|     36|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|     36|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|     26|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|     26|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 0, False: 26]
  ------------------
  105|      0|      this->normal_prediction_mode_ = mode;
  106|      0|      return true;
  107|     26|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 26, False: 0]
  ------------------
  108|     26|      this->normal_prediction_mode_ = mode;
  109|     26|      return true;
  110|     26|    }
  111|      0|    return false;
  112|     26|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   178k|                             DataTypeT *prediction) override {
   42|   178k|    DRACO_DCHECK(this->IsInitialized());
   43|   178k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   178k|    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|   178k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   178k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   178k|    VectorD<int64_t, 3> normal;
   53|   178k|    CornerIndex c_next, c_prev;
   54|  1.24M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.07M, False: 178k]
  ------------------
   55|       |      // Getting corners.
   56|  1.07M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 0, False: 1.07M]
  ------------------
   57|      0|        c_next = corner_table->Next(corner_id);
   58|      0|        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|   178k|    constexpr int64_t upper_bound = 1 << 29;
   85|   178k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 0, False: 178k]
  ------------------
   86|      0|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|      0|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 0, False: 0]
  ------------------
   88|      0|        const int64_t quotient = abs_sum / upper_bound;
   89|      0|        normal = normal / quotient;
   90|      0|      }
   91|   178k|    } else {
   92|   178k|      const int64_t abs_sum = normal.AbsSum();
   93|   178k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 159k, False: 19.1k]
  ------------------
   94|   159k|        const int64_t quotient = abs_sum / upper_bound;
   95|   159k|        normal = normal / quotient;
   96|   159k|      }
   97|   178k|    }
   98|   178k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   178k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   178k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   178k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   178k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|      9|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|      9|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 1, False: 8]
  ------------------
  105|      1|      this->normal_prediction_mode_ = mode;
  106|      1|      return true;
  107|      8|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 8, False: 0]
  ------------------
  108|      8|      this->normal_prediction_mode_ = mode;
  109|      8|      return true;
  110|      8|    }
  111|      0|    return false;
  112|      9|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|     21|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|     21|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 0, False: 21]
  ------------------
  105|      0|      this->normal_prediction_mode_ = mode;
  106|      0|      return true;
  107|     21|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 21, False: 0]
  ------------------
  108|     21|      this->normal_prediction_mode_ = mode;
  109|     21|      return true;
  110|     21|    }
  111|      0|    return false;
  112|     21|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   123k|                             DataTypeT *prediction) override {
   42|   123k|    DRACO_DCHECK(this->IsInitialized());
   43|   123k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   123k|    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|   123k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   123k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   123k|    VectorD<int64_t, 3> normal;
   53|   123k|    CornerIndex c_next, c_prev;
   54|   865k|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 741k, False: 123k]
  ------------------
   55|       |      // Getting corners.
   56|   741k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 0, False: 741k]
  ------------------
   57|      0|        c_next = corner_table->Next(corner_id);
   58|      0|        c_prev = corner_table->Previous(corner_id);
   59|   741k|      } else {
   60|   741k|        c_next = corner_table->Next(cit.Corner());
   61|   741k|        c_prev = corner_table->Previous(cit.Corner());
   62|   741k|      }
   63|   741k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   741k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   741k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   741k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   741k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   741k|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|   741k|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|   741k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   741k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   741k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   741k|      cit.Next();
   81|   741k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   123k|    constexpr int64_t upper_bound = 1 << 29;
   85|   123k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 0, False: 123k]
  ------------------
   86|      0|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|      0|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 0, False: 0]
  ------------------
   88|      0|        const int64_t quotient = abs_sum / upper_bound;
   89|      0|        normal = normal / quotient;
   90|      0|      }
   91|   123k|    } else {
   92|   123k|      const int64_t abs_sum = normal.AbsSum();
   93|   123k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 110k, False: 13.2k]
  ------------------
   94|   110k|        const int64_t quotient = abs_sum / upper_bound;
   95|   110k|        normal = normal / quotient;
   96|   110k|      }
   97|   123k|    }
   98|   123k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   123k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   123k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   123k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   123k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|     79|      : Base(md) {
   35|     79|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|     79|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|     88|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|     88|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 9, False: 79]
  ------------------
  105|      9|      this->normal_prediction_mode_ = mode;
  106|      9|      return true;
  107|     79|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 79, False: 0]
  ------------------
  108|     79|      this->normal_prediction_mode_ = mode;
  109|     79|      return true;
  110|     79|    }
  111|      0|    return false;
  112|     88|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|  55.1k|                             DataTypeT *prediction) override {
   42|  55.1k|    DRACO_DCHECK(this->IsInitialized());
   43|  55.1k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|  55.1k|    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|  55.1k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|  55.1k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|  55.1k|    VectorD<int64_t, 3> normal;
   53|  55.1k|    CornerIndex c_next, c_prev;
   54|   117k|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 62.7k, False: 55.1k]
  ------------------
   55|       |      // Getting corners.
   56|  62.7k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 48, False: 62.6k]
  ------------------
   57|     48|        c_next = corner_table->Next(corner_id);
   58|     48|        c_prev = corner_table->Previous(corner_id);
   59|  62.6k|      } else {
   60|  62.6k|        c_next = corner_table->Next(cit.Corner());
   61|  62.6k|        c_prev = corner_table->Previous(cit.Corner());
   62|  62.6k|      }
   63|  62.7k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  62.7k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  62.7k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  62.7k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  62.7k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  62.7k|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  62.7k|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  62.7k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  62.7k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  62.7k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  62.7k|      cit.Next();
   81|  62.7k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|  55.1k|    constexpr int64_t upper_bound = 1 << 29;
   85|  55.1k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 34, False: 55.1k]
  ------------------
   86|     34|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|     34|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 12, False: 22]
  ------------------
   88|     12|        const int64_t quotient = abs_sum / upper_bound;
   89|     12|        normal = normal / quotient;
   90|     12|      }
   91|  55.1k|    } else {
   92|  55.1k|      const int64_t abs_sum = normal.AbsSum();
   93|  55.1k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 1.96k, False: 53.1k]
  ------------------
   94|  1.96k|        const int64_t quotient = abs_sum / upper_bound;
   95|  1.96k|        normal = normal / quotient;
   96|  1.96k|      }
   97|  55.1k|    }
   98|  55.1k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|  55.1k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|  55.1k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|  55.1k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|  55.1k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    174|      : Base(md) {
   35|    174|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    174|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    181|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    181|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 7, False: 174]
  ------------------
  105|      7|      this->normal_prediction_mode_ = mode;
  106|      7|      return true;
  107|    174|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 174, False: 0]
  ------------------
  108|    174|      this->normal_prediction_mode_ = mode;
  109|    174|      return true;
  110|    174|    }
  111|      0|    return false;
  112|    181|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|  21.4k|                             DataTypeT *prediction) override {
   42|  21.4k|    DRACO_DCHECK(this->IsInitialized());
   43|  21.4k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|  21.4k|    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|  21.4k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|  21.4k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|  21.4k|    VectorD<int64_t, 3> normal;
   53|  21.4k|    CornerIndex c_next, c_prev;
   54|   114k|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 93.2k, False: 21.4k]
  ------------------
   55|       |      // Getting corners.
   56|  93.2k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 36, False: 93.1k]
  ------------------
   57|     36|        c_next = corner_table->Next(corner_id);
   58|     36|        c_prev = corner_table->Previous(corner_id);
   59|  93.1k|      } else {
   60|  93.1k|        c_next = corner_table->Next(cit.Corner());
   61|  93.1k|        c_prev = corner_table->Previous(cit.Corner());
   62|  93.1k|      }
   63|  93.2k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  93.2k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  93.2k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  93.2k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  93.2k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  93.2k|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  93.2k|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  93.2k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  93.2k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  93.2k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  93.2k|      cit.Next();
   81|  93.2k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|  21.4k|    constexpr int64_t upper_bound = 1 << 29;
   85|  21.4k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 36, False: 21.4k]
  ------------------
   86|     36|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|     36|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 0, False: 36]
  ------------------
   88|      0|        const int64_t quotient = abs_sum / upper_bound;
   89|      0|        normal = normal / quotient;
   90|      0|      }
   91|  21.4k|    } else {
   92|  21.4k|      const int64_t abs_sum = normal.AbsSum();
   93|  21.4k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 1.41k, False: 20.0k]
  ------------------
   94|  1.41k|        const int64_t quotient = abs_sum / upper_bound;
   95|  1.41k|        normal = normal / quotient;
   96|  1.41k|      }
   97|  21.4k|    }
   98|  21.4k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|  21.4k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|  21.4k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|  21.4k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|  21.4k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|      9|      : Base(md) {
   35|      9|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|      9|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|     26|      : Base(md) {
   35|     26|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|     26|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|      8|      : Base(md) {
   35|      8|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|      8|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|     21|      : Base(md) {
   35|     21|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|     21|  };

_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|    324|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|    324|    DRACO_DCHECK(this->IsInitialized());
   73|    324|    const auto corner_table = mesh_data_.corner_table();
   74|    324|    const auto vert_id = corner_table->Vertex(ci).value();
   75|    324|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|    324|    return GetPositionForDataId(data_id);
   77|    324|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|    324|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|    324|    DRACO_DCHECK(this->IsInitialized());
   65|    324|    const auto point_id = entry_to_point_id_map_[data_id];
   66|    324|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|    324|    VectorD<int64_t, 3> pos;
   68|    324|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|    324|    return pos;
   70|    324|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|      9|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|      9|    pos_attribute_ = &position_attribute;
   43|      9|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|      6|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|      6|    entry_to_point_id_map_ = map;
   46|      6|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.31M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.31M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.31M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.31M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.31M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.31M|    return GetPositionForDataId(data_id);
   77|  2.31M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  2.31M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.31M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.31M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.31M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.31M|    VectorD<int64_t, 3> pos;
   68|  2.31M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.31M|    return pos;
   70|  2.31M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|     26|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|     26|    pos_attribute_ = &position_attribute;
   43|     26|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|     26|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|     26|    entry_to_point_id_map_ = map;
   46|     26|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|      8|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|      8|    pos_attribute_ = &position_attribute;
   43|      8|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  1.60M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  1.60M|    DRACO_DCHECK(this->IsInitialized());
   73|  1.60M|    const auto corner_table = mesh_data_.corner_table();
   74|  1.60M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  1.60M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  1.60M|    return GetPositionForDataId(data_id);
   77|  1.60M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  1.60M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  1.60M|    DRACO_DCHECK(this->IsInitialized());
   65|  1.60M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  1.60M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  1.60M|    VectorD<int64_t, 3> pos;
   68|  1.60M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  1.60M|    return pos;
   70|  1.60M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|     21|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|     21|    pos_attribute_ = &position_attribute;
   43|     21|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|     20|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|     20|    entry_to_point_id_map_ = map;
   46|     20|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|     79|      : pos_attribute_(nullptr),
   36|     79|        entry_to_point_id_map_(nullptr),
   37|     79|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|     79|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|   180k|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|   180k|    DRACO_DCHECK(this->IsInitialized());
   73|   180k|    const auto corner_table = mesh_data_.corner_table();
   74|   180k|    const auto vert_id = corner_table->Vertex(ci).value();
   75|   180k|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|   180k|    return GetPositionForDataId(data_id);
   77|   180k|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|   180k|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|   180k|    DRACO_DCHECK(this->IsInitialized());
   65|   180k|    const auto point_id = entry_to_point_id_map_[data_id];
   66|   180k|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|   180k|    VectorD<int64_t, 3> pos;
   68|   180k|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|   180k|    return pos;
   70|   180k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|     79|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|     79|    pos_attribute_ = &position_attribute;
   43|     79|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|     76|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|     76|    entry_to_point_id_map_ = map;
   46|     76|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    174|      : pos_attribute_(nullptr),
   36|    174|        entry_to_point_id_map_(nullptr),
   37|    174|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    174|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|   207k|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|   207k|    DRACO_DCHECK(this->IsInitialized());
   73|   207k|    const auto corner_table = mesh_data_.corner_table();
   74|   207k|    const auto vert_id = corner_table->Vertex(ci).value();
   75|   207k|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|   207k|    return GetPositionForDataId(data_id);
   77|   207k|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|   207k|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|   207k|    DRACO_DCHECK(this->IsInitialized());
   65|   207k|    const auto point_id = entry_to_point_id_map_[data_id];
   66|   207k|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|   207k|    VectorD<int64_t, 3> pos;
   68|   207k|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|   207k|    return pos;
   70|   207k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    174|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    174|    pos_attribute_ = &position_attribute;
   43|    174|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    169|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    169|    entry_to_point_id_map_ = map;
   46|    169|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|      9|      : pos_attribute_(nullptr),
   36|      9|        entry_to_point_id_map_(nullptr),
   37|      9|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|      9|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|     26|      : pos_attribute_(nullptr),
   36|     26|        entry_to_point_id_map_(nullptr),
   37|     26|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|     26|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|      8|      : pos_attribute_(nullptr),
   36|      8|        entry_to_point_id_map_(nullptr),
   37|      8|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|      8|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|     21|      : pos_attribute_(nullptr),
   36|     21|        entry_to_point_id_map_(nullptr),
   37|     21|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|     21|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}

_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|     11|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|     11|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|      6|                          const PointIndex * /* entry_to_point_id_map */) {
   64|      6|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|      6|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|      6|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|      6|      new DataTypeT[num_components]());
   70|       |
   71|      6|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|      6|  const CornerTable *const table = this->mesh_data().corner_table();
   74|      6|  const std::vector<int32_t> *const vertex_to_data_map =
   75|      6|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|      6|  const int corner_map_size =
   78|      6|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|  24.7k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (79:19): [True: 24.6k, False: 6]
  ------------------
   80|  24.6k|    const CornerIndex start_corner_id =
   81|  24.6k|        this->mesh_data().data_to_corner_map()->at(p);
   82|       |
   83|  24.6k|    CornerIndex corner_id(start_corner_id);
   84|  24.6k|    int num_parallelograms = 0;
   85|   249k|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (85:21): [True: 224k, False: 24.6k]
  ------------------
   86|   224k|      pred_vals[i] = static_cast<DataTypeT>(0);
   87|   224k|    }
   88|  65.7k|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (88:12): [True: 41.0k, False: 24.6k]
  ------------------
   89|  41.0k|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (89:11): [True: 6.71k, False: 34.3k]
  ------------------
   90|  41.0k|              p, corner_id, table, *vertex_to_data_map, out_data,
   91|  41.0k|              num_components, parallelogram_pred_vals.get())) {
   92|  70.0k|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (92:25): [True: 63.3k, False: 6.71k]
  ------------------
   93|  63.3k|          pred_vals[c] =
   94|  63.3k|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   95|  63.3k|        }
   96|  6.71k|        ++num_parallelograms;
   97|  6.71k|      }
   98|       |
   99|       |      // Proceed to the next corner attached to the vertex.
  100|  41.0k|      corner_id = table->SwingRight(corner_id);
  101|  41.0k|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (101:11): [True: 3.12k, False: 37.9k]
  ------------------
  102|  3.12k|        corner_id = kInvalidCornerIndex;
  103|  3.12k|      }
  104|  41.0k|    }
  105|       |
  106|  24.6k|    const int dst_offset = p * num_components;
  107|  24.6k|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (107:9): [True: 21.0k, False: 3.61k]
  ------------------
  108|       |      // No parallelogram was valid.
  109|       |      // We use the last decoded point as a reference.
  110|  21.0k|      const int src_offset = (p - 1) * num_components;
  111|  21.0k|      this->transform().ComputeOriginalValue(
  112|  21.0k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  113|  21.0k|    } else {
  114|       |      // Compute the correction from the predicted value.
  115|  38.1k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (115:23): [True: 34.4k, False: 3.61k]
  ------------------
  116|  34.4k|        pred_vals[c] /= num_parallelograms;
  117|  34.4k|      }
  118|  3.61k|      this->transform().ComputeOriginalValue(
  119|  3.61k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  120|  3.61k|    }
  121|  24.6k|  }
  122|      6|  return true;
  123|      6|}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|     63|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|     63|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|     52|                          const PointIndex * /* entry_to_point_id_map */) {
   64|     52|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|     52|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|     52|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|     52|      new DataTypeT[num_components]());
   70|       |
   71|     52|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|     52|  const CornerTable *const table = this->mesh_data().corner_table();
   74|     52|  const std::vector<int32_t> *const vertex_to_data_map =
   75|     52|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|     52|  const int corner_map_size =
   78|     52|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|   309k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (79:19): [True: 309k, False: 52]
  ------------------
   80|   309k|    const CornerIndex start_corner_id =
   81|   309k|        this->mesh_data().data_to_corner_map()->at(p);
   82|       |
   83|   309k|    CornerIndex corner_id(start_corner_id);
   84|   309k|    int num_parallelograms = 0;
   85|  1.26M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (85:21): [True: 954k, False: 309k]
  ------------------
   86|   954k|      pred_vals[i] = static_cast<DataTypeT>(0);
   87|   954k|    }
   88|  2.16M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (88:12): [True: 1.85M, False: 309k]
  ------------------
   89|  1.85M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (89:11): [True: 597k, False: 1.25M]
  ------------------
   90|  1.85M|              p, corner_id, table, *vertex_to_data_map, out_data,
   91|  1.85M|              num_components, parallelogram_pred_vals.get())) {
   92|  2.43M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (92:25): [True: 1.83M, False: 597k]
  ------------------
   93|  1.83M|          pred_vals[c] =
   94|  1.83M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   95|  1.83M|        }
   96|   597k|        ++num_parallelograms;
   97|   597k|      }
   98|       |
   99|       |      // Proceed to the next corner attached to the vertex.
  100|  1.85M|      corner_id = table->SwingRight(corner_id);
  101|  1.85M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (101:11): [True: 309k, False: 1.54M]
  ------------------
  102|   309k|        corner_id = kInvalidCornerIndex;
  103|   309k|      }
  104|  1.85M|    }
  105|       |
  106|   309k|    const int dst_offset = p * num_components;
  107|   309k|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (107:9): [True: 239, False: 308k]
  ------------------
  108|       |      // No parallelogram was valid.
  109|       |      // We use the last decoded point as a reference.
  110|    239|      const int src_offset = (p - 1) * num_components;
  111|    239|      this->transform().ComputeOriginalValue(
  112|    239|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  113|   308k|    } else {
  114|       |      // Compute the correction from the predicted value.
  115|  1.26M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (115:23): [True: 953k, False: 308k]
  ------------------
  116|   953k|        pred_vals[c] /= num_parallelograms;
  117|   953k|      }
  118|   308k|      this->transform().ComputeOriginalValue(
  119|   308k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  120|   308k|    }
  121|   309k|  }
  122|     52|  return true;
  123|     52|}

_ZN5draco40MeshPredictionSchemeParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   40|     43|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   41|     43|            attribute, transform, mesh_data) {}
_ZN5draco40MeshPredictionSchemeParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   60|     42|                          const PointIndex * /* entry_to_point_id_map */) {
   61|     42|  this->transform().Init(num_components);
   62|       |
   63|     42|  const CornerTable *const table = this->mesh_data().corner_table();
   64|     42|  const std::vector<int32_t> *const vertex_to_data_map =
   65|     42|      this->mesh_data().vertex_to_data_map();
   66|       |
   67|       |  // For storage of prediction values (already initialized to zero).
   68|     42|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   69|       |
   70|       |  // Restore the first value.
   71|     42|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|     42|  const int corner_map_size =
   74|     42|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   75|  4.70k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (75:19): [True: 4.66k, False: 42]
  ------------------
   76|  4.66k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
   77|  4.66k|    const int dst_offset = p * num_components;
   78|  4.66k|    if (!ComputeParallelogramPrediction(p, corner_id, table,
  ------------------
  |  Branch (78:9): [True: 3.99k, False: 671]
  ------------------
   79|  4.66k|                                        *vertex_to_data_map, out_data,
   80|  4.66k|                                        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|  3.99k|      const int src_offset = (p - 1) * num_components;
   85|  3.99k|      this->transform().ComputeOriginalValue(
   86|  3.99k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
   87|  3.99k|    } else {
   88|       |      // Apply the parallelogram prediction.
   89|    671|      this->transform().ComputeOriginalValue(
   90|    671|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
   91|    671|    }
   92|  4.66k|  }
   93|     42|  return true;
   94|     42|}
_ZN5draco40MeshPredictionSchemeParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   40|     34|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   41|     34|            attribute, transform, mesh_data) {}
_ZN5draco40MeshPredictionSchemeParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   60|     30|                          const PointIndex * /* entry_to_point_id_map */) {
   61|     30|  this->transform().Init(num_components);
   62|       |
   63|     30|  const CornerTable *const table = this->mesh_data().corner_table();
   64|     30|  const std::vector<int32_t> *const vertex_to_data_map =
   65|     30|      this->mesh_data().vertex_to_data_map();
   66|       |
   67|       |  // For storage of prediction values (already initialized to zero).
   68|     30|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   69|       |
   70|       |  // Restore the first value.
   71|     30|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|     30|  const int corner_map_size =
   74|     30|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   75|  15.1k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (75:19): [True: 15.1k, False: 30]
  ------------------
   76|  15.1k|    const CornerIndex corner_id = this->mesh_data().data_to_corner_map()->at(p);
   77|  15.1k|    const int dst_offset = p * num_components;
   78|  15.1k|    if (!ComputeParallelogramPrediction(p, corner_id, table,
  ------------------
  |  Branch (78:9): [True: 99, False: 15.0k]
  ------------------
   79|  15.1k|                                        *vertex_to_data_map, out_data,
   80|  15.1k|                                        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|     99|      const int src_offset = (p - 1) * num_components;
   85|     99|      this->transform().ComputeOriginalValue(
   86|     99|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
   87|  15.0k|    } else {
   88|       |      // Apply the parallelogram prediction.
   89|  15.0k|      this->transform().ComputeOriginalValue(
   90|  15.0k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
   91|  15.0k|    }
   92|  15.1k|  }
   93|     30|  return true;
   94|     30|}

_ZN5draco30ComputeParallelogramPredictionINS_24MeshAttributeCornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  51.0k|    int num_components, DataTypeT *out_prediction) {
   49|  51.0k|  const CornerIndex oci = table->Opposite(ci);
   50|  51.0k|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 28.9k, False: 22.1k]
  ------------------
   51|  28.9k|    return false;
   52|  28.9k|  }
   53|  22.1k|  int vert_opp, vert_next, vert_prev;
   54|  22.1k|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  22.1k|                                        &vert_opp, &vert_next, &vert_prev);
   56|  22.1k|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 11.1k, False: 11.0k]
  |  Branch (56:35): [True: 8.47k, False: 2.68k]
  ------------------
   57|  8.47k|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 7.92k, False: 547]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|  7.92k|    const int v_opp_off = vert_opp * num_components;
   60|  7.92k|    const int v_next_off = vert_next * num_components;
   61|  7.92k|    const int v_prev_off = vert_prev * num_components;
   62|  76.6k|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 68.7k, False: 7.92k]
  ------------------
   63|  68.7k|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  68.7k|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  68.7k|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  68.7k|      const int64_t result =
   67|  68.7k|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  68.7k|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  68.7k|    }
   71|  7.92k|    return true;
   72|  7.92k|  }
   73|  14.2k|  return false;  // Not all data is available for prediction
   74|  22.1k|}
_ZN5draco23GetParallelogramEntriesINS_24MeshAttributeCornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  22.1k|    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|  22.1k|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  22.1k|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  22.1k|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  22.1k|}
_ZN5draco30ComputeParallelogramPredictionINS_11CornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  1.87M|    int num_components, DataTypeT *out_prediction) {
   49|  1.87M|  const CornerIndex oci = table->Opposite(ci);
   50|  1.87M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 1.92k, False: 1.87M]
  ------------------
   51|  1.92k|    return false;
   52|  1.92k|  }
   53|  1.87M|  int vert_opp, vert_next, vert_prev;
   54|  1.87M|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  1.87M|                                        &vert_opp, &vert_next, &vert_prev);
   56|  1.87M|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 943k, False: 933k]
  |  Branch (56:35): [True: 668k, False: 275k]
  ------------------
   57|   668k|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 613k, False: 54.5k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|   613k|    const int v_opp_off = vert_opp * num_components;
   60|   613k|    const int v_next_off = vert_next * num_components;
   61|   613k|    const int v_prev_off = vert_prev * num_components;
   62|  3.17M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 2.56M, False: 613k]
  ------------------
   63|  2.56M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  2.56M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  2.56M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  2.56M|      const int64_t result =
   67|  2.56M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  2.56M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  2.56M|    }
   71|   613k|    return true;
   72|   613k|  }
   73|  1.26M|  return false;  // Not all data is available for prediction
   74|  1.87M|}
_ZN5draco23GetParallelogramEntriesINS_11CornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  1.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|  1.87M|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  1.87M|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  1.87M|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  1.87M|}

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

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

_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS3_:
   38|     31|      : pos_attribute_(nullptr),
   39|     31|        entry_to_point_id_map_(nullptr),
   40|     31|        mesh_data_(md) {}
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|     31|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|     31|    pos_attribute_ = &position_attribute;
   43|     31|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18ResizeOrientationsEi:
   73|     30|  void ResizeOrientations(int num_orientations) {
   74|     30|    orientations_.resize(num_orientations);
   75|     30|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE15set_orientationEib:
   71|   330M|  void set_orientation(int i, bool v) { orientations_[i] = v; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|     26|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|     26|    entry_to_point_id_map_ = map;
   46|     26|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueILb0EEEbNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
   93|  2.15k|                                                 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|  2.15k|  const CornerIndex next_corner_id = mesh_data_.corner_table()->Next(corner_id);
   98|  2.15k|  const CornerIndex prev_corner_id =
   99|  2.15k|      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|  2.15k|  int next_data_id, prev_data_id;
  103|       |
  104|  2.15k|  int next_vert_id, prev_vert_id;
  105|  2.15k|  next_vert_id = mesh_data_.corner_table()->Vertex(next_corner_id).value();
  106|  2.15k|  prev_vert_id = mesh_data_.corner_table()->Vertex(prev_corner_id).value();
  107|       |
  108|  2.15k|  next_data_id = mesh_data_.vertex_to_data_map()->at(next_vert_id);
  109|  2.15k|  prev_data_id = mesh_data_.vertex_to_data_map()->at(prev_vert_id);
  110|       |
  111|  2.15k|  typedef VectorD<int64_t, 2> Vec2;
  112|  2.15k|  typedef VectorD<int64_t, 3> Vec3;
  113|  2.15k|  typedef VectorD<uint64_t, 2> Vec2u;
  114|       |
  115|  2.15k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (115:7): [True: 1.51k, False: 637]
  |  Branch (115:33): [True: 875, False: 638]
  ------------------
  116|       |    // Both other corners have available UV coordinates for prediction.
  117|    875|    const Vec2 n_uv = GetTexCoordForEntryId(next_data_id, data);
  118|    875|    const Vec2 p_uv = GetTexCoordForEntryId(prev_data_id, data);
  119|    875|    if (p_uv == n_uv) {
  ------------------
  |  Branch (119:9): [True: 103, False: 772]
  ------------------
  120|       |      // We cannot do a reliable prediction on degenerated UV triangles.
  121|    103|      predicted_value_[0] = p_uv[0];
  122|    103|      predicted_value_[1] = p_uv[1];
  123|    103|      return true;
  124|    103|    }
  125|       |
  126|       |    // Get positions at all corners.
  127|    772|    const Vec3 tip_pos = GetPositionForEntryId(data_id);
  128|    772|    const Vec3 next_pos = GetPositionForEntryId(next_data_id);
  129|    772|    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|    772|    const Vec3 pn = prev_pos - next_pos;
  146|    772|    const uint64_t pn_norm2_squared = pn.SquaredNorm();
  147|    772|    if (pn_norm2_squared != 0) {
  ------------------
  |  Branch (147:9): [True: 723, False: 49]
  ------------------
  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|    723|      const Vec3 cn = tip_pos - next_pos;
  153|    723|      const int64_t cn_dot_pn = pn.Dot(cn);
  154|       |
  155|    723|      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|    723|      const int64_t n_uv_absmax_element =
  164|    723|          std::max(std::abs(n_uv[0]), std::abs(n_uv[1]));
  165|    723|      if (n_uv_absmax_element >
  ------------------
  |  Branch (165:11): [True: 2, False: 721]
  ------------------
  166|    723|          std::numeric_limits<int64_t>::max() / pn_norm2_squared) {
  167|       |        // Return false if the below multiplication would overflow.
  168|      2|        return false;
  169|      2|      }
  170|    721|      const int64_t pn_uv_absmax_element =
  171|    721|          std::max(std::abs(pn_uv[0]), std::abs(pn_uv[1]));
  172|    721|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (172:11): [True: 6, False: 715]
  ------------------
  173|    721|          std::numeric_limits<int64_t>::max() / pn_uv_absmax_element) {
  174|       |        // Return false if squared length calculation would overflow.
  175|      6|        return false;
  176|      6|      }
  177|    715|      const Vec2 x_uv = n_uv * pn_norm2_squared + (cn_dot_pn * pn_uv);
  178|    715|      const int64_t pn_absmax_element =
  179|    715|          std::max(std::max(std::abs(pn[0]), std::abs(pn[1])), std::abs(pn[2]));
  180|    715|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (180:11): [True: 0, False: 715]
  ------------------
  181|    715|          std::numeric_limits<int64_t>::max() / pn_absmax_element) {
  182|       |        // Return false if squared length calculation would overflow.
  183|      0|        return false;
  184|      0|      }
  185|       |
  186|       |      // Compute squared length of vector CX in position coordinate system:
  187|    715|      const Vec3 x_pos = next_pos + (cn_dot_pn * pn) / pn_norm2_squared;
  188|    715|      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|    715|      Vec2 cx_uv(pn_uv[1], -pn_uv[0]);  // Rotated PN_UV.
  205|       |      // Compute CX.Norm2() * PN.Norm2()
  206|    715|      const uint64_t norm_squared =
  207|    715|          IntSqrt(cx_norm2_squared * pn_norm2_squared);
  208|       |      // Final cx_uv in the scaled coordinate space.
  209|    715|      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|    715|      Vec2 predicted_uv;
  214|    715|      if (is_encoder_t) {
  ------------------
  |  Branch (214:11): [Folded, False: 715]
  ------------------
  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|    715|      } else {
  231|       |        // When decoding the data, we already know which orientation to use.
  232|    715|        if (orientations_.empty()) {
  ------------------
  |  Branch (232:13): [True: 0, False: 715]
  ------------------
  233|      0|          return false;
  234|      0|        }
  235|    715|        const bool orientation = orientations_.back();
  236|    715|        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|    715|        if (orientation) {
  ------------------
  |  Branch (239:13): [True: 121, False: 594]
  ------------------
  240|    121|          predicted_uv = Vec2(Vec2u(x_uv) + Vec2u(cx_uv)) / pn_norm2_squared;
  241|    594|        } else {
  242|    594|          predicted_uv = Vec2(Vec2u(x_uv) - Vec2u(cx_uv)) / pn_norm2_squared;
  243|    594|        }
  244|    715|      }
  245|    715|      predicted_value_[0] = static_cast<int>(predicted_uv[0]);
  246|    715|      predicted_value_[1] = static_cast<int>(predicted_uv[1]);
  247|    715|      return true;
  248|    715|    }
  249|    772|  }
  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|  1.32k|  int data_offset = 0;
  254|  1.32k|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (254:7): [True: 687, False: 637]
  ------------------
  255|       |    // Use the value on the previous corner as the prediction.
  256|    687|    data_offset = prev_data_id * kNumComponents;
  257|    687|  }
  258|  1.32k|  if (next_data_id < data_id) {
  ------------------
  |  Branch (258:7): [True: 49, False: 1.27k]
  ------------------
  259|       |    // Use the value on the next corner as the prediction.
  260|     49|    data_offset = next_data_id * kNumComponents;
  261|  1.27k|  } else {
  262|       |    // None of the other corners have a valid value. Use the last encoded value
  263|       |    // as the prediction if possible.
  264|  1.27k|    if (data_id > 0) {
  ------------------
  |  Branch (264:9): [True: 1.24k, False: 26]
  ------------------
  265|  1.24k|      data_offset = (data_id - 1) * kNumComponents;
  266|  1.24k|    } else {
  267|       |      // We are encoding the first value. Predict 0.
  268|     78|      for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (268:23): [True: 52, False: 26]
  ------------------
  269|     52|        predicted_value_[i] = 0;
  270|     52|      }
  271|     26|      return true;
  272|     26|    }
  273|  1.27k|  }
  274|  3.89k|  for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (274:19): [True: 2.59k, False: 1.29k]
  ------------------
  275|  2.59k|    predicted_value_[i] = data[data_offset + i];
  276|  2.59k|  }
  277|  1.29k|  return true;
  278|  1.32k|}
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetTexCoordForEntryIdEiPKi:
   58|  1.75k|                                            const DataTypeT *data) const {
   59|  1.75k|    const int data_offset = entry_id * kNumComponents;
   60|  1.75k|    return VectorD<int64_t, 2>(data[data_offset], data[data_offset + 1]);
   61|  1.75k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetPositionForEntryIdEi:
   49|  2.31k|  VectorD<int64_t, 3> GetPositionForEntryId(int entry_id) const {
   50|  2.31k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   51|  2.31k|    VectorD<int64_t, 3> pos;
   52|  2.31k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   53|  2.31k|                                 &pos[0]);
   54|  2.31k|    return pos;
   55|  2.31k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE15predicted_valueEv:
   69|  2.14k|  const DataTypeT *predicted_value() const { return predicted_value_; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS3_:
   38|      5|      : pos_attribute_(nullptr),
   39|      5|        entry_to_point_id_map_(nullptr),
   40|      5|        mesh_data_(md) {}
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|      5|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|      5|    pos_attribute_ = &position_attribute;
   43|      5|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18ResizeOrientationsEi:
   73|      5|  void ResizeOrientations(int num_orientations) {
   74|      5|    orientations_.resize(num_orientations);
   75|      5|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE15set_orientationEib:
   71|  59.4M|  void set_orientation(int i, bool v) { orientations_[i] = v; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|      3|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|      3|    entry_to_point_id_map_ = map;
   46|      3|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueILb0EEEbNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
   93|     13|                                                 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|     13|  const CornerIndex next_corner_id = mesh_data_.corner_table()->Next(corner_id);
   98|     13|  const CornerIndex prev_corner_id =
   99|     13|      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|     13|  int next_data_id, prev_data_id;
  103|       |
  104|     13|  int next_vert_id, prev_vert_id;
  105|     13|  next_vert_id = mesh_data_.corner_table()->Vertex(next_corner_id).value();
  106|     13|  prev_vert_id = mesh_data_.corner_table()->Vertex(prev_corner_id).value();
  107|       |
  108|     13|  next_data_id = mesh_data_.vertex_to_data_map()->at(next_vert_id);
  109|     13|  prev_data_id = mesh_data_.vertex_to_data_map()->at(prev_vert_id);
  110|       |
  111|     13|  typedef VectorD<int64_t, 2> Vec2;
  112|     13|  typedef VectorD<int64_t, 3> Vec3;
  113|     13|  typedef VectorD<uint64_t, 2> Vec2u;
  114|       |
  115|     13|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (115:7): [True: 10, False: 3]
  |  Branch (115:33): [True: 7, False: 3]
  ------------------
  116|       |    // Both other corners have available UV coordinates for prediction.
  117|      7|    const Vec2 n_uv = GetTexCoordForEntryId(next_data_id, data);
  118|      7|    const Vec2 p_uv = GetTexCoordForEntryId(prev_data_id, data);
  119|      7|    if (p_uv == n_uv) {
  ------------------
  |  Branch (119:9): [True: 0, False: 7]
  ------------------
  120|       |      // We cannot do a reliable prediction on degenerated UV triangles.
  121|      0|      predicted_value_[0] = p_uv[0];
  122|      0|      predicted_value_[1] = p_uv[1];
  123|      0|      return true;
  124|      0|    }
  125|       |
  126|       |    // Get positions at all corners.
  127|      7|    const Vec3 tip_pos = GetPositionForEntryId(data_id);
  128|      7|    const Vec3 next_pos = GetPositionForEntryId(next_data_id);
  129|      7|    const Vec3 prev_pos = GetPositionForEntryId(prev_data_id);
  130|       |    // We use the positions of the above triangle to predict the texture
  131|       |    // coordinate on the tip corner C.
  132|       |    // To convert the triangle into the UV coordinate system we first compute
  133|       |    // position X on the vector |prev_pos - next_pos| that is the projection of
  134|       |    // point C onto vector |prev_pos - next_pos|:
  135|       |    //
  136|       |    //              C
  137|       |    //             /.  \
  138|       |    //            / .     \
  139|       |    //           /  .        \
  140|       |    //          N---X----------P
  141|       |    //
  142|       |    // Where next_pos is point (N), prev_pos is point (P) and tip_pos is the
  143|       |    // position of predicted coordinate (C).
  144|       |    //
  145|      7|    const Vec3 pn = prev_pos - next_pos;
  146|      7|    const uint64_t pn_norm2_squared = pn.SquaredNorm();
  147|      7|    if (pn_norm2_squared != 0) {
  ------------------
  |  Branch (147:9): [True: 7, False: 0]
  ------------------
  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|      7|      const Vec3 cn = tip_pos - next_pos;
  153|      7|      const int64_t cn_dot_pn = pn.Dot(cn);
  154|       |
  155|      7|      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|      7|      const int64_t n_uv_absmax_element =
  164|      7|          std::max(std::abs(n_uv[0]), std::abs(n_uv[1]));
  165|      7|      if (n_uv_absmax_element >
  ------------------
  |  Branch (165:11): [True: 0, False: 7]
  ------------------
  166|      7|          std::numeric_limits<int64_t>::max() / pn_norm2_squared) {
  167|       |        // Return false if the below multiplication would overflow.
  168|      0|        return false;
  169|      0|      }
  170|      7|      const int64_t pn_uv_absmax_element =
  171|      7|          std::max(std::abs(pn_uv[0]), std::abs(pn_uv[1]));
  172|      7|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (172:11): [True: 0, False: 7]
  ------------------
  173|      7|          std::numeric_limits<int64_t>::max() / pn_uv_absmax_element) {
  174|       |        // Return false if squared length calculation would overflow.
  175|      0|        return false;
  176|      0|      }
  177|      7|      const Vec2 x_uv = n_uv * pn_norm2_squared + (cn_dot_pn * pn_uv);
  178|      7|      const int64_t pn_absmax_element =
  179|      7|          std::max(std::max(std::abs(pn[0]), std::abs(pn[1])), std::abs(pn[2]));
  180|      7|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (180:11): [True: 0, False: 7]
  ------------------
  181|      7|          std::numeric_limits<int64_t>::max() / pn_absmax_element) {
  182|       |        // Return false if squared length calculation would overflow.
  183|      0|        return false;
  184|      0|      }
  185|       |
  186|       |      // Compute squared length of vector CX in position coordinate system:
  187|      7|      const Vec3 x_pos = next_pos + (cn_dot_pn * pn) / pn_norm2_squared;
  188|      7|      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|      7|      Vec2 cx_uv(pn_uv[1], -pn_uv[0]);  // Rotated PN_UV.
  205|       |      // Compute CX.Norm2() * PN.Norm2()
  206|      7|      const uint64_t norm_squared =
  207|      7|          IntSqrt(cx_norm2_squared * pn_norm2_squared);
  208|       |      // Final cx_uv in the scaled coordinate space.
  209|      7|      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|      7|      Vec2 predicted_uv;
  214|      7|      if (is_encoder_t) {
  ------------------
  |  Branch (214:11): [Folded, False: 7]
  ------------------
  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|      7|      } else {
  231|       |        // When decoding the data, we already know which orientation to use.
  232|      7|        if (orientations_.empty()) {
  ------------------
  |  Branch (232:13): [True: 0, False: 7]
  ------------------
  233|      0|          return false;
  234|      0|        }
  235|      7|        const bool orientation = orientations_.back();
  236|      7|        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|      7|        if (orientation) {
  ------------------
  |  Branch (239:13): [True: 4, False: 3]
  ------------------
  240|      4|          predicted_uv = Vec2(Vec2u(x_uv) + Vec2u(cx_uv)) / pn_norm2_squared;
  241|      4|        } else {
  242|      3|          predicted_uv = Vec2(Vec2u(x_uv) - Vec2u(cx_uv)) / pn_norm2_squared;
  243|      3|        }
  244|      7|      }
  245|      7|      predicted_value_[0] = static_cast<int>(predicted_uv[0]);
  246|      7|      predicted_value_[1] = static_cast<int>(predicted_uv[1]);
  247|      7|      return true;
  248|      7|    }
  249|      7|  }
  250|       |  // Else we don't have available textures on both corners or the position data
  251|       |  // is invalid. For such cases we can't use positions for predicting the uv
  252|       |  // value and we resort to delta coding.
  253|      6|  int data_offset = 0;
  254|      6|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (254:7): [True: 3, False: 3]
  ------------------
  255|       |    // Use the value on the previous corner as the prediction.
  256|      3|    data_offset = prev_data_id * kNumComponents;
  257|      3|  }
  258|      6|  if (next_data_id < data_id) {
  ------------------
  |  Branch (258:7): [True: 0, False: 6]
  ------------------
  259|       |    // Use the value on the next corner as the prediction.
  260|      0|    data_offset = next_data_id * kNumComponents;
  261|      6|  } else {
  262|       |    // None of the other corners have a valid value. Use the last encoded value
  263|       |    // as the prediction if possible.
  264|      6|    if (data_id > 0) {
  ------------------
  |  Branch (264:9): [True: 3, False: 3]
  ------------------
  265|      3|      data_offset = (data_id - 1) * kNumComponents;
  266|      3|    } else {
  267|       |      // We are encoding the first value. Predict 0.
  268|      9|      for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (268:23): [True: 6, False: 3]
  ------------------
  269|      6|        predicted_value_[i] = 0;
  270|      6|      }
  271|      3|      return true;
  272|      3|    }
  273|      6|  }
  274|      9|  for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (274:19): [True: 6, False: 3]
  ------------------
  275|      6|    predicted_value_[i] = data[data_offset + i];
  276|      6|  }
  277|      3|  return true;
  278|      6|}
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetTexCoordForEntryIdEiPKi:
   58|     14|                                            const DataTypeT *data) const {
   59|     14|    const int data_offset = entry_id * kNumComponents;
   60|     14|    return VectorD<int64_t, 2>(data[data_offset], data[data_offset + 1]);
   61|     14|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetPositionForEntryIdEi:
   49|     21|  VectorD<int64_t, 3> GetPositionForEntryId(int entry_id) const {
   50|     21|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   51|     21|    VectorD<int64_t, 3> pos;
   52|     21|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   53|     21|                                 &pos[0]);
   54|     21|    return pos;
   55|     21|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE15predicted_valueEv:
   69|     13|  const DataTypeT *predicted_value() const { return predicted_value_; }

_ZNK5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|     20|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|     55|  bool AreCorrectionsPositive() override {
   71|     55|    return transform_.AreCorrectionsPositive();
   72|     55|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|     20|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|     20|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 8, False: 12]
  ------------------
   50|      8|      return false;
   51|      8|    }
   52|     12|    return true;
   53|     20|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE9transformEv:
   81|   189k|  inline Transform &transform() { return transform_; }
_ZNK5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|     13|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|     42|  bool AreCorrectionsPositive() override {
   71|     42|    return transform_.AreCorrectionsPositive();
   72|     42|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|     13|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|     13|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 6, False: 7]
  ------------------
   50|      6|      return false;
   51|      6|    }
   52|      7|    return true;
   53|     13|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE9transformEv:
   81|   148k|  inline Transform &transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    593|      : attribute_(attribute), transform_(transform) {}
_ZNK5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22GetNumParentAttributesEv:
   58|    287|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22AreCorrectionsPositiveEv:
   70|    558|  bool AreCorrectionsPositive() override {
   71|    558|    return transform_.AreCorrectionsPositive();
   72|    558|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    280|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|    280|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 27, False: 253]
  ------------------
   50|     27|      return false;
   51|     27|    }
   52|    253|    return true;
   53|    280|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE9transformEv:
   81|   549k|  inline Transform &transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|     55|      : attribute_(attribute), transform_(transform) {}
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|     42|      : attribute_(attribute), transform_(transform) {}

_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|     55|                                 const PointCloudDecoder *decoder) {
  188|     55|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|     55|      method, att_id, decoder, TransformT());
  190|     55|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|     55|                                 const TransformT &transform) {
  156|     55|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 55]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|     55|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|     55|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 48, False: 7]
  ------------------
  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|     48|    const MeshDecoder *const mesh_decoder =
  167|     48|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|     48|    auto ret = CreateMeshPredictionScheme<
  170|     48|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|     48|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|     48|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|     48|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 35, False: 13]
  ------------------
  174|     35|      return ret;
  175|     35|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|     48|  }
  178|       |  // Create delta decoder.
  179|     20|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|     20|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|     55|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|      9|      uint16_t bitstream_version) {
  143|      9|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|      9|        method, attribute, transform, mesh_data, bitstream_version);
  145|      9|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|      9|        uint16_t bitstream_version) {
  127|      9|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 9, False: 0]
  ------------------
  128|      9|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|      9|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|      9|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|      9|                                                  mesh_data));
  132|      9|      }
  133|      0|      return nullptr;
  134|      9|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|     27|      uint16_t bitstream_version) {
  143|     27|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|     27|        method, attribute, transform, mesh_data, bitstream_version);
  145|     27|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|     27|        uint16_t bitstream_version) {
  127|     27|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 26, False: 1]
  ------------------
  128|     26|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|     26|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|     26|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|     26|                                                  mesh_data));
  132|     26|      }
  133|      1|      return nullptr;
  134|     27|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|     42|                                 const PointCloudDecoder *decoder) {
  188|     42|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|     42|      method, att_id, decoder, TransformT());
  190|     42|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|     42|                                 const TransformT &transform) {
  156|     42|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 42]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|     42|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|     42|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 42, False: 0]
  ------------------
  161|       |    // Cast the decoder to mesh decoder. This is not necessarily safe if there
  162|       |    // is some other decoder decides to use TRIANGULAR_MESH as the return type,
  163|       |    // but unfortunately there is not nice work around for this without using
  164|       |    // RTTI (double dispatch and similar concepts will not work because of the
  165|       |    // template nature of the prediction schemes).
  166|     42|    const MeshDecoder *const mesh_decoder =
  167|     42|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|     42|    auto ret = CreateMeshPredictionScheme<
  170|     42|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|     42|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|     42|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|     42|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 29, False: 13]
  ------------------
  174|     29|      return ret;
  175|     29|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|     42|  }
  178|       |  // Create delta decoder.
  179|     13|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|     13|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|     42|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|     10|      uint16_t bitstream_version) {
  143|     10|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|     10|        method, attribute, transform, mesh_data, bitstream_version);
  145|     10|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|     10|        uint16_t bitstream_version) {
  111|     10|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 8, False: 2]
  ------------------
  112|      8|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|      8|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|      8|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|      8|                                                  mesh_data));
  116|      8|      }
  117|      2|      return nullptr;
  118|     10|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|     22|      uint16_t bitstream_version) {
  143|     22|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|     22|        method, attribute, transform, mesh_data, bitstream_version);
  145|     22|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|     22|        uint16_t bitstream_version) {
  111|     22|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 21, False: 1]
  ------------------
  112|     21|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|     21|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|     21|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|     21|                                                  mesh_data));
  116|     21|      }
  117|      1|      return nullptr;
  118|     22|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    593|                                 const PointCloudDecoder *decoder) {
  188|    593|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    593|      method, att_id, decoder, TransformT());
  190|    593|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    593|                                 const TransformT &transform) {
  156|    593|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 593]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    593|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|    593|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 593, False: 0]
  ------------------
  161|       |    // Cast the decoder to mesh decoder. This is not necessarily safe if there
  162|       |    // is some other decoder decides to use TRIANGULAR_MESH as the return type,
  163|       |    // but unfortunately there is not nice work around for this without using
  164|       |    // RTTI (double dispatch and similar concepts will not work because of the
  165|       |    // template nature of the prediction schemes).
  166|    593|    const MeshDecoder *const mesh_decoder =
  167|    593|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|    593|    auto ret = CreateMeshPredictionScheme<
  170|    593|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    593|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    593|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    593|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 575, False: 18]
  ------------------
  174|    575|      return ret;
  175|    575|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    593|  }
  178|       |  // Create delta decoder.
  179|     18|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|     18|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    593|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    231|      uint16_t bitstream_version) {
  143|    231|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    231|        method, attribute, transform, mesh_data, bitstream_version);
  145|    231|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|    231|        uint16_t bitstream_version) {
   53|    231|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 43, False: 188]
  ------------------
   54|     43|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|     43|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|     43|                                                         MeshDataT>(
   57|     43|                attribute, transform, mesh_data));
   58|     43|      }
   59|    188|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|    188|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 11, False: 177]
  ------------------
   61|     11|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|     11|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|     11|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|     11|                                                  mesh_data));
   65|     11|      }
   66|    177|#endif
   67|    177|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 55, False: 122]
  ------------------
   68|     55|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|     55|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|     55|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|     55|                                                  mesh_data));
   72|     55|      }
   73|    122|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|    122|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 12, False: 110]
  ------------------
   75|     12|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|     12|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|     12|                                                     MeshDataT>(
   78|     12|                attribute, transform, mesh_data, bitstream_version));
   79|     12|      }
   80|    110|#endif
   81|    110|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 31, False: 79]
  ------------------
   82|     31|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|     31|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|     31|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|     31|                                                  mesh_data));
   86|     31|      }
   87|     79|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|     79|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 79, False: 0]
  ------------------
   89|     79|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|     79|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|     79|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|     79|                                                  mesh_data));
   93|     79|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|    231|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    344|      uint16_t bitstream_version) {
  143|    344|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    344|        method, attribute, transform, mesh_data, bitstream_version);
  145|    344|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|    344|        uint16_t bitstream_version) {
   53|    344|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 34, False: 310]
  ------------------
   54|     34|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|     34|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|     34|                                                         MeshDataT>(
   57|     34|                attribute, transform, mesh_data));
   58|     34|      }
   59|    310|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|    310|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 63, False: 247]
  ------------------
   61|     63|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|     63|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|     63|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|     63|                                                  mesh_data));
   65|     63|      }
   66|    247|#endif
   67|    247|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 63, False: 184]
  ------------------
   68|     63|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|     63|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|     63|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|     63|                                                  mesh_data));
   72|     63|      }
   73|    184|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|    184|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 5, False: 179]
  ------------------
   75|      5|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|      5|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|      5|                                                     MeshDataT>(
   78|      5|                attribute, transform, mesh_data, bitstream_version));
   79|      5|      }
   80|    179|#endif
   81|    179|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 5, False: 174]
  ------------------
   82|      5|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|      5|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|      5|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|      5|                                                  mesh_data));
   86|      5|      }
   87|    174|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    174|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 174, False: 0]
  ------------------
   89|    174|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    174|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    174|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    174|                                                  mesh_data));
   93|    174|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|    344|    }

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

_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|     48|    uint16_t bitstream_version) {
   38|     48|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|     48|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 48, False: 0]
  ------------------
   40|     48|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 0, False: 48]
  ------------------
   41|     48|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 1, False: 47]
  ------------------
   42|     47|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 0, False: 47]
  ------------------
   43|     47|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 8, False: 39]
  ------------------
   44|     39|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 35, False: 4]
  ------------------
   45|     45|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 1, False: 3]
  ------------------
   46|     45|    const CornerTable *const ct = source->GetCornerTable();
   47|     45|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|     45|        source->GetAttributeEncodingData(att_id);
   49|     45|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 9, False: 36]
  |  Branch (49:26): [True: 0, False: 36]
  ------------------
   50|       |      // No connectivity data found.
   51|      9|      return nullptr;
   52|      9|    }
   53|       |    // Connectivity data exists.
   54|     36|    const MeshAttributeCornerTable *const att_ct =
   55|     36|        source->GetAttributeCornerTable(att_id);
   56|     36|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 9, False: 27]
  ------------------
   57|      9|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|      9|      MeshData md;
   59|      9|      md.Set(source->mesh(), att_ct,
   60|      9|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|      9|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|      9|      MeshPredictionSchemeFactoryT factory;
   63|      9|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|      9|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 9, False: 0]
  ------------------
   65|      9|        return ret;
   66|      9|      }
   67|     27|    } else {
   68|     27|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|     27|      MeshData md;
   70|     27|      md.Set(source->mesh(), ct,
   71|     27|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|     27|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|     27|      MeshPredictionSchemeFactoryT factory;
   74|     27|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|     27|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 26, False: 1]
  ------------------
   76|     26|        return ret;
   77|     26|      }
   78|     27|    }
   79|     36|  }
   80|      4|  return nullptr;
   81|     48|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|     42|    uint16_t bitstream_version) {
   38|     42|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|     42|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 42, False: 0]
  ------------------
   40|     42|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 4, False: 38]
  ------------------
   41|     38|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 1, False: 37]
  ------------------
   42|     37|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 0, False: 37]
  ------------------
   43|     37|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 1, False: 36]
  ------------------
   44|     36|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 31, False: 5]
  ------------------
   45|     40|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 3, False: 2]
  ------------------
   46|     40|    const CornerTable *const ct = source->GetCornerTable();
   47|     40|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|     40|        source->GetAttributeEncodingData(att_id);
   49|     40|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 8, False: 32]
  |  Branch (49:26): [True: 0, False: 32]
  ------------------
   50|       |      // No connectivity data found.
   51|      8|      return nullptr;
   52|      8|    }
   53|       |    // Connectivity data exists.
   54|     32|    const MeshAttributeCornerTable *const att_ct =
   55|     32|        source->GetAttributeCornerTable(att_id);
   56|     32|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 10, False: 22]
  ------------------
   57|     10|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|     10|      MeshData md;
   59|     10|      md.Set(source->mesh(), att_ct,
   60|     10|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|     10|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|     10|      MeshPredictionSchemeFactoryT factory;
   63|     10|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|     10|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 8, False: 2]
  ------------------
   65|      8|        return ret;
   66|      8|      }
   67|     22|    } else {
   68|     22|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|     22|      MeshData md;
   70|     22|      md.Set(source->mesh(), ct,
   71|     22|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|     22|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|     22|      MeshPredictionSchemeFactoryT factory;
   74|     22|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|     22|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 21, False: 1]
  ------------------
   76|     21|        return ret;
   77|     21|      }
   78|     22|    }
   79|     32|  }
   80|      5|  return nullptr;
   81|     42|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    593|    uint16_t bitstream_version) {
   38|    593|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|    593|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 593, False: 0]
  ------------------
   40|    593|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 79, False: 514]
  ------------------
   41|    514|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 77, False: 437]
  ------------------
   42|    437|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 118, False: 319]
  ------------------
   43|    319|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 36, False: 283]
  ------------------
   44|    283|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 254, False: 29]
  ------------------
   45|    582|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 18, False: 11]
  ------------------
   46|    582|    const CornerTable *const ct = source->GetCornerTable();
   47|    582|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|    582|        source->GetAttributeEncodingData(att_id);
   49|    582|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 7, False: 575]
  |  Branch (49:26): [True: 0, False: 575]
  ------------------
   50|       |      // No connectivity data found.
   51|      7|      return nullptr;
   52|      7|    }
   53|       |    // Connectivity data exists.
   54|    575|    const MeshAttributeCornerTable *const att_ct =
   55|    575|        source->GetAttributeCornerTable(att_id);
   56|    575|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 231, False: 344]
  ------------------
   57|    231|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    231|      MeshData md;
   59|    231|      md.Set(source->mesh(), att_ct,
   60|    231|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    231|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    231|      MeshPredictionSchemeFactoryT factory;
   63|    231|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    231|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 231, False: 0]
  ------------------
   65|    231|        return ret;
   66|    231|      }
   67|    344|    } else {
   68|    344|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    344|      MeshData md;
   70|    344|      md.Set(source->mesh(), ct,
   71|    344|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    344|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    344|      MeshPredictionSchemeFactoryT factory;
   74|    344|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    344|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 344, False: 0]
  ------------------
   76|    344|        return ret;
   77|    344|      }
   78|    344|    }
   79|    575|  }
   80|     11|  return nullptr;
   81|    593|}

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

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

_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE14IsInBottomLeftERKNS_7VectorDIiLi2EEE:
   92|   148k|  bool IsInBottomLeft(const Point2 &p) const {
   93|   148k|    if (p[0] == 0 && p[1] == 0) {
  ------------------
  |  Branch (93:9): [True: 40.8k, False: 107k]
  |  Branch (93:22): [True: 35.8k, False: 5.06k]
  ------------------
   94|  35.8k|      return true;
   95|  35.8k|    }
   96|   112k|    return (p[0] < 0 && p[1] <= 0);
  ------------------
  |  Branch (96:13): [True: 53.1k, False: 59.5k]
  |  Branch (96:25): [True: 25.2k, False: 27.9k]
  ------------------
   97|   148k|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE16GetRotationCountENS_7VectorDIiLi2EEE:
   50|   148k|  int32_t GetRotationCount(Point2 pred) const {
   51|   148k|    const DataType sign_x = pred[0];
   52|   148k|    const DataType sign_y = pred[1];
   53|       |
   54|   148k|    int32_t rotation_count = 0;
   55|   148k|    if (sign_x == 0) {
  ------------------
  |  Branch (55:9): [True: 40.8k, False: 107k]
  ------------------
   56|  40.8k|      if (sign_y == 0) {
  ------------------
  |  Branch (56:11): [True: 35.8k, False: 5.06k]
  ------------------
   57|  35.8k|        rotation_count = 0;
   58|  35.8k|      } else if (sign_y > 0) {
  ------------------
  |  Branch (58:18): [True: 2.68k, False: 2.38k]
  ------------------
   59|  2.68k|        rotation_count = 3;
   60|  2.68k|      } else {
   61|  2.38k|        rotation_count = 1;
   62|  2.38k|      }
   63|   107k|    } else if (sign_x > 0) {
  ------------------
  |  Branch (63:16): [True: 54.4k, False: 53.1k]
  ------------------
   64|  54.4k|      if (sign_y >= 0) {
  ------------------
  |  Branch (64:11): [True: 25.8k, False: 28.6k]
  ------------------
   65|  25.8k|        rotation_count = 2;
   66|  28.6k|      } else {
   67|  28.6k|        rotation_count = 1;
   68|  28.6k|      }
   69|  54.4k|    } else {
   70|  53.1k|      if (sign_y <= 0) {
  ------------------
  |  Branch (70:11): [True: 25.2k, False: 27.9k]
  ------------------
   71|  25.2k|        rotation_count = 0;
   72|  27.9k|      } else {
   73|  27.9k|        rotation_count = 3;
   74|  27.9k|      }
   75|  53.1k|    }
   76|   148k|    return rotation_count;
   77|   148k|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE11RotatePointENS_7VectorDIiLi2EEEi:
   79|   174k|  Point2 RotatePoint(Point2 p, int32_t rotation_count) const {
   80|   174k|    switch (rotation_count) {
   81|  61.5k|      case 1:
  ------------------
  |  Branch (81:7): [True: 61.5k, False: 113k]
  ------------------
   82|  61.5k|        return Point2(p[1], -p[0]);
   83|  51.6k|      case 2:
  ------------------
  |  Branch (83:7): [True: 51.6k, False: 123k]
  ------------------
   84|  51.6k|        return Point2(-p[0], -p[1]);
   85|  61.5k|      case 3:
  ------------------
  |  Branch (85:7): [True: 61.5k, False: 113k]
  ------------------
   86|  61.5k|        return Point2(-p[1], p[0]);
   87|      0|      default:
  ------------------
  |  Branch (87:7): [True: 0, False: 174k]
  ------------------
   88|      0|        return p;
   89|   174k|    }
   90|   174k|  }
_ZN5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiEC2Ev:
   40|     42|  PredictionSchemeNormalOctahedronCanonicalizedTransformBase() : Base() {}

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

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

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

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

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

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

_ZN5draco37SequentialAttributeDecodersControllerC2ENSt3__110unique_ptrINS_15PointsSequencerENS1_14default_deleteIS3_EEEE:
   26|  2.87k|    : sequencer_(std::move(sequencer)) {}
_ZN5draco37SequentialAttributeDecodersController27DecodeAttributesDecoderDataEPNS_13DecoderBufferE:
   29|    384|    DecoderBuffer *buffer) {
   30|    384|  if (!AttributesDecoder::DecodeAttributesDecoderData(buffer)) {
  ------------------
  |  Branch (30:7): [True: 32, False: 352]
  ------------------
   31|     32|    return false;
   32|     32|  }
   33|       |  // Decode unique ids of all sequential encoders and create them.
   34|    352|  const int32_t num_attributes = GetNumAttributes();
   35|    352|  sequential_decoders_.resize(num_attributes);
   36|  5.52k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (36:19): [True: 5.18k, False: 347]
  ------------------
   37|  5.18k|    uint8_t decoder_type;
   38|  5.18k|    if (!buffer->Decode(&decoder_type)) {
  ------------------
  |  Branch (38:9): [True: 1, False: 5.17k]
  ------------------
   39|      1|      return false;
   40|      1|    }
   41|       |    // Create the decoder from the id.
   42|  5.17k|    sequential_decoders_[i] = CreateSequentialDecoder(decoder_type);
   43|  5.17k|    if (!sequential_decoders_[i]) {
  ------------------
  |  Branch (43:9): [True: 4, False: 5.17k]
  ------------------
   44|      4|      return false;
   45|      4|    }
   46|  5.17k|    if (!sequential_decoders_[i]->Init(GetDecoder(), GetAttributeId(i))) {
  ------------------
  |  Branch (46:9): [True: 0, False: 5.17k]
  ------------------
   47|      0|      return false;
   48|      0|    }
   49|  5.17k|  }
   50|    347|  return true;
   51|    352|}
_ZN5draco37SequentialAttributeDecodersController16DecodeAttributesEPNS_13DecoderBufferE:
   54|    344|    DecoderBuffer *buffer) {
   55|    344|  if (!sequencer_ || !sequencer_->GenerateSequence(&point_ids_)) {
  ------------------
  |  Branch (55:7): [True: 0, False: 344]
  |  Branch (55:22): [True: 1, False: 343]
  ------------------
   56|      1|    return false;
   57|      1|  }
   58|       |  // Initialize point to attribute value mapping for all decoded attributes.
   59|    343|  const int32_t num_attributes = GetNumAttributes();
   60|  5.51k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (60:19): [True: 5.16k, False: 343]
  ------------------
   61|  5.16k|    PointAttribute *const pa =
   62|  5.16k|        GetDecoder()->point_cloud()->attribute(GetAttributeId(i));
   63|  5.16k|    if (!sequencer_->UpdatePointToAttributeIndexMapping(pa)) {
  ------------------
  |  Branch (63:9): [True: 0, False: 5.16k]
  ------------------
   64|      0|      return false;
   65|      0|    }
   66|  5.16k|  }
   67|    343|  return AttributesDecoder::DecodeAttributes(buffer);
   68|    343|}
_ZN5draco37SequentialAttributeDecodersController24DecodePortableAttributesEPNS_13DecoderBufferE:
   71|    343|    DecoderBuffer *in_buffer) {
   72|    343|  const int32_t num_attributes = GetNumAttributes();
   73|  2.36k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (73:19): [True: 2.25k, False: 116]
  ------------------
   74|  2.25k|    if (!sequential_decoders_[i]->DecodePortableAttribute(point_ids_,
  ------------------
  |  Branch (74:9): [True: 227, False: 2.02k]
  ------------------
   75|  2.25k|                                                          in_buffer)) {
   76|    227|      return false;
   77|    227|    }
   78|  2.25k|  }
   79|    116|  return true;
   80|    343|}
_ZN5draco37SequentialAttributeDecodersController36DecodeDataNeededByPortableTransformsEPNS_13DecoderBufferE:
   83|    116|    DecodeDataNeededByPortableTransforms(DecoderBuffer *in_buffer) {
   84|    116|  const int32_t num_attributes = GetNumAttributes();
   85|    611|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (85:19): [True: 524, False: 87]
  ------------------
   86|    524|    if (!sequential_decoders_[i]->DecodeDataNeededByPortableTransform(
  ------------------
  |  Branch (86:9): [True: 29, False: 495]
  ------------------
   87|    524|            point_ids_, in_buffer)) {
   88|     29|      return false;
   89|     29|    }
   90|    524|  }
   91|     87|  return true;
   92|    116|}
_ZN5draco37SequentialAttributeDecodersController35TransformAttributesToOriginalFormatEv:
   95|     87|    TransformAttributesToOriginalFormat() {
   96|     87|  const int32_t num_attributes = GetNumAttributes();
   97|    506|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (97:19): [True: 469, False: 37]
  ------------------
   98|       |    // Check whether the attribute transform should be skipped.
   99|    469|    if (GetDecoder()->options()) {
  ------------------
  |  Branch (99:9): [True: 469, False: 0]
  ------------------
  100|    469|      const PointAttribute *const attribute =
  101|    469|          sequential_decoders_[i]->attribute();
  102|    469|      const PointAttribute *const portable_attribute =
  103|    469|          sequential_decoders_[i]->GetPortableAttribute();
  104|    469|      if (portable_attribute &&
  ------------------
  |  Branch (104:11): [True: 206, False: 263]
  |  Branch (104:11): [True: 66, False: 403]
  ------------------
  105|    206|          GetDecoder()->options()->GetAttributeBool(
  ------------------
  |  Branch (105:11): [True: 66, False: 140]
  ------------------
  106|    206|              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|     66|        sequential_decoders_[i]->attribute()->CopyFrom(*portable_attribute);
  113|     66|        continue;
  114|     66|      }
  115|    469|    }
  116|    403|    if (!sequential_decoders_[i]->TransformAttributeToOriginalFormat(
  ------------------
  |  Branch (116:9): [True: 50, False: 353]
  ------------------
  117|    403|            point_ids_)) {
  118|     50|      return false;
  119|     50|    }
  120|    403|  }
  121|     37|  return true;
  122|     87|}
_ZN5draco37SequentialAttributeDecodersController23CreateSequentialDecoderEh:
  126|  5.17k|    uint8_t decoder_type) {
  127|  5.17k|  switch (decoder_type) {
  128|  2.10k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_GENERIC:
  ------------------
  |  Branch (128:5): [True: 2.10k, False: 3.07k]
  ------------------
  129|  2.10k|      return std::unique_ptr<SequentialAttributeDecoder>(
  130|  2.10k|          new SequentialAttributeDecoder());
  131|  2.94k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_INTEGER:
  ------------------
  |  Branch (131:5): [True: 2.94k, False: 2.23k]
  ------------------
  132|  2.94k|      return std::unique_ptr<SequentialAttributeDecoder>(
  133|  2.94k|          new SequentialIntegerAttributeDecoder());
  134|     15|    case SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION:
  ------------------
  |  Branch (134:5): [True: 15, False: 5.16k]
  ------------------
  135|     15|      return std::unique_ptr<SequentialAttributeDecoder>(
  136|     15|          new SequentialQuantizationAttributeDecoder());
  137|      0|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
  138|    117|    case SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS:
  ------------------
  |  Branch (138:5): [True: 117, False: 5.06k]
  ------------------
  139|    117|      return std::unique_ptr<SequentialNormalAttributeDecoder>(
  140|    117|          new SequentialNormalAttributeDecoder());
  141|      0|#endif
  142|      4|    default:
  ------------------
  |  Branch (142:5): [True: 4, False: 5.17k]
  ------------------
  143|      4|      break;
  144|  5.17k|  }
  145|       |  // Unknown or unsupported decoder type.
  146|      4|  return nullptr;
  147|  5.17k|}

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

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

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

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

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

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

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

_ZN5draco16DirectBitDecoder28DecodeLeastSignificantBits32EiPj:
   50|   333k|  bool DecodeLeastSignificantBits32(int nbits, uint32_t *value) {
   51|   333k|    DRACO_DCHECK_EQ(true, nbits <= 32);
   52|   333k|    DRACO_DCHECK_EQ(true, nbits > 0);
   53|   333k|    const int remaining = 32 - num_used_bits_;
   54|   333k|    if (nbits <= remaining) {
  ------------------
  |  Branch (54:9): [True: 259k, False: 74.2k]
  ------------------
   55|   259k|      if (pos_ == bits_.end()) {
  ------------------
  |  Branch (55:11): [True: 35, False: 259k]
  ------------------
   56|     35|        return false;
   57|     35|      }
   58|   259k|      *value = (*pos_ << num_used_bits_) >> (32 - nbits);
   59|   259k|      num_used_bits_ += nbits;
   60|   259k|      if (num_used_bits_ == 32) {
  ------------------
  |  Branch (60:11): [True: 8.58k, False: 250k]
  ------------------
   61|  8.58k|        ++pos_;
   62|  8.58k|        num_used_bits_ = 0;
   63|  8.58k|      }
   64|   259k|    } else {
   65|  74.2k|      if (pos_ + 1 == bits_.end()) {
  ------------------
  |  Branch (65:11): [True: 64.1k, False: 10.1k]
  ------------------
   66|  64.1k|        return false;
   67|  64.1k|      }
   68|  10.1k|      const uint32_t value_l = ((*pos_) << num_used_bits_);
   69|  10.1k|      num_used_bits_ = nbits - remaining;
   70|  10.1k|      ++pos_;
   71|  10.1k|      const uint32_t value_r = (*pos_) >> (32 - num_used_bits_);
   72|  10.1k|      *value = (value_l >> (32 - num_used_bits_ - remaining)) | value_r;
   73|  10.1k|    }
   74|   269k|    return true;
   75|   333k|  }
_ZN5draco16DirectBitDecoder13DecodeNextBitEv:
   34|  2.32M|  bool DecodeNextBit() {
   35|  2.32M|    const uint32_t selector = 1 << (31 - num_used_bits_);
   36|  2.32M|    if (pos_ == bits_.end()) {
  ------------------
  |  Branch (36:9): [True: 1.94M, False: 377k]
  ------------------
   37|  1.94M|      return false;
   38|  1.94M|    }
   39|   377k|    const bool bit = *pos_ & selector;
   40|   377k|    ++num_used_bits_;
   41|   377k|    if (num_used_bits_ == 32) {
  ------------------
  |  Branch (41:9): [True: 11.7k, False: 365k]
  ------------------
   42|  11.7k|      ++pos_;
   43|  11.7k|      num_used_bits_ = 0;
   44|  11.7k|    }
   45|   377k|    return bit;
   46|  2.32M|  }
_ZN5draco16DirectBitDecoder11EndDecodingEv:
   77|    391|  void EndDecoding() {}

_ZN5draco18FoldedBit32DecoderINS_14RAnsBitDecoderEED2Ev:
   30|    272|  ~FoldedBit32Decoder() {}
_ZN5draco18FoldedBit32DecoderINS_14RAnsBitDecoderEE13StartDecodingEPNS_13DecoderBufferE:
   33|    254|  bool StartDecoding(DecoderBuffer *source_buffer) {
   34|  7.79k|    for (int i = 0; i < 32; i++) {
  ------------------
  |  Branch (34:21): [True: 7.56k, False: 231]
  ------------------
   35|  7.56k|      if (!folded_number_decoders_[i].StartDecoding(source_buffer)) {
  ------------------
  |  Branch (35:11): [True: 23, False: 7.54k]
  ------------------
   36|     23|        return false;
   37|     23|      }
   38|  7.56k|    }
   39|    231|    return bit_decoder_.StartDecoding(source_buffer);
   40|    254|  }
_ZN5draco18FoldedBit32DecoderINS_14RAnsBitDecoderEE28DecodeLeastSignificantBits32EiPj:
   47|  2.35M|  void DecodeLeastSignificantBits32(int nbits, uint32_t *value) {
   48|  2.35M|    uint32_t result = 0;
   49|  14.1M|    for (int i = 0; i < nbits; ++i) {
  ------------------
  |  Branch (49:21): [True: 11.7M, False: 2.35M]
  ------------------
   50|  11.7M|      const bool bit = folded_number_decoders_[i].DecodeNextBit();
   51|  11.7M|      result = (result << 1) + bit;
   52|  11.7M|    }
   53|  2.35M|    *value = result;
   54|  2.35M|  }
_ZN5draco18FoldedBit32DecoderINS_14RAnsBitDecoderEE11EndDecodingEv:
   56|    129|  void EndDecoding() {
   57|  4.25k|    for (int i = 0; i < 32; i++) {
  ------------------
  |  Branch (57:21): [True: 4.12k, False: 129]
  ------------------
   58|  4.12k|      folded_number_decoders_[i].EndDecoding();
   59|  4.12k|    }
   60|    129|    bit_decoder_.EndDecoding();
   61|    129|  }
_ZN5draco18FoldedBit32DecoderINS_14RAnsBitDecoderEEC2Ev:
   29|    272|  FoldedBit32Decoder() {}

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

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

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

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

_ZN5draco10AnsDecoderC2Ev:
   56|  12.5k|  AnsDecoder() : buf(nullptr), buf_offset(0), state(0) {}
rans_bit_decoder.cc:_ZN5dracoL13ans_read_initEPNS_10AnsDecoderEPKhi:
  300|  10.2k|                                const uint8_t *const buf, int offset) {
  301|  10.2k|  unsigned x;
  302|  10.2k|  if (offset < 1) {
  ------------------
  |  Branch (302:7): [True: 13, False: 10.2k]
  ------------------
  303|     13|    return 1;
  304|     13|  }
  305|  10.2k|  ans->buf = buf;
  306|  10.2k|  x = buf[offset - 1] >> 6;
  307|  10.2k|  if (x == 0) {
  ------------------
  |  Branch (307:7): [True: 9.14k, False: 1.12k]
  ------------------
  308|  9.14k|    ans->buf_offset = offset - 1;
  309|  9.14k|    ans->state = buf[offset - 1] & 0x3F;
  310|  9.14k|  } else if (x == 1) {
  ------------------
  |  Branch (310:14): [True: 1.06k, False: 65]
  ------------------
  311|  1.06k|    if (offset < 2) {
  ------------------
  |  Branch (311:9): [True: 1, False: 1.06k]
  ------------------
  312|      1|      return 1;
  313|      1|    }
  314|  1.06k|    ans->buf_offset = offset - 2;
  315|  1.06k|    ans->state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  316|  1.06k|  } else if (x == 2) {
  ------------------
  |  Branch (316:14): [True: 62, False: 3]
  ------------------
  317|     62|    if (offset < 3) {
  ------------------
  |  Branch (317:9): [True: 1, False: 61]
  ------------------
  318|      1|      return 1;
  319|      1|    }
  320|     61|    ans->buf_offset = offset - 3;
  321|     61|    ans->state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  322|     61|  } else {
  323|      3|    return 1;
  324|      3|  }
  325|  10.2k|  ans->state += DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  10.2k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  326|  10.2k|  if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   64|  10.2k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
                if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  10.2k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (326:7): [True: 0, False: 10.2k]
  ------------------
  327|      0|    return 1;
  328|      0|  }
  329|  10.2k|  return 0;
  330|  10.2k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|  1.06k|static uint32_t mem_get_le16(const void *vmem) {
   68|  1.06k|  uint32_t val;
   69|  1.06k|  const uint8_t *mem = (const uint8_t *)vmem;
   70|       |
   71|  1.06k|  val = mem[1] << 8;
   72|  1.06k|  val |= mem[0];
   73|  1.06k|  return val;
   74|  1.06k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|     61|static uint32_t mem_get_le24(const void *vmem) {
   77|     61|  uint32_t val;
   78|     61|  const uint8_t *mem = (const uint8_t *)vmem;
   79|       |
   80|     61|  val = mem[2] << 16;
   81|     61|  val |= mem[1] << 8;
   82|     61|  val |= mem[0];
   83|     61|  return val;
   84|     61|}
rans_bit_decoder.cc:_ZN5dracoL14rabs_desc_readEPNS_10AnsDecoderEh:
  166|   408M|static inline int rabs_desc_read(struct AnsDecoder *ans, AnsP8 p0) {
  167|   408M|  int val;
  168|       |#if DRACO_ANS_IMPL1
  169|       |  unsigned l_s;
  170|       |#else
  171|   408M|  unsigned quot, rem, x, xn;
  172|   408M|#endif
  173|   408M|  const AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
  ------------------
  |  |   63|   408M|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  174|   408M|  if (ans->state < DRACO_ANS_L_BASE && ans->buf_offset > 0) {
  ------------------
  |  |   64|   816M|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  |  Branch (174:7): [True: 368M, False: 39.7M]
  |  Branch (174:40): [True: 56.7k, False: 368M]
  ------------------
  175|  56.7k|    ans->state = ans->state * DRACO_ANS_IO_BASE + ans->buf[--ans->buf_offset];
  ------------------
  |  |   65|  56.7k|#define DRACO_ANS_IO_BASE 256
  ------------------
  176|  56.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|   408M|  x = ans->state;
  184|   408M|  quot = x / DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|   408M|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  185|   408M|  rem = x % DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|   408M|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  186|   408M|  xn = quot * p;
  187|   408M|  val = rem < p;
  188|   408M|  if (UNPREDICTABLE(val)) {
  ------------------
  |  |  165|   816M|#define UNPREDICTABLE(x) x
  |  |  ------------------
  |  |  |  Branch (165:26): [True: 369M, False: 38.7M]
  |  |  ------------------
  ------------------
  189|   369M|    ans->state = xn + rem;
  190|   369M|  } else {
  191|       |    // ans->state = quot * p0 + rem - p;
  192|  38.7M|    ans->state = x - xn - p;
  193|  38.7M|  }
  194|   408M|#endif
  195|   408M|  return val;
  196|   408M|}
rans_bit_decoder.cc:_ZN5dracoL12ans_read_endEPNS_10AnsDecoderE:
  332|  22.2k|static inline int ans_read_end(struct AnsDecoder *const ans) {
  333|  22.2k|  return ans->state == DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  22.2k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  334|  22.2k|}
_ZN5draco11RAnsDecoderILi12EEC2Ev:
  416|    375|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi12EE24rans_build_look_up_tableEPKjj:
  481|    160|                                       uint32_t num_symbols) {
  482|    160|    lut_table_.resize(rans_precision);
  483|    160|    probability_table_.resize(num_symbols);
  484|    160|    uint32_t cum_prob = 0;
  485|    160|    uint32_t act_prob = 0;
  486|  2.47k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 2.35k, False: 121]
  ------------------
  487|  2.35k|      probability_table_[i].prob = token_probs[i];
  488|  2.35k|      probability_table_[i].cum_prob = cum_prob;
  489|  2.35k|      cum_prob += token_probs[i];
  490|  2.35k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 39, False: 2.31k]
  ------------------
  491|     39|        return false;
  492|     39|      }
  493|   351k|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 349k, False: 2.31k]
  ------------------
  494|   349k|        lut_table_[j] = i;
  495|   349k|      }
  496|  2.31k|      act_prob = cum_prob;
  497|  2.31k|    }
  498|    121|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 39, False: 82]
  ------------------
  499|     39|      return false;
  500|     39|    }
  501|     82|    return true;
  502|    121|  }
_ZN5draco11RAnsDecoderILi12EE9read_initEPKhi:
  421|     63|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     63|    unsigned x;
  423|     63|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 4, False: 59]
  ------------------
  424|      4|      return 1;
  425|      4|    }
  426|     59|    ans_.buf = buf;
  427|     59|    x = buf[offset - 1] >> 6;
  428|     59|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 38, False: 21]
  ------------------
  429|     38|      ans_.buf_offset = offset - 1;
  430|     38|      ans_.state = buf[offset - 1] & 0x3F;
  431|     38|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 9, False: 12]
  ------------------
  432|      9|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 0, False: 9]
  ------------------
  433|      0|        return 1;
  434|      0|      }
  435|      9|      ans_.buf_offset = offset - 2;
  436|      9|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     12|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 8, False: 4]
  ------------------
  438|      8|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 0, False: 8]
  ------------------
  439|      0|        return 1;
  440|      0|      }
  441|      8|      ans_.buf_offset = offset - 3;
  442|      8|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|      8|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 4, False: 0]
  ------------------
  444|      4|      ans_.buf_offset = offset - 4;
  445|      4|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|      4|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     59|    ans_.state += l_rans_base;
  450|     59|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     59|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 4, False: 55]
  ------------------
  451|      4|      return 1;
  452|      4|    }
  453|     55|    return 0;
  454|     59|  }
symbol_decoding.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|     14|static uint32_t mem_get_le16(const void *vmem) {
   68|     14|  uint32_t val;
   69|     14|  const uint8_t *mem = (const uint8_t *)vmem;
   70|       |
   71|     14|  val = mem[1] << 8;
   72|     14|  val |= mem[0];
   73|     14|  return val;
   74|     14|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|     12|static uint32_t mem_get_le24(const void *vmem) {
   77|     12|  uint32_t val;
   78|     12|  const uint8_t *mem = (const uint8_t *)vmem;
   79|       |
   80|     12|  val = mem[2] << 16;
   81|     12|  val |= mem[1] << 8;
   82|     12|  val |= mem[0];
   83|     12|  return val;
   84|     12|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le32EPKv:
   86|     12|static inline uint32_t mem_get_le32(const void *vmem) {
   87|     12|  uint32_t val;
   88|     12|  const uint8_t *mem = (const uint8_t *)vmem;
   89|       |
   90|     12|  val = mem[3] << 24;
   91|     12|  val |= mem[2] << 16;
   92|     12|  val |= mem[1] << 8;
   93|     12|  val |= mem[0];
   94|     12|  return val;
   95|     12|}
_ZN5draco11RAnsDecoderILi12EE9rans_readEv:
  462|  1.33M|  inline int rans_read() {
  463|  1.33M|    unsigned rem;
  464|  1.33M|    unsigned quo;
  465|  1.33M|    struct rans_dec_sym sym;
  466|  1.34M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 1.18M, False: 154k]
  |  Branch (466:40): [True: 2.47k, False: 1.18M]
  ------------------
  467|  2.47k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  2.47k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  2.47k|    }
  469|       |    // |rans_precision| is a power of two compile time constant, and the below
  470|       |    // division and modulo are going to be optimized by the compiler.
  471|  1.33M|    quo = ans_.state / rans_precision;
  472|  1.33M|    rem = ans_.state % rans_precision;
  473|  1.33M|    fetch_sym(&sym, rem);
  474|  1.33M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  1.33M|    return sym.val;
  476|  1.33M|  }
_ZN5draco11RAnsDecoderILi12EE9fetch_symEPNS_12rans_dec_symEj:
  505|  1.33M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  1.33M|    uint32_t symbol = lut_table_[rem];
  507|  1.33M|    out->val = symbol;
  508|  1.33M|    out->prob = probability_table_[symbol].prob;
  509|  1.33M|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  1.33M|  }
_ZN5draco11RAnsDecoderILi12EE8read_endEv:
  456|     45|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi13EEC2Ev:
  416|     29|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi13EE24rans_build_look_up_tableEPKjj:
  481|     17|                                       uint32_t num_symbols) {
  482|     17|    lut_table_.resize(rans_precision);
  483|     17|    probability_table_.resize(num_symbols);
  484|     17|    uint32_t cum_prob = 0;
  485|     17|    uint32_t act_prob = 0;
  486|    215|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 210, False: 5]
  ------------------
  487|    210|      probability_table_[i].prob = token_probs[i];
  488|    210|      probability_table_[i].cum_prob = cum_prob;
  489|    210|      cum_prob += token_probs[i];
  490|    210|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 12, False: 198]
  ------------------
  491|     12|        return false;
  492|     12|      }
  493|  40.0k|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 39.8k, False: 198]
  ------------------
  494|  39.8k|        lut_table_[j] = i;
  495|  39.8k|      }
  496|    198|      act_prob = cum_prob;
  497|    198|    }
  498|      5|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 4, False: 1]
  ------------------
  499|      4|      return false;
  500|      4|    }
  501|      1|    return true;
  502|      5|  }
_ZN5draco11RAnsDecoderILi15EEC2Ev:
  416|     24|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi15EE24rans_build_look_up_tableEPKjj:
  481|     15|                                       uint32_t num_symbols) {
  482|     15|    lut_table_.resize(rans_precision);
  483|     15|    probability_table_.resize(num_symbols);
  484|     15|    uint32_t cum_prob = 0;
  485|     15|    uint32_t act_prob = 0;
  486|  1.18k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 1.17k, False: 13]
  ------------------
  487|  1.17k|      probability_table_[i].prob = token_probs[i];
  488|  1.17k|      probability_table_[i].cum_prob = cum_prob;
  489|  1.17k|      cum_prob += token_probs[i];
  490|  1.17k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 2, False: 1.17k]
  ------------------
  491|      2|        return false;
  492|      2|      }
  493|   460k|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 459k, False: 1.17k]
  ------------------
  494|   459k|        lut_table_[j] = i;
  495|   459k|      }
  496|  1.17k|      act_prob = cum_prob;
  497|  1.17k|    }
  498|     13|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 0, False: 13]
  ------------------
  499|      0|      return false;
  500|      0|    }
  501|     13|    return true;
  502|     13|  }
_ZN5draco11RAnsDecoderILi15EE9read_initEPKhi:
  421|      3|  inline int read_init(const uint8_t *const buf, int offset) {
  422|      3|    unsigned x;
  423|      3|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 0, False: 3]
  ------------------
  424|      0|      return 1;
  425|      0|    }
  426|      3|    ans_.buf = buf;
  427|      3|    x = buf[offset - 1] >> 6;
  428|      3|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 0, False: 3]
  ------------------
  429|      0|      ans_.buf_offset = offset - 1;
  430|      0|      ans_.state = buf[offset - 1] & 0x3F;
  431|      3|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 3, False: 0]
  ------------------
  432|      3|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 0, False: 3]
  ------------------
  433|      0|        return 1;
  434|      0|      }
  435|      3|      ans_.buf_offset = offset - 2;
  436|      3|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|      3|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 0, False: 0]
  ------------------
  438|      0|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 0, False: 0]
  ------------------
  439|      0|        return 1;
  440|      0|      }
  441|      0|      ans_.buf_offset = offset - 3;
  442|      0|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|      0|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 0, False: 0]
  ------------------
  444|      0|      ans_.buf_offset = offset - 4;
  445|      0|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|      0|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|      3|    ans_.state += l_rans_base;
  450|      3|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|      3|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 0, False: 3]
  ------------------
  451|      0|      return 1;
  452|      0|    }
  453|      3|    return 0;
  454|      3|  }
_ZN5draco11RAnsDecoderILi15EE9rans_readEv:
  462|  38.8k|  inline int rans_read() {
  463|  38.8k|    unsigned rem;
  464|  38.8k|    unsigned quo;
  465|  38.8k|    struct rans_dec_sym sym;
  466|  41.3k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 21.8k, False: 19.5k]
  |  Branch (466:40): [True: 2.48k, False: 19.3k]
  ------------------
  467|  2.48k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  2.48k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  2.48k|    }
  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|  38.8k|    quo = ans_.state / rans_precision;
  472|  38.8k|    rem = ans_.state % rans_precision;
  473|  38.8k|    fetch_sym(&sym, rem);
  474|  38.8k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  38.8k|    return sym.val;
  476|  38.8k|  }
_ZN5draco11RAnsDecoderILi15EE9fetch_symEPNS_12rans_dec_symEj:
  505|  38.8k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  38.8k|    uint32_t symbol = lut_table_[rem];
  507|  38.8k|    out->val = symbol;
  508|  38.8k|    out->prob = probability_table_[symbol].prob;
  509|  38.8k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  38.8k|  }
_ZN5draco11RAnsDecoderILi15EE8read_endEv:
  456|      3|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi16EEC2Ev:
  416|     31|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi16EE24rans_build_look_up_tableEPKjj:
  481|     18|                                       uint32_t num_symbols) {
  482|     18|    lut_table_.resize(rans_precision);
  483|     18|    probability_table_.resize(num_symbols);
  484|     18|    uint32_t cum_prob = 0;
  485|     18|    uint32_t act_prob = 0;
  486|  1.78k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 1.77k, False: 10]
  ------------------
  487|  1.77k|      probability_table_[i].prob = token_probs[i];
  488|  1.77k|      probability_table_[i].cum_prob = cum_prob;
  489|  1.77k|      cum_prob += token_probs[i];
  490|  1.77k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 8, False: 1.76k]
  ------------------
  491|      8|        return false;
  492|      8|      }
  493|   753k|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 751k, False: 1.76k]
  ------------------
  494|   751k|        lut_table_[j] = i;
  495|   751k|      }
  496|  1.76k|      act_prob = cum_prob;
  497|  1.76k|    }
  498|     10|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 1, False: 9]
  ------------------
  499|      1|      return false;
  500|      1|    }
  501|      9|    return true;
  502|     10|  }
_ZN5draco11RAnsDecoderILi16EE9read_initEPKhi:
  421|      6|  inline int read_init(const uint8_t *const buf, int offset) {
  422|      6|    unsigned x;
  423|      6|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 0, False: 6]
  ------------------
  424|      0|      return 1;
  425|      0|    }
  426|      6|    ans_.buf = buf;
  427|      6|    x = buf[offset - 1] >> 6;
  428|      6|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 6, False: 0]
  ------------------
  429|      6|      ans_.buf_offset = offset - 1;
  430|      6|      ans_.state = buf[offset - 1] & 0x3F;
  431|      6|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 0, False: 0]
  ------------------
  432|      0|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 0, False: 0]
  ------------------
  433|      0|        return 1;
  434|      0|      }
  435|      0|      ans_.buf_offset = offset - 2;
  436|      0|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|      0|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 0, False: 0]
  ------------------
  438|      0|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 0, False: 0]
  ------------------
  439|      0|        return 1;
  440|      0|      }
  441|      0|      ans_.buf_offset = offset - 3;
  442|      0|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|      0|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 0, False: 0]
  ------------------
  444|      0|      ans_.buf_offset = offset - 4;
  445|      0|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|      0|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|      6|    ans_.state += l_rans_base;
  450|      6|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|      6|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 0, False: 6]
  ------------------
  451|      0|      return 1;
  452|      0|    }
  453|      6|    return 0;
  454|      6|  }
_ZN5draco11RAnsDecoderILi16EE9rans_readEv:
  462|  71.5k|  inline int rans_read() {
  463|  71.5k|    unsigned rem;
  464|  71.5k|    unsigned quo;
  465|  71.5k|    struct rans_dec_sym sym;
  466|  73.4k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 58.5k, False: 14.8k]
  |  Branch (466:40): [True: 1.85k, False: 56.6k]
  ------------------
  467|  1.85k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  1.85k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  1.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|  71.5k|    quo = ans_.state / rans_precision;
  472|  71.5k|    rem = ans_.state % rans_precision;
  473|  71.5k|    fetch_sym(&sym, rem);
  474|  71.5k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  71.5k|    return sym.val;
  476|  71.5k|  }
_ZN5draco11RAnsDecoderILi16EE9fetch_symEPNS_12rans_dec_symEj:
  505|  71.5k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  71.5k|    uint32_t symbol = lut_table_[rem];
  507|  71.5k|    out->val = symbol;
  508|  71.5k|    out->prob = probability_table_[symbol].prob;
  509|  71.5k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  71.5k|  }
_ZN5draco11RAnsDecoderILi16EE8read_endEv:
  456|      6|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi18EEC2Ev:
  416|     16|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi18EE24rans_build_look_up_tableEPKjj:
  481|      7|                                       uint32_t num_symbols) {
  482|      7|    lut_table_.resize(rans_precision);
  483|      7|    probability_table_.resize(num_symbols);
  484|      7|    uint32_t cum_prob = 0;
  485|      7|    uint32_t act_prob = 0;
  486|     49|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 42, False: 7]
  ------------------
  487|     42|      probability_table_[i].prob = token_probs[i];
  488|     42|      probability_table_[i].cum_prob = cum_prob;
  489|     42|      cum_prob += token_probs[i];
  490|     42|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 0, False: 42]
  ------------------
  491|      0|        return false;
  492|      0|      }
  493|  1.57M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 1.57M, False: 42]
  ------------------
  494|  1.57M|        lut_table_[j] = i;
  495|  1.57M|      }
  496|     42|      act_prob = cum_prob;
  497|     42|    }
  498|      7|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 1, False: 6]
  ------------------
  499|      1|      return false;
  500|      1|    }
  501|      6|    return true;
  502|      7|  }
_ZN5draco11RAnsDecoderILi18EE9read_initEPKhi:
  421|      5|  inline int read_init(const uint8_t *const buf, int offset) {
  422|      5|    unsigned x;
  423|      5|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 0, False: 5]
  ------------------
  424|      0|      return 1;
  425|      0|    }
  426|      5|    ans_.buf = buf;
  427|      5|    x = buf[offset - 1] >> 6;
  428|      5|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 3, False: 2]
  ------------------
  429|      3|      ans_.buf_offset = offset - 1;
  430|      3|      ans_.state = buf[offset - 1] & 0x3F;
  431|      3|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 0, False: 2]
  ------------------
  432|      0|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 0, False: 0]
  ------------------
  433|      0|        return 1;
  434|      0|      }
  435|      0|      ans_.buf_offset = offset - 2;
  436|      0|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|      2|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 2, False: 0]
  ------------------
  438|      2|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 0, False: 2]
  ------------------
  439|      0|        return 1;
  440|      0|      }
  441|      2|      ans_.buf_offset = offset - 3;
  442|      2|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|      2|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 0, False: 0]
  ------------------
  444|      0|      ans_.buf_offset = offset - 4;
  445|      0|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|      0|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|      5|    ans_.state += l_rans_base;
  450|      5|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|      5|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 0, False: 5]
  ------------------
  451|      0|      return 1;
  452|      0|    }
  453|      5|    return 0;
  454|      5|  }
_ZN5draco11RAnsDecoderILi18EE9rans_readEv:
  462|  21.1k|  inline int rans_read() {
  463|  21.1k|    unsigned rem;
  464|  21.1k|    unsigned quo;
  465|  21.1k|    struct rans_dec_sym sym;
  466|  21.1k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 54, False: 21.1k]
  |  Branch (466:40): [True: 54, False: 0]
  ------------------
  467|     54|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|     54|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|     54|    }
  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|  21.1k|    quo = ans_.state / rans_precision;
  472|  21.1k|    rem = ans_.state % rans_precision;
  473|  21.1k|    fetch_sym(&sym, rem);
  474|  21.1k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  21.1k|    return sym.val;
  476|  21.1k|  }
_ZN5draco11RAnsDecoderILi18EE9fetch_symEPNS_12rans_dec_symEj:
  505|  21.1k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  21.1k|    uint32_t symbol = lut_table_[rem];
  507|  21.1k|    out->val = symbol;
  508|  21.1k|    out->prob = probability_table_[symbol].prob;
  509|  21.1k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  21.1k|  }
_ZN5draco11RAnsDecoderILi18EE8read_endEv:
  456|      5|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi19EEC2Ev:
  416|     20|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi19EE24rans_build_look_up_tableEPKjj:
  481|      5|                                       uint32_t num_symbols) {
  482|      5|    lut_table_.resize(rans_precision);
  483|      5|    probability_table_.resize(num_symbols);
  484|      5|    uint32_t cum_prob = 0;
  485|      5|    uint32_t act_prob = 0;
  486|     15|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 10, False: 5]
  ------------------
  487|     10|      probability_table_[i].prob = token_probs[i];
  488|     10|      probability_table_[i].cum_prob = cum_prob;
  489|     10|      cum_prob += token_probs[i];
  490|     10|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 0, False: 10]
  ------------------
  491|      0|        return false;
  492|      0|      }
  493|  2.09M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 2.09M, False: 10]
  ------------------
  494|  2.09M|        lut_table_[j] = i;
  495|  2.09M|      }
  496|     10|      act_prob = cum_prob;
  497|     10|    }
  498|      5|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 1, False: 4]
  ------------------
  499|      1|      return false;
  500|      1|    }
  501|      4|    return true;
  502|      5|  }
_ZN5draco11RAnsDecoderILi19EE9read_initEPKhi:
  421|      2|  inline int read_init(const uint8_t *const buf, int offset) {
  422|      2|    unsigned x;
  423|      2|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 0, False: 2]
  ------------------
  424|      0|      return 1;
  425|      0|    }
  426|      2|    ans_.buf = buf;
  427|      2|    x = buf[offset - 1] >> 6;
  428|      2|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 2, False: 0]
  ------------------
  429|      2|      ans_.buf_offset = offset - 1;
  430|      2|      ans_.state = buf[offset - 1] & 0x3F;
  431|      2|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 0, False: 0]
  ------------------
  432|      0|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 0, False: 0]
  ------------------
  433|      0|        return 1;
  434|      0|      }
  435|      0|      ans_.buf_offset = offset - 2;
  436|      0|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|      0|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 0, False: 0]
  ------------------
  438|      0|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 0, False: 0]
  ------------------
  439|      0|        return 1;
  440|      0|      }
  441|      0|      ans_.buf_offset = offset - 3;
  442|      0|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|      0|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 0, False: 0]
  ------------------
  444|      0|      ans_.buf_offset = offset - 4;
  445|      0|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|      0|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|      2|    ans_.state += l_rans_base;
  450|      2|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|      2|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 0, False: 2]
  ------------------
  451|      0|      return 1;
  452|      0|    }
  453|      2|    return 0;
  454|      2|  }
_ZN5draco11RAnsDecoderILi19EE9rans_readEv:
  462|  27.0k|  inline int rans_read() {
  463|  27.0k|    unsigned rem;
  464|  27.0k|    unsigned quo;
  465|  27.0k|    struct rans_dec_sym sym;
  466|  27.7k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 651, False: 27.0k]
  |  Branch (466:40): [True: 651, False: 0]
  ------------------
  467|    651|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    651|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|    651|    }
  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|  27.0k|    quo = ans_.state / rans_precision;
  472|  27.0k|    rem = ans_.state % rans_precision;
  473|  27.0k|    fetch_sym(&sym, rem);
  474|  27.0k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  27.0k|    return sym.val;
  476|  27.0k|  }
_ZN5draco11RAnsDecoderILi19EE9fetch_symEPNS_12rans_dec_symEj:
  505|  27.0k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  27.0k|    uint32_t symbol = lut_table_[rem];
  507|  27.0k|    out->val = symbol;
  508|  27.0k|    out->prob = probability_table_[symbol].prob;
  509|  27.0k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  27.0k|  }
_ZN5draco11RAnsDecoderILi19EE8read_endEv:
  456|      2|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi20EEC2Ev:
  416|     96|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi20EE24rans_build_look_up_tableEPKjj:
  481|     64|                                       uint32_t num_symbols) {
  482|     64|    lut_table_.resize(rans_precision);
  483|     64|    probability_table_.resize(num_symbols);
  484|     64|    uint32_t cum_prob = 0;
  485|     64|    uint32_t act_prob = 0;
  486|  1.37k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 1.32k, False: 53]
  ------------------
  487|  1.32k|      probability_table_[i].prob = token_probs[i];
  488|  1.32k|      probability_table_[i].cum_prob = cum_prob;
  489|  1.32k|      cum_prob += token_probs[i];
  490|  1.32k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 11, False: 1.31k]
  ------------------
  491|     11|        return false;
  492|     11|      }
  493|  57.4M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 57.4M, False: 1.31k]
  ------------------
  494|  57.4M|        lut_table_[j] = i;
  495|  57.4M|      }
  496|  1.31k|      act_prob = cum_prob;
  497|  1.31k|    }
  498|     53|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 1, False: 52]
  ------------------
  499|      1|      return false;
  500|      1|    }
  501|     52|    return true;
  502|     53|  }
_ZN5draco11RAnsDecoderILi20EE9read_initEPKhi:
  421|     15|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     15|    unsigned x;
  423|     15|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 0, False: 15]
  ------------------
  424|      0|      return 1;
  425|      0|    }
  426|     15|    ans_.buf = buf;
  427|     15|    x = buf[offset - 1] >> 6;
  428|     15|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 3, False: 12]
  ------------------
  429|      3|      ans_.buf_offset = offset - 1;
  430|      3|      ans_.state = buf[offset - 1] & 0x3F;
  431|     12|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 2, False: 10]
  ------------------
  432|      2|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 0, False: 2]
  ------------------
  433|      0|        return 1;
  434|      0|      }
  435|      2|      ans_.buf_offset = offset - 2;
  436|      2|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     10|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 2, False: 8]
  ------------------
  438|      2|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 0, False: 2]
  ------------------
  439|      0|        return 1;
  440|      0|      }
  441|      2|      ans_.buf_offset = offset - 3;
  442|      2|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|      8|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 8, False: 0]
  ------------------
  444|      8|      ans_.buf_offset = offset - 4;
  445|      8|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|      8|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     15|    ans_.state += l_rans_base;
  450|     15|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     15|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 4, False: 11]
  ------------------
  451|      4|      return 1;
  452|      4|    }
  453|     11|    return 0;
  454|     15|  }
_ZN5draco11RAnsDecoderILi20EE9rans_readEv:
  462|  3.18M|  inline int rans_read() {
  463|  3.18M|    unsigned rem;
  464|  3.18M|    unsigned quo;
  465|  3.18M|    struct rans_dec_sym sym;
  466|  3.18M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 18.9k, False: 3.16M]
  |  Branch (466:40): [True: 983, False: 17.9k]
  ------------------
  467|    983|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    983|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|    983|    }
  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|  3.18M|    quo = ans_.state / rans_precision;
  472|  3.18M|    rem = ans_.state % rans_precision;
  473|  3.18M|    fetch_sym(&sym, rem);
  474|  3.18M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  3.18M|    return sym.val;
  476|  3.18M|  }
_ZN5draco11RAnsDecoderILi20EE9fetch_symEPNS_12rans_dec_symEj:
  505|  3.18M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  3.18M|    uint32_t symbol = lut_table_[rem];
  507|  3.18M|    out->val = symbol;
  508|  3.18M|    out->prob = probability_table_[symbol].prob;
  509|  3.18M|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  3.18M|  }
_ZN5draco11RAnsDecoderILi20EE8read_endEv:
  456|     11|  inline int read_end() { return ans_.state == l_rans_base; }

_ZN5draco17RAnsSymbolDecoderILi5EEC2Ev:
   33|    126|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi5EE6CreateEPNS_13DecoderBufferE:
   59|    126|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    126|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 126]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    126|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    126|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    126|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 10, False: 116]
  ------------------
   67|     10|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 10]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     10|  } else
   72|    116|#endif
   73|    116|  {
   74|    116|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 1, False: 115]
  ------------------
   75|      1|      return false;
   76|      1|    }
   77|    116|  }
   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|    125|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 1, False: 124]
  ------------------
   83|      1|    return false;
   84|      1|  }
   85|    124|  probability_table_.resize(num_symbols_);
   86|    124|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 67, False: 57]
  ------------------
   87|     67|    return true;
   88|     67|  }
   89|       |  // Decode the table.
   90|   148k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 148k, False: 35]
  ------------------
   91|   148k|    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|   148k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 3, False: 148k]
  ------------------
   95|      3|      return false;
   96|      3|    }
   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|   148k|    const int token = prob_data & 3;
  102|   148k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 50.4k, False: 98.2k]
  ------------------
  103|  50.4k|      const uint32_t offset = prob_data >> 2;
  104|  50.4k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 18, False: 50.4k]
  ------------------
  105|     18|        return false;
  106|     18|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  1.77M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 1.72M, False: 50.4k]
  ------------------
  109|  1.72M|        probability_table_[i + j] = 0;
  110|  1.72M|      }
  111|  50.4k|      i += offset;
  112|  98.2k|    } else {
  113|  98.2k|      const int extra_bytes = token;
  114|  98.2k|      uint32_t prob = prob_data >> 2;
  115|   158k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 59.9k, False: 98.2k]
  ------------------
  116|  59.9k|        uint8_t eb;
  117|  59.9k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 1, False: 59.9k]
  ------------------
  118|      1|          return false;
  119|      1|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  59.9k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  59.9k|      }
  124|  98.2k|      probability_table_[i] = prob;
  125|  98.2k|    }
  126|   148k|  }
  127|     35|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 26, False: 9]
  ------------------
  128|     26|    return false;
  129|     26|  }
  130|      9|  return true;
  131|     35|}
_ZN5draco17RAnsSymbolDecoderILi5EE13StartDecodingEPNS_13DecoderBufferE:
  135|     30|    DecoderBuffer *buffer) {
  136|     30|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     30|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     30|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     30|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 7, False: 23]
  ------------------
  140|      7|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 7]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      7|  } else
  145|     23|#endif
  146|     23|  {
  147|     23|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 23]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     23|  }
  151|     30|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 7, False: 23]
  ------------------
  152|      7|    return false;
  153|      7|  }
  154|     23|  const uint8_t *const data_head =
  155|     23|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     23|  buffer->Advance(bytes_encoded);
  158|     23|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 4, False: 19]
  ------------------
  159|      4|    return false;
  160|      4|  }
  161|     19|  return true;
  162|     23|}
_ZNK5draco17RAnsSymbolDecoderILi5EE11num_symbolsEv:
   38|     65|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi5EE12DecodeSymbolEv:
   43|  56.3k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi5EE11EndDecodingEv:
  165|      9|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|      9|  ans_.read_end();
  167|      9|}
_ZN5draco17RAnsSymbolDecoderILi1EEC2Ev:
   33|     63|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi1EE6CreateEPNS_13DecoderBufferE:
   59|     63|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     63|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 63]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     63|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     63|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     63|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 21, False: 42]
  ------------------
   67|     21|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 21]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     21|  } else
   72|     42|#endif
   73|     42|  {
   74|     42|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 42]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     42|  }
   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|     63|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 10, False: 53]
  ------------------
   83|     10|    return false;
   84|     10|  }
   85|     53|  probability_table_.resize(num_symbols_);
   86|     53|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 1, False: 52]
  ------------------
   87|      1|    return true;
   88|      1|  }
   89|       |  // Decode the table.
   90|  3.86M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 3.86M, False: 34]
  ------------------
   91|  3.86M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  3.86M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 11, False: 3.86M]
  ------------------
   95|     11|      return false;
   96|     11|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  3.86M|    const int token = prob_data & 3;
  102|  3.86M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 1.49M, False: 2.37M]
  ------------------
  103|  1.49M|      const uint32_t offset = prob_data >> 2;
  104|  1.49M|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 6, False: 1.49M]
  ------------------
  105|      6|        return false;
  106|      6|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  43.3M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 41.8M, False: 1.49M]
  ------------------
  109|  41.8M|        probability_table_[i + j] = 0;
  110|  41.8M|      }
  111|  1.49M|      i += offset;
  112|  2.37M|    } else {
  113|  2.37M|      const int extra_bytes = token;
  114|  2.37M|      uint32_t prob = prob_data >> 2;
  115|  2.52M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 154k, False: 2.37M]
  ------------------
  116|   154k|        uint8_t eb;
  117|   154k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 1, False: 154k]
  ------------------
  118|      1|          return false;
  119|      1|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   154k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   154k|      }
  124|  2.37M|      probability_table_[i] = prob;
  125|  2.37M|    }
  126|  3.86M|  }
  127|     34|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 31, False: 3]
  ------------------
  128|     31|    return false;
  129|     31|  }
  130|      3|  return true;
  131|     34|}
_ZNK5draco17RAnsSymbolDecoderILi1EE11num_symbolsEv:
   38|      4|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi1EE13StartDecodingEPNS_13DecoderBufferE:
  135|      3|    DecoderBuffer *buffer) {
  136|      3|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|      3|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|      3|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|      3|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 3]
  ------------------
  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|      3|#endif
  146|      3|  {
  147|      3|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 3]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|      3|  }
  151|      3|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 0, False: 3]
  ------------------
  152|      0|    return false;
  153|      0|  }
  154|      3|  const uint8_t *const data_head =
  155|      3|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|      3|  buffer->Advance(bytes_encoded);
  158|      3|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 0, False: 3]
  ------------------
  159|      0|    return false;
  160|      0|  }
  161|      3|  return true;
  162|      3|}
_ZN5draco17RAnsSymbolDecoderILi1EE12DecodeSymbolEv:
   43|  11.2k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi1EE11EndDecodingEv:
  165|      3|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|      3|  ans_.read_end();
  167|      3|}
_ZN5draco17RAnsSymbolDecoderILi2EEC2Ev:
   33|     52|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi2EE6CreateEPNS_13DecoderBufferE:
   59|     52|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     52|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 52]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     52|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     52|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     52|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 9, False: 43]
  ------------------
   67|      9|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 9]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|      9|  } else
   72|     43|#endif
   73|     43|  {
   74|     43|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 43]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     43|  }
   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|     52|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 7, False: 45]
  ------------------
   83|      7|    return false;
   84|      7|  }
   85|     45|  probability_table_.resize(num_symbols_);
   86|     45|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 45]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|   661k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 661k, False: 25]
  ------------------
   91|   661k|    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|   661k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 9, False: 661k]
  ------------------
   95|      9|      return false;
   96|      9|    }
   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|   661k|    const int token = prob_data & 3;
  102|   661k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 157k, False: 503k]
  ------------------
  103|   157k|      const uint32_t offset = prob_data >> 2;
  104|   157k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 4, False: 157k]
  ------------------
  105|      4|        return false;
  106|      4|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  5.17M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 5.01M, False: 157k]
  ------------------
  109|  5.01M|        probability_table_[i + j] = 0;
  110|  5.01M|      }
  111|   157k|      i += offset;
  112|   503k|    } else {
  113|   503k|      const int extra_bytes = token;
  114|   503k|      uint32_t prob = prob_data >> 2;
  115|   942k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 439k, False: 503k]
  ------------------
  116|   439k|        uint8_t eb;
  117|   439k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 7, False: 439k]
  ------------------
  118|      7|          return false;
  119|      7|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   439k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   439k|      }
  124|   503k|      probability_table_[i] = prob;
  125|   503k|    }
  126|   661k|  }
  127|     25|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 9, False: 16]
  ------------------
  128|      9|    return false;
  129|      9|  }
  130|     16|  return true;
  131|     25|}
_ZNK5draco17RAnsSymbolDecoderILi2EE11num_symbolsEv:
   38|     16|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi2EE13StartDecodingEPNS_13DecoderBufferE:
  135|     16|    DecoderBuffer *buffer) {
  136|     16|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     16|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     16|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     16|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 2, False: 14]
  ------------------
  140|      2|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 2]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      2|  } else
  145|     14|#endif
  146|     14|  {
  147|     14|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 14]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     14|  }
  151|     16|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 4, False: 12]
  ------------------
  152|      4|    return false;
  153|      4|  }
  154|     12|  const uint8_t *const data_head =
  155|     12|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     12|  buffer->Advance(bytes_encoded);
  158|     12|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 0, False: 12]
  ------------------
  159|      0|    return false;
  160|      0|  }
  161|     12|  return true;
  162|     12|}
_ZN5draco17RAnsSymbolDecoderILi2EE12DecodeSymbolEv:
   43|   258k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi2EE11EndDecodingEv:
  165|     12|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     12|  ans_.read_end();
  167|     12|}
_ZN5draco17RAnsSymbolDecoderILi3EEC2Ev:
   33|     27|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi3EE6CreateEPNS_13DecoderBufferE:
   59|     27|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     27|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 27]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     27|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     27|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     27|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 20, False: 7]
  ------------------
   67|     20|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 20]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     20|  } else
   72|      7|#endif
   73|      7|  {
   74|      7|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 7]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|      7|  }
   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|     27|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 27]
  ------------------
   83|      0|    return false;
   84|      0|  }
   85|     27|  probability_table_.resize(num_symbols_);
   86|     27|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 1, False: 26]
  ------------------
   87|      1|    return true;
   88|      1|  }
   89|       |  // Decode the table.
   90|  3.62k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 3.60k, False: 22]
  ------------------
   91|  3.60k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  3.60k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 0, False: 3.60k]
  ------------------
   95|      0|      return false;
   96|      0|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  3.60k|    const int token = prob_data & 3;
  102|  3.60k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 2.58k, False: 1.02k]
  ------------------
  103|  2.58k|      const uint32_t offset = prob_data >> 2;
  104|  2.58k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 3, False: 2.57k]
  ------------------
  105|      3|        return false;
  106|      3|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  99.0k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 96.5k, False: 2.57k]
  ------------------
  109|  96.5k|        probability_table_[i + j] = 0;
  110|  96.5k|      }
  111|  2.57k|      i += offset;
  112|  2.57k|    } else {
  113|  1.02k|      const int extra_bytes = token;
  114|  1.02k|      uint32_t prob = prob_data >> 2;
  115|  1.73k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 709, False: 1.02k]
  ------------------
  116|    709|        uint8_t eb;
  117|    709|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 1, False: 708]
  ------------------
  118|      1|          return false;
  119|      1|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|    708|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|    708|      }
  124|  1.02k|      probability_table_[i] = prob;
  125|  1.02k|    }
  126|  3.60k|  }
  127|     22|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 2, False: 20]
  ------------------
  128|      2|    return false;
  129|      2|  }
  130|     20|  return true;
  131|     22|}
_ZNK5draco17RAnsSymbolDecoderILi3EE11num_symbolsEv:
   38|     21|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi3EE13StartDecodingEPNS_13DecoderBufferE:
  135|     20|    DecoderBuffer *buffer) {
  136|     20|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     20|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     20|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     20|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 18, False: 2]
  ------------------
  140|     18|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 18]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     18|  } else
  145|      2|#endif
  146|      2|  {
  147|      2|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 2]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|      2|  }
  151|     20|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 13, False: 7]
  ------------------
  152|     13|    return false;
  153|     13|  }
  154|      7|  const uint8_t *const data_head =
  155|      7|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|      7|  buffer->Advance(bytes_encoded);
  158|      7|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 2, False: 5]
  ------------------
  159|      2|    return false;
  160|      2|  }
  161|      5|  return true;
  162|      7|}
_ZN5draco17RAnsSymbolDecoderILi3EE12DecodeSymbolEv:
   43|     30|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi3EE11EndDecodingEv:
  165|      5|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|      5|  ans_.read_end();
  167|      5|}
_ZN5draco17RAnsSymbolDecoderILi4EEC2Ev:
   33|     11|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi4EE6CreateEPNS_13DecoderBufferE:
   59|     11|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     11|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 11]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     11|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     11|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     11|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 0, False: 11]
  ------------------
   67|      0|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 0]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|      0|  } else
   72|     11|#endif
   73|     11|  {
   74|     11|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 11]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     11|  }
   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|     11|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 11]
  ------------------
   83|      0|    return false;
   84|      0|  }
   85|     11|  probability_table_.resize(num_symbols_);
   86|     11|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 11]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|  4.38k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 4.37k, False: 9]
  ------------------
   91|  4.37k|    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|  4.37k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 0, False: 4.37k]
  ------------------
   95|      0|      return false;
   96|      0|    }
   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|  4.37k|    const int token = prob_data & 3;
  102|  4.37k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 235, False: 4.13k]
  ------------------
  103|    235|      const uint32_t offset = prob_data >> 2;
  104|    235|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 2, False: 233]
  ------------------
  105|      2|        return false;
  106|      2|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  6.42k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 6.19k, False: 233]
  ------------------
  109|  6.19k|        probability_table_[i + j] = 0;
  110|  6.19k|      }
  111|    233|      i += offset;
  112|  4.13k|    } else {
  113|  4.13k|      const int extra_bytes = token;
  114|  4.13k|      uint32_t prob = prob_data >> 2;
  115|  6.40k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 2.26k, False: 4.13k]
  ------------------
  116|  2.26k|        uint8_t eb;
  117|  2.26k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 0, False: 2.26k]
  ------------------
  118|      0|          return false;
  119|      0|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  2.26k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  2.26k|      }
  124|  4.13k|      probability_table_[i] = prob;
  125|  4.13k|    }
  126|  4.37k|  }
  127|      9|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 3, False: 6]
  ------------------
  128|      3|    return false;
  129|      3|  }
  130|      6|  return true;
  131|      9|}
_ZNK5draco17RAnsSymbolDecoderILi4EE11num_symbolsEv:
   38|      6|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi4EE13StartDecodingEPNS_13DecoderBufferE:
  135|      6|    DecoderBuffer *buffer) {
  136|      6|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|      6|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|      6|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|      6|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 6]
  ------------------
  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|      6|#endif
  146|      6|  {
  147|      6|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 6]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|      6|  }
  151|      6|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 1, False: 5]
  ------------------
  152|      1|    return false;
  153|      1|  }
  154|      5|  const uint8_t *const data_head =
  155|      5|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|      5|  buffer->Advance(bytes_encoded);
  158|      5|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 2, False: 3]
  ------------------
  159|      2|    return false;
  160|      2|  }
  161|      3|  return true;
  162|      5|}
_ZN5draco17RAnsSymbolDecoderILi4EE12DecodeSymbolEv:
   43|  16.9k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi4EE11EndDecodingEv:
  165|      3|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|      3|  ans_.read_end();
  167|      3|}
_ZN5draco17RAnsSymbolDecoderILi6EEC2Ev:
   33|     25|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi6EE6CreateEPNS_13DecoderBufferE:
   59|     25|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     25|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 25]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     25|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     25|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     25|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 20, False: 5]
  ------------------
   67|     20|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 20]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     20|  } else
   72|      5|#endif
   73|      5|  {
   74|      5|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 5]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|      5|  }
   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|     25|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 1, False: 24]
  ------------------
   83|      1|    return false;
   84|      1|  }
   85|     24|  probability_table_.resize(num_symbols_);
   86|     24|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 24]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|  39.4k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 39.4k, False: 17]
  ------------------
   91|  39.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|  39.4k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 0, False: 39.4k]
  ------------------
   95|      0|      return false;
   96|      0|    }
   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|  39.4k|    const int token = prob_data & 3;
  102|  39.4k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 12.0k, False: 27.3k]
  ------------------
  103|  12.0k|      const uint32_t offset = prob_data >> 2;
  104|  12.0k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 2, False: 12.0k]
  ------------------
  105|      2|        return false;
  106|      2|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   315k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 303k, False: 12.0k]
  ------------------
  109|   303k|        probability_table_[i + j] = 0;
  110|   303k|      }
  111|  12.0k|      i += offset;
  112|  27.3k|    } else {
  113|  27.3k|      const int extra_bytes = token;
  114|  27.3k|      uint32_t prob = prob_data >> 2;
  115|  51.0k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 23.6k, False: 27.3k]
  ------------------
  116|  23.6k|        uint8_t eb;
  117|  23.6k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 5, False: 23.6k]
  ------------------
  118|      5|          return false;
  119|      5|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  23.6k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  23.6k|      }
  124|  27.3k|      probability_table_[i] = prob;
  125|  27.3k|    }
  126|  39.4k|  }
  127|     17|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 4, False: 13]
  ------------------
  128|      4|    return false;
  129|      4|  }
  130|     13|  return true;
  131|     17|}
_ZNK5draco17RAnsSymbolDecoderILi6EE11num_symbolsEv:
   38|     13|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi6EE13StartDecodingEPNS_13DecoderBufferE:
  135|     13|    DecoderBuffer *buffer) {
  136|     13|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     13|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     13|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     13|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 10, False: 3]
  ------------------
  140|     10|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 10]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     10|  } else
  145|      3|#endif
  146|      3|  {
  147|      3|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 3]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|      3|  }
  151|     13|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 10, False: 3]
  ------------------
  152|     10|    return false;
  153|     10|  }
  154|      3|  const uint8_t *const data_head =
  155|      3|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|      3|  buffer->Advance(bytes_encoded);
  158|      3|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 0, False: 3]
  ------------------
  159|      0|    return false;
  160|      0|  }
  161|      3|  return true;
  162|      3|}
_ZN5draco17RAnsSymbolDecoderILi6EE12DecodeSymbolEv:
   43|   752k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi6EE11EndDecodingEv:
  165|      3|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|      3|  ans_.read_end();
  167|      3|}
_ZN5draco17RAnsSymbolDecoderILi7EEC2Ev:
   33|     40|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi7EE6CreateEPNS_13DecoderBufferE:
   59|     40|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     40|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 40]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     40|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     40|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     40|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 19, False: 21]
  ------------------
   67|     19|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 19]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     19|  } else
   72|     21|#endif
   73|     21|  {
   74|     21|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 21]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     21|  }
   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|     40|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 2, False: 38]
  ------------------
   83|      2|    return false;
   84|      2|  }
   85|     38|  probability_table_.resize(num_symbols_);
   86|     38|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 38]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|  2.14M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 2.14M, False: 4]
  ------------------
   91|  2.14M|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  2.14M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 21, False: 2.14M]
  ------------------
   95|     21|      return false;
   96|     21|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  2.14M|    const int token = prob_data & 3;
  102|  2.14M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 563k, False: 1.58M]
  ------------------
  103|   563k|      const uint32_t offset = prob_data >> 2;
  104|   563k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 9, False: 563k]
  ------------------
  105|      9|        return false;
  106|      9|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  19.0M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 18.5M, False: 563k]
  ------------------
  109|  18.5M|        probability_table_[i + j] = 0;
  110|  18.5M|      }
  111|   563k|      i += offset;
  112|  1.58M|    } else {
  113|  1.58M|      const int extra_bytes = token;
  114|  1.58M|      uint32_t prob = prob_data >> 2;
  115|  2.60M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 1.01M, False: 1.58M]
  ------------------
  116|  1.01M|        uint8_t eb;
  117|  1.01M|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 4, False: 1.01M]
  ------------------
  118|      4|          return false;
  119|      4|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  1.01M|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  1.01M|      }
  124|  1.58M|      probability_table_[i] = prob;
  125|  1.58M|    }
  126|  2.14M|  }
  127|      4|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 1, False: 3]
  ------------------
  128|      1|    return false;
  129|      1|  }
  130|      3|  return true;
  131|      4|}
_ZNK5draco17RAnsSymbolDecoderILi7EE11num_symbolsEv:
   38|      3|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi7EE13StartDecodingEPNS_13DecoderBufferE:
  135|      3|    DecoderBuffer *buffer) {
  136|      3|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|      3|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|      3|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|      3|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 3]
  ------------------
  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|      3|#endif
  146|      3|  {
  147|      3|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 3]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|      3|  }
  151|      3|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 1, False: 2]
  ------------------
  152|      1|    return false;
  153|      1|  }
  154|      2|  const uint8_t *const data_head =
  155|      2|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|      2|  buffer->Advance(bytes_encoded);
  158|      2|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 0, False: 2]
  ------------------
  159|      0|    return false;
  160|      0|  }
  161|      2|  return true;
  162|      2|}
_ZN5draco17RAnsSymbolDecoderILi7EE12DecodeSymbolEv:
   43|  27.5k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi7EE11EndDecodingEv:
  165|      2|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|      2|  ans_.read_end();
  167|      2|}
_ZN5draco17RAnsSymbolDecoderILi8EEC2Ev:
   33|     31|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi8EE6CreateEPNS_13DecoderBufferE:
   59|     31|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     31|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 31]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     31|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     31|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     31|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 19, False: 12]
  ------------------
   67|     19|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 19]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     19|  } else
   72|     12|#endif
   73|     12|  {
   74|     12|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 12]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     12|  }
   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|     31|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 5, False: 26]
  ------------------
   83|      5|    return false;
   84|      5|  }
   85|     26|  probability_table_.resize(num_symbols_);
   86|     26|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 1, False: 25]
  ------------------
   87|      1|    return true;
   88|      1|  }
   89|       |  // Decode the table.
   90|   357k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 357k, False: 14]
  ------------------
   91|   357k|    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|   357k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 5, False: 357k]
  ------------------
   95|      5|      return false;
   96|      5|    }
   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|   357k|    const int token = prob_data & 3;
  102|   357k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 99.7k, False: 257k]
  ------------------
  103|  99.7k|      const uint32_t offset = prob_data >> 2;
  104|  99.7k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 4, False: 99.7k]
  ------------------
  105|      4|        return false;
  106|      4|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  3.59M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 3.49M, False: 99.7k]
  ------------------
  109|  3.49M|        probability_table_[i + j] = 0;
  110|  3.49M|      }
  111|  99.7k|      i += offset;
  112|   257k|    } else {
  113|   257k|      const int extra_bytes = token;
  114|   257k|      uint32_t prob = prob_data >> 2;
  115|   443k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 185k, False: 257k]
  ------------------
  116|   185k|        uint8_t eb;
  117|   185k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 2, False: 185k]
  ------------------
  118|      2|          return false;
  119|      2|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   185k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   185k|      }
  124|   257k|      probability_table_[i] = prob;
  125|   257k|    }
  126|   357k|  }
  127|     14|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 2, False: 12]
  ------------------
  128|      2|    return false;
  129|      2|  }
  130|     12|  return true;
  131|     14|}
_ZNK5draco17RAnsSymbolDecoderILi8EE11num_symbolsEv:
   38|     13|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi8EE13StartDecodingEPNS_13DecoderBufferE:
  135|     12|    DecoderBuffer *buffer) {
  136|     12|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     12|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     12|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     12|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 7, False: 5]
  ------------------
  140|      7|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 7]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      7|  } else
  145|      5|#endif
  146|      5|  {
  147|      5|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 5]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|      5|  }
  151|     12|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 4, False: 8]
  ------------------
  152|      4|    return false;
  153|      4|  }
  154|      8|  const uint8_t *const data_head =
  155|      8|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|      8|  buffer->Advance(bytes_encoded);
  158|      8|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 0, False: 8]
  ------------------
  159|      0|    return false;
  160|      0|  }
  161|      8|  return true;
  162|      8|}
_ZN5draco17RAnsSymbolDecoderILi8EE12DecodeSymbolEv:
   43|   216k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi8EE11EndDecodingEv:
  165|      8|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|      8|  ans_.read_end();
  167|      8|}
_ZN5draco17RAnsSymbolDecoderILi9EEC2Ev:
   33|     29|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi9EE6CreateEPNS_13DecoderBufferE:
   59|     29|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     29|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 29]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     29|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     29|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     29|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 10, False: 19]
  ------------------
   67|     10|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 10]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     10|  } else
   72|     19|#endif
   73|     19|  {
   74|     19|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 19]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     19|  }
   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|     29|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 29]
  ------------------
   83|      0|    return false;
   84|      0|  }
   85|     29|  probability_table_.resize(num_symbols_);
   86|     29|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 29]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|  66.2k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 66.2k, False: 17]
  ------------------
   91|  66.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|  66.2k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 1, False: 66.2k]
  ------------------
   95|      1|      return false;
   96|      1|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  66.2k|    const int token = prob_data & 3;
  102|  66.2k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 10.4k, False: 55.7k]
  ------------------
  103|  10.4k|      const uint32_t offset = prob_data >> 2;
  104|  10.4k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 8, False: 10.4k]
  ------------------
  105|      8|        return false;
  106|      8|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   280k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 269k, False: 10.4k]
  ------------------
  109|   269k|        probability_table_[i + j] = 0;
  110|   269k|      }
  111|  10.4k|      i += offset;
  112|  55.7k|    } else {
  113|  55.7k|      const int extra_bytes = token;
  114|  55.7k|      uint32_t prob = prob_data >> 2;
  115|  79.8k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 24.0k, False: 55.7k]
  ------------------
  116|  24.0k|        uint8_t eb;
  117|  24.0k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 3, False: 24.0k]
  ------------------
  118|      3|          return false;
  119|      3|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  24.0k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  24.0k|      }
  124|  55.7k|      probability_table_[i] = prob;
  125|  55.7k|    }
  126|  66.2k|  }
  127|     17|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 16, False: 1]
  ------------------
  128|     16|    return false;
  129|     16|  }
  130|      1|  return true;
  131|     17|}
_ZNK5draco17RAnsSymbolDecoderILi9EE11num_symbolsEv:
   38|      1|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi9EE13StartDecodingEPNS_13DecoderBufferE:
  135|      1|    DecoderBuffer *buffer) {
  136|      1|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|      1|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|      1|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|      1|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 1]
  ------------------
  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|      1|#endif
  146|      1|  {
  147|      1|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 1]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|      1|  }
  151|      1|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 1, False: 0]
  ------------------
  152|      1|    return false;
  153|      1|  }
  154|      0|  const uint8_t *const data_head =
  155|      0|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|      0|  buffer->Advance(bytes_encoded);
  158|      0|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 0, False: 0]
  ------------------
  159|      0|    return false;
  160|      0|  }
  161|      0|  return true;
  162|      0|}
_ZN5draco17RAnsSymbolDecoderILi10EEC2Ev:
   33|     24|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi10EE6CreateEPNS_13DecoderBufferE:
   59|     24|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     24|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 24]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     24|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     24|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     24|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 0, False: 24]
  ------------------
   67|      0|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 0]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|      0|  } else
   72|     24|#endif
   73|     24|  {
   74|     24|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 24]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     24|  }
   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|     24|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 24]
  ------------------
   83|      0|    return false;
   84|      0|  }
   85|     24|  probability_table_.resize(num_symbols_);
   86|     24|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 24]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|   250k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 250k, False: 15]
  ------------------
   91|   250k|    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|   250k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 1, False: 250k]
  ------------------
   95|      1|      return false;
   96|      1|    }
   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|   250k|    const int token = prob_data & 3;
  102|   250k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 84.0k, False: 166k]
  ------------------
  103|  84.0k|      const uint32_t offset = prob_data >> 2;
  104|  84.0k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 3, False: 84.0k]
  ------------------
  105|      3|        return false;
  106|      3|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  2.99M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 2.90M, False: 84.0k]
  ------------------
  109|  2.90M|        probability_table_[i + j] = 0;
  110|  2.90M|      }
  111|  84.0k|      i += offset;
  112|   166k|    } else {
  113|   166k|      const int extra_bytes = token;
  114|   166k|      uint32_t prob = prob_data >> 2;
  115|   303k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 137k, False: 166k]
  ------------------
  116|   137k|        uint8_t eb;
  117|   137k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 5, False: 137k]
  ------------------
  118|      5|          return false;
  119|      5|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   137k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   137k|      }
  124|   166k|      probability_table_[i] = prob;
  125|   166k|    }
  126|   250k|  }
  127|     15|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 2, False: 13]
  ------------------
  128|      2|    return false;
  129|      2|  }
  130|     13|  return true;
  131|     15|}
_ZNK5draco17RAnsSymbolDecoderILi10EE11num_symbolsEv:
   38|     13|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi10EE13StartDecodingEPNS_13DecoderBufferE:
  135|     13|    DecoderBuffer *buffer) {
  136|     13|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     13|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     13|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     13|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 13]
  ------------------
  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|     13|#endif
  146|     13|  {
  147|     13|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 13]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     13|  }
  151|     13|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 10, False: 3]
  ------------------
  152|     10|    return false;
  153|     10|  }
  154|      3|  const uint8_t *const data_head =
  155|      3|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|      3|  buffer->Advance(bytes_encoded);
  158|      3|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 0, False: 3]
  ------------------
  159|      0|    return false;
  160|      0|  }
  161|      3|  return true;
  162|      3|}
_ZN5draco17RAnsSymbolDecoderILi10EE12DecodeSymbolEv:
   43|  38.8k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi10EE11EndDecodingEv:
  165|      3|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|      3|  ans_.read_end();
  167|      3|}
_ZN5draco17RAnsSymbolDecoderILi11EEC2Ev:
   33|     31|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi11EE6CreateEPNS_13DecoderBufferE:
   59|     31|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     31|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 31]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     31|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     31|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     31|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 20, False: 11]
  ------------------
   67|     20|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 20]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     20|  } else
   72|     11|#endif
   73|     11|  {
   74|     11|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 11]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     11|  }
   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|     31|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 1, False: 30]
  ------------------
   83|      1|    return false;
   84|      1|  }
   85|     30|  probability_table_.resize(num_symbols_);
   86|     30|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 30]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|   112k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 112k, False: 18]
  ------------------
   91|   112k|    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|   112k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 3, False: 112k]
  ------------------
   95|      3|      return false;
   96|      3|    }
   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|   112k|    const int token = prob_data & 3;
  102|   112k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 29.7k, False: 82.6k]
  ------------------
  103|  29.7k|      const uint32_t offset = prob_data >> 2;
  104|  29.7k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 9, False: 29.7k]
  ------------------
  105|      9|        return false;
  106|      9|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  1.17M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 1.14M, False: 29.7k]
  ------------------
  109|  1.14M|        probability_table_[i + j] = 0;
  110|  1.14M|      }
  111|  29.7k|      i += offset;
  112|  82.6k|    } else {
  113|  82.6k|      const int extra_bytes = token;
  114|  82.6k|      uint32_t prob = prob_data >> 2;
  115|   121k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 38.9k, False: 82.6k]
  ------------------
  116|  38.9k|        uint8_t eb;
  117|  38.9k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 0, False: 38.9k]
  ------------------
  118|      0|          return false;
  119|      0|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  38.9k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  38.9k|      }
  124|  82.6k|      probability_table_[i] = prob;
  125|  82.6k|    }
  126|   112k|  }
  127|     18|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 9, False: 9]
  ------------------
  128|      9|    return false;
  129|      9|  }
  130|      9|  return true;
  131|     18|}
_ZNK5draco17RAnsSymbolDecoderILi11EE11num_symbolsEv:
   38|      9|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi11EE13StartDecodingEPNS_13DecoderBufferE:
  135|      9|    DecoderBuffer *buffer) {
  136|      9|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|      9|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|      9|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|      9|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 9]
  ------------------
  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|      9|#endif
  146|      9|  {
  147|      9|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 9]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|      9|  }
  151|      9|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 3, False: 6]
  ------------------
  152|      3|    return false;
  153|      3|  }
  154|      6|  const uint8_t *const data_head =
  155|      6|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|      6|  buffer->Advance(bytes_encoded);
  158|      6|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 0, False: 6]
  ------------------
  159|      0|    return false;
  160|      0|  }
  161|      6|  return true;
  162|      6|}
_ZN5draco17RAnsSymbolDecoderILi11EE12DecodeSymbolEv:
   43|  71.5k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi11EE11EndDecodingEv:
  165|      6|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|      6|  ans_.read_end();
  167|      6|}
_ZN5draco17RAnsSymbolDecoderILi12EEC2Ev:
   33|     16|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi12EE6CreateEPNS_13DecoderBufferE:
   59|     16|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     16|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 16]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     16|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     16|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     16|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 1, False: 15]
  ------------------
   67|      1|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 1]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|      1|  } else
   72|     15|#endif
   73|     15|  {
   74|     15|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 15]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     15|  }
   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|     16|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 16]
  ------------------
   83|      0|    return false;
   84|      0|  }
   85|     16|  probability_table_.resize(num_symbols_);
   86|     16|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 16]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|  61.2k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 61.2k, False: 7]
  ------------------
   91|  61.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|  61.2k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 3, False: 61.2k]
  ------------------
   95|      3|      return false;
   96|      3|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  61.2k|    const int token = prob_data & 3;
  102|  61.2k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 6.33k, False: 54.9k]
  ------------------
  103|  6.33k|      const uint32_t offset = prob_data >> 2;
  104|  6.33k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 2, False: 6.33k]
  ------------------
  105|      2|        return false;
  106|      2|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   214k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 208k, False: 6.33k]
  ------------------
  109|   208k|        probability_table_[i + j] = 0;
  110|   208k|      }
  111|  6.33k|      i += offset;
  112|  54.9k|    } else {
  113|  54.9k|      const int extra_bytes = token;
  114|  54.9k|      uint32_t prob = prob_data >> 2;
  115|  62.8k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 7.93k, False: 54.9k]
  ------------------
  116|  7.93k|        uint8_t eb;
  117|  7.93k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 4, False: 7.93k]
  ------------------
  118|      4|          return false;
  119|      4|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  7.93k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  7.93k|      }
  124|  54.9k|      probability_table_[i] = prob;
  125|  54.9k|    }
  126|  61.2k|  }
  127|      7|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 1, False: 6]
  ------------------
  128|      1|    return false;
  129|      1|  }
  130|      6|  return true;
  131|      7|}
_ZNK5draco17RAnsSymbolDecoderILi12EE11num_symbolsEv:
   38|      6|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi12EE13StartDecodingEPNS_13DecoderBufferE:
  135|      6|    DecoderBuffer *buffer) {
  136|      6|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|      6|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|      6|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|      6|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 6]
  ------------------
  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|      6|#endif
  146|      6|  {
  147|      6|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 6]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|      6|  }
  151|      6|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 1, False: 5]
  ------------------
  152|      1|    return false;
  153|      1|  }
  154|      5|  const uint8_t *const data_head =
  155|      5|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|      5|  buffer->Advance(bytes_encoded);
  158|      5|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 0, False: 5]
  ------------------
  159|      0|    return false;
  160|      0|  }
  161|      5|  return true;
  162|      5|}
_ZN5draco17RAnsSymbolDecoderILi12EE12DecodeSymbolEv:
   43|  21.1k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi12EE11EndDecodingEv:
  165|      5|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|      5|  ans_.read_end();
  167|      5|}
_ZN5draco17RAnsSymbolDecoderILi13EEC2Ev:
   33|     20|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi13EE6CreateEPNS_13DecoderBufferE:
   59|     20|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     20|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 20]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     20|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     20|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     20|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 0, False: 20]
  ------------------
   67|      0|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 0]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|      0|  } else
   72|     20|#endif
   73|     20|  {
   74|     20|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 20]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     20|  }
   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|     20|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 20]
  ------------------
   83|      0|    return false;
   84|      0|  }
   85|     20|  probability_table_.resize(num_symbols_);
   86|     20|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 20]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|   750k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 750k, False: 5]
  ------------------
   91|   750k|    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|   750k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 11, False: 750k]
  ------------------
   95|     11|      return false;
   96|     11|    }
   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|   750k|    const int token = prob_data & 3;
  102|   750k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 163k, False: 587k]
  ------------------
  103|   163k|      const uint32_t offset = prob_data >> 2;
  104|   163k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 4, False: 163k]
  ------------------
  105|      4|        return false;
  106|      4|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  5.88M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 5.71M, False: 163k]
  ------------------
  109|  5.71M|        probability_table_[i + j] = 0;
  110|  5.71M|      }
  111|   163k|      i += offset;
  112|   587k|    } else {
  113|   587k|      const int extra_bytes = token;
  114|   587k|      uint32_t prob = prob_data >> 2;
  115|  1.04M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 459k, False: 587k]
  ------------------
  116|   459k|        uint8_t eb;
  117|   459k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 0, False: 459k]
  ------------------
  118|      0|          return false;
  119|      0|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   459k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   459k|      }
  124|   587k|      probability_table_[i] = prob;
  125|   587k|    }
  126|   750k|  }
  127|      5|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 1, False: 4]
  ------------------
  128|      1|    return false;
  129|      1|  }
  130|      4|  return true;
  131|      5|}
_ZNK5draco17RAnsSymbolDecoderILi13EE11num_symbolsEv:
   38|      4|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi13EE13StartDecodingEPNS_13DecoderBufferE:
  135|      4|    DecoderBuffer *buffer) {
  136|      4|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|      4|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|      4|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|      4|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 4]
  ------------------
  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|      4|#endif
  146|      4|  {
  147|      4|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 4]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|      4|  }
  151|      4|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 2, False: 2]
  ------------------
  152|      2|    return false;
  153|      2|  }
  154|      2|  const uint8_t *const data_head =
  155|      2|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|      2|  buffer->Advance(bytes_encoded);
  158|      2|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 0, False: 2]
  ------------------
  159|      0|    return false;
  160|      0|  }
  161|      2|  return true;
  162|      2|}
_ZN5draco17RAnsSymbolDecoderILi13EE12DecodeSymbolEv:
   43|  27.0k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi13EE11EndDecodingEv:
  165|      2|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|      2|  ans_.read_end();
  167|      2|}
_ZN5draco17RAnsSymbolDecoderILi14EEC2Ev:
   33|     25|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi14EE6CreateEPNS_13DecoderBufferE:
   59|     25|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     25|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 25]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     25|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     25|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     25|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 8, False: 17]
  ------------------
   67|      8|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 8]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|      8|  } else
   72|     17|#endif
   73|     17|  {
   74|     17|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 17]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     17|  }
   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|     25|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 25]
  ------------------
   83|      0|    return false;
   84|      0|  }
   85|     25|  probability_table_.resize(num_symbols_);
   86|     25|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 25]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|   228k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 228k, False: 17]
  ------------------
   91|   228k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|   228k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 1, False: 228k]
  ------------------
   95|      1|      return false;
   96|      1|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   228k|    const int token = prob_data & 3;
  102|   228k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 75.6k, False: 153k]
  ------------------
  103|  75.6k|      const uint32_t offset = prob_data >> 2;
  104|  75.6k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 4, False: 75.6k]
  ------------------
  105|      4|        return false;
  106|      4|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  3.58M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 3.51M, False: 75.6k]
  ------------------
  109|  3.51M|        probability_table_[i + j] = 0;
  110|  3.51M|      }
  111|  75.6k|      i += offset;
  112|   153k|    } else {
  113|   153k|      const int extra_bytes = token;
  114|   153k|      uint32_t prob = prob_data >> 2;
  115|   258k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 105k, False: 153k]
  ------------------
  116|   105k|        uint8_t eb;
  117|   105k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 3, False: 105k]
  ------------------
  118|      3|          return false;
  119|      3|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   105k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   105k|      }
  124|   153k|      probability_table_[i] = prob;
  125|   153k|    }
  126|   228k|  }
  127|     17|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 4, False: 13]
  ------------------
  128|      4|    return false;
  129|      4|  }
  130|     13|  return true;
  131|     17|}
_ZNK5draco17RAnsSymbolDecoderILi14EE11num_symbolsEv:
   38|     13|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi14EE13StartDecodingEPNS_13DecoderBufferE:
  135|     13|    DecoderBuffer *buffer) {
  136|     13|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     13|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     13|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     13|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 13]
  ------------------
  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|     13|#endif
  146|     13|  {
  147|     13|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 13]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|     13|  }
  151|     13|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 7, False: 6]
  ------------------
  152|      7|    return false;
  153|      7|  }
  154|      6|  const uint8_t *const data_head =
  155|      6|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|      6|  buffer->Advance(bytes_encoded);
  158|      6|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 3, False: 3]
  ------------------
  159|      3|    return false;
  160|      3|  }
  161|      3|  return true;
  162|      6|}
_ZN5draco17RAnsSymbolDecoderILi14EE12DecodeSymbolEv:
   43|  25.0k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi14EE11EndDecodingEv:
  165|      3|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|      3|  ans_.read_end();
  167|      3|}
_ZN5draco17RAnsSymbolDecoderILi15EEC2Ev:
   33|     33|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi15EE6CreateEPNS_13DecoderBufferE:
   59|     33|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     33|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 33]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     33|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     33|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     33|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 7, False: 26]
  ------------------
   67|      7|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 7]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|      7|  } else
   72|     26|#endif
   73|     26|  {
   74|     26|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 26]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     26|  }
   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|     33|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 33]
  ------------------
   83|      0|    return false;
   84|      0|  }
   85|     33|  probability_table_.resize(num_symbols_);
   86|     33|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 33]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|   188k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 188k, False: 17]
  ------------------
   91|   188k|    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|   188k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 9, False: 188k]
  ------------------
   95|      9|      return false;
   96|      9|    }
   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|   188k|    const int token = prob_data & 3;
  102|   188k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 27.0k, False: 161k]
  ------------------
  103|  27.0k|      const uint32_t offset = prob_data >> 2;
  104|  27.0k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 4, False: 27.0k]
  ------------------
  105|      4|        return false;
  106|      4|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   839k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 812k, False: 27.0k]
  ------------------
  109|   812k|        probability_table_[i + j] = 0;
  110|   812k|      }
  111|  27.0k|      i += offset;
  112|   161k|    } else {
  113|   161k|      const int extra_bytes = token;
  114|   161k|      uint32_t prob = prob_data >> 2;
  115|   225k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 63.5k, False: 161k]
  ------------------
  116|  63.5k|        uint8_t eb;
  117|  63.5k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 3, False: 63.5k]
  ------------------
  118|      3|          return false;
  119|      3|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  63.5k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  63.5k|      }
  124|   161k|      probability_table_[i] = prob;
  125|   161k|    }
  126|   188k|  }
  127|     17|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 4, False: 13]
  ------------------
  128|      4|    return false;
  129|      4|  }
  130|     13|  return true;
  131|     17|}
_ZNK5draco17RAnsSymbolDecoderILi15EE11num_symbolsEv:
   38|     13|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi15EE13StartDecodingEPNS_13DecoderBufferE:
  135|     13|    DecoderBuffer *buffer) {
  136|     13|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     13|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     13|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     13|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 7, False: 6]
  ------------------
  140|      7|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 7]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      7|  } else
  145|      6|#endif
  146|      6|  {
  147|      6|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 6]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|      6|  }
  151|     13|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 10, False: 3]
  ------------------
  152|     10|    return false;
  153|     10|  }
  154|      3|  const uint8_t *const data_head =
  155|      3|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|      3|  buffer->Advance(bytes_encoded);
  158|      3|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 0, False: 3]
  ------------------
  159|      0|    return false;
  160|      0|  }
  161|      3|  return true;
  162|      3|}
_ZN5draco17RAnsSymbolDecoderILi15EE12DecodeSymbolEv:
   43|  12.3k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi15EE11EndDecodingEv:
  165|      3|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|      3|  ans_.read_end();
  167|      3|}
_ZN5draco17RAnsSymbolDecoderILi16EEC2Ev:
   33|      8|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi16EE6CreateEPNS_13DecoderBufferE:
   59|      8|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|      8|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 8]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|      8|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|      8|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|      8|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 2, False: 6]
  ------------------
   67|      2|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 2]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|      2|  } else
   72|      6|#endif
   73|      6|  {
   74|      6|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 6]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|      6|  }
   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|      8|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 8]
  ------------------
   83|      0|    return false;
   84|      0|  }
   85|      8|  probability_table_.resize(num_symbols_);
   86|      8|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 8]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|  4.00k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 4.00k, False: 6]
  ------------------
   91|  4.00k|    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|  4.00k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 0, False: 4.00k]
  ------------------
   95|      0|      return false;
   96|      0|    }
   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|  4.00k|    const int token = prob_data & 3;
  102|  4.00k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 2.71k, False: 1.29k]
  ------------------
  103|  2.71k|      const uint32_t offset = prob_data >> 2;
  104|  2.71k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 2, False: 2.71k]
  ------------------
  105|      2|        return false;
  106|      2|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  85.9k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 83.1k, False: 2.71k]
  ------------------
  109|  83.1k|        probability_table_[i + j] = 0;
  110|  83.1k|      }
  111|  2.71k|      i += offset;
  112|  2.71k|    } else {
  113|  1.29k|      const int extra_bytes = token;
  114|  1.29k|      uint32_t prob = prob_data >> 2;
  115|  2.09k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 802, False: 1.29k]
  ------------------
  116|    802|        uint8_t eb;
  117|    802|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 0, False: 802]
  ------------------
  118|      0|          return false;
  119|      0|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|    802|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|    802|      }
  124|  1.29k|      probability_table_[i] = prob;
  125|  1.29k|    }
  126|  4.00k|  }
  127|      6|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 3, False: 3]
  ------------------
  128|      3|    return false;
  129|      3|  }
  130|      3|  return true;
  131|      6|}
_ZNK5draco17RAnsSymbolDecoderILi16EE11num_symbolsEv:
   38|      3|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi16EE13StartDecodingEPNS_13DecoderBufferE:
  135|      3|    DecoderBuffer *buffer) {
  136|      3|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|      3|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|      3|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|      3|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 1, False: 2]
  ------------------
  140|      1|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 1]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      1|  } else
  145|      2|#endif
  146|      2|  {
  147|      2|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 2]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|      2|  }
  151|      3|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 3, False: 0]
  ------------------
  152|      3|    return false;
  153|      3|  }
  154|      0|  const uint8_t *const data_head =
  155|      0|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|      0|  buffer->Advance(bytes_encoded);
  158|      0|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 0, False: 0]
  ------------------
  159|      0|    return false;
  160|      0|  }
  161|      0|  return true;
  162|      0|}
_ZN5draco17RAnsSymbolDecoderILi17EEC2Ev:
   33|     13|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi17EE6CreateEPNS_13DecoderBufferE:
   59|     13|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     13|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 13]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     13|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     13|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     13|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 1, False: 12]
  ------------------
   67|      1|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 1]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|      1|  } else
   72|     12|#endif
   73|     12|  {
   74|     12|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 12]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|     12|  }
   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|     13|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 13]
  ------------------
   83|      0|    return false;
   84|      0|  }
   85|     13|  probability_table_.resize(num_symbols_);
   86|     13|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 13]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|  1.19k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.18k, False: 10]
  ------------------
   91|  1.18k|    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.18k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 0, False: 1.18k]
  ------------------
   95|      0|      return false;
   96|      0|    }
   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.18k|    const int token = prob_data & 3;
  102|  1.18k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 514, False: 671]
  ------------------
  103|    514|      const uint32_t offset = prob_data >> 2;
  104|    514|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 3, False: 511]
  ------------------
  105|      3|        return false;
  106|      3|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  15.4k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 14.9k, False: 511]
  ------------------
  109|  14.9k|        probability_table_[i + j] = 0;
  110|  14.9k|      }
  111|    511|      i += offset;
  112|    671|    } else {
  113|    671|      const int extra_bytes = token;
  114|    671|      uint32_t prob = prob_data >> 2;
  115|  1.23k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 562, False: 671]
  ------------------
  116|    562|        uint8_t eb;
  117|    562|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 0, False: 562]
  ------------------
  118|      0|          return false;
  119|      0|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|    562|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|    562|      }
  124|    671|      probability_table_[i] = prob;
  125|    671|    }
  126|  1.18k|  }
  127|     10|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 0, False: 10]
  ------------------
  128|      0|    return false;
  129|      0|  }
  130|     10|  return true;
  131|     10|}
_ZNK5draco17RAnsSymbolDecoderILi17EE11num_symbolsEv:
   38|     10|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi17EE13StartDecodingEPNS_13DecoderBufferE:
  135|     10|    DecoderBuffer *buffer) {
  136|     10|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     10|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     10|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     10|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 1, False: 9]
  ------------------
  140|      1|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 1]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|      1|  } else
  145|      9|#endif
  146|      9|  {
  147|      9|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 9]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|      9|  }
  151|     10|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 6, False: 4]
  ------------------
  152|      6|    return false;
  153|      6|  }
  154|      4|  const uint8_t *const data_head =
  155|      4|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|      4|  buffer->Advance(bytes_encoded);
  158|      4|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 1, False: 3]
  ------------------
  159|      1|    return false;
  160|      1|  }
  161|      3|  return true;
  162|      4|}
_ZN5draco17RAnsSymbolDecoderILi17EE12DecodeSymbolEv:
   43|  1.95k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi17EE11EndDecodingEv:
  165|      3|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|      3|  ans_.read_end();
  167|      3|}
_ZN5draco17RAnsSymbolDecoderILi18EEC2Ev:
   33|     17|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi18EE6CreateEPNS_13DecoderBufferE:
   59|     17|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|     17|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 17]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|     17|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|     17|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     17|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 13, False: 4]
  ------------------
   67|     13|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 13]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     13|  } else
   72|      4|#endif
   73|      4|  {
   74|      4|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 0, False: 4]
  ------------------
   75|      0|      return false;
   76|      0|    }
   77|      4|  }
   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|     17|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 0, False: 17]
  ------------------
   83|      0|    return false;
   84|      0|  }
   85|     17|  probability_table_.resize(num_symbols_);
   86|     17|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 0, False: 17]
  ------------------
   87|      0|    return true;
   88|      0|  }
   89|       |  // Decode the table.
   90|  52.8k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 52.8k, False: 14]
  ------------------
   91|  52.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|  52.8k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 1, False: 52.8k]
  ------------------
   95|      1|      return false;
   96|      1|    }
   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|  52.8k|    const int token = prob_data & 3;
  102|  52.8k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 41.8k, False: 11.0k]
  ------------------
  103|  41.8k|      const uint32_t offset = prob_data >> 2;
  104|  41.8k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 1, False: 41.8k]
  ------------------
  105|      1|        return false;
  106|      1|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   305k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 263k, False: 41.8k]
  ------------------
  109|   263k|        probability_table_[i + j] = 0;
  110|   263k|      }
  111|  41.8k|      i += offset;
  112|  41.8k|    } else {
  113|  11.0k|      const int extra_bytes = token;
  114|  11.0k|      uint32_t prob = prob_data >> 2;
  115|  25.9k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 14.9k, False: 11.0k]
  ------------------
  116|  14.9k|        uint8_t eb;
  117|  14.9k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 1, False: 14.9k]
  ------------------
  118|      1|          return false;
  119|      1|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  14.9k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  14.9k|      }
  124|  11.0k|      probability_table_[i] = prob;
  125|  11.0k|    }
  126|  52.8k|  }
  127|     14|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 1, False: 13]
  ------------------
  128|      1|    return false;
  129|      1|  }
  130|     13|  return true;
  131|     14|}
_ZNK5draco17RAnsSymbolDecoderILi18EE11num_symbolsEv:
   38|     13|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi18EE13StartDecodingEPNS_13DecoderBufferE:
  135|     13|    DecoderBuffer *buffer) {
  136|     13|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|     13|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|     13|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     13|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 11, False: 2]
  ------------------
  140|     11|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 11]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     11|  } else
  145|      2|#endif
  146|      2|  {
  147|      2|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 2]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|      2|  }
  151|     13|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 11, False: 2]
  ------------------
  152|     11|    return false;
  153|     11|  }
  154|      2|  const uint8_t *const data_head =
  155|      2|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|      2|  buffer->Advance(bytes_encoded);
  158|      2|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 0, False: 2]
  ------------------
  159|      0|    return false;
  160|      0|  }
  161|      2|  return true;
  162|      2|}
_ZN5draco17RAnsSymbolDecoderILi18EE12DecodeSymbolEv:
   43|  3.14M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi18EE11EndDecodingEv:
  165|      2|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|      2|  ans_.read_end();
  167|      2|}

_ZN5draco13DecodeSymbolsEjiPNS_13DecoderBufferEPj:
   33|    825|                   DecoderBuffer *src_buffer, uint32_t *out_values) {
   34|    825|  if (num_values == 0) {
  ------------------
  |  Branch (34:7): [True: 0, False: 825]
  ------------------
   35|      0|    return true;
   36|      0|  }
   37|       |  // Decode which scheme to use.
   38|    825|  uint8_t scheme;
   39|    825|  if (!src_buffer->Decode(&scheme)) {
  ------------------
  |  Branch (39:7): [True: 0, False: 825]
  ------------------
   40|      0|    return false;
   41|      0|  }
   42|    825|  if (scheme == SYMBOL_CODING_TAGGED) {
  ------------------
  |  Branch (42:7): [True: 75, False: 750]
  ------------------
   43|     75|    return DecodeTaggedSymbols<RAnsSymbolDecoder>(num_values, num_components,
   44|     75|                                                  src_buffer, out_values);
   45|    750|  } else if (scheme == SYMBOL_CODING_RAW) {
  ------------------
  |  Branch (45:14): [True: 534, False: 216]
  ------------------
   46|    534|    return DecodeRawSymbols<RAnsSymbolDecoder>(num_values, src_buffer,
   47|    534|                                               out_values);
   48|    534|  }
   49|    216|  return false;
   50|    825|}
_ZN5draco19DecodeTaggedSymbolsINS_17RAnsSymbolDecoderEEEbjiPNS_13DecoderBufferEPj:
   54|     75|                         DecoderBuffer *src_buffer, uint32_t *out_values) {
   55|       |  // Decode the encoded data.
   56|     75|  SymbolDecoderT<5> tag_decoder;
   57|     75|  if (!tag_decoder.Create(src_buffer)) {
  ------------------
  |  Branch (57:7): [True: 50, False: 25]
  ------------------
   58|     50|    return false;
   59|     50|  }
   60|       |
   61|     25|  if (!tag_decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (61:7): [True: 11, False: 14]
  ------------------
   62|     11|    return false;
   63|     11|  }
   64|       |
   65|     14|  if (num_values > 0 && tag_decoder.num_symbols() == 0) {
  ------------------
  |  Branch (65:7): [True: 14, False: 0]
  |  Branch (65:25): [True: 10, False: 4]
  ------------------
   66|     10|    return false;  // Wrong number of symbols.
   67|     10|  }
   68|       |
   69|       |  // src_buffer now points behind the encoded tag data (to the place where the
   70|       |  // values are encoded).
   71|      4|  src_buffer->StartBitDecoding(false, nullptr);
   72|      4|  int value_id = 0;
   73|  35.9k|  for (uint32_t i = 0; i < num_values; i += num_components) {
  ------------------
  |  Branch (73:24): [True: 35.9k, False: 4]
  ------------------
   74|       |    // Decode the tag.
   75|  35.9k|    const uint32_t bit_length = tag_decoder.DecodeSymbol();
   76|       |    // Decode the actual value.
   77|  96.4k|    for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (77:21): [True: 60.4k, False: 35.9k]
  ------------------
   78|  60.4k|      uint32_t val;
   79|  60.4k|      if (!src_buffer->DecodeLeastSignificantBits32(bit_length, &val)) {
  ------------------
  |  Branch (79:11): [True: 0, False: 60.4k]
  ------------------
   80|      0|        return false;
   81|      0|      }
   82|  60.4k|      out_values[value_id++] = val;
   83|  60.4k|    }
   84|  35.9k|  }
   85|      4|  tag_decoder.EndDecoding();
   86|      4|  src_buffer->EndBitDecoding();
   87|      4|  return true;
   88|      4|}
_ZN5draco16DecodeRawSymbolsINS_17RAnsSymbolDecoderEEEbjPNS_13DecoderBufferEPj:
  116|    534|                      uint32_t *out_values) {
  117|    534|  uint8_t max_bit_length;
  118|    534|  if (!src_buffer->Decode(&max_bit_length)) {
  ------------------
  |  Branch (118:7): [True: 0, False: 534]
  ------------------
  119|      0|    return false;
  120|      0|  }
  121|    534|  switch (max_bit_length) {
  122|     63|    case 1:
  ------------------
  |  Branch (122:5): [True: 63, False: 471]
  ------------------
  123|     63|      return DecodeRawSymbolsInternal<SymbolDecoderT<1>>(num_values, src_buffer,
  124|     63|                                                         out_values);
  125|     52|    case 2:
  ------------------
  |  Branch (125:5): [True: 52, False: 482]
  ------------------
  126|     52|      return DecodeRawSymbolsInternal<SymbolDecoderT<2>>(num_values, src_buffer,
  127|     52|                                                         out_values);
  128|     27|    case 3:
  ------------------
  |  Branch (128:5): [True: 27, False: 507]
  ------------------
  129|     27|      return DecodeRawSymbolsInternal<SymbolDecoderT<3>>(num_values, src_buffer,
  130|     27|                                                         out_values);
  131|     11|    case 4:
  ------------------
  |  Branch (131:5): [True: 11, False: 523]
  ------------------
  132|     11|      return DecodeRawSymbolsInternal<SymbolDecoderT<4>>(num_values, src_buffer,
  133|     11|                                                         out_values);
  134|     51|    case 5:
  ------------------
  |  Branch (134:5): [True: 51, False: 483]
  ------------------
  135|     51|      return DecodeRawSymbolsInternal<SymbolDecoderT<5>>(num_values, src_buffer,
  136|     51|                                                         out_values);
  137|     25|    case 6:
  ------------------
  |  Branch (137:5): [True: 25, False: 509]
  ------------------
  138|     25|      return DecodeRawSymbolsInternal<SymbolDecoderT<6>>(num_values, src_buffer,
  139|     25|                                                         out_values);
  140|     40|    case 7:
  ------------------
  |  Branch (140:5): [True: 40, False: 494]
  ------------------
  141|     40|      return DecodeRawSymbolsInternal<SymbolDecoderT<7>>(num_values, src_buffer,
  142|     40|                                                         out_values);
  143|     31|    case 8:
  ------------------
  |  Branch (143:5): [True: 31, False: 503]
  ------------------
  144|     31|      return DecodeRawSymbolsInternal<SymbolDecoderT<8>>(num_values, src_buffer,
  145|     31|                                                         out_values);
  146|     29|    case 9:
  ------------------
  |  Branch (146:5): [True: 29, False: 505]
  ------------------
  147|     29|      return DecodeRawSymbolsInternal<SymbolDecoderT<9>>(num_values, src_buffer,
  148|     29|                                                         out_values);
  149|     24|    case 10:
  ------------------
  |  Branch (149:5): [True: 24, False: 510]
  ------------------
  150|     24|      return DecodeRawSymbolsInternal<SymbolDecoderT<10>>(
  151|     24|          num_values, src_buffer, out_values);
  152|     31|    case 11:
  ------------------
  |  Branch (152:5): [True: 31, False: 503]
  ------------------
  153|     31|      return DecodeRawSymbolsInternal<SymbolDecoderT<11>>(
  154|     31|          num_values, src_buffer, out_values);
  155|     16|    case 12:
  ------------------
  |  Branch (155:5): [True: 16, False: 518]
  ------------------
  156|     16|      return DecodeRawSymbolsInternal<SymbolDecoderT<12>>(
  157|     16|          num_values, src_buffer, out_values);
  158|     20|    case 13:
  ------------------
  |  Branch (158:5): [True: 20, False: 514]
  ------------------
  159|     20|      return DecodeRawSymbolsInternal<SymbolDecoderT<13>>(
  160|     20|          num_values, src_buffer, out_values);
  161|     25|    case 14:
  ------------------
  |  Branch (161:5): [True: 25, False: 509]
  ------------------
  162|     25|      return DecodeRawSymbolsInternal<SymbolDecoderT<14>>(
  163|     25|          num_values, src_buffer, out_values);
  164|     33|    case 15:
  ------------------
  |  Branch (164:5): [True: 33, False: 501]
  ------------------
  165|     33|      return DecodeRawSymbolsInternal<SymbolDecoderT<15>>(
  166|     33|          num_values, src_buffer, out_values);
  167|      8|    case 16:
  ------------------
  |  Branch (167:5): [True: 8, False: 526]
  ------------------
  168|      8|      return DecodeRawSymbolsInternal<SymbolDecoderT<16>>(
  169|      8|          num_values, src_buffer, out_values);
  170|     13|    case 17:
  ------------------
  |  Branch (170:5): [True: 13, False: 521]
  ------------------
  171|     13|      return DecodeRawSymbolsInternal<SymbolDecoderT<17>>(
  172|     13|          num_values, src_buffer, out_values);
  173|     17|    case 18:
  ------------------
  |  Branch (173:5): [True: 17, False: 517]
  ------------------
  174|     17|      return DecodeRawSymbolsInternal<SymbolDecoderT<18>>(
  175|     17|          num_values, src_buffer, out_values);
  176|     18|    default:
  ------------------
  |  Branch (176:5): [True: 18, False: 516]
  ------------------
  177|     18|      return false;
  178|    534|  }
  179|    534|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi1EEEEEbjPNS_13DecoderBufferEPj:
   92|     63|                              uint32_t *out_values) {
   93|     63|  SymbolDecoderT decoder;
   94|     63|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 59, False: 4]
  ------------------
   95|     59|    return false;
   96|     59|  }
   97|       |
   98|      4|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 4, False: 0]
  |  Branch (98:25): [True: 1, False: 3]
  ------------------
   99|      1|    return false;  // Wrong number of symbols.
  100|      1|  }
  101|       |
  102|      3|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 0, False: 3]
  ------------------
  103|      0|    return false;
  104|      0|  }
  105|  11.2k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 11.2k, False: 3]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  11.2k|    const uint32_t value = decoder.DecodeSymbol();
  108|  11.2k|    out_values[i] = value;
  109|  11.2k|  }
  110|      3|  decoder.EndDecoding();
  111|      3|  return true;
  112|      3|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi2EEEEEbjPNS_13DecoderBufferEPj:
   92|     52|                              uint32_t *out_values) {
   93|     52|  SymbolDecoderT decoder;
   94|     52|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 36, False: 16]
  ------------------
   95|     36|    return false;
   96|     36|  }
   97|       |
   98|     16|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 16, False: 0]
  |  Branch (98:25): [True: 0, False: 16]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     16|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 4, False: 12]
  ------------------
  103|      4|    return false;
  104|      4|  }
  105|   258k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 258k, False: 12]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   258k|    const uint32_t value = decoder.DecodeSymbol();
  108|   258k|    out_values[i] = value;
  109|   258k|  }
  110|     12|  decoder.EndDecoding();
  111|     12|  return true;
  112|     16|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi3EEEEEbjPNS_13DecoderBufferEPj:
   92|     27|                              uint32_t *out_values) {
   93|     27|  SymbolDecoderT decoder;
   94|     27|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 6, False: 21]
  ------------------
   95|      6|    return false;
   96|      6|  }
   97|       |
   98|     21|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 21, False: 0]
  |  Branch (98:25): [True: 1, False: 20]
  ------------------
   99|      1|    return false;  // Wrong number of symbols.
  100|      1|  }
  101|       |
  102|     20|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 15, False: 5]
  ------------------
  103|     15|    return false;
  104|     15|  }
  105|     35|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 30, False: 5]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|     30|    const uint32_t value = decoder.DecodeSymbol();
  108|     30|    out_values[i] = value;
  109|     30|  }
  110|      5|  decoder.EndDecoding();
  111|      5|  return true;
  112|     20|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi4EEEEEbjPNS_13DecoderBufferEPj:
   92|     11|                              uint32_t *out_values) {
   93|     11|  SymbolDecoderT decoder;
   94|     11|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 5, False: 6]
  ------------------
   95|      5|    return false;
   96|      5|  }
   97|       |
   98|      6|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 6, False: 0]
  |  Branch (98:25): [True: 0, False: 6]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|      6|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 3, False: 3]
  ------------------
  103|      3|    return false;
  104|      3|  }
  105|  16.9k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 16.9k, False: 3]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  16.9k|    const uint32_t value = decoder.DecodeSymbol();
  108|  16.9k|    out_values[i] = value;
  109|  16.9k|  }
  110|      3|  decoder.EndDecoding();
  111|      3|  return true;
  112|      6|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi5EEEEEbjPNS_13DecoderBufferEPj:
   92|     51|                              uint32_t *out_values) {
   93|     51|  SymbolDecoderT decoder;
   94|     51|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 0, False: 51]
  ------------------
   95|      0|    return false;
   96|      0|  }
   97|       |
   98|     51|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 51, False: 0]
  |  Branch (98:25): [True: 46, False: 5]
  ------------------
   99|     46|    return false;  // Wrong number of symbols.
  100|     46|  }
  101|       |
  102|      5|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 0, False: 5]
  ------------------
  103|      0|    return false;
  104|      0|  }
  105|  20.4k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 20.4k, False: 5]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  20.4k|    const uint32_t value = decoder.DecodeSymbol();
  108|  20.4k|    out_values[i] = value;
  109|  20.4k|  }
  110|      5|  decoder.EndDecoding();
  111|      5|  return true;
  112|      5|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi6EEEEEbjPNS_13DecoderBufferEPj:
   92|     25|                              uint32_t *out_values) {
   93|     25|  SymbolDecoderT decoder;
   94|     25|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 12, False: 13]
  ------------------
   95|     12|    return false;
   96|     12|  }
   97|       |
   98|     13|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 13, False: 0]
  |  Branch (98:25): [True: 0, False: 13]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     13|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 10, False: 3]
  ------------------
  103|     10|    return false;
  104|     10|  }
  105|   752k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 752k, False: 3]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   752k|    const uint32_t value = decoder.DecodeSymbol();
  108|   752k|    out_values[i] = value;
  109|   752k|  }
  110|      3|  decoder.EndDecoding();
  111|      3|  return true;
  112|     13|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi7EEEEEbjPNS_13DecoderBufferEPj:
   92|     40|                              uint32_t *out_values) {
   93|     40|  SymbolDecoderT decoder;
   94|     40|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 37, False: 3]
  ------------------
   95|     37|    return false;
   96|     37|  }
   97|       |
   98|      3|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 3, False: 0]
  |  Branch (98:25): [True: 0, False: 3]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|      3|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 1, False: 2]
  ------------------
  103|      1|    return false;
  104|      1|  }
  105|  27.5k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 27.5k, False: 2]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  27.5k|    const uint32_t value = decoder.DecodeSymbol();
  108|  27.5k|    out_values[i] = value;
  109|  27.5k|  }
  110|      2|  decoder.EndDecoding();
  111|      2|  return true;
  112|      3|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi8EEEEEbjPNS_13DecoderBufferEPj:
   92|     31|                              uint32_t *out_values) {
   93|     31|  SymbolDecoderT decoder;
   94|     31|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 18, False: 13]
  ------------------
   95|     18|    return false;
   96|     18|  }
   97|       |
   98|     13|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 13, False: 0]
  |  Branch (98:25): [True: 1, False: 12]
  ------------------
   99|      1|    return false;  // Wrong number of symbols.
  100|      1|  }
  101|       |
  102|     12|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 4, False: 8]
  ------------------
  103|      4|    return false;
  104|      4|  }
  105|   216k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 216k, False: 8]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   216k|    const uint32_t value = decoder.DecodeSymbol();
  108|   216k|    out_values[i] = value;
  109|   216k|  }
  110|      8|  decoder.EndDecoding();
  111|      8|  return true;
  112|     12|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi9EEEEEbjPNS_13DecoderBufferEPj:
   92|     29|                              uint32_t *out_values) {
   93|     29|  SymbolDecoderT decoder;
   94|     29|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 28, False: 1]
  ------------------
   95|     28|    return false;
   96|     28|  }
   97|       |
   98|      1|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 1, False: 0]
  |  Branch (98:25): [True: 0, False: 1]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|      1|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 1, False: 0]
  ------------------
  103|      1|    return false;
  104|      1|  }
  105|      0|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 0, False: 0]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|      0|    const uint32_t value = decoder.DecodeSymbol();
  108|      0|    out_values[i] = value;
  109|      0|  }
  110|      0|  decoder.EndDecoding();
  111|      0|  return true;
  112|      1|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi10EEEEEbjPNS_13DecoderBufferEPj:
   92|     24|                              uint32_t *out_values) {
   93|     24|  SymbolDecoderT decoder;
   94|     24|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 11, False: 13]
  ------------------
   95|     11|    return false;
   96|     11|  }
   97|       |
   98|     13|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 13, False: 0]
  |  Branch (98:25): [True: 0, False: 13]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     13|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 10, False: 3]
  ------------------
  103|     10|    return false;
  104|     10|  }
  105|  38.8k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 38.8k, False: 3]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  38.8k|    const uint32_t value = decoder.DecodeSymbol();
  108|  38.8k|    out_values[i] = value;
  109|  38.8k|  }
  110|      3|  decoder.EndDecoding();
  111|      3|  return true;
  112|     13|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi11EEEEEbjPNS_13DecoderBufferEPj:
   92|     31|                              uint32_t *out_values) {
   93|     31|  SymbolDecoderT decoder;
   94|     31|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 22, False: 9]
  ------------------
   95|     22|    return false;
   96|     22|  }
   97|       |
   98|      9|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 9, False: 0]
  |  Branch (98:25): [True: 0, False: 9]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|      9|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 3, False: 6]
  ------------------
  103|      3|    return false;
  104|      3|  }
  105|  71.5k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 71.5k, False: 6]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  71.5k|    const uint32_t value = decoder.DecodeSymbol();
  108|  71.5k|    out_values[i] = value;
  109|  71.5k|  }
  110|      6|  decoder.EndDecoding();
  111|      6|  return true;
  112|      9|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi12EEEEEbjPNS_13DecoderBufferEPj:
   92|     16|                              uint32_t *out_values) {
   93|     16|  SymbolDecoderT decoder;
   94|     16|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 10, False: 6]
  ------------------
   95|     10|    return false;
   96|     10|  }
   97|       |
   98|      6|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 6, False: 0]
  |  Branch (98:25): [True: 0, False: 6]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|      6|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 1, False: 5]
  ------------------
  103|      1|    return false;
  104|      1|  }
  105|  21.1k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 21.1k, False: 5]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  21.1k|    const uint32_t value = decoder.DecodeSymbol();
  108|  21.1k|    out_values[i] = value;
  109|  21.1k|  }
  110|      5|  decoder.EndDecoding();
  111|      5|  return true;
  112|      6|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi13EEEEEbjPNS_13DecoderBufferEPj:
   92|     20|                              uint32_t *out_values) {
   93|     20|  SymbolDecoderT decoder;
   94|     20|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 16, False: 4]
  ------------------
   95|     16|    return false;
   96|     16|  }
   97|       |
   98|      4|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 4, False: 0]
  |  Branch (98:25): [True: 0, False: 4]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|      4|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 2, False: 2]
  ------------------
  103|      2|    return false;
  104|      2|  }
  105|  27.0k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 27.0k, False: 2]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  27.0k|    const uint32_t value = decoder.DecodeSymbol();
  108|  27.0k|    out_values[i] = value;
  109|  27.0k|  }
  110|      2|  decoder.EndDecoding();
  111|      2|  return true;
  112|      4|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi14EEEEEbjPNS_13DecoderBufferEPj:
   92|     25|                              uint32_t *out_values) {
   93|     25|  SymbolDecoderT decoder;
   94|     25|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 12, False: 13]
  ------------------
   95|     12|    return false;
   96|     12|  }
   97|       |
   98|     13|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 13, False: 0]
  |  Branch (98:25): [True: 0, False: 13]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     13|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 10, False: 3]
  ------------------
  103|     10|    return false;
  104|     10|  }
  105|  25.0k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 25.0k, False: 3]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  25.0k|    const uint32_t value = decoder.DecodeSymbol();
  108|  25.0k|    out_values[i] = value;
  109|  25.0k|  }
  110|      3|  decoder.EndDecoding();
  111|      3|  return true;
  112|     13|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi15EEEEEbjPNS_13DecoderBufferEPj:
   92|     33|                              uint32_t *out_values) {
   93|     33|  SymbolDecoderT decoder;
   94|     33|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 20, False: 13]
  ------------------
   95|     20|    return false;
   96|     20|  }
   97|       |
   98|     13|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 13, False: 0]
  |  Branch (98:25): [True: 0, False: 13]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     13|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 10, False: 3]
  ------------------
  103|     10|    return false;
  104|     10|  }
  105|  12.3k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 12.3k, False: 3]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  12.3k|    const uint32_t value = decoder.DecodeSymbol();
  108|  12.3k|    out_values[i] = value;
  109|  12.3k|  }
  110|      3|  decoder.EndDecoding();
  111|      3|  return true;
  112|     13|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi16EEEEEbjPNS_13DecoderBufferEPj:
   92|      8|                              uint32_t *out_values) {
   93|      8|  SymbolDecoderT decoder;
   94|      8|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 5, False: 3]
  ------------------
   95|      5|    return false;
   96|      5|  }
   97|       |
   98|      3|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 3, False: 0]
  |  Branch (98:25): [True: 0, False: 3]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|      3|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 3, False: 0]
  ------------------
  103|      3|    return false;
  104|      3|  }
  105|      0|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 0, False: 0]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|      0|    const uint32_t value = decoder.DecodeSymbol();
  108|      0|    out_values[i] = value;
  109|      0|  }
  110|      0|  decoder.EndDecoding();
  111|      0|  return true;
  112|      3|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi17EEEEEbjPNS_13DecoderBufferEPj:
   92|     13|                              uint32_t *out_values) {
   93|     13|  SymbolDecoderT decoder;
   94|     13|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 3, False: 10]
  ------------------
   95|      3|    return false;
   96|      3|  }
   97|       |
   98|     10|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 10, False: 0]
  |  Branch (98:25): [True: 0, False: 10]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     10|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 7, False: 3]
  ------------------
  103|      7|    return false;
  104|      7|  }
  105|  1.95k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 1.95k, False: 3]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  1.95k|    const uint32_t value = decoder.DecodeSymbol();
  108|  1.95k|    out_values[i] = value;
  109|  1.95k|  }
  110|      3|  decoder.EndDecoding();
  111|      3|  return true;
  112|     10|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi18EEEEEbjPNS_13DecoderBufferEPj:
   92|     17|                              uint32_t *out_values) {
   93|     17|  SymbolDecoderT decoder;
   94|     17|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 4, False: 13]
  ------------------
   95|      4|    return false;
   96|      4|  }
   97|       |
   98|     13|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 13, False: 0]
  |  Branch (98:25): [True: 0, False: 13]
  ------------------
   99|      0|    return false;  // Wrong number of symbols.
  100|      0|  }
  101|       |
  102|     13|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 11, False: 2]
  ------------------
  103|     11|    return false;
  104|     11|  }
  105|  3.14M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 3.14M, False: 2]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  3.14M|    const uint32_t value = decoder.DecodeSymbol();
  108|  3.14M|    out_values[i] = value;
  109|  3.14M|  }
  110|      2|  decoder.EndDecoding();
  111|      2|  return true;
  112|     13|}

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

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

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

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

_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEEC2Ev:
   48|    254|    : decoder_(nullptr),
   49|    254|      last_symbol_id_(-1),
   50|    254|      last_vert_id_(-1),
   51|    254|      last_face_id_(-1),
   52|    254|      num_new_vertices_(0),
   53|    254|      num_encoded_vertices_(0),
   54|    254|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|    254|    MeshEdgebreakerDecoder *decoder) {
   59|    254|  decoder_ = decoder;
   60|    254|  return true;
   61|    254|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE23GetAttributeCornerTableEi:
   66|    304|    int att_id) const {
   67|    346|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 336, False: 10]
  ------------------
   68|    336|    const int decoder_id = attribute_data_[i].decoder_id;
   69|    336|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 42, False: 294]
  |  Branch (69:27): [True: 0, False: 294]
  ------------------
   70|     42|      continue;
   71|     42|    }
   72|    294|    const AttributesDecoderInterface *const dec =
   73|    294|        decoder_->attributes_decoder(decoder_id);
   74|  2.01k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 2.01k, False: 0]
  ------------------
   75|  2.01k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 294, False: 1.72k]
  ------------------
   76|    294|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 163, False: 131]
  ------------------
   77|    163|          return &attribute_data_[i].connectivity_data;
   78|    163|        }
   79|    131|        return nullptr;
   80|    294|      }
   81|  2.01k|    }
   82|    294|  }
   83|     10|  return nullptr;
   84|    304|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE24GetAttributeEncodingDataEi:
   89|    304|    int att_id) const {
   90|    346|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 336, False: 10]
  ------------------
   91|    336|    const int decoder_id = attribute_data_[i].decoder_id;
   92|    336|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 42, False: 294]
  |  Branch (92:27): [True: 0, False: 294]
  ------------------
   93|     42|      continue;
   94|     42|    }
   95|    294|    const AttributesDecoderInterface *const dec =
   96|    294|        decoder_->attributes_decoder(decoder_id);
   97|  2.01k|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 2.01k, False: 0]
  ------------------
   98|  2.01k|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 294, False: 1.72k]
  ------------------
   99|    294|        return &attribute_data_[i].encoding_data;
  100|    294|      }
  101|  2.01k|    }
  102|    294|  }
  103|     10|  return &pos_encoding_data_;
  104|    304|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE23CreateAttributesDecoderEi:
  130|    162|    int32_t att_decoder_id) {
  131|    162|  int8_t att_data_id;
  132|    162|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 0, False: 162]
  ------------------
  133|      0|    return false;
  134|      0|  }
  135|    162|  uint8_t decoder_type;
  136|    162|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 0, False: 162]
  ------------------
  137|      0|    return false;
  138|      0|  }
  139|       |
  140|    162|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 154, False: 8]
  ------------------
  141|    154|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 28, False: 126]
  ------------------
  142|     28|      return false;  // Unexpected attribute data.
  143|     28|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|    126|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 0, False: 126]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|       |
  151|    126|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|    126|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|      8|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 0, False: 8]
  ------------------
  155|      0|      return false;  // Some other decoder is already using the data. Error.
  156|      0|    }
  157|      8|    pos_data_decoder_id_ = att_decoder_id;
  158|      8|  }
  159|       |
  160|    134|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|    134|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    134|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 134, False: 0]
  ------------------
  162|    134|    uint8_t traversal_method_encoded;
  163|    134|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 0, False: 134]
  ------------------
  164|      0|      return false;
  165|      0|    }
  166|       |    // Check that decoded traversal method is valid.
  167|    134|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 3, False: 131]
  ------------------
  168|      3|      return false;
  169|      3|    }
  170|    131|    traversal_method =
  171|    131|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|    131|  }
  173|       |
  174|    131|  const Mesh *mesh = decoder_->mesh();
  175|    131|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|    131|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 48, False: 83]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|     48|    MeshAttributeIndicesEncodingData *encoding_data = nullptr;
  181|     48|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 7, False: 41]
  ------------------
  182|      7|      encoding_data = &pos_encoding_data_;
  183|     41|    } else {
  184|     41|      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|     41|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|     41|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|     48|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 21, False: 27]
  ------------------
  191|     21|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|     21|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|     21|          AttTraverser;
  194|     21|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|     27|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 27, False: 0]
  ------------------
  196|     27|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|     27|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|     27|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|     27|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|     83|  } else {
  203|     83|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 0, False: 83]
  ------------------
  204|      0|      return false;  // Unsupported method.
  205|      0|    }
  206|     83|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 0, False: 83]
  ------------------
  207|      0|      return false;  // Attribute data must be specified.
  208|      0|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|     83|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|     83|        AttObserver;
  214|     83|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|     83|        AttTraverser;
  216|       |
  217|     83|    MeshAttributeIndicesEncodingData *const encoding_data =
  218|     83|        &attribute_data_[att_data_id].encoding_data;
  219|     83|    const MeshAttributeCornerTable *const corner_table =
  220|     83|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|     83|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|     83|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|     83|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|     83|                             encoding_data);
  227|       |
  228|     83|    AttTraverser att_traverser;
  229|     83|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|     83|    traversal_sequencer->SetTraverser(att_traverser);
  232|     83|    sequencer = std::move(traversal_sequencer);
  233|     83|  }
  234|       |
  235|    131|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 131]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|    131|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|    131|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|    131|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|    131|                                        std::move(att_controller));
  244|    131|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18DecodeConnectivityEv:
  247|    254|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|    254|  num_new_vertices_ = 0;
  249|    254|  new_to_parent_vertex_map_.clear();
  250|    254|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|    254|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    254|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 60, False: 194]
  ------------------
  252|     60|    uint32_t num_new_verts;
  253|     60|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     60|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 25, False: 35]
  ------------------
  254|     25|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 25]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|     35|    } else {
  258|     35|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 35]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|     35|    }
  262|     60|    num_new_vertices_ = num_new_verts;
  263|     60|  }
  264|    254|#endif
  265|       |
  266|    254|  uint32_t num_encoded_vertices;
  267|    254|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|    254|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    254|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 25, False: 229]
  ------------------
  269|     25|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 25]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|     25|  } else
  274|    229|#endif
  275|    229|  {
  276|    229|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 229]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|    229|  }
  280|    254|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|    254|  uint32_t num_faces;
  283|    254|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|    254|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    254|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 25, False: 229]
  ------------------
  285|     25|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 25]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|     25|  } else
  290|    229|#endif
  291|    229|  {
  292|    229|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 229]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|    229|  }
  296|    254|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 0, False: 254]
  ------------------
  297|      0|    return false;  // Draco cannot handle this many faces.
  298|      0|  }
  299|       |
  300|    254|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 0, False: 254]
  ------------------
  301|      0|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      0|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|    254|  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|    254|  const uint64_t num_encoded_vertices_64 =
  311|    254|      static_cast<uint64_t>(num_encoded_vertices_);
  312|    254|  const uint64_t max_num_vertex_edges =
  313|    254|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|    254|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 0, False: 254]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      0|    return false;
  317|      0|  }
  318|       |
  319|    254|  uint8_t num_attribute_data;
  320|    254|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 254]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|    254|  uint32_t num_encoded_symbols;
  325|    254|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|    254|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    254|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 25, False: 229]
  ------------------
  327|     25|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 25]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|     25|  } else
  332|    229|#endif
  333|    229|  {
  334|    229|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 229]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|    229|  }
  338|       |
  339|    254|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 0, False: 254]
  ------------------
  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|      0|    return false;
  344|      0|  }
  345|    254|  const uint32_t max_encoded_faces =
  346|    254|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|    254|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 1, False: 253]
  ------------------
  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|      1|    return false;
  352|      1|  }
  353|       |
  354|    253|  uint32_t num_encoded_split_symbols;
  355|    253|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|    253|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    253|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 24, False: 229]
  ------------------
  357|     24|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 24]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|     24|  } else
  362|    229|#endif
  363|    229|  {
  364|    229|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 229]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|    229|  }
  368|       |
  369|    253|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 0, False: 253]
  ------------------
  370|      0|    return false;  // Split symbols are a sub-set of all symbols.
  371|      0|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|    253|  vertex_traversal_length_.clear();
  375|    253|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|    253|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 253]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|    253|  processed_corner_ids_.clear();
  380|    253|  processed_corner_ids_.reserve(num_faces);
  381|    253|  processed_connectivity_corners_.clear();
  382|    253|  processed_connectivity_corners_.reserve(num_faces);
  383|    253|  topology_split_data_.clear();
  384|    253|  hole_event_data_.clear();
  385|    253|  init_face_configurations_.clear();
  386|    253|  init_corners_.clear();
  387|       |
  388|    253|  last_symbol_id_ = -1;
  389|    253|  last_face_id_ = -1;
  390|    253|  last_vert_id_ = -1;
  391|       |
  392|    253|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|    253|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|    253|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 0, False: 253]
  ------------------
  397|    253|          num_faces, num_encoded_vertices_ + num_encoded_split_symbols)) {
  398|      0|    return false;
  399|      0|  }
  400|       |
  401|       |  // Start with all vertices marked as holes (boundaries).
  402|       |  // Only vertices decoded with TOPOLOGY_C symbol (and the initial face) will
  403|       |  // be marked as non hole vertices. We need to allocate the array larger
  404|       |  // because split symbols can create extra vertices during the decoding
  405|       |  // process (these extra vertices are then eliminated during deduplication).
  406|    253|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|    253|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|    253|  int32_t topology_split_decoded_bytes = -1;
  410|    253|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    253|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 59, False: 194]
  ------------------
  411|     59|    uint32_t encoded_connectivity_size;
  412|     59|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     59|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 24, False: 35]
  ------------------
  413|     24|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 0, False: 24]
  ------------------
  414|      0|        return false;
  415|      0|      }
  416|     35|    } else {
  417|     35|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 35]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|     35|    }
  421|     59|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 0, False: 59]
  ------------------
  422|     59|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 0, False: 59]
  ------------------
  423|      0|      return false;
  424|      0|    }
  425|     59|    DecoderBuffer event_buffer;
  426|     59|    event_buffer.Init(
  427|     59|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|     59|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|     59|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|     59|    topology_split_decoded_bytes =
  432|     59|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|     59|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 20, False: 39]
  ------------------
  434|     20|      return false;
  435|     20|    }
  436|       |
  437|     59|  } else
  438|    194|#endif
  439|    194|  {
  440|    194|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 0, False: 194]
  ------------------
  441|      0|      return false;
  442|      0|    }
  443|    194|  }
  444|       |
  445|    233|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|    233|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|    233|                                           num_encoded_split_symbols);
  449|    233|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|    233|  DecoderBuffer traversal_end_buffer;
  452|    233|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 6, False: 227]
  ------------------
  453|      6|    return false;
  454|      6|  }
  455|       |
  456|    227|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|    227|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 65, False: 162]
  ------------------
  458|     65|    return false;
  459|     65|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|    162|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|    162|                           traversal_end_buffer.remaining_size(),
  464|    162|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|    162|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|    162|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    162|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 34, False: 128]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|     34|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|     34|  }
  471|    162|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|    162|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 161, False: 1]
  ------------------
  475|    161|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|    161|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|    161|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 34, False: 127]
  ------------------
  477|    102|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 68, False: 34]
  ------------------
  478|     68|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 68]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|     68|      }
  482|       |
  483|     34|    } else
  484|    127|#endif
  485|    127|    {
  486|   327k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 327k, False: 127]
  ------------------
  487|   327k|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 327k]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|   327k|      }
  491|    127|    }
  492|    161|  }
  493|    162|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|    820|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 658, False: 162]
  ------------------
  498|    658|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  3.61M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 3.61M, False: 658]
  ------------------
  501|  3.61M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  3.61M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|    658|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 658]
  ------------------
  505|    658|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|    658|  }
  509|       |
  510|    162|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|    820|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 658, False: 162]
  ------------------
  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|    658|    int32_t att_connectivity_verts =
  517|    658|        attribute_data_[i].connectivity_data.num_vertices();
  518|    658|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 4, False: 654]
  ------------------
  519|      4|      att_connectivity_verts = corner_table_->num_vertices();
  520|      4|    }
  521|    658|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|    658|  }
  523|    162|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 0, False: 162]
  ------------------
  524|      0|    return false;
  525|      0|  }
  526|    162|  return true;
  527|    162|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE19OnAttributesDecodedEv:
  530|      8|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|      8|  return true;
  532|      8|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18DecodeConnectivityEi:
  536|    227|    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|    227|  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|    227|  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|    227|  std::vector<VertexIndex> invalid_vertices;
  558|    227|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|    227|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|    227|  int num_faces = 0;
  562|  13.2M|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 13.2M, False: 190]
  ------------------
  563|  13.2M|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  13.2M|    bool check_topology_split = false;
  566|  13.2M|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  13.2M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 6.12M, False: 7.10M]
  ------------------
  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|  6.12M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 0, False: 6.12M]
  ------------------
  588|      0|        return -1;
  589|      0|      }
  590|       |
  591|  6.12M|      const CornerIndex corner_a = active_corner_stack.back();
  592|  6.12M|      const VertexIndex vertex_x =
  593|  6.12M|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|  6.12M|      const CornerIndex corner_b =
  595|  6.12M|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|  6.12M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 34, False: 6.12M]
  ------------------
  598|       |        // All matched corners must be different.
  599|     34|        return -1;
  600|     34|      }
  601|  6.12M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 6.12M]
  |  Branch (601:11): [True: 0, False: 6.12M]
  ------------------
  602|  6.12M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 6.12M]
  ------------------
  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|  6.12M|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|  6.12M|      SetOppositeCorners(corner_a, corner + 1);
  612|  6.12M|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|  6.12M|      const VertexIndex vert_a_prev =
  616|  6.12M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|  6.12M|      const VertexIndex vert_b_next =
  618|  6.12M|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|  6.12M|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 6.12M]
  |  Branch (619:38): [True: 0, False: 6.12M]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|  6.12M|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|  6.12M|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|  6.12M|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|  6.12M|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|  6.12M|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|  6.12M|      active_corner_stack.back() = corner;
  631|  7.10M|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 1.66M, False: 5.43M]
  |  Branch (631:40): [True: 650k, False: 4.78M]
  ------------------
  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|  2.31M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 0, False: 2.31M]
  ------------------
  647|      0|        return -1;
  648|      0|      }
  649|  2.31M|      const CornerIndex corner_a = active_corner_stack.back();
  650|  2.31M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 2.31M]
  ------------------
  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|  2.31M|      const CornerIndex corner(3 * face.value());
  658|  2.31M|      CornerIndex opp_corner, corner_l, corner_r;
  659|  2.31M|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 1.66M, False: 650k]
  ------------------
  660|       |        // "r" is the new first corner.
  661|  1.66M|        opp_corner = corner + 2;
  662|  1.66M|        corner_l = corner + 1;
  663|  1.66M|        corner_r = corner;
  664|  1.66M|      } else {
  665|       |        // "l" is the new first corner.
  666|   650k|        opp_corner = corner + 1;
  667|   650k|        corner_l = corner;
  668|   650k|        corner_r = corner + 2;
  669|   650k|      }
  670|  2.31M|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  2.31M|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  2.31M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 1, False: 2.31M]
  ------------------
  675|      1|        return -1;  // Unexpected number of decoded vertices.
  676|      1|      }
  677|       |
  678|  2.31M|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  2.31M|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  2.31M|      const VertexIndex vertex_r =
  682|  2.31M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  2.31M|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  2.31M|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  2.31M|      corner_table_->MapCornerToVertex(
  688|  2.31M|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  2.31M|      active_corner_stack.back() = corner;
  690|  2.31M|      check_topology_split = true;
  691|  4.78M|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 1.39M, False: 3.39M]
  ------------------
  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.39M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 0, False: 1.39M]
  ------------------
  703|      0|        return -1;
  704|      0|      }
  705|  1.39M|      const CornerIndex corner_b = active_corner_stack.back();
  706|  1.39M|      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.39M|      const auto it = topology_split_active_corners.find(symbol_id);
  711|  1.39M|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 0, False: 1.39M]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|      0|        active_corner_stack.push_back(it->second);
  714|      0|      }
  715|  1.39M|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 1, False: 1.39M]
  ------------------
  716|      1|        return -1;
  717|      1|      }
  718|  1.39M|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|  1.39M|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 1.39M]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|  1.39M|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 0, False: 1.39M]
  |  Branch (724:11): [True: 0, False: 1.39M]
  ------------------
  725|  1.39M|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 1.39M]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|      0|        return -1;
  729|      0|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|  1.39M|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|  1.39M|      SetOppositeCorners(corner_a, corner + 2);
  735|  1.39M|      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.39M|      const VertexIndex vertex_p =
  739|  1.39M|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|  1.39M|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|  1.39M|      corner_table_->MapCornerToVertex(
  742|  1.39M|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|  1.39M|      const VertexIndex vert_b_prev =
  744|  1.39M|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|  1.39M|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|  1.39M|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|  1.39M|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|  1.39M|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|  1.39M|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|  1.39M|      corner_table_->SetLeftMostCorner(vertex_p,
  752|  1.39M|                                       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.39M|      const CornerIndex first_corner = corner_n;
  757|  8.48M|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 7.09M, False: 1.39M]
  ------------------
  758|  7.09M|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|  7.09M|        corner_n = corner_table_->SwingLeft(corner_n);
  760|  7.09M|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 0, False: 7.09M]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      0|          return -1;
  764|      0|        }
  765|  7.09M|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|  1.39M|      corner_table_->MakeVertexIsolated(vertex_n);
  769|  1.39M|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 8.01k, False: 1.38M]
  ------------------
  770|  8.01k|        invalid_vertices.push_back(vertex_n);
  771|  8.01k|      }
  772|  1.39M|      active_corner_stack.back() = corner;
  773|  3.39M|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 3.39M, False: 0]
  ------------------
  774|  3.39M|      const CornerIndex corner(3 * face.value());
  775|  3.39M|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|  3.39M|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|  3.39M|      corner_table_->MapCornerToVertex(corner + 1,
  779|  3.39M|                                       corner_table_->AddNewVertex());
  780|  3.39M|      corner_table_->MapCornerToVertex(corner + 2,
  781|  3.39M|                                       corner_table_->AddNewVertex());
  782|       |
  783|  3.39M|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 0, False: 3.39M]
  ------------------
  784|      0|        return -1;  // Unexpected number of decoded vertices.
  785|      0|      }
  786|       |
  787|  3.39M|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|  3.39M|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|  3.39M|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|  3.39M|      active_corner_stack.push_back(corner);
  792|  3.39M|      check_topology_split = true;
  793|  3.39M|    } 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|  13.2M|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  13.2M|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 5.71M, False: 7.51M]
  ------------------
  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|  5.71M|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  5.71M|      EdgeFaceName split_edge;
  812|  5.71M|      int encoder_split_symbol_id;
  813|  5.71M|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 36, False: 5.71M]
  ------------------
  814|  5.71M|                             &encoder_split_symbol_id)) {
  815|     36|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 1, False: 35]
  ------------------
  816|      1|          return -1;  // Wrong split symbol id.
  817|      1|        }
  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|     35|        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|     35|        CornerIndex new_active_corner;
  831|     35|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 10, False: 25]
  ------------------
  832|     10|          new_active_corner = corner_table_->Next(act_top_corner);
  833|     25|        } else {
  834|     25|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|     25|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|     35|        const int decoder_split_symbol_id =
  839|     35|            num_symbols - encoder_split_symbol_id - 1;
  840|     35|        topology_split_active_corners[decoder_split_symbol_id] =
  841|     35|            new_active_corner;
  842|     35|      }
  843|  5.71M|    }
  844|  13.2M|  }
  845|    190|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 190]
  ------------------
  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|  45.3k|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 45.1k, False: 170]
  ------------------
  850|  45.1k|    const CornerIndex corner = active_corner_stack.back();
  851|  45.1k|    active_corner_stack.pop_back();
  852|  45.1k|    const bool interior_face =
  853|  45.1k|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|  45.1k|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 39.6k, False: 5.52k]
  ------------------
  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|  39.6k|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 1, False: 39.6k]
  ------------------
  877|      1|        return -1;  // More faces than expected added to the mesh.
  878|      1|      }
  879|       |
  880|  39.6k|      const CornerIndex corner_a = corner;
  881|  39.6k|      const VertexIndex vert_n =
  882|  39.6k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|  39.6k|      const CornerIndex corner_b =
  884|  39.6k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|  39.6k|      const VertexIndex vert_x =
  887|  39.6k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|  39.6k|      const CornerIndex corner_c =
  889|  39.6k|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|  39.6k|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 11, False: 39.6k]
  |  Branch (891:33): [True: 8, False: 39.6k]
  |  Branch (891:55): [True: 0, False: 39.6k]
  ------------------
  892|       |        // All matched corners must be different.
  893|     19|        return -1;
  894|     19|      }
  895|  39.6k|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 0, False: 39.6k]
  |  Branch (895:11): [True: 0, False: 39.6k]
  ------------------
  896|  39.6k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 0, False: 39.6k]
  ------------------
  897|  39.6k|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 0, False: 39.6k]
  ------------------
  898|       |        // One of the corners is already opposite to an existing face, which
  899|       |        // should not happen unless the input was tampered with.
  900|      0|        return -1;
  901|      0|      }
  902|       |
  903|  39.6k|      const VertexIndex vert_p =
  904|  39.6k|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|  39.6k|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|  39.6k|      const CornerIndex new_corner(3 * face.value());
  909|  39.6k|      SetOppositeCorners(new_corner, corner);
  910|  39.6k|      SetOppositeCorners(new_corner + 1, corner_b);
  911|  39.6k|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|  39.6k|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|  39.6k|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|  39.6k|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|   158k|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 118k, False: 39.6k]
  ------------------
  920|   118k|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|   118k|      }
  922|       |
  923|  39.6k|      init_face_configurations_.push_back(true);
  924|  39.6k|      init_corners_.push_back(new_corner);
  925|  39.6k|    } else {
  926|       |      // The initial face wasn't interior and the traversal had to start from
  927|       |      // an open boundary. In this case no new face is added, but we need to
  928|       |      // keep record about the first opposite corner to this boundary.
  929|  5.52k|      init_face_configurations_.push_back(false);
  930|  5.52k|      init_corners_.push_back(corner);
  931|  5.52k|    }
  932|  45.1k|  }
  933|    170|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 8, False: 162]
  ------------------
  934|      8|    return -1;  // Unexpected number of decoded faces.
  935|      8|  }
  936|       |
  937|    162|  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|    162|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 0, False: 162]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|      0|    VertexIndex src_vert(num_vertices - 1);
  943|      0|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 0, False: 0]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|      0|      src_vert = VertexIndex(--num_vertices - 1);
  946|      0|    }
  947|      0|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 0, False: 0]
  ------------------
  948|      0|      continue;  // No need to swap anything.
  949|      0|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|      0|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|      0|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 0, False: 0]
  ------------------
  954|      0|      const CornerIndex cid = vcit.Corner();
  955|      0|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 0, False: 0]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      0|        return -1;
  959|      0|      }
  960|      0|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|      0|    }
  962|      0|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|      0|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|      0|    corner_table_->MakeVertexIsolated(src_vert);
  967|      0|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|      0|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|      0|    num_vertices--;
  972|      0|  }
  973|    162|  return num_vertices;
  974|    162|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|    253|    DecoderBuffer *decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|    253|  uint32_t num_topology_splits;
  982|    253|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|    253|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    253|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 24, False: 229]
  ------------------
  984|     24|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 0, False: 24]
  ------------------
  985|      0|      return -1;
  986|      0|    }
  987|       |
  988|     24|  } else
  989|    229|#endif
  990|    229|  {
  991|    229|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 229]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|    229|  }
  995|    253|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 154, False: 99]
  ------------------
  996|    154|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 0, False: 154]
  ------------------
  997|    154|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|      0|      return -1;
  999|      0|    }
 1000|    154|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|    154|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    154|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 14, False: 140]
  ------------------
 1002|    962|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 951, False: 11]
  ------------------
 1003|    951|        TopologySplitEventData event_data;
 1004|    951|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 1, False: 950]
  ------------------
 1005|      1|          return -1;
 1006|      1|        }
 1007|    950|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 2, False: 948]
  ------------------
 1008|      2|          return -1;
 1009|      2|        }
 1010|    948|        uint8_t edge_data;
 1011|    948|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 0, False: 948]
  ------------------
 1012|      0|          return -1;
 1013|      0|        }
 1014|    948|        event_data.source_edge = edge_data & 1;
 1015|    948|        topology_split_data_.push_back(event_data);
 1016|    948|      }
 1017|       |
 1018|     14|    } else
 1019|    140|#endif
 1020|    140|    {
 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|    140|      int last_source_symbol_id = 0;
 1024|    631|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 491, False: 140]
  ------------------
 1025|    491|        TopologySplitEventData event_data;
 1026|    491|        uint32_t delta;
 1027|    491|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 0, False: 491]
  ------------------
 1028|      0|          return -1;
 1029|      0|        }
 1030|    491|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|    491|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 0, False: 491]
  ------------------
 1032|      0|          return -1;
 1033|      0|        }
 1034|    491|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 0, False: 491]
  ------------------
 1035|      0|          return -1;
 1036|      0|        }
 1037|    491|        event_data.split_symbol_id =
 1038|    491|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|    491|        last_source_symbol_id = event_data.source_symbol_id;
 1040|    491|        topology_split_data_.push_back(event_data);
 1041|    491|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|    140|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|    631|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 491, False: 140]
  ------------------
 1045|    491|        uint32_t edge_data;
 1046|    491|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    491|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 215, False: 276]
  ------------------
 1047|    215|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|    276|        } else {
 1049|    276|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|    276|        }
 1051|    491|        TopologySplitEventData &event_data = topology_split_data_[i];
 1052|    491|        event_data.source_edge = edge_data & 1;
 1053|    491|      }
 1054|    140|      decoder_buffer->EndBitDecoding();
 1055|    140|    }
 1056|    154|  }
 1057|    250|  uint32_t num_hole_events = 0;
 1058|    250|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|    250|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    250|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 21, False: 229]
  ------------------
 1060|     21|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 0, False: 21]
  ------------------
 1061|      0|      return -1;
 1062|      0|    }
 1063|    229|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|    229|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 35, False: 194]
  ------------------
 1064|     35|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 0, False: 35]
  ------------------
 1065|      0|      return -1;
 1066|      0|    }
 1067|     35|  }
 1068|    250|#endif
 1069|    250|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 20, False: 230]
  ------------------
 1070|     20|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     20|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     20|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 9, False: 11]
  ------------------
 1072|  36.2k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 36.2k, False: 2]
  ------------------
 1073|  36.2k|        HoleEventData event_data;
 1074|  36.2k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 7, False: 36.2k]
  ------------------
 1075|      7|          return -1;
 1076|      7|        }
 1077|  36.2k|        hole_event_data_.push_back(event_data);
 1078|  36.2k|      }
 1079|       |
 1080|      9|    } else
 1081|     11|#endif
 1082|     11|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|     11|      int last_symbol_id = 0;
 1085|  84.7k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 84.7k, False: 1]
  ------------------
 1086|  84.7k|        HoleEventData event_data;
 1087|  84.7k|        uint32_t delta;
 1088|  84.7k|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 10, False: 84.7k]
  ------------------
 1089|     10|          return -1;
 1090|     10|        }
 1091|  84.7k|        event_data.symbol_id = delta + last_symbol_id;
 1092|  84.7k|        last_symbol_id = event_data.symbol_id;
 1093|  84.7k|        hole_event_data_.push_back(event_data);
 1094|  84.7k|      }
 1095|     11|    }
 1096|     20|  }
 1097|    233|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|    250|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE41DecodeAttributeConnectivitiesOnFaceLegacyENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1103|     68|    DecodeAttributeConnectivitiesOnFaceLegacy(CornerIndex corner) {
 1104|       |  // Three corners of the face.
 1105|     68|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1106|     68|                                  corner_table_->Previous(corner)};
 1107|       |
 1108|    272|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1108:19): [True: 204, False: 68]
  ------------------
 1109|    204|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1110|    204|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1110:9): [True: 154, False: 50]
  ------------------
 1111|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1112|       |      // is automatically an attribute seam).
 1113|    308|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1113:28): [True: 154, False: 154]
  ------------------
 1114|    154|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1115|    154|      }
 1116|    154|      continue;
 1117|    154|    }
 1118|       |
 1119|    100|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1119:26): [True: 50, False: 50]
  ------------------
 1120|     50|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1121|     50|      if (is_seam) {
  ------------------
  |  Branch (1121:11): [True: 0, False: 50]
  ------------------
 1122|      0|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1123|      0|      }
 1124|     50|    }
 1125|     50|  }
 1126|     68|  return true;
 1127|     68|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|   327k|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|   327k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|   327k|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|   327k|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  1.30M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 982k, False: 327k]
  ------------------
 1139|   982k|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|   982k|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 37.5k, False: 944k]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|   290k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 252k, False: 37.5k]
  ------------------
 1144|   252k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|   252k|      }
 1146|  37.5k|      continue;
 1147|  37.5k|    }
 1148|   944k|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|   944k|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 472k, False: 472k]
  ------------------
 1151|   472k|      continue;
 1152|   472k|    }
 1153|       |
 1154|  4.15M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 3.67M, False: 472k]
  ------------------
 1155|  3.67M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  3.67M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 3.36M, False: 316k]
  ------------------
 1157|  3.36M|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|  3.36M|      }
 1159|  3.67M|    }
 1160|   472k|  }
 1161|   327k|  return true;
 1162|   327k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE21AssignPointsToCornersEi:
 1166|    162|    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|    162|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|    162|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 1, False: 161]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|      1|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 0, False: 1]
  ------------------
 1176|      0|      Mesh::Face face;
 1177|      0|      const CornerIndex start_corner(3 * f.value());
 1178|      0|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 0, False: 0]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|      0|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|      0|        face[c] = vert_id;
 1182|      0|      }
 1183|      0|      decoder_->mesh()->SetFace(f, face);
 1184|      0|    }
 1185|      1|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|      1|    return true;
 1187|      1|  }
 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|    161|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|    161|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|   206k|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 206k, False: 161]
  ------------------
 1197|   206k|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|   206k|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 15.1k, False: 191k]
  ------------------
 1199|  15.1k|      continue;  // Isolated vertex.
 1200|  15.1k|    }
 1201|   191k|    CornerIndex deduplication_first_corner = c;
 1202|   191k|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 37.7k, False: 153k]
  ------------------
 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|  37.7k|      deduplication_first_corner = c;
 1206|   153k|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|   161k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 159k, False: 1.15k]
  ------------------
 1210|   159k|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 2.87k, False: 157k]
  ------------------
 1211|  2.87k|          continue;  // No seam for this attribute, ignore it.
 1212|  2.87k|        }
 1213|       |        // Else there needs to be at least one seam edge.
 1214|       |
 1215|       |        // At this point, we use identity mapping between corners and point ids.
 1216|   157k|        const VertexIndex vert_id =
 1217|   157k|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|   157k|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|   157k|        bool seam_found = false;
 1220|   163k|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 158k, False: 4.33k]
  ------------------
 1221|   158k|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 0, False: 158k]
  ------------------
 1222|      0|            return false;
 1223|      0|          }
 1224|   158k|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 152k, False: 6.08k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|   152k|            deduplication_first_corner = act_c;
 1227|   152k|            seam_found = true;
 1228|   152k|            break;
 1229|   152k|          }
 1230|  6.08k|          act_c = corner_table_->SwingRight(act_c);
 1231|  6.08k|        }
 1232|   157k|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 152k, False: 4.33k]
  ------------------
 1233|   152k|          break;  // No reason to process other attributes if we found a seam.
 1234|   152k|        }
 1235|   157k|      }
 1236|   153k|    }
 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|   191k|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|   191k|    corner_to_point_map[c.value()] =
 1246|   191k|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|   191k|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|   191k|    CornerIndex prev_c = c;
 1250|   191k|    c = corner_table_->SwingRight(c);
 1251|  1.04M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 1.00M, False: 37.9k]
  |  Branch (1251:40): [True: 852k, False: 153k]
  ------------------
 1252|   852k|      bool attribute_seam = false;
 1253|   876k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 872k, False: 4.60k]
  ------------------
 1254|   872k|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 847k, False: 24.5k]
  ------------------
 1255|   872k|            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|   847k|          attribute_seam = true;
 1259|   847k|          break;
 1260|   847k|        }
 1261|   872k|      }
 1262|   852k|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 847k, False: 4.60k]
  ------------------
 1263|   847k|        corner_to_point_map[c.value()] =
 1264|   847k|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|   847k|        point_to_corner_map.push_back(c.value());
 1266|   847k|      } else {
 1267|  4.60k|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|  4.60k|      }
 1269|   852k|      prev_c = c;
 1270|   852k|      c = corner_table_->SwingRight(c);
 1271|   852k|    }
 1272|   191k|  }
 1273|       |  // Add faces.
 1274|   327k|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 327k, False: 161]
  ------------------
 1275|   327k|    Mesh::Face face;
 1276|  1.30M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 982k, False: 327k]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|   982k|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|   982k|    }
 1280|   327k|    decoder_->mesh()->SetFace(f, face);
 1281|   327k|  }
 1282|    161|  decoder_->point_cloud()->set_num_points(
 1283|    161|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|    161|  return true;
 1285|    161|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEEC2Ev:
   48|    227|    : decoder_(nullptr),
   49|    227|      last_symbol_id_(-1),
   50|    227|      last_vert_id_(-1),
   51|    227|      last_face_id_(-1),
   52|    227|      num_new_vertices_(0),
   53|    227|      num_encoded_vertices_(0),
   54|    227|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|    227|    MeshEdgebreakerDecoder *decoder) {
   59|    227|  decoder_ = decoder;
   60|    227|  return true;
   61|    227|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE23GetAttributeCornerTableEi:
   66|    330|    int att_id) const {
   67|    535|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 364, False: 171]
  ------------------
   68|    364|    const int decoder_id = attribute_data_[i].decoder_id;
   69|    364|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 205, False: 159]
  |  Branch (69:27): [True: 0, False: 159]
  ------------------
   70|    205|      continue;
   71|    205|    }
   72|    159|    const AttributesDecoderInterface *const dec =
   73|    159|        decoder_->attributes_decoder(decoder_id);
   74|    654|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 654, False: 0]
  ------------------
   75|    654|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 159, False: 495]
  ------------------
   76|    159|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 85, False: 74]
  ------------------
   77|     85|          return &attribute_data_[i].connectivity_data;
   78|     85|        }
   79|     74|        return nullptr;
   80|    159|      }
   81|    654|    }
   82|    159|  }
   83|    171|  return nullptr;
   84|    330|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE24GetAttributeEncodingDataEi:
   89|    330|    int att_id) const {
   90|    535|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 364, False: 171]
  ------------------
   91|    364|    const int decoder_id = attribute_data_[i].decoder_id;
   92|    364|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 205, False: 159]
  |  Branch (92:27): [True: 0, False: 159]
  ------------------
   93|    205|      continue;
   94|    205|    }
   95|    159|    const AttributesDecoderInterface *const dec =
   96|    159|        decoder_->attributes_decoder(decoder_id);
   97|    654|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 654, False: 0]
  ------------------
   98|    654|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 159, False: 495]
  ------------------
   99|    159|        return &attribute_data_[i].encoding_data;
  100|    159|      }
  101|    654|    }
  102|    159|  }
  103|    171|  return &pos_encoding_data_;
  104|    330|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE23CreateAttributesDecoderEi:
  130|    171|    int32_t att_decoder_id) {
  131|    171|  int8_t att_data_id;
  132|    171|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 0, False: 171]
  ------------------
  133|      0|    return false;
  134|      0|  }
  135|    171|  uint8_t decoder_type;
  136|    171|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 0, False: 171]
  ------------------
  137|      0|    return false;
  138|      0|  }
  139|       |
  140|    171|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 101, False: 70]
  ------------------
  141|    101|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 0, False: 101]
  ------------------
  142|      0|      return false;  // Unexpected attribute data.
  143|      0|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|    101|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 0, False: 101]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|       |
  151|    101|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|    101|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|     70|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 0, False: 70]
  ------------------
  155|      0|      return false;  // Some other decoder is already using the data. Error.
  156|      0|    }
  157|     70|    pos_data_decoder_id_ = att_decoder_id;
  158|     70|  }
  159|       |
  160|    171|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|    171|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|    171|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 171, False: 0]
  ------------------
  162|    171|    uint8_t traversal_method_encoded;
  163|    171|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 0, False: 171]
  ------------------
  164|      0|      return false;
  165|      0|    }
  166|       |    // Check that decoded traversal method is valid.
  167|    171|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 0, False: 171]
  ------------------
  168|      0|      return false;
  169|      0|    }
  170|    171|    traversal_method =
  171|    171|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|    171|  }
  173|       |
  174|    171|  const Mesh *mesh = decoder_->mesh();
  175|    171|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|    171|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 116, False: 55]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|    116|    MeshAttributeIndicesEncodingData *encoding_data = nullptr;
  181|    116|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 70, False: 46]
  ------------------
  182|     70|      encoding_data = &pos_encoding_data_;
  183|     70|    } else {
  184|     46|      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|     46|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|     46|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|    116|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 3, False: 113]
  ------------------
  191|      3|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|      3|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|      3|          AttTraverser;
  194|      3|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|    113|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 113, False: 0]
  ------------------
  196|    113|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|    113|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|    113|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|    113|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|    116|  } else {
  203|     55|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 0, False: 55]
  ------------------
  204|      0|      return false;  // Unsupported method.
  205|      0|    }
  206|     55|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 0, False: 55]
  ------------------
  207|      0|      return false;  // Attribute data must be specified.
  208|      0|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|     55|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|     55|        AttObserver;
  214|     55|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|     55|        AttTraverser;
  216|       |
  217|     55|    MeshAttributeIndicesEncodingData *const encoding_data =
  218|     55|        &attribute_data_[att_data_id].encoding_data;
  219|     55|    const MeshAttributeCornerTable *const corner_table =
  220|     55|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|     55|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|     55|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|     55|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|     55|                             encoding_data);
  227|       |
  228|     55|    AttTraverser att_traverser;
  229|     55|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|     55|    traversal_sequencer->SetTraverser(att_traverser);
  232|     55|    sequencer = std::move(traversal_sequencer);
  233|     55|  }
  234|       |
  235|    171|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 171]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|    171|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|    171|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|    171|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|    171|                                        std::move(att_controller));
  244|    171|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18DecodeConnectivityEv:
  247|    227|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|    227|  num_new_vertices_ = 0;
  249|    227|  new_to_parent_vertex_map_.clear();
  250|    227|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|    227|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    227|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 51, False: 176]
  ------------------
  252|     51|    uint32_t num_new_verts;
  253|     51|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     51|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 50, False: 1]
  ------------------
  254|     50|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 50]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|     50|    } else {
  258|      1|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 1]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|      1|    }
  262|     51|    num_new_vertices_ = num_new_verts;
  263|     51|  }
  264|    227|#endif
  265|       |
  266|    227|  uint32_t num_encoded_vertices;
  267|    227|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|    227|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    227|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 50, False: 177]
  ------------------
  269|     50|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 50]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|     50|  } else
  274|    177|#endif
  275|    177|  {
  276|    177|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 177]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|    177|  }
  280|    227|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|    227|  uint32_t num_faces;
  283|    227|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|    227|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    227|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 50, False: 177]
  ------------------
  285|     50|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 50]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|     50|  } else
  290|    177|#endif
  291|    177|  {
  292|    177|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 177]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|    177|  }
  296|    227|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 0, False: 227]
  ------------------
  297|      0|    return false;  // Draco cannot handle this many faces.
  298|      0|  }
  299|       |
  300|    227|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 0, False: 227]
  ------------------
  301|      0|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      0|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|    227|  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|    227|  const uint64_t num_encoded_vertices_64 =
  311|    227|      static_cast<uint64_t>(num_encoded_vertices_);
  312|    227|  const uint64_t max_num_vertex_edges =
  313|    227|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|    227|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 0, False: 227]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      0|    return false;
  317|      0|  }
  318|       |
  319|    227|  uint8_t num_attribute_data;
  320|    227|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 227]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|    227|  uint32_t num_encoded_symbols;
  325|    227|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|    227|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    227|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 50, False: 177]
  ------------------
  327|     50|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 50]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|     50|  } else
  332|    177|#endif
  333|    177|  {
  334|    177|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 177]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|    177|  }
  338|       |
  339|    227|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 0, False: 227]
  ------------------
  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|      0|    return false;
  344|      0|  }
  345|    227|  const uint32_t max_encoded_faces =
  346|    227|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|    227|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 0, False: 227]
  ------------------
  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|      0|    return false;
  352|      0|  }
  353|       |
  354|    227|  uint32_t num_encoded_split_symbols;
  355|    227|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|    227|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    227|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 50, False: 177]
  ------------------
  357|     50|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 50]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|     50|  } else
  362|    177|#endif
  363|    177|  {
  364|    177|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 177]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|    177|  }
  368|       |
  369|    227|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 0, False: 227]
  ------------------
  370|      0|    return false;  // Split symbols are a sub-set of all symbols.
  371|      0|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|    227|  vertex_traversal_length_.clear();
  375|    227|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|    227|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 227]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|    227|  processed_corner_ids_.clear();
  380|    227|  processed_corner_ids_.reserve(num_faces);
  381|    227|  processed_connectivity_corners_.clear();
  382|    227|  processed_connectivity_corners_.reserve(num_faces);
  383|    227|  topology_split_data_.clear();
  384|    227|  hole_event_data_.clear();
  385|    227|  init_face_configurations_.clear();
  386|    227|  init_corners_.clear();
  387|       |
  388|    227|  last_symbol_id_ = -1;
  389|    227|  last_face_id_ = -1;
  390|    227|  last_vert_id_ = -1;
  391|       |
  392|    227|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|    227|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|    227|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 0, False: 227]
  ------------------
  397|    227|          num_faces, num_encoded_vertices_ + num_encoded_split_symbols)) {
  398|      0|    return false;
  399|      0|  }
  400|       |
  401|       |  // Start with all vertices marked as holes (boundaries).
  402|       |  // Only vertices decoded with TOPOLOGY_C symbol (and the initial face) will
  403|       |  // be marked as non hole vertices. We need to allocate the array larger
  404|       |  // because split symbols can create extra vertices during the decoding
  405|       |  // process (these extra vertices are then eliminated during deduplication).
  406|    227|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|    227|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|    227|  int32_t topology_split_decoded_bytes = -1;
  410|    227|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    227|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 51, False: 176]
  ------------------
  411|     51|    uint32_t encoded_connectivity_size;
  412|     51|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     51|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 50, False: 1]
  ------------------
  413|     50|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 0, False: 50]
  ------------------
  414|      0|        return false;
  415|      0|      }
  416|     50|    } else {
  417|      1|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 1]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|      1|    }
  421|     51|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 0, False: 51]
  ------------------
  422|     51|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 2, False: 49]
  ------------------
  423|      2|      return false;
  424|      2|    }
  425|     49|    DecoderBuffer event_buffer;
  426|     49|    event_buffer.Init(
  427|     49|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|     49|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|     49|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|     49|    topology_split_decoded_bytes =
  432|     49|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|     49|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 46, False: 3]
  ------------------
  434|     46|      return false;
  435|     46|    }
  436|       |
  437|     49|  } else
  438|    176|#endif
  439|    176|  {
  440|    176|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 0, False: 176]
  ------------------
  441|      0|      return false;
  442|      0|    }
  443|    176|  }
  444|       |
  445|    179|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|    179|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|    179|                                           num_encoded_split_symbols);
  449|    179|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|    179|  DecoderBuffer traversal_end_buffer;
  452|    179|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 8, False: 171]
  ------------------
  453|      8|    return false;
  454|      8|  }
  455|       |
  456|    171|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|    171|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 0, False: 171]
  ------------------
  458|      0|    return false;
  459|      0|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|    171|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|    171|                           traversal_end_buffer.remaining_size(),
  464|    171|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|    171|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|    171|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    171|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 0, False: 171]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|      0|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|      0|  }
  471|    171|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|    171|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 171, False: 0]
  ------------------
  475|    171|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|    171|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|    171|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 0, False: 171]
  ------------------
  477|      0|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 0, False: 0]
  ------------------
  478|      0|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 0]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|      0|      }
  482|       |
  483|      0|    } else
  484|    171|#endif
  485|    171|    {
  486|   807k|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 807k, False: 171]
  ------------------
  487|   807k|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 807k]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|   807k|      }
  491|    171|    }
  492|    171|  }
  493|    171|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|    386|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 215, False: 171]
  ------------------
  498|    215|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|  1.17M|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 1.17M, False: 215]
  ------------------
  501|  1.17M|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|  1.17M|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|    215|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 215]
  ------------------
  505|    215|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|    215|  }
  509|       |
  510|    171|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|    386|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 215, False: 171]
  ------------------
  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|    215|    int32_t att_connectivity_verts =
  517|    215|        attribute_data_[i].connectivity_data.num_vertices();
  518|    215|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 4, False: 211]
  ------------------
  519|      4|      att_connectivity_verts = corner_table_->num_vertices();
  520|      4|    }
  521|    215|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|    215|  }
  523|    171|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 0, False: 171]
  ------------------
  524|      0|    return false;
  525|      0|  }
  526|    171|  return true;
  527|    171|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE19OnAttributesDecodedEv:
  530|     18|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|     18|  return true;
  532|     18|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18DecodeConnectivityEi:
  536|    171|    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|    171|  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|    171|  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|    171|  std::vector<VertexIndex> invalid_vertices;
  558|    171|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|    171|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|    171|  int num_faces = 0;
  562|   807k|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 807k, False: 171]
  ------------------
  563|   807k|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|   807k|    bool check_topology_split = false;
  566|   807k|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|   807k|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 402k, False: 404k]
  ------------------
  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|   402k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 0, False: 402k]
  ------------------
  588|      0|        return -1;
  589|      0|      }
  590|       |
  591|   402k|      const CornerIndex corner_a = active_corner_stack.back();
  592|   402k|      const VertexIndex vertex_x =
  593|   402k|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|   402k|      const CornerIndex corner_b =
  595|   402k|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|   402k|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 0, False: 402k]
  ------------------
  598|       |        // All matched corners must be different.
  599|      0|        return -1;
  600|      0|      }
  601|   402k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 402k]
  |  Branch (601:11): [True: 0, False: 402k]
  ------------------
  602|   402k|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 402k]
  ------------------
  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|   402k|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|   402k|      SetOppositeCorners(corner_a, corner + 1);
  612|   402k|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|   402k|      const VertexIndex vert_a_prev =
  616|   402k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|   402k|      const VertexIndex vert_b_next =
  618|   402k|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|   402k|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 402k]
  |  Branch (619:38): [True: 0, False: 402k]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|   402k|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|   402k|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|   402k|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|   402k|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|   402k|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|   402k|      active_corner_stack.back() = corner;
  631|   404k|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 403k, False: 936]
  |  Branch (631:40): [True: 283, False: 653]
  ------------------
  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|   404k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 0, False: 404k]
  ------------------
  647|      0|        return -1;
  648|      0|      }
  649|   404k|      const CornerIndex corner_a = active_corner_stack.back();
  650|   404k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 404k]
  ------------------
  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|   404k|      const CornerIndex corner(3 * face.value());
  658|   404k|      CornerIndex opp_corner, corner_l, corner_r;
  659|   404k|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 403k, False: 283]
  ------------------
  660|       |        // "r" is the new first corner.
  661|   403k|        opp_corner = corner + 2;
  662|   403k|        corner_l = corner + 1;
  663|   403k|        corner_r = corner;
  664|   403k|      } else {
  665|       |        // "l" is the new first corner.
  666|    283|        opp_corner = corner + 1;
  667|    283|        corner_l = corner;
  668|    283|        corner_r = corner + 2;
  669|    283|      }
  670|   404k|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|   404k|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|   404k|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 0, False: 404k]
  ------------------
  675|      0|        return -1;  // Unexpected number of decoded vertices.
  676|      0|      }
  677|       |
  678|   404k|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|   404k|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|   404k|      const VertexIndex vertex_r =
  682|   404k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|   404k|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|   404k|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|   404k|      corner_table_->MapCornerToVertex(
  688|   404k|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|   404k|      active_corner_stack.back() = corner;
  690|   404k|      check_topology_split = true;
  691|   404k|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 196, False: 457]
  ------------------
  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|    196|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 0, False: 196]
  ------------------
  703|      0|        return -1;
  704|      0|      }
  705|    196|      const CornerIndex corner_b = active_corner_stack.back();
  706|    196|      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|    196|      const auto it = topology_split_active_corners.find(symbol_id);
  711|    196|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 0, False: 196]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|      0|        active_corner_stack.push_back(it->second);
  714|      0|      }
  715|    196|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 0, False: 196]
  ------------------
  716|      0|        return -1;
  717|      0|      }
  718|    196|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|    196|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 196]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|    196|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 0, False: 196]
  |  Branch (724:11): [True: 0, False: 196]
  ------------------
  725|    196|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 196]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|      0|        return -1;
  729|      0|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|    196|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|    196|      SetOppositeCorners(corner_a, corner + 2);
  735|    196|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|    196|      const VertexIndex vertex_p =
  739|    196|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|    196|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|    196|      corner_table_->MapCornerToVertex(
  742|    196|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|    196|      const VertexIndex vert_b_prev =
  744|    196|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|    196|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|    196|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|    196|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|    196|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|    196|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|    196|      corner_table_->SetLeftMostCorner(vertex_p,
  752|    196|                                       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|    196|      const CornerIndex first_corner = corner_n;
  757|    818|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 622, False: 196]
  ------------------
  758|    622|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|    622|        corner_n = corner_table_->SwingLeft(corner_n);
  760|    622|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 0, False: 622]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      0|          return -1;
  764|      0|        }
  765|    622|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|    196|      corner_table_->MakeVertexIsolated(vertex_n);
  769|    196|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 0, False: 196]
  ------------------
  770|      0|        invalid_vertices.push_back(vertex_n);
  771|      0|      }
  772|    196|      active_corner_stack.back() = corner;
  773|    457|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 457, False: 0]
  ------------------
  774|    457|      const CornerIndex corner(3 * face.value());
  775|    457|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|    457|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|    457|      corner_table_->MapCornerToVertex(corner + 1,
  779|    457|                                       corner_table_->AddNewVertex());
  780|    457|      corner_table_->MapCornerToVertex(corner + 2,
  781|    457|                                       corner_table_->AddNewVertex());
  782|       |
  783|    457|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 0, False: 457]
  ------------------
  784|      0|        return -1;  // Unexpected number of decoded vertices.
  785|      0|      }
  786|       |
  787|    457|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|    457|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|    457|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|    457|      active_corner_stack.push_back(corner);
  792|    457|      check_topology_split = true;
  793|    457|    } 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|   807k|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|   807k|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 404k, False: 402k]
  ------------------
  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|   404k|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|   404k|      EdgeFaceName split_edge;
  812|   404k|      int encoder_split_symbol_id;
  813|   404k|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 88, False: 404k]
  ------------------
  814|   404k|                             &encoder_split_symbol_id)) {
  815|     88|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 0, False: 88]
  ------------------
  816|      0|          return -1;  // Wrong split symbol id.
  817|      0|        }
  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|     88|        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|     88|        CornerIndex new_active_corner;
  831|     88|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 23, False: 65]
  ------------------
  832|     23|          new_active_corner = corner_table_->Next(act_top_corner);
  833|     65|        } else {
  834|     65|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|     65|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|     88|        const int decoder_split_symbol_id =
  839|     88|            num_symbols - encoder_split_symbol_id - 1;
  840|     88|        topology_split_active_corners[decoder_split_symbol_id] =
  841|     88|            new_active_corner;
  842|     88|      }
  843|   404k|    }
  844|   807k|  }
  845|    171|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 171]
  ------------------
  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|    432|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 261, False: 171]
  ------------------
  850|    261|    const CornerIndex corner = active_corner_stack.back();
  851|    261|    active_corner_stack.pop_back();
  852|    261|    const bool interior_face =
  853|    261|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|    261|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 171, False: 90]
  ------------------
  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|    171|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 0, False: 171]
  ------------------
  877|      0|        return -1;  // More faces than expected added to the mesh.
  878|      0|      }
  879|       |
  880|    171|      const CornerIndex corner_a = corner;
  881|    171|      const VertexIndex vert_n =
  882|    171|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|    171|      const CornerIndex corner_b =
  884|    171|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|    171|      const VertexIndex vert_x =
  887|    171|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|    171|      const CornerIndex corner_c =
  889|    171|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|    171|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 0, False: 171]
  |  Branch (891:33): [True: 0, False: 171]
  |  Branch (891:55): [True: 0, False: 171]
  ------------------
  892|       |        // All matched corners must be different.
  893|      0|        return -1;
  894|      0|      }
  895|    171|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 0, False: 171]
  |  Branch (895:11): [True: 0, False: 171]
  ------------------
  896|    171|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 0, False: 171]
  ------------------
  897|    171|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 0, False: 171]
  ------------------
  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|    171|      const VertexIndex vert_p =
  904|    171|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|    171|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|    171|      const CornerIndex new_corner(3 * face.value());
  909|    171|      SetOppositeCorners(new_corner, corner);
  910|    171|      SetOppositeCorners(new_corner + 1, corner_b);
  911|    171|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|    171|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|    171|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|    171|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|    684|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 513, False: 171]
  ------------------
  920|    513|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|    513|      }
  922|       |
  923|    171|      init_face_configurations_.push_back(true);
  924|    171|      init_corners_.push_back(new_corner);
  925|    171|    } 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|     90|      init_face_configurations_.push_back(false);
  930|     90|      init_corners_.push_back(corner);
  931|     90|    }
  932|    261|  }
  933|    171|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 0, False: 171]
  ------------------
  934|      0|    return -1;  // Unexpected number of decoded faces.
  935|      0|  }
  936|       |
  937|    171|  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|    171|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 0, False: 171]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|      0|    VertexIndex src_vert(num_vertices - 1);
  943|      0|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 0, False: 0]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|      0|      src_vert = VertexIndex(--num_vertices - 1);
  946|      0|    }
  947|      0|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 0, False: 0]
  ------------------
  948|      0|      continue;  // No need to swap anything.
  949|      0|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|      0|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|      0|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 0, False: 0]
  ------------------
  954|      0|      const CornerIndex cid = vcit.Corner();
  955|      0|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 0, False: 0]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      0|        return -1;
  959|      0|      }
  960|      0|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|      0|    }
  962|      0|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|      0|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|      0|    corner_table_->MakeVertexIsolated(src_vert);
  967|      0|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|      0|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|      0|    num_vertices--;
  972|      0|  }
  973|    171|  return num_vertices;
  974|    171|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|    225|    DecoderBuffer *decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|    225|  uint32_t num_topology_splits;
  982|    225|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|    225|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    225|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 48, False: 177]
  ------------------
  984|     48|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 0, False: 48]
  ------------------
  985|      0|      return -1;
  986|      0|    }
  987|       |
  988|     48|  } else
  989|    177|#endif
  990|    177|  {
  991|    177|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 177]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|    177|  }
  995|    225|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 90, False: 135]
  ------------------
  996|     90|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 6, False: 84]
  ------------------
  997|     90|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|      6|      return -1;
  999|      6|    }
 1000|     84|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|     84|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     84|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 38, False: 46]
  ------------------
 1002|   187k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 187k, False: 18]
  ------------------
 1003|   187k|        TopologySplitEventData event_data;
 1004|   187k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 10, False: 187k]
  ------------------
 1005|     10|          return -1;
 1006|     10|        }
 1007|   187k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 7, False: 187k]
  ------------------
 1008|      7|          return -1;
 1009|      7|        }
 1010|   187k|        uint8_t edge_data;
 1011|   187k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 3, False: 187k]
  ------------------
 1012|      3|          return -1;
 1013|      3|        }
 1014|   187k|        event_data.source_edge = edge_data & 1;
 1015|   187k|        topology_split_data_.push_back(event_data);
 1016|   187k|      }
 1017|       |
 1018|     38|    } else
 1019|     46|#endif
 1020|     46|    {
 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|     46|      int last_source_symbol_id = 0;
 1024|    228|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 182, False: 46]
  ------------------
 1025|    182|        TopologySplitEventData event_data;
 1026|    182|        uint32_t delta;
 1027|    182|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 0, False: 182]
  ------------------
 1028|      0|          return -1;
 1029|      0|        }
 1030|    182|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|    182|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 0, False: 182]
  ------------------
 1032|      0|          return -1;
 1033|      0|        }
 1034|    182|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 0, False: 182]
  ------------------
 1035|      0|          return -1;
 1036|      0|        }
 1037|    182|        event_data.split_symbol_id =
 1038|    182|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|    182|        last_source_symbol_id = event_data.source_symbol_id;
 1040|    182|        topology_split_data_.push_back(event_data);
 1041|    182|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|     46|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|    228|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 182, False: 46]
  ------------------
 1045|    182|        uint32_t edge_data;
 1046|    182|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    182|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 3, False: 179]
  ------------------
 1047|      3|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|    179|        } else {
 1049|    179|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|    179|        }
 1051|    182|        TopologySplitEventData &event_data = topology_split_data_[i];
 1052|    182|        event_data.source_edge = edge_data & 1;
 1053|    182|      }
 1054|     46|      decoder_buffer->EndBitDecoding();
 1055|     46|    }
 1056|     84|  }
 1057|    199|  uint32_t num_hole_events = 0;
 1058|    199|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|    199|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    199|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 22, False: 177]
  ------------------
 1060|     22|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 0, False: 22]
  ------------------
 1061|      0|      return -1;
 1062|      0|    }
 1063|    177|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|    177|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 1, False: 176]
  ------------------
 1064|      1|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 0, False: 1]
  ------------------
 1065|      0|      return -1;
 1066|      0|    }
 1067|      1|  }
 1068|    199|#endif
 1069|    199|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 20, False: 179]
  ------------------
 1070|     20|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|     20|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     20|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 20, False: 0]
  ------------------
 1072|   114k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 114k, False: 0]
  ------------------
 1073|   114k|        HoleEventData event_data;
 1074|   114k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 20, False: 114k]
  ------------------
 1075|     20|          return -1;
 1076|     20|        }
 1077|   114k|        hole_event_data_.push_back(event_data);
 1078|   114k|      }
 1079|       |
 1080|     20|    } else
 1081|      0|#endif
 1082|      0|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|      0|      int last_symbol_id = 0;
 1085|      0|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 0, False: 0]
  ------------------
 1086|      0|        HoleEventData event_data;
 1087|      0|        uint32_t delta;
 1088|      0|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 0, False: 0]
  ------------------
 1089|      0|          return -1;
 1090|      0|        }
 1091|      0|        event_data.symbol_id = delta + last_symbol_id;
 1092|      0|        last_symbol_id = event_data.symbol_id;
 1093|      0|        hole_event_data_.push_back(event_data);
 1094|      0|      }
 1095|      0|    }
 1096|     20|  }
 1097|    179|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|    199|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|   807k|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|   807k|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|   807k|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|   807k|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|  3.22M|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 2.42M, False: 807k]
  ------------------
 1139|  2.42M|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|  2.42M|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 2.52k, False: 2.41M]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|  5.43k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 2.90k, False: 2.52k]
  ------------------
 1144|  2.90k|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|  2.90k|      }
 1146|  2.52k|      continue;
 1147|  2.52k|    }
 1148|  2.41M|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|  2.41M|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 1.20M, False: 1.20M]
  ------------------
 1151|  1.20M|      continue;
 1152|  1.20M|    }
 1153|       |
 1154|  2.42M|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 1.21M, False: 1.20M]
  ------------------
 1155|  1.21M|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|  1.21M|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 1.17M, False: 39.2k]
  ------------------
 1157|  1.17M|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|  1.17M|      }
 1159|  1.21M|    }
 1160|  1.20M|  }
 1161|   807k|  return true;
 1162|   807k|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE21AssignPointsToCornersEi:
 1166|    171|    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|    171|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|    171|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 0, False: 171]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|      0|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 0, False: 0]
  ------------------
 1176|      0|      Mesh::Face face;
 1177|      0|      const CornerIndex start_corner(3 * f.value());
 1178|      0|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 0, False: 0]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|      0|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|      0|        face[c] = vert_id;
 1182|      0|      }
 1183|      0|      decoder_->mesh()->SetFace(f, face);
 1184|      0|    }
 1185|      0|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|      0|    return true;
 1187|      0|  }
 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|    171|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|    171|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|   405k|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 405k, False: 171]
  ------------------
 1197|   405k|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|   405k|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 196, False: 405k]
  ------------------
 1199|    196|      continue;  // Isolated vertex.
 1200|    196|    }
 1201|   405k|    CornerIndex deduplication_first_corner = c;
 1202|   405k|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 2.52k, False: 402k]
  ------------------
 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|  2.52k|      deduplication_first_corner = c;
 1206|   402k|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|   414k|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 402k, False: 11.3k]
  ------------------
 1210|   402k|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 10.7k, False: 392k]
  ------------------
 1211|  10.7k|          continue;  // No seam for this attribute, ignore it.
 1212|  10.7k|        }
 1213|       |        // Else there needs to be at least one seam edge.
 1214|       |
 1215|       |        // At this point, we use identity mapping between corners and point ids.
 1216|   392k|        const VertexIndex vert_id =
 1217|   392k|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|   392k|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|   392k|        bool seam_found = false;
 1220|   398k|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 397k, False: 723]
  ------------------
 1221|   397k|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 0, False: 397k]
  ------------------
 1222|      0|            return false;
 1223|      0|          }
 1224|   397k|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 391k, False: 6.49k]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|   391k|            deduplication_first_corner = act_c;
 1227|   391k|            seam_found = true;
 1228|   391k|            break;
 1229|   391k|          }
 1230|  6.49k|          act_c = corner_table_->SwingRight(act_c);
 1231|  6.49k|        }
 1232|   392k|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 391k, False: 723]
  ------------------
 1233|   391k|          break;  // No reason to process other attributes if we found a seam.
 1234|   391k|        }
 1235|   392k|      }
 1236|   402k|    }
 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|   405k|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|   405k|    corner_to_point_map[c.value()] =
 1246|   405k|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|   405k|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|   405k|    CornerIndex prev_c = c;
 1250|   405k|    c = corner_table_->SwingRight(c);
 1251|  2.42M|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 2.41M, False: 2.63k]
  |  Branch (1251:40): [True: 2.01M, False: 402k]
  ------------------
 1252|  2.01M|      bool attribute_seam = false;
 1253|  2.07M|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 2.01M, False: 61.4k]
  ------------------
 1254|  2.01M|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 1.95M, False: 62.6k]
  ------------------
 1255|  2.01M|            attribute_data_[i].connectivity_data.Vertex(prev_c)) {
 1256|       |          // Attribute index changed from the previous corner. We need to add a
 1257|       |          // new point here.
 1258|  1.95M|          attribute_seam = true;
 1259|  1.95M|          break;
 1260|  1.95M|        }
 1261|  2.01M|      }
 1262|  2.01M|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 1.95M, False: 61.4k]
  ------------------
 1263|  1.95M|        corner_to_point_map[c.value()] =
 1264|  1.95M|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|  1.95M|        point_to_corner_map.push_back(c.value());
 1266|  1.95M|      } else {
 1267|  61.4k|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|  61.4k|      }
 1269|  2.01M|      prev_c = c;
 1270|  2.01M|      c = corner_table_->SwingRight(c);
 1271|  2.01M|    }
 1272|   405k|  }
 1273|       |  // Add faces.
 1274|   807k|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 807k, False: 171]
  ------------------
 1275|   807k|    Mesh::Face face;
 1276|  3.22M|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 2.42M, False: 807k]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|  2.42M|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|  2.42M|    }
 1280|   807k|    decoder_->mesh()->SetFace(f, face);
 1281|   807k|  }
 1282|    171|  decoder_->point_cloud()->set_num_points(
 1283|    171|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|    171|  return true;
 1285|    171|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEEC2Ev:
   48|    153|    : decoder_(nullptr),
   49|    153|      last_symbol_id_(-1),
   50|    153|      last_vert_id_(-1),
   51|    153|      last_face_id_(-1),
   52|    153|      num_new_vertices_(0),
   53|    153|      num_encoded_vertices_(0),
   54|    153|      pos_data_decoder_id_(-1) {}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE4InitEPNS_22MeshEdgebreakerDecoderE:
   58|    153|    MeshEdgebreakerDecoder *decoder) {
   59|    153|  decoder_ = decoder;
   60|    153|  return true;
   61|    153|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE23GetAttributeCornerTableEi:
   66|      9|    int att_id) const {
   67|     14|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (67:24): [True: 12, False: 2]
  ------------------
   68|     12|    const int decoder_id = attribute_data_[i].decoder_id;
   69|     12|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (69:9): [True: 5, False: 7]
  |  Branch (69:27): [True: 0, False: 7]
  ------------------
   70|      5|      continue;
   71|      5|    }
   72|      7|    const AttributesDecoderInterface *const dec =
   73|      7|        decoder_->attributes_decoder(decoder_id);
   74|     51|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (74:21): [True: 51, False: 0]
  ------------------
   75|     51|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (75:11): [True: 7, False: 44]
  ------------------
   76|      7|        if (attribute_data_[i].is_connectivity_used) {
  ------------------
  |  Branch (76:13): [True: 2, False: 5]
  ------------------
   77|      2|          return &attribute_data_[i].connectivity_data;
   78|      2|        }
   79|      5|        return nullptr;
   80|      7|      }
   81|     51|    }
   82|      7|  }
   83|      2|  return nullptr;
   84|      9|}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE24GetAttributeEncodingDataEi:
   89|      9|    int att_id) const {
   90|     14|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (90:24): [True: 12, False: 2]
  ------------------
   91|     12|    const int decoder_id = attribute_data_[i].decoder_id;
   92|     12|    if (decoder_id < 0 || decoder_id >= decoder_->num_attributes_decoders()) {
  ------------------
  |  Branch (92:9): [True: 5, False: 7]
  |  Branch (92:27): [True: 0, False: 7]
  ------------------
   93|      5|      continue;
   94|      5|    }
   95|      7|    const AttributesDecoderInterface *const dec =
   96|      7|        decoder_->attributes_decoder(decoder_id);
   97|     51|    for (int j = 0; j < dec->GetNumAttributes(); ++j) {
  ------------------
  |  Branch (97:21): [True: 51, False: 0]
  ------------------
   98|     51|      if (dec->GetAttributeId(j) == att_id) {
  ------------------
  |  Branch (98:11): [True: 7, False: 44]
  ------------------
   99|      7|        return &attribute_data_[i].encoding_data;
  100|      7|      }
  101|     51|    }
  102|      7|  }
  103|      2|  return &pos_encoding_data_;
  104|      9|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE23CreateAttributesDecoderEi:
  130|     16|    int32_t att_decoder_id) {
  131|     16|  int8_t att_data_id;
  132|     16|  if (!decoder_->buffer()->Decode(&att_data_id)) {
  ------------------
  |  Branch (132:7): [True: 0, False: 16]
  ------------------
  133|      0|    return false;
  134|      0|  }
  135|     16|  uint8_t decoder_type;
  136|     16|  if (!decoder_->buffer()->Decode(&decoder_type)) {
  ------------------
  |  Branch (136:7): [True: 0, False: 16]
  ------------------
  137|      0|    return false;
  138|      0|  }
  139|       |
  140|     16|  if (att_data_id >= 0) {
  ------------------
  |  Branch (140:7): [True: 15, False: 1]
  ------------------
  141|     15|    if (att_data_id >= attribute_data_.size()) {
  ------------------
  |  Branch (141:9): [True: 1, False: 14]
  ------------------
  142|      1|      return false;  // Unexpected attribute data.
  143|      1|    }
  144|       |
  145|       |    // Ensure that the attribute data is not mapped to a different attributes
  146|       |    // decoder already.
  147|     14|    if (attribute_data_[att_data_id].decoder_id >= 0) {
  ------------------
  |  Branch (147:9): [True: 0, False: 14]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|       |
  151|     14|    attribute_data_[att_data_id].decoder_id = att_decoder_id;
  152|     14|  } else {
  153|       |    // Assign the attributes decoder to |pos_encoding_data_|.
  154|      1|    if (pos_data_decoder_id_ >= 0) {
  ------------------
  |  Branch (154:9): [True: 0, False: 1]
  ------------------
  155|      0|      return false;  // Some other decoder is already using the data. Error.
  156|      0|    }
  157|      1|    pos_data_decoder_id_ = att_decoder_id;
  158|      1|  }
  159|       |
  160|     15|  MeshTraversalMethod traversal_method = MESH_TRAVERSAL_DEPTH_FIRST;
  161|     15|  if (decoder_->bitstream_version() >= DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     15|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (161:7): [True: 15, False: 0]
  ------------------
  162|     15|    uint8_t traversal_method_encoded;
  163|     15|    if (!decoder_->buffer()->Decode(&traversal_method_encoded)) {
  ------------------
  |  Branch (163:9): [True: 0, False: 15]
  ------------------
  164|      0|      return false;
  165|      0|    }
  166|       |    // Check that decoded traversal method is valid.
  167|     15|    if (traversal_method_encoded >= NUM_TRAVERSAL_METHODS) {
  ------------------
  |  Branch (167:9): [True: 0, False: 15]
  ------------------
  168|      0|      return false;
  169|      0|    }
  170|     15|    traversal_method =
  171|     15|        static_cast<MeshTraversalMethod>(traversal_method_encoded);
  172|     15|  }
  173|       |
  174|     15|  const Mesh *mesh = decoder_->mesh();
  175|     15|  std::unique_ptr<PointsSequencer> sequencer;
  176|       |
  177|     15|  if (decoder_type == MESH_VERTEX_ATTRIBUTE) {
  ------------------
  |  Branch (177:7): [True: 2, False: 13]
  ------------------
  178|       |    // Per-vertex attribute decoder.
  179|       |
  180|      2|    MeshAttributeIndicesEncodingData *encoding_data = nullptr;
  181|      2|    if (att_data_id < 0) {
  ------------------
  |  Branch (181:9): [True: 1, False: 1]
  ------------------
  182|      1|      encoding_data = &pos_encoding_data_;
  183|      1|    } else {
  184|      1|      encoding_data = &attribute_data_[att_data_id].encoding_data;
  185|       |      // Mark the attribute connectivity data invalid to ensure it's not used
  186|       |      // later on.
  187|      1|      attribute_data_[att_data_id].is_connectivity_used = false;
  188|      1|    }
  189|       |    // Defining sequencer via a traversal scheme.
  190|      2|    if (traversal_method == MESH_TRAVERSAL_PREDICTION_DEGREE) {
  ------------------
  |  Branch (190:9): [True: 1, False: 1]
  ------------------
  191|      1|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  192|      1|      typedef MaxPredictionDegreeTraverser<CornerTable, AttObserver>
  193|      1|          AttTraverser;
  194|      1|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  195|      1|    } else if (traversal_method == MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (195:16): [True: 1, False: 0]
  ------------------
  196|      1|      typedef MeshAttributeIndicesEncodingObserver<CornerTable> AttObserver;
  197|      1|      typedef DepthFirstTraverser<CornerTable, AttObserver> AttTraverser;
  198|      1|      sequencer = CreateVertexTraversalSequencer<AttTraverser>(encoding_data);
  199|      1|    } else {
  200|      0|      return false;  // Unsupported method
  201|      0|    }
  202|     13|  } else {
  203|     13|    if (traversal_method != MESH_TRAVERSAL_DEPTH_FIRST) {
  ------------------
  |  Branch (203:9): [True: 0, False: 13]
  ------------------
  204|      0|      return false;  // Unsupported method.
  205|      0|    }
  206|     13|    if (att_data_id < 0) {
  ------------------
  |  Branch (206:9): [True: 0, False: 13]
  ------------------
  207|      0|      return false;  // Attribute data must be specified.
  208|      0|    }
  209|       |
  210|       |    // Per-corner attribute decoder.
  211|       |
  212|     13|    typedef MeshAttributeIndicesEncodingObserver<MeshAttributeCornerTable>
  213|     13|        AttObserver;
  214|     13|    typedef DepthFirstTraverser<MeshAttributeCornerTable, AttObserver>
  215|     13|        AttTraverser;
  216|       |
  217|     13|    MeshAttributeIndicesEncodingData *const encoding_data =
  218|     13|        &attribute_data_[att_data_id].encoding_data;
  219|     13|    const MeshAttributeCornerTable *const corner_table =
  220|     13|        &attribute_data_[att_data_id].connectivity_data;
  221|       |
  222|     13|    std::unique_ptr<MeshTraversalSequencer<AttTraverser>> traversal_sequencer(
  223|     13|        new MeshTraversalSequencer<AttTraverser>(mesh, encoding_data));
  224|       |
  225|     13|    AttObserver att_observer(corner_table, mesh, traversal_sequencer.get(),
  226|     13|                             encoding_data);
  227|       |
  228|     13|    AttTraverser att_traverser;
  229|     13|    att_traverser.Init(corner_table, att_observer);
  230|       |
  231|     13|    traversal_sequencer->SetTraverser(att_traverser);
  232|     13|    sequencer = std::move(traversal_sequencer);
  233|     13|  }
  234|       |
  235|     15|  if (!sequencer) {
  ------------------
  |  Branch (235:7): [True: 0, False: 15]
  ------------------
  236|      0|    return false;
  237|      0|  }
  238|       |
  239|     15|  std::unique_ptr<SequentialAttributeDecodersController> att_controller(
  240|     15|      new SequentialAttributeDecodersController(std::move(sequencer)));
  241|       |
  242|     15|  return decoder_->SetAttributesDecoder(att_decoder_id,
  243|     15|                                        std::move(att_controller));
  244|     15|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18DecodeConnectivityEv:
  247|    153|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::DecodeConnectivity() {
  248|    153|  num_new_vertices_ = 0;
  249|    153|  new_to_parent_vertex_map_.clear();
  250|    153|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  251|    153|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    153|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (251:7): [True: 35, False: 118]
  ------------------
  252|     35|    uint32_t num_new_verts;
  253|     35|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     35|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (253:9): [True: 32, False: 3]
  ------------------
  254|     32|      if (!decoder_->buffer()->Decode(&num_new_verts)) {
  ------------------
  |  Branch (254:11): [True: 0, False: 32]
  ------------------
  255|      0|        return false;
  256|      0|      }
  257|     32|    } else {
  258|      3|      if (!DecodeVarint(&num_new_verts, decoder_->buffer())) {
  ------------------
  |  Branch (258:11): [True: 0, False: 3]
  ------------------
  259|      0|        return false;
  260|      0|      }
  261|      3|    }
  262|     35|    num_new_vertices_ = num_new_verts;
  263|     35|  }
  264|    153|#endif
  265|       |
  266|    153|  uint32_t num_encoded_vertices;
  267|    153|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  268|    153|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    153|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (268:7): [True: 32, False: 121]
  ------------------
  269|     32|    if (!decoder_->buffer()->Decode(&num_encoded_vertices)) {
  ------------------
  |  Branch (269:9): [True: 0, False: 32]
  ------------------
  270|      0|      return false;
  271|      0|    }
  272|       |
  273|     32|  } else
  274|    121|#endif
  275|    121|  {
  276|    121|    if (!DecodeVarint(&num_encoded_vertices, decoder_->buffer())) {
  ------------------
  |  Branch (276:9): [True: 0, False: 121]
  ------------------
  277|      0|      return false;
  278|      0|    }
  279|    121|  }
  280|    153|  num_encoded_vertices_ = num_encoded_vertices;
  281|       |
  282|    153|  uint32_t num_faces;
  283|    153|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  284|    153|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    153|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (284:7): [True: 32, False: 121]
  ------------------
  285|     32|    if (!decoder_->buffer()->Decode(&num_faces)) {
  ------------------
  |  Branch (285:9): [True: 0, False: 32]
  ------------------
  286|      0|      return false;
  287|      0|    }
  288|       |
  289|     32|  } else
  290|    121|#endif
  291|    121|  {
  292|    121|    if (!DecodeVarint(&num_faces, decoder_->buffer())) {
  ------------------
  |  Branch (292:9): [True: 0, False: 121]
  ------------------
  293|      0|      return false;
  294|      0|    }
  295|    121|  }
  296|    153|  if (num_faces > std::numeric_limits<CornerIndex::ValueType>::max() / 3) {
  ------------------
  |  Branch (296:7): [True: 0, False: 153]
  ------------------
  297|      0|    return false;  // Draco cannot handle this many faces.
  298|      0|  }
  299|       |
  300|    153|  if (static_cast<uint32_t>(num_encoded_vertices_) > num_faces * 3) {
  ------------------
  |  Branch (300:7): [True: 0, False: 153]
  ------------------
  301|      0|    return false;  // There cannot be more vertices than 3 * num_faces.
  302|      0|  }
  303|       |
  304|       |  // Minimum number of edges of the mesh assuming each edge is shared between
  305|       |  // two faces.
  306|    153|  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|    153|  const uint64_t num_encoded_vertices_64 =
  311|    153|      static_cast<uint64_t>(num_encoded_vertices_);
  312|    153|  const uint64_t max_num_vertex_edges =
  313|    153|      num_encoded_vertices_64 * (num_encoded_vertices_64 - 1) / 2;
  314|    153|  if (max_num_vertex_edges < min_num_face_edges) {
  ------------------
  |  Branch (314:7): [True: 0, False: 153]
  ------------------
  315|       |    // It is impossible to construct a manifold mesh with these properties.
  316|      0|    return false;
  317|      0|  }
  318|       |
  319|    153|  uint8_t num_attribute_data;
  320|    153|  if (!decoder_->buffer()->Decode(&num_attribute_data)) {
  ------------------
  |  Branch (320:7): [True: 0, False: 153]
  ------------------
  321|      0|    return false;
  322|      0|  }
  323|       |
  324|    153|  uint32_t num_encoded_symbols;
  325|    153|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  326|    153|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    153|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (326:7): [True: 32, False: 121]
  ------------------
  327|     32|    if (!decoder_->buffer()->Decode(&num_encoded_symbols)) {
  ------------------
  |  Branch (327:9): [True: 0, False: 32]
  ------------------
  328|      0|      return false;
  329|      0|    }
  330|       |
  331|     32|  } else
  332|    121|#endif
  333|    121|  {
  334|    121|    if (!DecodeVarint(&num_encoded_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (334:9): [True: 0, False: 121]
  ------------------
  335|      0|      return false;
  336|      0|    }
  337|    121|  }
  338|       |
  339|    153|  if (num_faces < num_encoded_symbols) {
  ------------------
  |  Branch (339:7): [True: 0, False: 153]
  ------------------
  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|      0|    return false;
  344|      0|  }
  345|    153|  const uint32_t max_encoded_faces =
  346|    153|      num_encoded_symbols + (num_encoded_symbols / 3);
  347|    153|  if (num_faces > max_encoded_faces) {
  ------------------
  |  Branch (347:7): [True: 0, False: 153]
  ------------------
  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|      0|    return false;
  352|      0|  }
  353|       |
  354|    153|  uint32_t num_encoded_split_symbols;
  355|    153|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  356|    153|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    153|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (356:7): [True: 32, False: 121]
  ------------------
  357|     32|    if (!decoder_->buffer()->Decode(&num_encoded_split_symbols)) {
  ------------------
  |  Branch (357:9): [True: 0, False: 32]
  ------------------
  358|      0|      return false;
  359|      0|    }
  360|       |
  361|     32|  } else
  362|    121|#endif
  363|    121|  {
  364|    121|    if (!DecodeVarint(&num_encoded_split_symbols, decoder_->buffer())) {
  ------------------
  |  Branch (364:9): [True: 0, False: 121]
  ------------------
  365|      0|      return false;
  366|      0|    }
  367|    121|  }
  368|       |
  369|    153|  if (num_encoded_split_symbols > num_encoded_symbols) {
  ------------------
  |  Branch (369:7): [True: 1, False: 152]
  ------------------
  370|      1|    return false;  // Split symbols are a sub-set of all symbols.
  371|      1|  }
  372|       |
  373|       |  // Decode topology (connectivity).
  374|    152|  vertex_traversal_length_.clear();
  375|    152|  corner_table_ = std::unique_ptr<CornerTable>(new CornerTable());
  376|    152|  if (corner_table_ == nullptr) {
  ------------------
  |  Branch (376:7): [True: 0, False: 152]
  ------------------
  377|      0|    return false;
  378|      0|  }
  379|    152|  processed_corner_ids_.clear();
  380|    152|  processed_corner_ids_.reserve(num_faces);
  381|    152|  processed_connectivity_corners_.clear();
  382|    152|  processed_connectivity_corners_.reserve(num_faces);
  383|    152|  topology_split_data_.clear();
  384|    152|  hole_event_data_.clear();
  385|    152|  init_face_configurations_.clear();
  386|    152|  init_corners_.clear();
  387|       |
  388|    152|  last_symbol_id_ = -1;
  389|    152|  last_face_id_ = -1;
  390|    152|  last_vert_id_ = -1;
  391|       |
  392|    152|  attribute_data_.clear();
  393|       |  // Add one attribute data for each attribute decoder.
  394|    152|  attribute_data_.resize(num_attribute_data);
  395|       |
  396|    152|  if (!corner_table_->Reset(
  ------------------
  |  Branch (396:7): [True: 0, False: 152]
  ------------------
  397|    152|          num_faces, num_encoded_vertices_ + num_encoded_split_symbols)) {
  398|      0|    return false;
  399|      0|  }
  400|       |
  401|       |  // Start with all vertices marked as holes (boundaries).
  402|       |  // Only vertices decoded with TOPOLOGY_C symbol (and the initial face) will
  403|       |  // be marked as non hole vertices. We need to allocate the array larger
  404|       |  // because split symbols can create extra vertices during the decoding
  405|       |  // process (these extra vertices are then eliminated during deduplication).
  406|    152|  is_vert_hole_.assign(num_encoded_vertices_ + num_encoded_split_symbols, true);
  407|       |
  408|    152|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  409|    152|  int32_t topology_split_decoded_bytes = -1;
  410|    152|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    152|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (410:7): [True: 34, False: 118]
  ------------------
  411|     34|    uint32_t encoded_connectivity_size;
  412|     34|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|     34|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (412:9): [True: 31, False: 3]
  ------------------
  413|     31|      if (!decoder_->buffer()->Decode(&encoded_connectivity_size)) {
  ------------------
  |  Branch (413:11): [True: 0, False: 31]
  ------------------
  414|      0|        return false;
  415|      0|      }
  416|     31|    } else {
  417|      3|      if (!DecodeVarint(&encoded_connectivity_size, decoder_->buffer())) {
  ------------------
  |  Branch (417:11): [True: 0, False: 3]
  ------------------
  418|      0|        return false;
  419|      0|      }
  420|      3|    }
  421|     34|    if (encoded_connectivity_size == 0 ||
  ------------------
  |  Branch (421:9): [True: 0, False: 34]
  ------------------
  422|     34|        encoded_connectivity_size > decoder_->buffer()->remaining_size()) {
  ------------------
  |  Branch (422:9): [True: 0, False: 34]
  ------------------
  423|      0|      return false;
  424|      0|    }
  425|     34|    DecoderBuffer event_buffer;
  426|     34|    event_buffer.Init(
  427|     34|        decoder_->buffer()->data_head() + encoded_connectivity_size,
  428|     34|        decoder_->buffer()->remaining_size() - encoded_connectivity_size,
  429|     34|        decoder_->buffer()->bitstream_version());
  430|       |    // Decode hole and topology split events.
  431|     34|    topology_split_decoded_bytes =
  432|     34|        DecodeHoleAndTopologySplitEvents(&event_buffer);
  433|     34|    if (topology_split_decoded_bytes == -1) {
  ------------------
  |  Branch (433:9): [True: 15, False: 19]
  ------------------
  434|     15|      return false;
  435|     15|    }
  436|       |
  437|     34|  } else
  438|    118|#endif
  439|    118|  {
  440|    118|    if (DecodeHoleAndTopologySplitEvents(decoder_->buffer()) == -1) {
  ------------------
  |  Branch (440:9): [True: 0, False: 118]
  ------------------
  441|      0|      return false;
  442|      0|    }
  443|    118|  }
  444|       |
  445|    137|  traversal_decoder_.Init(this);
  446|       |  // Add one extra vertex for each split symbol.
  447|    137|  traversal_decoder_.SetNumEncodedVertices(num_encoded_vertices_ +
  448|    137|                                           num_encoded_split_symbols);
  449|    137|  traversal_decoder_.SetNumAttributeData(num_attribute_data);
  450|       |
  451|    137|  DecoderBuffer traversal_end_buffer;
  452|    137|  if (!traversal_decoder_.Start(&traversal_end_buffer)) {
  ------------------
  |  Branch (452:7): [True: 78, False: 59]
  ------------------
  453|     78|    return false;
  454|     78|  }
  455|       |
  456|     59|  const int num_connectivity_verts = DecodeConnectivity(num_encoded_symbols);
  457|     59|  if (num_connectivity_verts == -1) {
  ------------------
  |  Branch (457:7): [True: 43, False: 16]
  ------------------
  458|     43|    return false;
  459|     43|  }
  460|       |
  461|       |  // Set the main buffer to the end of the traversal.
  462|     16|  decoder_->buffer()->Init(traversal_end_buffer.data_head(),
  463|     16|                           traversal_end_buffer.remaining_size(),
  464|     16|                           decoder_->buffer()->bitstream_version());
  465|       |
  466|     16|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  467|     16|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|     16|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (467:7): [True: 0, False: 16]
  ------------------
  468|       |    // Skip topology split data that was already decoded earlier.
  469|      0|    decoder_->buffer()->Advance(topology_split_decoded_bytes);
  470|      0|  }
  471|     16|#endif
  472|       |
  473|       |  // Decode connectivity of non-position attributes.
  474|     16|  if (!attribute_data_.empty()) {
  ------------------
  |  Branch (474:7): [True: 16, False: 0]
  ------------------
  475|     16|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  476|     16|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|     16|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (476:9): [True: 0, False: 16]
  ------------------
  477|      0|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (477:31): [True: 0, False: 0]
  ------------------
  478|      0|        if (!DecodeAttributeConnectivitiesOnFaceLegacy(ci)) {
  ------------------
  |  Branch (478:13): [True: 0, False: 0]
  ------------------
  479|      0|          return false;
  480|      0|        }
  481|      0|      }
  482|       |
  483|      0|    } else
  484|     16|#endif
  485|     16|    {
  486|     34|      for (CornerIndex ci(0); ci < corner_table_->num_corners(); ci += 3) {
  ------------------
  |  Branch (486:31): [True: 18, False: 16]
  ------------------
  487|     18|        if (!DecodeAttributeConnectivitiesOnFace(ci)) {
  ------------------
  |  Branch (487:13): [True: 0, False: 18]
  ------------------
  488|      0|          return false;
  489|      0|        }
  490|     18|      }
  491|     16|    }
  492|     16|  }
  493|     16|  traversal_decoder_.Done();
  494|       |
  495|       |  // Decode attribute connectivity.
  496|       |  // Prepare data structure for decoding non-position attribute connectivity.
  497|     34|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (497:24): [True: 18, False: 16]
  ------------------
  498|     18|    attribute_data_[i].connectivity_data.InitEmpty(corner_table_.get());
  499|       |    // Add all seams.
  500|     55|    for (int32_t c : attribute_data_[i].attribute_seam_corners) {
  ------------------
  |  Branch (500:20): [True: 55, False: 18]
  ------------------
  501|     55|      attribute_data_[i].connectivity_data.AddSeamEdge(CornerIndex(c));
  502|     55|    }
  503|       |    // Recompute vertices from the newly added seam edges.
  504|     18|    if (!attribute_data_[i].connectivity_data.RecomputeVertices(nullptr,
  ------------------
  |  Branch (504:9): [True: 0, False: 18]
  ------------------
  505|     18|                                                                nullptr)) {
  506|      0|      return false;
  507|      0|    }
  508|     18|  }
  509|       |
  510|     16|  pos_encoding_data_.Init(corner_table_->num_vertices());
  511|     34|  for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (511:24): [True: 18, False: 16]
  ------------------
  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|     18|    int32_t att_connectivity_verts =
  517|     18|        attribute_data_[i].connectivity_data.num_vertices();
  518|     18|    if (att_connectivity_verts < corner_table_->num_vertices()) {
  ------------------
  |  Branch (518:9): [True: 0, False: 18]
  ------------------
  519|      0|      att_connectivity_verts = corner_table_->num_vertices();
  520|      0|    }
  521|     18|    attribute_data_[i].encoding_data.Init(att_connectivity_verts);
  522|     18|  }
  523|     16|  if (!AssignPointsToCorners(num_connectivity_verts)) {
  ------------------
  |  Branch (523:7): [True: 0, False: 16]
  ------------------
  524|      0|    return false;
  525|      0|  }
  526|     16|  return true;
  527|     16|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE19OnAttributesDecodedEv:
  530|      2|bool MeshEdgebreakerDecoderImpl<TraversalDecoder>::OnAttributesDecoded() {
  531|      2|  return true;
  532|      2|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18DecodeConnectivityEi:
  536|     59|    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|     59|  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|     59|  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|     59|  std::vector<VertexIndex> invalid_vertices;
  558|     59|  const bool remove_invalid_vertices = attribute_data_.empty();
  559|       |
  560|     59|  int max_num_vertices = static_cast<int>(is_vert_hole_.size());
  561|     59|  int num_faces = 0;
  562|  29.6k|  for (int symbol_id = 0; symbol_id < num_symbols; ++symbol_id) {
  ------------------
  |  Branch (562:27): [True: 29.6k, False: 16]
  ------------------
  563|  29.6k|    const FaceIndex face(num_faces++);
  564|       |    // Used to flag cases where we need to look for topology split events.
  565|  29.6k|    bool check_topology_split = false;
  566|  29.6k|    const uint32_t symbol = traversal_decoder_.DecodeSymbol();
  567|  29.6k|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (567:9): [True: 228, False: 29.4k]
  ------------------
  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|    228|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (587:11): [True: 4, False: 224]
  ------------------
  588|      4|        return -1;
  589|      4|      }
  590|       |
  591|    224|      const CornerIndex corner_a = active_corner_stack.back();
  592|    224|      const VertexIndex vertex_x =
  593|    224|          corner_table_->Vertex(corner_table_->Next(corner_a));
  594|    224|      const CornerIndex corner_b =
  595|    224|          corner_table_->Next(corner_table_->LeftMostCorner(vertex_x));
  596|       |
  597|    224|      if (corner_a == corner_b) {
  ------------------
  |  Branch (597:11): [True: 19, False: 205]
  ------------------
  598|       |        // All matched corners must be different.
  599|     19|        return -1;
  600|     19|      }
  601|    205|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (601:11): [True: 0, False: 205]
  |  Branch (601:11): [True: 0, False: 205]
  ------------------
  602|    205|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (602:11): [True: 0, False: 205]
  ------------------
  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|    205|      const CornerIndex corner(3 * face.value());
  610|       |      // Update opposite corner mappings.
  611|    205|      SetOppositeCorners(corner_a, corner + 1);
  612|    205|      SetOppositeCorners(corner_b, corner + 2);
  613|       |
  614|       |      // Update vertex mapping.
  615|    205|      const VertexIndex vert_a_prev =
  616|    205|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  617|    205|      const VertexIndex vert_b_next =
  618|    205|          corner_table_->Vertex(corner_table_->Next(corner_b));
  619|    205|      if (vertex_x == vert_a_prev || vertex_x == vert_b_next) {
  ------------------
  |  Branch (619:11): [True: 0, False: 205]
  |  Branch (619:38): [True: 0, False: 205]
  ------------------
  620|       |        // Encoding is invalid, because face vertices are degenerate.
  621|      0|        return -1;
  622|      0|      }
  623|    205|      corner_table_->MapCornerToVertex(corner, vertex_x);
  624|    205|      corner_table_->MapCornerToVertex(corner + 1, vert_b_next);
  625|    205|      corner_table_->MapCornerToVertex(corner + 2, vert_a_prev);
  626|    205|      corner_table_->SetLeftMostCorner(vert_a_prev, corner + 2);
  627|       |      // Mark the vertex |x| as interior.
  628|    205|      is_vert_hole_[vertex_x.value()] = false;
  629|       |      // Update the corner on the active stack.
  630|    205|      active_corner_stack.back() = corner;
  631|  29.4k|    } else if (symbol == TOPOLOGY_R || symbol == TOPOLOGY_L) {
  ------------------
  |  Branch (631:16): [True: 4, False: 29.4k]
  |  Branch (631:40): [True: 29.3k, False: 74]
  ------------------
  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|  29.3k|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (646:11): [True: 0, False: 29.3k]
  ------------------
  647|      0|        return -1;
  648|      0|      }
  649|  29.3k|      const CornerIndex corner_a = active_corner_stack.back();
  650|  29.3k|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex) {
  ------------------
  |  Branch (650:11): [True: 0, False: 29.3k]
  ------------------
  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|  29.3k|      const CornerIndex corner(3 * face.value());
  658|  29.3k|      CornerIndex opp_corner, corner_l, corner_r;
  659|  29.3k|      if (symbol == TOPOLOGY_R) {
  ------------------
  |  Branch (659:11): [True: 4, False: 29.3k]
  ------------------
  660|       |        // "r" is the new first corner.
  661|      4|        opp_corner = corner + 2;
  662|      4|        corner_l = corner + 1;
  663|      4|        corner_r = corner;
  664|  29.3k|      } else {
  665|       |        // "l" is the new first corner.
  666|  29.3k|        opp_corner = corner + 1;
  667|  29.3k|        corner_l = corner;
  668|  29.3k|        corner_r = corner + 2;
  669|  29.3k|      }
  670|  29.3k|      SetOppositeCorners(opp_corner, corner_a);
  671|       |      // Update vertex mapping.
  672|  29.3k|      const VertexIndex new_vert_index = corner_table_->AddNewVertex();
  673|       |
  674|  29.3k|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (674:11): [True: 0, False: 29.3k]
  ------------------
  675|      0|        return -1;  // Unexpected number of decoded vertices.
  676|      0|      }
  677|       |
  678|  29.3k|      corner_table_->MapCornerToVertex(opp_corner, new_vert_index);
  679|  29.3k|      corner_table_->SetLeftMostCorner(new_vert_index, opp_corner);
  680|       |
  681|  29.3k|      const VertexIndex vertex_r =
  682|  29.3k|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  683|  29.3k|      corner_table_->MapCornerToVertex(corner_r, vertex_r);
  684|       |      // Update left-most corner on the vertex on the |corner_r|.
  685|  29.3k|      corner_table_->SetLeftMostCorner(vertex_r, corner_r);
  686|       |
  687|  29.3k|      corner_table_->MapCornerToVertex(
  688|  29.3k|          corner_l, corner_table_->Vertex(corner_table_->Next(corner_a)));
  689|  29.3k|      active_corner_stack.back() = corner;
  690|  29.3k|      check_topology_split = true;
  691|  29.3k|    } else if (symbol == TOPOLOGY_S) {
  ------------------
  |  Branch (691:16): [True: 6, False: 68]
  ------------------
  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|      6|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (702:11): [True: 0, False: 6]
  ------------------
  703|      0|        return -1;
  704|      0|      }
  705|      6|      const CornerIndex corner_b = active_corner_stack.back();
  706|      6|      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|      6|      const auto it = topology_split_active_corners.find(symbol_id);
  711|      6|      if (it != topology_split_active_corners.end()) {
  ------------------
  |  Branch (711:11): [True: 0, False: 6]
  ------------------
  712|       |        // Topology split event. Move the retrieved edge to the stack.
  713|      0|        active_corner_stack.push_back(it->second);
  714|      0|      }
  715|      6|      if (active_corner_stack.empty()) {
  ------------------
  |  Branch (715:11): [True: 6, False: 0]
  ------------------
  716|      6|        return -1;
  717|      6|      }
  718|      0|      const CornerIndex corner_a = active_corner_stack.back();
  719|       |
  720|      0|      if (corner_a == corner_b) {
  ------------------
  |  Branch (720:11): [True: 0, False: 0]
  ------------------
  721|       |        // All matched corners must be different.
  722|      0|        return -1;
  723|      0|      }
  724|      0|      if (corner_table_->Opposite(corner_a) != kInvalidCornerIndex ||
  ------------------
  |  Branch (724:11): [True: 0, False: 0]
  |  Branch (724:11): [True: 0, False: 0]
  ------------------
  725|      0|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex) {
  ------------------
  |  Branch (725:11): [True: 0, False: 0]
  ------------------
  726|       |        // One of the corners is already opposite to an existing face, which
  727|       |        // should not happen unless the input was tampered with.
  728|      0|        return -1;
  729|      0|      }
  730|       |
  731|       |      // First corner on the new face is corner "x" from the image above.
  732|      0|      const CornerIndex corner(3 * face.value());
  733|       |      // Update the opposite corner mapping.
  734|      0|      SetOppositeCorners(corner_a, corner + 2);
  735|      0|      SetOppositeCorners(corner_b, corner + 1);
  736|       |      // Update vertices. For the vertex at corner "x", use the vertex id from
  737|       |      // the corner "p".
  738|      0|      const VertexIndex vertex_p =
  739|      0|          corner_table_->Vertex(corner_table_->Previous(corner_a));
  740|      0|      corner_table_->MapCornerToVertex(corner, vertex_p);
  741|      0|      corner_table_->MapCornerToVertex(
  742|      0|          corner + 1, corner_table_->Vertex(corner_table_->Next(corner_a)));
  743|      0|      const VertexIndex vert_b_prev =
  744|      0|          corner_table_->Vertex(corner_table_->Previous(corner_b));
  745|      0|      corner_table_->MapCornerToVertex(corner + 2, vert_b_prev);
  746|      0|      corner_table_->SetLeftMostCorner(vert_b_prev, corner + 2);
  747|      0|      CornerIndex corner_n = corner_table_->Next(corner_b);
  748|      0|      const VertexIndex vertex_n = corner_table_->Vertex(corner_n);
  749|      0|      traversal_decoder_.MergeVertices(vertex_p, vertex_n);
  750|       |      // Update the left most corner on the newly merged vertex.
  751|      0|      corner_table_->SetLeftMostCorner(vertex_p,
  752|      0|                                       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|      0|      const CornerIndex first_corner = corner_n;
  757|      0|      while (corner_n != kInvalidCornerIndex) {
  ------------------
  |  Branch (757:14): [True: 0, False: 0]
  ------------------
  758|      0|        corner_table_->MapCornerToVertex(corner_n, vertex_p);
  759|      0|        corner_n = corner_table_->SwingLeft(corner_n);
  760|      0|        if (corner_n == first_corner) {
  ------------------
  |  Branch (760:13): [True: 0, False: 0]
  ------------------
  761|       |          // We reached the start again which should not happen for split
  762|       |          // symbols.
  763|      0|          return -1;
  764|      0|        }
  765|      0|      }
  766|       |      // Make sure the old vertex n is now mapped to an invalid corner (make it
  767|       |      // isolated).
  768|      0|      corner_table_->MakeVertexIsolated(vertex_n);
  769|      0|      if (remove_invalid_vertices) {
  ------------------
  |  Branch (769:11): [True: 0, False: 0]
  ------------------
  770|      0|        invalid_vertices.push_back(vertex_n);
  771|      0|      }
  772|      0|      active_corner_stack.back() = corner;
  773|     68|    } else if (symbol == TOPOLOGY_E) {
  ------------------
  |  Branch (773:16): [True: 55, False: 13]
  ------------------
  774|     55|      const CornerIndex corner(3 * face.value());
  775|     55|      const VertexIndex first_vert_index = corner_table_->AddNewVertex();
  776|       |      // Create three new vertices at the corners of the new face.
  777|     55|      corner_table_->MapCornerToVertex(corner, first_vert_index);
  778|     55|      corner_table_->MapCornerToVertex(corner + 1,
  779|     55|                                       corner_table_->AddNewVertex());
  780|     55|      corner_table_->MapCornerToVertex(corner + 2,
  781|     55|                                       corner_table_->AddNewVertex());
  782|       |
  783|     55|      if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (783:11): [True: 0, False: 55]
  ------------------
  784|      0|        return -1;  // Unexpected number of decoded vertices.
  785|      0|      }
  786|       |
  787|     55|      corner_table_->SetLeftMostCorner(first_vert_index, corner);
  788|     55|      corner_table_->SetLeftMostCorner(first_vert_index + 1, corner + 1);
  789|     55|      corner_table_->SetLeftMostCorner(first_vert_index + 2, corner + 2);
  790|       |      // Add the tip corner to the active stack.
  791|     55|      active_corner_stack.push_back(corner);
  792|     55|      check_topology_split = true;
  793|     55|    } else {
  794|       |      // Error. Unknown symbol decoded.
  795|     13|      return -1;
  796|     13|    }
  797|       |    // Inform the traversal decoder that a new corner has been reached.
  798|  29.6k|    traversal_decoder_.NewActiveCornerReached(active_corner_stack.back());
  799|       |
  800|  29.6k|    if (check_topology_split) {
  ------------------
  |  Branch (800:9): [True: 29.3k, False: 205]
  ------------------
  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|  29.3k|      const int encoder_symbol_id = num_symbols - symbol_id - 1;
  811|  29.3k|      EdgeFaceName split_edge;
  812|  29.3k|      int encoder_split_symbol_id;
  813|  29.3k|      while (IsTopologySplit(encoder_symbol_id, &split_edge,
  ------------------
  |  Branch (813:14): [True: 1, False: 29.3k]
  ------------------
  814|  29.3k|                             &encoder_split_symbol_id)) {
  815|      1|        if (encoder_split_symbol_id < 0) {
  ------------------
  |  Branch (815:13): [True: 1, False: 0]
  ------------------
  816|      1|          return -1;  // Wrong split symbol id.
  817|      1|        }
  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|      0|        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|      0|        CornerIndex new_active_corner;
  831|      0|        if (split_edge == RIGHT_FACE_EDGE) {
  ------------------
  |  Branch (831:13): [True: 0, False: 0]
  ------------------
  832|      0|          new_active_corner = corner_table_->Next(act_top_corner);
  833|      0|        } else {
  834|      0|          new_active_corner = corner_table_->Previous(act_top_corner);
  835|      0|        }
  836|       |        // Add the new active edge.
  837|       |        // Convert the encoder split symbol id to decoder symbol id.
  838|      0|        const int decoder_split_symbol_id =
  839|      0|            num_symbols - encoder_split_symbol_id - 1;
  840|      0|        topology_split_active_corners[decoder_split_symbol_id] =
  841|      0|            new_active_corner;
  842|      0|      }
  843|  29.3k|    }
  844|  29.6k|  }
  845|     16|  if (corner_table_->num_vertices() > max_num_vertices) {
  ------------------
  |  Branch (845:7): [True: 0, False: 16]
  ------------------
  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|     32|  while (!active_corner_stack.empty()) {
  ------------------
  |  Branch (849:10): [True: 16, False: 16]
  ------------------
  850|     16|    const CornerIndex corner = active_corner_stack.back();
  851|     16|    active_corner_stack.pop_back();
  852|     16|    const bool interior_face =
  853|     16|        traversal_decoder_.DecodeStartFaceConfiguration();
  854|     16|    if (interior_face) {
  ------------------
  |  Branch (854:9): [True: 0, False: 16]
  ------------------
  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|      0|      if (num_faces >= corner_table_->num_faces()) {
  ------------------
  |  Branch (876:11): [True: 0, False: 0]
  ------------------
  877|      0|        return -1;  // More faces than expected added to the mesh.
  878|      0|      }
  879|       |
  880|      0|      const CornerIndex corner_a = corner;
  881|      0|      const VertexIndex vert_n =
  882|      0|          corner_table_->Vertex(corner_table_->Next(corner_a));
  883|      0|      const CornerIndex corner_b =
  884|      0|          corner_table_->Next(corner_table_->LeftMostCorner(vert_n));
  885|       |
  886|      0|      const VertexIndex vert_x =
  887|      0|          corner_table_->Vertex(corner_table_->Next(corner_b));
  888|      0|      const CornerIndex corner_c =
  889|      0|          corner_table_->Next(corner_table_->LeftMostCorner(vert_x));
  890|       |
  891|      0|      if (corner == corner_b || corner == corner_c || corner_b == corner_c) {
  ------------------
  |  Branch (891:11): [True: 0, False: 0]
  |  Branch (891:33): [True: 0, False: 0]
  |  Branch (891:55): [True: 0, False: 0]
  ------------------
  892|       |        // All matched corners must be different.
  893|      0|        return -1;
  894|      0|      }
  895|      0|      if (corner_table_->Opposite(corner) != kInvalidCornerIndex ||
  ------------------
  |  Branch (895:11): [True: 0, False: 0]
  |  Branch (895:11): [True: 0, False: 0]
  ------------------
  896|      0|          corner_table_->Opposite(corner_b) != kInvalidCornerIndex ||
  ------------------
  |  Branch (896:11): [True: 0, False: 0]
  ------------------
  897|      0|          corner_table_->Opposite(corner_c) != kInvalidCornerIndex) {
  ------------------
  |  Branch (897:11): [True: 0, False: 0]
  ------------------
  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|      0|      const VertexIndex vert_p =
  904|      0|          corner_table_->Vertex(corner_table_->Next(corner_c));
  905|       |
  906|      0|      const FaceIndex face(num_faces++);
  907|       |      // The first corner of the initial face is the corner opposite to "a".
  908|      0|      const CornerIndex new_corner(3 * face.value());
  909|      0|      SetOppositeCorners(new_corner, corner);
  910|      0|      SetOppositeCorners(new_corner + 1, corner_b);
  911|      0|      SetOppositeCorners(new_corner + 2, corner_c);
  912|       |
  913|       |      // Map new corners to existing vertices.
  914|      0|      corner_table_->MapCornerToVertex(new_corner, vert_x);
  915|      0|      corner_table_->MapCornerToVertex(new_corner + 1, vert_p);
  916|      0|      corner_table_->MapCornerToVertex(new_corner + 2, vert_n);
  917|       |
  918|       |      // Mark all three vertices as interior.
  919|      0|      for (int ci = 0; ci < 3; ++ci) {
  ------------------
  |  Branch (919:24): [True: 0, False: 0]
  ------------------
  920|      0|        is_vert_hole_[corner_table_->Vertex(new_corner + ci).value()] = false;
  921|      0|      }
  922|       |
  923|      0|      init_face_configurations_.push_back(true);
  924|      0|      init_corners_.push_back(new_corner);
  925|     16|    } 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|     16|      init_face_configurations_.push_back(false);
  930|     16|      init_corners_.push_back(corner);
  931|     16|    }
  932|     16|  }
  933|     16|  if (num_faces != corner_table_->num_faces()) {
  ------------------
  |  Branch (933:7): [True: 0, False: 16]
  ------------------
  934|      0|    return -1;  // Unexpected number of decoded faces.
  935|      0|  }
  936|       |
  937|     16|  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|     16|  for (const VertexIndex invalid_vert : invalid_vertices) {
  ------------------
  |  Branch (940:39): [True: 0, False: 16]
  ------------------
  941|       |    // Find the last valid vertex and swap it with the isolated vertex.
  942|      0|    VertexIndex src_vert(num_vertices - 1);
  943|      0|    while (corner_table_->LeftMostCorner(src_vert) == kInvalidCornerIndex) {
  ------------------
  |  Branch (943:12): [True: 0, False: 0]
  ------------------
  944|       |      // The last vertex is invalid, proceed to the previous one.
  945|      0|      src_vert = VertexIndex(--num_vertices - 1);
  946|      0|    }
  947|      0|    if (src_vert < invalid_vert) {
  ------------------
  |  Branch (947:9): [True: 0, False: 0]
  ------------------
  948|      0|      continue;  // No need to swap anything.
  949|      0|    }
  950|       |
  951|       |    // Remap all corners mapped to |src_vert| to |invalid_vert|.
  952|      0|    VertexCornersIterator<CornerTable> vcit(corner_table_.get(), src_vert);
  953|      0|    for (; !vcit.End(); ++vcit) {
  ------------------
  |  Branch (953:12): [True: 0, False: 0]
  ------------------
  954|      0|      const CornerIndex cid = vcit.Corner();
  955|      0|      if (corner_table_->Vertex(cid) != src_vert) {
  ------------------
  |  Branch (955:11): [True: 0, False: 0]
  ------------------
  956|       |        // Vertex mapped to |cid| was not |src_vert|. This indicates corrupted
  957|       |        // data and we should terminate the decoding.
  958|      0|        return -1;
  959|      0|      }
  960|      0|      corner_table_->MapCornerToVertex(cid, invalid_vert);
  961|      0|    }
  962|      0|    corner_table_->SetLeftMostCorner(invalid_vert,
  963|      0|                                     corner_table_->LeftMostCorner(src_vert));
  964|       |
  965|       |    // Make the |src_vert| invalid.
  966|      0|    corner_table_->MakeVertexIsolated(src_vert);
  967|      0|    is_vert_hole_[invalid_vert.value()] = is_vert_hole_[src_vert.value()];
  968|      0|    is_vert_hole_[src_vert.value()] = false;
  969|       |
  970|       |    // The last vertex is now invalid.
  971|      0|    num_vertices--;
  972|      0|  }
  973|     16|  return num_vertices;
  974|     16|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE32DecodeHoleAndTopologySplitEventsEPNS_13DecoderBufferE:
  979|    152|    DecoderBuffer *decoder_buffer) {
  980|       |  // Prepare a new decoder from the provided buffer offset.
  981|    152|  uint32_t num_topology_splits;
  982|    152|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  983|    152|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    152|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (983:7): [True: 31, False: 121]
  ------------------
  984|     31|    if (!decoder_buffer->Decode(&num_topology_splits)) {
  ------------------
  |  Branch (984:9): [True: 0, False: 31]
  ------------------
  985|      0|      return -1;
  986|      0|    }
  987|       |
  988|     31|  } else
  989|    121|#endif
  990|    121|  {
  991|    121|    if (!DecodeVarint(&num_topology_splits, decoder_buffer)) {
  ------------------
  |  Branch (991:9): [True: 0, False: 121]
  ------------------
  992|      0|      return -1;
  993|      0|    }
  994|    121|  }
  995|    152|  if (num_topology_splits > 0) {
  ------------------
  |  Branch (995:7): [True: 51, False: 101]
  ------------------
  996|     51|    if (num_topology_splits >
  ------------------
  |  Branch (996:9): [True: 0, False: 51]
  ------------------
  997|     51|        static_cast<uint32_t>(corner_table_->num_faces())) {
  998|      0|      return -1;
  999|      0|    }
 1000|     51|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1001|     51|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|     51|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1001:9): [True: 16, False: 35]
  ------------------
 1002|   196k|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1002:28): [True: 196k, False: 8]
  ------------------
 1003|   196k|        TopologySplitEventData event_data;
 1004|   196k|        if (!decoder_buffer->Decode(&event_data.split_symbol_id)) {
  ------------------
  |  Branch (1004:13): [True: 2, False: 196k]
  ------------------
 1005|      2|          return -1;
 1006|      2|        }
 1007|   196k|        if (!decoder_buffer->Decode(&event_data.source_symbol_id)) {
  ------------------
  |  Branch (1007:13): [True: 6, False: 196k]
  ------------------
 1008|      6|          return -1;
 1009|      6|        }
 1010|   196k|        uint8_t edge_data;
 1011|   196k|        if (!decoder_buffer->Decode(&edge_data)) {
  ------------------
  |  Branch (1011:13): [True: 0, False: 196k]
  ------------------
 1012|      0|          return -1;
 1013|      0|        }
 1014|   196k|        event_data.source_edge = edge_data & 1;
 1015|   196k|        topology_split_data_.push_back(event_data);
 1016|   196k|      }
 1017|       |
 1018|     16|    } else
 1019|     35|#endif
 1020|     35|    {
 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|     35|      int last_source_symbol_id = 0;
 1024|     74|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1024:28): [True: 39, False: 35]
  ------------------
 1025|     39|        TopologySplitEventData event_data;
 1026|     39|        uint32_t delta;
 1027|     39|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1027:13): [True: 0, False: 39]
  ------------------
 1028|      0|          return -1;
 1029|      0|        }
 1030|     39|        event_data.source_symbol_id = delta + last_source_symbol_id;
 1031|     39|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1031:13): [True: 0, False: 39]
  ------------------
 1032|      0|          return -1;
 1033|      0|        }
 1034|     39|        if (delta > event_data.source_symbol_id) {
  ------------------
  |  Branch (1034:13): [True: 0, False: 39]
  ------------------
 1035|      0|          return -1;
 1036|      0|        }
 1037|     39|        event_data.split_symbol_id =
 1038|     39|            event_data.source_symbol_id - static_cast<int32_t>(delta);
 1039|     39|        last_source_symbol_id = event_data.source_symbol_id;
 1040|     39|        topology_split_data_.push_back(event_data);
 1041|     39|      }
 1042|       |      // Split edges are decoded from a direct bit decoder.
 1043|     35|      decoder_buffer->StartBitDecoding(false, nullptr);
 1044|     74|      for (uint32_t i = 0; i < num_topology_splits; ++i) {
  ------------------
  |  Branch (1044:28): [True: 39, False: 35]
  ------------------
 1045|     39|        uint32_t edge_data;
 1046|     39|        if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|     39|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1046:13): [True: 2, False: 37]
  ------------------
 1047|      2|          decoder_buffer->DecodeLeastSignificantBits32(2, &edge_data);
 1048|     37|        } else {
 1049|     37|          decoder_buffer->DecodeLeastSignificantBits32(1, &edge_data);
 1050|     37|        }
 1051|     39|        TopologySplitEventData &event_data = topology_split_data_[i];
 1052|     39|        event_data.source_edge = edge_data & 1;
 1053|     39|      }
 1054|     35|      decoder_buffer->EndBitDecoding();
 1055|     35|    }
 1056|     51|  }
 1057|    144|  uint32_t num_hole_events = 0;
 1058|    144|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1059|    144|  if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    144|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1059:7): [True: 23, False: 121]
  ------------------
 1060|     23|    if (!decoder_buffer->Decode(&num_hole_events)) {
  ------------------
  |  Branch (1060:9): [True: 0, False: 23]
  ------------------
 1061|      0|      return -1;
 1062|      0|    }
 1063|    121|  } else if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 1)) {
  ------------------
  |  |  115|    121|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1063:14): [True: 2, False: 119]
  ------------------
 1064|      2|    if (!DecodeVarint(&num_hole_events, decoder_buffer)) {
  ------------------
  |  Branch (1064:9): [True: 0, False: 2]
  ------------------
 1065|      0|      return -1;
 1066|      0|    }
 1067|      2|  }
 1068|    144|#endif
 1069|    144|  if (num_hole_events > 0) {
  ------------------
  |  Branch (1069:7): [True: 8, False: 136]
  ------------------
 1070|      8|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
 1071|      8|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(1, 2)) {
  ------------------
  |  |  115|      8|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (1071:9): [True: 7, False: 1]
  ------------------
 1072|   192k|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1072:28): [True: 192k, False: 0]
  ------------------
 1073|   192k|        HoleEventData event_data;
 1074|   192k|        if (!decoder_buffer->Decode(&event_data)) {
  ------------------
  |  Branch (1074:13): [True: 7, False: 192k]
  ------------------
 1075|      7|          return -1;
 1076|      7|        }
 1077|   192k|        hole_event_data_.push_back(event_data);
 1078|   192k|      }
 1079|       |
 1080|      7|    } else
 1081|      1|#endif
 1082|      1|    {
 1083|       |      // Decode hole symbol ids using delta and varint coding.
 1084|      1|      int last_symbol_id = 0;
 1085|      2|      for (uint32_t i = 0; i < num_hole_events; ++i) {
  ------------------
  |  Branch (1085:28): [True: 1, False: 1]
  ------------------
 1086|      1|        HoleEventData event_data;
 1087|      1|        uint32_t delta;
 1088|      1|        if (!DecodeVarint<uint32_t>(&delta, decoder_buffer)) {
  ------------------
  |  Branch (1088:13): [True: 0, False: 1]
  ------------------
 1089|      0|          return -1;
 1090|      0|        }
 1091|      1|        event_data.symbol_id = delta + last_symbol_id;
 1092|      1|        last_symbol_id = event_data.symbol_id;
 1093|      1|        hole_event_data_.push_back(event_data);
 1094|      1|      }
 1095|      1|    }
 1096|      8|  }
 1097|    137|  return static_cast<int32_t>(decoder_buffer->decoded_size());
 1098|    144|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE35DecodeAttributeConnectivitiesOnFaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
 1132|     18|    TraversalDecoder>::DecodeAttributeConnectivitiesOnFace(CornerIndex corner) {
 1133|       |  // Three corners of the face.
 1134|     18|  const CornerIndex corners[3] = {corner, corner_table_->Next(corner),
 1135|     18|                                  corner_table_->Previous(corner)};
 1136|       |
 1137|     18|  const FaceIndex src_face_id = corner_table_->Face(corner);
 1138|     72|  for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1138:19): [True: 54, False: 18]
  ------------------
 1139|     54|    const CornerIndex opp_corner = corner_table_->Opposite(corners[c]);
 1140|     54|    if (opp_corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (1140:9): [True: 46, False: 8]
  ------------------
 1141|       |      // Don't decode attribute seams on boundary edges (every boundary edge
 1142|       |      // is automatically an attribute seam).
 1143|     96|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1143:28): [True: 50, False: 46]
  ------------------
 1144|     50|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1145|     50|      }
 1146|     46|      continue;
 1147|     46|    }
 1148|      8|    const FaceIndex opp_face_id = corner_table_->Face(opp_corner);
 1149|       |    // Don't decode edges when the opposite face has been already processed.
 1150|      8|    if (opp_face_id < src_face_id) {
  ------------------
  |  Branch (1150:9): [True: 4, False: 4]
  ------------------
 1151|      4|      continue;
 1152|      4|    }
 1153|       |
 1154|     12|    for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1154:26): [True: 8, False: 4]
  ------------------
 1155|      8|      const bool is_seam = traversal_decoder_.DecodeAttributeSeam(i);
 1156|      8|      if (is_seam) {
  ------------------
  |  Branch (1156:11): [True: 5, False: 3]
  ------------------
 1157|      5|        attribute_data_[i].attribute_seam_corners.push_back(corners[c].value());
 1158|      5|      }
 1159|      8|    }
 1160|      4|  }
 1161|     18|  return true;
 1162|     18|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE21AssignPointsToCornersEi:
 1166|     16|    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|     16|  decoder_->mesh()->SetNumFaces(corner_table_->num_faces());
 1171|       |
 1172|     16|  if (attribute_data_.empty()) {
  ------------------
  |  Branch (1172:7): [True: 0, False: 16]
  ------------------
 1173|       |    // We have connectivity for position only. In this case all vertex indices
 1174|       |    // are equal to point indices.
 1175|      0|    for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1175:26): [True: 0, False: 0]
  ------------------
 1176|      0|      Mesh::Face face;
 1177|      0|      const CornerIndex start_corner(3 * f.value());
 1178|      0|      for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1178:23): [True: 0, False: 0]
  ------------------
 1179|       |        // Get the vertex index on the corner and use it as a point index.
 1180|      0|        const int32_t vert_id = corner_table_->Vertex(start_corner + c).value();
 1181|      0|        face[c] = vert_id;
 1182|      0|      }
 1183|      0|      decoder_->mesh()->SetFace(f, face);
 1184|      0|    }
 1185|      0|    decoder_->point_cloud()->set_num_points(num_connectivity_verts);
 1186|      0|    return true;
 1187|      0|  }
 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|     16|  std::vector<int32_t> point_to_corner_map;
 1194|       |  // Map between every corner and their new point ids.
 1195|     16|  std::vector<int32_t> corner_to_point_map(corner_table_->num_corners());
 1196|     64|  for (int v = 0; v < corner_table_->num_vertices(); ++v) {
  ------------------
  |  Branch (1196:19): [True: 48, False: 16]
  ------------------
 1197|     48|    CornerIndex c = corner_table_->LeftMostCorner(VertexIndex(v));
 1198|     48|    if (c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1198:9): [True: 0, False: 48]
  ------------------
 1199|      0|      continue;  // Isolated vertex.
 1200|      0|    }
 1201|     48|    CornerIndex deduplication_first_corner = c;
 1202|     48|    if (is_vert_hole_[v]) {
  ------------------
  |  Branch (1202:9): [True: 46, False: 2]
  ------------------
 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|     46|      deduplication_first_corner = c;
 1206|     46|    } else {
 1207|       |      // If we are not on the boundary we need to find the first seam (of any
 1208|       |      // attribute).
 1209|      5|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1209:28): [True: 4, False: 1]
  ------------------
 1210|      4|        if (!attribute_data_[i].connectivity_data.IsCornerOnSeam(c)) {
  ------------------
  |  Branch (1210:13): [True: 0, False: 4]
  ------------------
 1211|      0|          continue;  // No seam for this attribute, ignore it.
 1212|      0|        }
 1213|       |        // Else there needs to be at least one seam edge.
 1214|       |
 1215|       |        // At this point, we use identity mapping between corners and point ids.
 1216|      4|        const VertexIndex vert_id =
 1217|      4|            attribute_data_[i].connectivity_data.Vertex(c);
 1218|      4|        CornerIndex act_c = corner_table_->SwingRight(c);
 1219|      4|        bool seam_found = false;
 1220|      7|        while (act_c != c) {
  ------------------
  |  Branch (1220:16): [True: 4, False: 3]
  ------------------
 1221|      4|          if (act_c == kInvalidCornerIndex) {
  ------------------
  |  Branch (1221:15): [True: 0, False: 4]
  ------------------
 1222|      0|            return false;
 1223|      0|          }
 1224|      4|          if (attribute_data_[i].connectivity_data.Vertex(act_c) != vert_id) {
  ------------------
  |  Branch (1224:15): [True: 1, False: 3]
  ------------------
 1225|       |            // Attribute seam found. Stop.
 1226|      1|            deduplication_first_corner = act_c;
 1227|      1|            seam_found = true;
 1228|      1|            break;
 1229|      1|          }
 1230|      3|          act_c = corner_table_->SwingRight(act_c);
 1231|      3|        }
 1232|      4|        if (seam_found) {
  ------------------
  |  Branch (1232:13): [True: 1, False: 3]
  ------------------
 1233|      1|          break;  // No reason to process other attributes if we found a seam.
 1234|      1|        }
 1235|      4|      }
 1236|      2|    }
 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|     48|    c = deduplication_first_corner;
 1244|       |    // Create a new point.
 1245|     48|    corner_to_point_map[c.value()] =
 1246|     48|        static_cast<uint32_t>(point_to_corner_map.size());
 1247|     48|    point_to_corner_map.push_back(c.value());
 1248|       |    // Traverse in CW direction.
 1249|     48|    CornerIndex prev_c = c;
 1250|     48|    c = corner_table_->SwingRight(c);
 1251|     54|    while (c != kInvalidCornerIndex && c != deduplication_first_corner) {
  ------------------
  |  Branch (1251:12): [True: 8, False: 46]
  |  Branch (1251:40): [True: 6, False: 2]
  ------------------
 1252|      6|      bool attribute_seam = false;
 1253|     12|      for (uint32_t i = 0; i < attribute_data_.size(); ++i) {
  ------------------
  |  Branch (1253:28): [True: 10, False: 2]
  ------------------
 1254|     10|        if (attribute_data_[i].connectivity_data.Vertex(c) !=
  ------------------
  |  Branch (1254:13): [True: 4, False: 6]
  ------------------
 1255|     10|            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|      4|          attribute_seam = true;
 1259|      4|          break;
 1260|      4|        }
 1261|     10|      }
 1262|      6|      if (attribute_seam) {
  ------------------
  |  Branch (1262:11): [True: 4, False: 2]
  ------------------
 1263|      4|        corner_to_point_map[c.value()] =
 1264|      4|            static_cast<uint32_t>(point_to_corner_map.size());
 1265|      4|        point_to_corner_map.push_back(c.value());
 1266|      4|      } else {
 1267|      2|        corner_to_point_map[c.value()] = corner_to_point_map[prev_c.value()];
 1268|      2|      }
 1269|      6|      prev_c = c;
 1270|      6|      c = corner_table_->SwingRight(c);
 1271|      6|    }
 1272|     48|  }
 1273|       |  // Add faces.
 1274|     34|  for (FaceIndex f(0); f < decoder_->mesh()->num_faces(); ++f) {
  ------------------
  |  Branch (1274:24): [True: 18, False: 16]
  ------------------
 1275|     18|    Mesh::Face face;
 1276|     72|    for (int c = 0; c < 3; ++c) {
  ------------------
  |  Branch (1276:21): [True: 54, False: 18]
  ------------------
 1277|       |      // Remap old points to the new ones.
 1278|     54|      face[c] = corner_to_point_map[3 * f.value() + c];
 1279|     54|    }
 1280|     18|    decoder_->mesh()->SetFace(f, face);
 1281|     18|  }
 1282|     16|  decoder_->point_cloud()->set_num_points(
 1283|     16|      static_cast<uint32_t>(point_to_corner_map.size()));
 1284|     16|  return true;
 1285|     16|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|     21|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|     21|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|     21|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|     21|  const Mesh *mesh = decoder_->mesh();
  115|     21|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|     21|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|     21|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|     21|                           encoding_data);
  120|       |
  121|     21|  TraverserT att_traverser;
  122|     21|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|     21|  traversal_sequencer->SetTraverser(att_traverser);
  125|     21|  return std::move(traversal_sequencer);
  126|     21|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|     27|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|     27|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|     27|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|     27|  const Mesh *mesh = decoder_->mesh();
  115|     27|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|     27|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|     27|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|     27|                           encoding_data);
  120|       |
  121|     27|  TraverserT att_traverser;
  122|     27|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|     27|  traversal_sequencer->SetTraverser(att_traverser);
  125|     27|  return std::move(traversal_sequencer);
  126|     27|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|      3|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|      3|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|      3|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|      3|  const Mesh *mesh = decoder_->mesh();
  115|      3|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|      3|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|      3|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|      3|                           encoding_data);
  120|       |
  121|      3|  TraverserT att_traverser;
  122|      3|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|      3|  traversal_sequencer->SetTraverser(att_traverser);
  125|      3|  return std::move(traversal_sequencer);
  126|      3|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|    113|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|    113|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|    113|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|    113|  const Mesh *mesh = decoder_->mesh();
  115|    113|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|    113|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|    113|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|    113|                           encoding_data);
  120|       |
  121|    113|  TraverserT att_traverser;
  122|    113|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|    113|  traversal_sequencer->SetTraverser(att_traverser);
  125|    113|  return std::move(traversal_sequencer);
  126|    113|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE30CreateVertexTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|      1|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|      1|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|      1|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|      1|  const Mesh *mesh = decoder_->mesh();
  115|      1|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|      1|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|      1|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|      1|                           encoding_data);
  120|       |
  121|      1|  TraverserT att_traverser;
  122|      1|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|      1|  traversal_sequencer->SetTraverser(att_traverser);
  125|      1|  return std::move(traversal_sequencer);
  126|      1|}
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE30CreateVertexTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS5_EEEEEENSt3__110unique_ptrINS_15PointsSequencerENS9_14default_deleteISB_EEEEPNS_32MeshAttributeIndicesEncodingDataE:
  110|      1|    MeshAttributeIndicesEncodingData *encoding_data) {
  111|      1|  typedef typename TraverserT::TraversalObserver AttObserver;
  112|      1|  typedef typename TraverserT::CornerTable CornerTable;
  113|       |
  114|      1|  const Mesh *mesh = decoder_->mesh();
  115|      1|  std::unique_ptr<MeshTraversalSequencer<TraverserT>> traversal_sequencer(
  116|      1|      new MeshTraversalSequencer<TraverserT>(mesh, encoding_data));
  117|       |
  118|      1|  AttObserver att_observer(corner_table_.get(), mesh, traversal_sequencer.get(),
  119|      1|                           encoding_data);
  120|       |
  121|      1|  TraverserT att_traverser;
  122|      1|  att_traverser.Init(corner_table_.get(), att_observer);
  123|       |
  124|      1|  traversal_sequencer->SetTraverser(att_traverser);
  125|      1|  return std::move(traversal_sequencer);
  126|      1|}

_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE10GetDecoderEv:
   65|    699|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE14GetCornerTableEv:
   66|    304|  const CornerTable *GetCornerTable() const override {
   67|    304|    return corner_table_.get();
   68|    304|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  5.71M|                       int *out_encoder_split_symbol_id) {
   87|  5.71M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 5.15k, False: 5.70M]
  ------------------
   88|  5.15k|      return false;
   89|  5.15k|    }
   90|  5.70M|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 1, False: 5.70M]
  ------------------
   91|  5.70M|        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|      1|      *out_encoder_split_symbol_id = -1;
   98|      1|      return true;
   99|      1|    }
  100|  5.70M|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 5.70M, False: 35]
  ------------------
  101|  5.70M|      return false;
  102|  5.70M|    }
  103|     35|    *out_face_edge =
  104|     35|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|     35|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|     35|    topology_split_data_.pop_back();
  108|     35|    return true;
  109|  5.70M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  17.4M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  17.4M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  17.4M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  17.4M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE13AttributeDataC2Ev:
  210|  1.12k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE10GetDecoderEv:
   65|    537|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE14GetCornerTableEv:
   66|    509|  const CornerTable *GetCornerTable() const override {
   67|    509|    return corner_table_.get();
   68|    509|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|   404k|                       int *out_encoder_split_symbol_id) {
   87|   404k|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 402k, False: 2.07k]
  ------------------
   88|   402k|      return false;
   89|   402k|    }
   90|  2.07k|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 0, False: 2.07k]
  ------------------
   91|  2.07k|        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|      0|      *out_encoder_split_symbol_id = -1;
   98|      0|      return true;
   99|      0|    }
  100|  2.07k|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 1.98k, False: 88]
  ------------------
  101|  1.98k|      return false;
  102|  1.98k|    }
  103|     88|    *out_face_edge =
  104|     88|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|     88|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|     88|    topology_split_data_.pop_back();
  108|     88|    return true;
  109|  2.07k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  1.20M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  1.20M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  1.20M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  1.20M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE13AttributeDataC2Ev:
  210|    568|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE10GetDecoderEv:
   65|    747|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE14GetCornerTableEv:
   66|    146|  const CornerTable *GetCornerTable() const override {
   67|    146|    return corner_table_.get();
   68|    146|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  29.3k|                       int *out_encoder_split_symbol_id) {
   87|  29.3k|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 29.3k, False: 8]
  ------------------
   88|  29.3k|      return false;
   89|  29.3k|    }
   90|      8|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 1, False: 7]
  ------------------
   91|      8|        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|      1|      *out_encoder_split_symbol_id = -1;
   98|      1|      return true;
   99|      1|    }
  100|      7|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 7, False: 0]
  ------------------
  101|      7|      return false;
  102|      7|    }
  103|      0|    *out_face_edge =
  104|      0|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|      0|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|      0|    topology_split_data_.pop_back();
  108|      0|    return true;
  109|      7|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  29.7k|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  29.7k|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  29.7k|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  29.7k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE13AttributeDataC2Ev:
  210|  1.45k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}

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

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

_ZN5draco31MeshEdgebreakerTraversalDecoderC2Ev:
   33|    634|      : attribute_connectivity_decoders_(nullptr),
   34|    634|        num_attribute_data_(0),
   35|    634|        decoder_impl_(nullptr) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder4InitEPNS_35MeshEdgebreakerDecoderImplInterfaceE:
   36|    549|  void Init(MeshEdgebreakerDecoderImplInterface *decoder) {
   37|    549|    decoder_impl_ = decoder;
   38|    549|    buffer_.Init(decoder->GetDecoder()->buffer()->data_head(),
   39|    549|                 decoder->GetDecoder()->buffer()->remaining_size(),
   40|    549|                 decoder->GetDecoder()->buffer()->bitstream_version());
   41|    549|  }
_ZNK5draco31MeshEdgebreakerTraversalDecoder16BitstreamVersionEv:
   44|    336|  uint16_t BitstreamVersion() const {
   45|    336|    return decoder_impl_->GetDecoder()->bitstream_version();
   46|    336|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder21SetNumEncodedVerticesEi:
   50|    233|  void SetNumEncodedVertices(int /* num_vertices */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19SetNumAttributeDataEi:
   54|    549|  void SetNumAttributeData(int num_data) { num_attribute_data_ = num_data; }
_ZN5draco31MeshEdgebreakerTraversalDecoder5StartEPNS_13DecoderBufferE:
   59|    412|  bool Start(DecoderBuffer *out_buffer) {
   60|       |    // Decode symbols from the main buffer decoder and face configurations from
   61|       |    // the start_face_buffer decoder.
   62|    412|    if (!DecodeTraversalSymbols()) {
  ------------------
  |  Branch (62:9): [True: 4, False: 408]
  ------------------
   63|      4|      return false;
   64|      4|    }
   65|       |
   66|    408|    if (!DecodeStartFaces()) {
  ------------------
  |  Branch (66:9): [True: 5, False: 403]
  ------------------
   67|      5|      return false;
   68|      5|    }
   69|       |
   70|    403|    if (!DecodeAttributeSeams()) {
  ------------------
  |  Branch (70:9): [True: 3, False: 400]
  ------------------
   71|      3|      return false;
   72|      3|    }
   73|    400|    *out_buffer = buffer_;
   74|    400|    return true;
   75|    403|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder28DecodeStartFaceConfigurationEv:
   78|  45.4k|  inline bool DecodeStartFaceConfiguration() {
   79|  45.4k|    uint32_t face_configuration;
   80|  45.4k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   81|  45.4k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  45.4k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (81:9): [True: 43, False: 45.4k]
  ------------------
   82|     43|      start_face_buffer_.DecodeLeastSignificantBits32(1, &face_configuration);
   83|       |
   84|     43|    } else
   85|  45.4k|#endif
   86|  45.4k|    {
   87|  45.4k|      face_configuration = start_face_decoder_.DecodeNextBit();
   88|  45.4k|    }
   89|  45.4k|    return face_configuration;
   90|  45.4k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder12DecodeSymbolEv:
   93|  13.2M|  inline uint32_t DecodeSymbol() {
   94|  13.2M|    uint32_t symbol;
   95|  13.2M|    symbol_buffer_.DecodeLeastSignificantBits32(1, &symbol);
   96|  13.2M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (96:9): [True: 6.12M, False: 7.10M]
  ------------------
   97|  6.12M|      return symbol;
   98|  6.12M|    }
   99|       |    // Else decode two additional bits.
  100|  7.10M|    uint32_t symbol_suffix;
  101|  7.10M|    symbol_buffer_.DecodeLeastSignificantBits32(2, &symbol_suffix);
  102|  7.10M|    symbol |= (symbol_suffix << 1);
  103|  7.10M|    return symbol;
  104|  13.2M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder22NewActiveCornerReachedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  13.2M|  inline void NewActiveCornerReached(CornerIndex /* corner */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder13MergeVerticesENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_:
  111|  1.39M|  inline void MergeVertices(VertexIndex /* dest */, VertexIndex /* source */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19DecodeAttributeSeamEi:
  117|  4.89M|  inline bool DecodeAttributeSeam(int attribute) {
  118|  4.89M|    return attribute_connectivity_decoders_[attribute].DecodeNextBit();
  119|  4.89M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder4DoneEv:
  122|    349|  void Done() {
  123|    349|    if (symbol_buffer_.bit_decoder_active()) {
  ------------------
  |  Branch (123:9): [True: 333, False: 16]
  ------------------
  124|    333|      symbol_buffer_.EndBitDecoding();
  125|    333|    }
  126|    349|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  127|    349|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    349|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (127:9): [True: 34, False: 315]
  ------------------
  128|     34|      start_face_buffer_.EndBitDecoding();
  129|       |
  130|     34|    } else
  131|    315|#endif
  132|    315|    {
  133|    315|      start_face_decoder_.EndDecoding();
  134|    315|    }
  135|    349|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder6bufferEv:
  138|    128|  DecoderBuffer *buffer() { return &buffer_; }
_ZN5draco31MeshEdgebreakerTraversalDecoder22DecodeTraversalSymbolsEv:
  140|    431|  bool DecodeTraversalSymbols() {
  141|    431|    uint64_t traversal_size;
  142|    431|    symbol_buffer_ = buffer_;
  143|    431|    if (!symbol_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (143:9): [True: 0, False: 431]
  ------------------
  144|      0|      return false;
  145|      0|    }
  146|    431|    buffer_ = symbol_buffer_;
  147|    431|    if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (147:9): [True: 6, False: 425]
  ------------------
  148|      6|      return false;
  149|      6|    }
  150|    425|    buffer_.Advance(traversal_size);
  151|    425|    return true;
  152|    431|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder16DecodeStartFacesEv:
  154|    543|  bool DecodeStartFaces() {
  155|       |    // Create a decoder that is set to the end of the encoded traversal data.
  156|    543|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  157|    543|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    543|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (157:9): [True: 55, False: 488]
  ------------------
  158|     55|      start_face_buffer_ = buffer_;
  159|     55|      uint64_t traversal_size;
  160|     55|      if (!start_face_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (160:11): [True: 0, False: 55]
  ------------------
  161|      0|        return false;
  162|      0|      }
  163|     55|      buffer_ = start_face_buffer_;
  164|     55|      if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (164:11): [True: 9, False: 46]
  ------------------
  165|      9|        return false;
  166|      9|      }
  167|     46|      buffer_.Advance(traversal_size);
  168|     46|      return true;
  169|     55|    }
  170|    488|#endif
  171|    488|    return start_face_decoder_.StartDecoding(&buffer_);
  172|    543|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder20DecodeAttributeSeamsEv:
  174|    531|  bool DecodeAttributeSeams() {
  175|       |    // Prepare attribute decoding.
  176|    531|    if (num_attribute_data_ > 0) {
  ------------------
  |  Branch (176:9): [True: 394, False: 137]
  ------------------
  177|    394|      attribute_connectivity_decoders_ = std::unique_ptr<BinaryDecoder[]>(
  178|    394|          new BinaryDecoder[num_attribute_data_]);
  179|  1.61k|      for (int i = 0; i < num_attribute_data_; ++i) {
  ------------------
  |  Branch (179:23): [True: 1.22k, False: 391]
  ------------------
  180|  1.22k|        if (!attribute_connectivity_decoders_[i].StartDecoding(&buffer_)) {
  ------------------
  |  Branch (180:13): [True: 3, False: 1.21k]
  ------------------
  181|      3|          return false;
  182|      3|        }
  183|  1.22k|      }
  184|    394|    }
  185|    528|    return true;
  186|    531|  }

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

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

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

_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|    139|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|   666k|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|   666k|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 665k, False: 593]
  ------------------
   61|   665k|      return true;  // Already traversed.
   62|   665k|    }
   63|       |
   64|    593|    corner_traversal_stack_.clear();
   65|    593|    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|    593|    const VertexIndex next_vert =
   69|    593|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|    593|    const VertexIndex prev_vert =
   71|    593|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|    593|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 593]
  |  Branch (72:45): [True: 0, False: 593]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|    593|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 574, False: 19]
  ------------------
   76|    574|      this->MarkVertexVisited(next_vert);
   77|    574|      this->traversal_observer().OnNewVertexVisited(
   78|    574|          next_vert, this->corner_table()->Next(corner_id));
   79|    574|    }
   80|    593|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 551, False: 42]
  ------------------
   81|    551|      this->MarkVertexVisited(prev_vert);
   82|    551|      this->traversal_observer().OnNewVertexVisited(
   83|    551|          prev_vert, this->corner_table()->Previous(corner_id));
   84|    551|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|  3.52k|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 2.93k, False: 593]
  ------------------
   88|       |      // Currently processed corner.
   89|  2.93k|      corner_id = corner_traversal_stack_.back();
   90|  2.93k|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  2.93k|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 2.93k]
  |  Branch (92:47): [True: 118, False: 2.81k]
  ------------------
   93|       |        // This face has been already traversed.
   94|    118|        corner_traversal_stack_.pop_back();
   95|    118|        continue;
   96|    118|      }
   97|   666k|      while (true) {
  ------------------
  |  Branch (97:14): [True: 666k, Folded]
  ------------------
   98|   666k|        this->MarkFaceVisited(face_id);
   99|   666k|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|   666k|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|   666k|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 666k]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|   666k|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 333k, False: 332k]
  ------------------
  105|   333k|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|   333k|          this->MarkVertexVisited(vert_id);
  107|   333k|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|   333k|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 332k, False: 1.22k]
  ------------------
  109|   332k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   332k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   332k|            continue;
  112|   332k|          }
  113|   333k|        }
  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|   334k|        const CornerIndex right_corner_id =
  118|   334k|            this->corner_table()->GetRightCorner(corner_id);
  119|   334k|        const CornerIndex left_corner_id =
  120|   334k|            this->corner_table()->GetLeftCorner(corner_id);
  121|   334k|        const FaceIndex right_face_id(
  122|   334k|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 986, False: 333k]
  ------------------
  123|   334k|                 ? kInvalidFaceIndex
  124|   334k|                 : FaceIndex(right_corner_id.value() / 3)));
  125|   334k|        const FaceIndex left_face_id(
  126|   334k|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 650, False: 333k]
  ------------------
  127|   334k|                 ? kInvalidFaceIndex
  128|   334k|                 : FaceIndex(left_corner_id.value() / 3)));
  129|   334k|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 331k, False: 2.14k]
  ------------------
  130|       |          // Right face has been already visited.
  131|   331k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 1.64k, False: 330k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  1.64k|            corner_traversal_stack_.pop_back();
  134|  1.64k|            break;  // Break from the while (true) loop.
  135|   330k|          } else {
  136|       |            // Go to the left face.
  137|   330k|            corner_id = left_corner_id;
  138|   330k|            face_id = left_face_id;
  139|   330k|          }
  140|   331k|        } else {
  141|       |          // Right face was not visited.
  142|  2.14k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 976, False: 1.16k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|    976|            corner_id = right_corner_id;
  145|    976|            face_id = right_face_id;
  146|  1.16k|          } 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|  1.16k|            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|  1.16k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  1.16k|            break;
  159|  1.16k|          }
  160|  2.14k|        }
  161|   334k|      }
  162|  2.81k|    }
  163|    593|    return true;
  164|    593|  }
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|    139|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|    282|  DepthFirstTraverser() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|    143|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|   102k|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|   102k|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 21.6k, False: 80.3k]
  ------------------
   61|  21.6k|      return true;  // Already traversed.
   62|  21.6k|    }
   63|       |
   64|  80.3k|    corner_traversal_stack_.clear();
   65|  80.3k|    corner_traversal_stack_.push_back(corner_id);
   66|       |    // For the first face, check the remaining corners as they may not be
   67|       |    // processed yet.
   68|  80.3k|    const VertexIndex next_vert =
   69|  80.3k|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  80.3k|    const VertexIndex prev_vert =
   71|  80.3k|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  80.3k|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 80.3k]
  |  Branch (72:45): [True: 0, False: 80.3k]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  80.3k|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 80.1k, False: 146]
  ------------------
   76|  80.1k|      this->MarkVertexVisited(next_vert);
   77|  80.1k|      this->traversal_observer().OnNewVertexVisited(
   78|  80.1k|          next_vert, this->corner_table()->Next(corner_id));
   79|  80.1k|    }
   80|  80.3k|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 80.1k, False: 178]
  ------------------
   81|  80.1k|      this->MarkVertexVisited(prev_vert);
   82|  80.1k|      this->traversal_observer().OnNewVertexVisited(
   83|  80.1k|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  80.1k|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|   162k|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 82.3k, False: 80.3k]
  ------------------
   88|       |      // Currently processed corner.
   89|  82.3k|      corner_id = corner_traversal_stack_.back();
   90|  82.3k|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  82.3k|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 82.3k]
  |  Branch (92:47): [True: 165, False: 82.1k]
  ------------------
   93|       |        // This face has been already traversed.
   94|    165|        corner_traversal_stack_.pop_back();
   95|    165|        continue;
   96|    165|      }
   97|   102k|      while (true) {
  ------------------
  |  Branch (97:14): [True: 102k, Folded]
  ------------------
   98|   102k|        this->MarkFaceVisited(face_id);
   99|   102k|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|   102k|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|   102k|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 102k]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|   102k|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 91.7k, False: 10.3k]
  ------------------
  105|  91.7k|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|  91.7k|          this->MarkVertexVisited(vert_id);
  107|  91.7k|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|  91.7k|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 9.57k, False: 82.1k]
  ------------------
  109|  9.57k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|  9.57k|            face_id = FaceIndex(corner_id.value() / 3);
  111|  9.57k|            continue;
  112|  9.57k|          }
  113|  91.7k|        }
  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|  92.4k|        const CornerIndex right_corner_id =
  118|  92.4k|            this->corner_table()->GetRightCorner(corner_id);
  119|  92.4k|        const CornerIndex left_corner_id =
  120|  92.4k|            this->corner_table()->GetLeftCorner(corner_id);
  121|  92.4k|        const FaceIndex right_face_id(
  122|  92.4k|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 81.2k, False: 11.1k]
  ------------------
  123|  92.4k|                 ? kInvalidFaceIndex
  124|  92.4k|                 : FaceIndex(right_corner_id.value() / 3)));
  125|  92.4k|        const FaceIndex left_face_id(
  126|  92.4k|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 81.1k, False: 11.2k]
  ------------------
  127|  92.4k|                 ? kInvalidFaceIndex
  128|  92.4k|                 : FaceIndex(left_corner_id.value() / 3)));
  129|  92.4k|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 90.6k, False: 1.78k]
  ------------------
  130|       |          // Right face has been already visited.
  131|  90.6k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 81.1k, False: 9.48k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  81.1k|            corner_traversal_stack_.pop_back();
  134|  81.1k|            break;  // Break from the while (true) loop.
  135|  81.1k|          } else {
  136|       |            // Go to the left face.
  137|  9.48k|            corner_id = left_corner_id;
  138|  9.48k|            face_id = left_face_id;
  139|  9.48k|          }
  140|  90.6k|        } else {
  141|       |          // Right face was not visited.
  142|  1.78k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 771, False: 1.00k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|    771|            corner_id = right_corner_id;
  145|    771|            face_id = right_face_id;
  146|  1.00k|          } 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|  1.00k|            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|  1.00k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  1.00k|            break;
  159|  1.00k|          }
  160|  1.78k|        }
  161|  92.4k|      }
  162|  82.1k|    }
  163|  80.3k|    return true;
  164|  80.3k|  }
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|    143|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|    302|  DepthFirstTraverser() {}

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

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

_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|     25|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|    807|  bool UpdatePointToAttributeIndexMapping(PointAttribute *attribute) override {
   49|    807|    const auto *corner_table = traverser_.corner_table();
   50|    807|    attribute->SetExplicitMapping(mesh_->num_points());
   51|    807|    const size_t num_faces = mesh_->num_faces();
   52|    807|    const size_t num_points = mesh_->num_points();
   53|   182k|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 181k, False: 807]
  ------------------
   54|   181k|      const auto &face = mesh_->face(f);
   55|   725k|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 544k, False: 181k]
  ------------------
   56|   544k|        const PointIndex point_id = face[p];
   57|   544k|        const VertexIndex vert_id =
   58|   544k|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|   544k|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 544k]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|   544k|        const AttributeValueIndex att_entry_id(
   63|   544k|            encoding_data_
   64|   544k|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|   544k|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 544k]
  |  Branch (65:13): [True: 0, False: 544k]
  |  Branch (65:39): [True: 0, False: 544k]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|   544k|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|   544k|      }
   71|   181k|    }
   72|    807|    return true;
   73|    807|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|     25|  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|     25|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|     25|    traverser_.OnTraversalStart();
   82|     25|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 25]
  ------------------
   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|     25|    } else {
   89|     25|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|  43.4k|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 43.4k, False: 25]
  ------------------
   91|  43.4k|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 43.4k]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|  43.4k|      }
   95|     25|    }
   96|     25|    traverser_.OnTraversalEnd();
   97|     25|    return true;
   98|     25|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  43.4k|  bool ProcessCorner(CornerIndex corner_id) {
  102|  43.4k|    return traverser_.TraverseFromCorner(corner_id);
  103|  43.4k|  }
_ZN5draco22MeshTraversalSequencerINS_28MaxPredictionDegreeTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|     25|  void SetTraverser(const TraverserT &t) { traverser_ = t; }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|    141|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  1.18k|  bool UpdatePointToAttributeIndexMapping(PointAttribute *attribute) override {
   49|  1.18k|    const auto *corner_table = traverser_.corner_table();
   50|  1.18k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  1.18k|    const size_t num_faces = mesh_->num_faces();
   52|  1.18k|    const size_t num_points = mesh_->num_points();
   53|  1.42M|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 1.42M, False: 1.18k]
  ------------------
   54|  1.42M|      const auto &face = mesh_->face(f);
   55|  5.69M|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 4.27M, False: 1.42M]
  ------------------
   56|  4.27M|        const PointIndex point_id = face[p];
   57|  4.27M|        const VertexIndex vert_id =
   58|  4.27M|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|  4.27M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 4.27M]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|  4.27M|        const AttributeValueIndex att_entry_id(
   63|  4.27M|            encoding_data_
   64|  4.27M|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|  4.27M|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 4.27M]
  |  Branch (65:13): [True: 0, False: 4.27M]
  |  Branch (65:39): [True: 0, False: 4.27M]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|  4.27M|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|  4.27M|      }
   71|  1.42M|    }
   72|  1.18k|    return true;
   73|  1.18k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|    139|  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|    139|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|    139|    traverser_.OnTraversalStart();
   82|    139|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 139]
  ------------------
   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|    139|    } else {
   89|    139|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|   666k|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 666k, False: 139]
  ------------------
   91|   666k|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 666k]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|   666k|      }
   95|    139|    }
   96|    139|    traverser_.OnTraversalEnd();
   97|    139|    return true;
   98|    139|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|   666k|  bool ProcessCorner(CornerIndex corner_id) {
  102|   666k|    return traverser_.TraverseFromCorner(corner_id);
  103|   666k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|    141|  void SetTraverser(const TraverserT &t) { traverser_ = t; }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEEC2EPKNS_4MeshEPKNS_32MeshAttributeIndicesEncodingDataE:
   34|    151|      : mesh_(mesh), encoding_data_(encoding_data), corner_order_(nullptr) {}
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE34UpdatePointToAttributeIndexMappingEPNS_14PointAttributeE:
   48|  3.13k|  bool UpdatePointToAttributeIndexMapping(PointAttribute *attribute) override {
   49|  3.13k|    const auto *corner_table = traverser_.corner_table();
   50|  3.13k|    attribute->SetExplicitMapping(mesh_->num_points());
   51|  3.13k|    const size_t num_faces = mesh_->num_faces();
   52|  3.13k|    const size_t num_points = mesh_->num_points();
   53|   234k|    for (FaceIndex f(0); f < static_cast<uint32_t>(num_faces); ++f) {
  ------------------
  |  Branch (53:26): [True: 231k, False: 3.13k]
  ------------------
   54|   231k|      const auto &face = mesh_->face(f);
   55|   926k|      for (int p = 0; p < 3; ++p) {
  ------------------
  |  Branch (55:23): [True: 694k, False: 231k]
  ------------------
   56|   694k|        const PointIndex point_id = face[p];
   57|   694k|        const VertexIndex vert_id =
   58|   694k|            corner_table->Vertex(CornerIndex(3 * f.value() + p));
   59|   694k|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (59:13): [True: 0, False: 694k]
  ------------------
   60|      0|          return false;
   61|      0|        }
   62|   694k|        const AttributeValueIndex att_entry_id(
   63|   694k|            encoding_data_
   64|   694k|                ->vertex_to_encoded_attribute_value_index_map[vert_id.value()]);
   65|   694k|        if (point_id >= num_points || att_entry_id.value() >= num_points) {
  ------------------
  |  Branch (65:13): [True: 0, False: 694k]
  |  Branch (65:13): [True: 0, False: 694k]
  |  Branch (65:39): [True: 0, False: 694k]
  ------------------
   66|       |          // There cannot be more attribute values than the number of points.
   67|      0|          return false;
   68|      0|        }
   69|   694k|        attribute->SetPointMapEntry(point_id, att_entry_id);
   70|   694k|      }
   71|   231k|    }
   72|  3.13k|    return true;
   73|  3.13k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE24GenerateSequenceInternalEv:
   76|    143|  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|    143|    out_point_ids()->reserve(traverser_.corner_table()->num_vertices());
   80|       |
   81|    143|    traverser_.OnTraversalStart();
   82|    143|    if (corner_order_) {
  ------------------
  |  Branch (82:9): [True: 0, False: 143]
  ------------------
   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|    143|    } else {
   89|    143|      const int32_t num_faces = traverser_.corner_table()->num_faces();
   90|   102k|      for (int i = 0; i < num_faces; ++i) {
  ------------------
  |  Branch (90:23): [True: 102k, False: 143]
  ------------------
   91|   102k|        if (!ProcessCorner(CornerIndex(3 * i))) {
  ------------------
  |  Branch (91:13): [True: 0, False: 102k]
  ------------------
   92|      0|          return false;
   93|      0|        }
   94|   102k|      }
   95|    143|    }
   96|    143|    traverser_.OnTraversalEnd();
   97|    143|    return true;
   98|    143|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE13ProcessCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|   102k|  bool ProcessCorner(CornerIndex corner_id) {
  102|   102k|    return traverser_.TraverseFromCorner(corner_id);
  103|   102k|  }
_ZN5draco22MeshTraversalSequencerINS_19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS2_EEEEE12SetTraverserERKS5_:
   35|    151|  void SetTraverser(const TraverserT &t) { traverser_ = t; }

_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|    302|  virtual ~TraverserBase() = default;
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  2.41M|  inline const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|   905k|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|   905k|    return is_vertex_visited_[vert_id.value()];
   65|   905k|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|   357k|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|   357k|    is_vertex_visited_[vert_id.value()] = true;
   68|   357k|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  1.06M|  inline TraversalObserverT &traversal_observer() {
   75|  1.06M|    return traversal_observer_;
   76|  1.06M|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|   842k|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|   842k|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 3.09k, False: 839k]
  ------------------
   47|  3.09k|      return true;  // Invalid faces are always considered as visited.
   48|  3.09k|    }
   49|   839k|    return is_face_visited_[face_id.value()];
   50|   842k|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|   709k|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|   709k|    is_face_visited_[face_id.value()] = true;
   62|   709k|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|    332|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|    332|  virtual ~TraverserBase() = default;
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|    166|                    TraversalObserver traversal_observer) {
   37|    166|    corner_table_ = corner_table;
   38|    166|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|    166|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|    166|    traversal_observer_ = traversal_observer;
   41|    166|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|   666k|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|   666k|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 666k]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|   666k|    return is_face_visited_[corner_id.value() / 3];
   58|   666k|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|   873k|  inline const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|   102k|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|   102k|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 102k]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|   102k|    return is_face_visited_[corner_id.value() / 3];
   58|   102k|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|   262k|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|   262k|    return is_vertex_visited_[vert_id.value()];
   65|   262k|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|   252k|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|   252k|    is_vertex_visited_[vert_id.value()] = true;
   68|   252k|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|   354k|  inline TraversalObserverT &traversal_observer() {
   75|   354k|    return traversal_observer_;
   76|   354k|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|   267k|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|   267k|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 162k, False: 104k]
  ------------------
   47|   162k|      return true;  // Invalid faces are always considered as visited.
   48|   162k|    }
   49|   104k|    return is_face_visited_[face_id.value()];
   50|   267k|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|   102k|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|   102k|    is_face_visited_[face_id.value()] = true;
   62|   102k|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|    302|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|    151|                    TraversalObserver traversal_observer) {
   37|    151|    corner_table_ = corner_table;
   38|    151|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|    151|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|    151|    traversal_observer_ = traversal_observer;
   41|    151|  }

_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_j:
  185|     21|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|     21|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 0, False: 21]
  ------------------
  187|      0|    return false;
  188|      0|  }
  189|     21|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 3, False: 18]
  ------------------
  190|      3|    return false;
  191|      3|  }
  192|     18|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 0, False: 18]
  ------------------
  193|      0|    return false;
  194|      0|  }
  195|     18|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 4, False: 14]
  ------------------
  196|      4|    return true;
  197|      4|  }
  198|     14|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 0, False: 14]
  ------------------
  199|      0|    return false;
  200|      0|  }
  201|     14|  num_decoded_points_ = 0;
  202|       |
  203|     14|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 0, False: 14]
  ------------------
  204|      0|    return false;
  205|      0|  }
  206|     14|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 3, False: 11]
  ------------------
  207|      3|    return false;
  208|      3|  }
  209|     11|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 2, False: 9]
  ------------------
  210|      2|    return false;
  211|      2|  }
  212|      9|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 0, False: 9]
  ------------------
  213|      0|    return false;
  214|      0|  }
  215|       |
  216|      9|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 9, False: 0]
  ------------------
  217|      9|    return false;
  218|      9|  }
  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|      9|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE14DecodeInternalINS_34PointAttributeVectorOutputIteratorIjEEEEbjRT_:
  253|      9|    uint32_t num_points, OutputIteratorT &oit) {
  254|      9|  typedef DecodingStatus Status;
  255|      9|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|      9|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|      9|  DecodingStatus init_status(num_points, 0, 0);
  258|      9|  std::stack<Status> status_stack;
  259|      9|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|  4.65k|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 4.65k, False: 0]
  ------------------
  263|  4.65k|    const DecodingStatus status = status_stack.top();
  264|  4.65k|    status_stack.pop();
  265|       |
  266|  4.65k|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|  4.65k|    const uint32_t last_axis = status.last_axis;
  268|  4.65k|    const uint32_t stack_pos = status.stack_pos;
  269|  4.65k|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|  4.65k|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|  4.65k|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 4.65k]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|  4.65k|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|  4.65k|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 0, False: 4.65k]
  ------------------
  278|      0|      return false;
  279|      0|    }
  280|       |
  281|  4.65k|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|  4.65k|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 873, False: 3.78k]
  ------------------
  285|  2.58k|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 1.71k, False: 873]
  ------------------
  286|  1.71k|        *oit = old_base;
  287|  1.71k|        ++oit;
  288|  1.71k|        ++num_decoded_points_;
  289|  1.71k|      }
  290|    873|      continue;
  291|    873|    }
  292|       |
  293|  3.78k|    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.78k|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 1.34k, False: 2.44k]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|  1.34k|      axes_[0] = axis;
  300|  13.4k|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 12.0k, False: 1.34k]
  ------------------
  301|  12.0k|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|  12.0k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 608, False: 11.4k]
  |  |  ------------------
  ------------------
  302|  12.0k|      }
  303|  3.64k|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 2.29k, False: 1.34k]
  ------------------
  304|  24.7k|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 22.4k, False: 2.29k]
  ------------------
  305|  22.4k|          p_[axes_[j]] = 0;
  306|  22.4k|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|  22.4k|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 8.24k, False: 14.1k]
  ------------------
  308|  8.24k|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 2, False: 8.23k]
  ------------------
  309|  8.24k|                    num_remaining_bits, &p_[axes_[j]])) {
  310|      2|              return false;
  311|      2|            }
  312|  8.24k|          }
  313|  22.4k|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|  22.4k|        }
  315|  2.29k|        *oit = p_;
  316|  2.29k|        ++oit;
  317|  2.29k|        ++num_decoded_points_;
  318|  2.29k|      }
  319|  1.34k|      continue;
  320|  1.34k|    }
  321|       |
  322|  2.44k|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 2.44k]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|  2.44k|    const int num_remaining_bits = bit_length_ - level;
  327|  2.44k|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|  2.44k|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|  2.44k|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|  2.44k|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|  2.44k|    uint32_t number = 0;
  334|  2.44k|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|  2.44k|    uint32_t first_half = num_remaining_points / 2;
  337|  2.44k|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 7, False: 2.43k]
  ------------------
  338|       |      // Invalid |number|.
  339|      7|      return false;
  340|      7|    }
  341|  2.43k|    first_half -= number;
  342|  2.43k|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|  2.43k|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 1.65k, False: 779]
  ------------------
  345|  1.65k|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 1.13k, False: 519]
  ------------------
  346|  1.13k|        std::swap(first_half, second_half);
  347|  1.13k|      }
  348|  1.65k|    }
  349|       |
  350|  2.43k|    levels_stack_[stack_pos][axis] += 1;
  351|  2.43k|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|  2.43k|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 2.38k, False: 53]
  ------------------
  353|  2.38k|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|  2.38k|    }
  355|  2.43k|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 2.35k, False: 80]
  ------------------
  356|  2.35k|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|  2.35k|    }
  358|  2.43k|  }
  359|      0|  return true;
  360|      9|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE14DecodingStatusC2Ejjj:
  134|  4.74k|        : num_remaining_points(num_remaining_points_),
  135|  4.74k|          last_axis(last_axis_),
  136|  4.74k|          stack_pos(stack_pos_) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE12DecodeNumberEiPj:
  127|  2.44k|  void DecodeNumber(int nbits, uint32_t *value) {
  128|  2.44k|    numbers_decoder_.DecodeLeastSignificantBits32(nbits, value);
  129|  2.44k|  }
_ZNK5draco33DynamicIntegerPointsKdTreeDecoderILi0EE18num_decoded_pointsEv:
  118|      4|  uint32_t num_decoded_points() const { return num_decoded_points_; }
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EEC2Ej:
   86|     23|      : bit_length_(0),
   87|     23|        num_points_(0),
   88|     23|        num_decoded_points_(0),
   89|     23|        dimension_(dimension),
   90|     23|        p_(dimension, 0),
   91|     23|        axes_(dimension, 0),
   92|       |        // Init the stack with the maximum depth of the tree.
   93|       |        // +1 for a second leaf.
   94|     23|        base_stack_(32 * dimension + 1, VectorUint32(dimension, 0)),
   95|     23|        levels_stack_(32 * dimension + 1, VectorUint32(dimension, 0)) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_j:
  185|     23|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|     23|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 0, False: 23]
  ------------------
  187|      0|    return false;
  188|      0|  }
  189|     23|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 1, False: 22]
  ------------------
  190|      1|    return false;
  191|      1|  }
  192|     22|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 0, False: 22]
  ------------------
  193|      0|    return false;
  194|      0|  }
  195|     22|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 4, False: 18]
  ------------------
  196|      4|    return true;
  197|      4|  }
  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: 0, False: 18]
  ------------------
  204|      0|    return false;
  205|      0|  }
  206|     18|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 1, False: 17]
  ------------------
  207|      1|    return false;
  208|      1|  }
  209|     17|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 2, False: 15]
  ------------------
  210|      2|    return false;
  211|      2|  }
  212|     15|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 1, False: 14]
  ------------------
  213|      1|    return false;
  214|      1|  }
  215|       |
  216|     14|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 13, False: 1]
  ------------------
  217|     13|    return false;
  218|     13|  }
  219|       |
  220|      1|  numbers_decoder_.EndDecoding();
  221|      1|  remaining_bits_decoder_.EndDecoding();
  222|      1|  axis_decoder_.EndDecoding();
  223|      1|  half_decoder_.EndDecoding();
  224|       |
  225|      1|  return true;
  226|     14|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EE14DecodeInternalINS_34PointAttributeVectorOutputIteratorIjEEEEbjRT_:
  253|     14|    uint32_t num_points, OutputIteratorT &oit) {
  254|     14|  typedef DecodingStatus Status;
  255|     14|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|     14|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|     14|  DecodingStatus init_status(num_points, 0, 0);
  258|     14|  std::stack<Status> status_stack;
  259|     14|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|   142k|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 142k, False: 1]
  ------------------
  263|   142k|    const DecodingStatus status = status_stack.top();
  264|   142k|    status_stack.pop();
  265|       |
  266|   142k|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|   142k|    const uint32_t last_axis = status.last_axis;
  268|   142k|    const uint32_t stack_pos = status.stack_pos;
  269|   142k|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|   142k|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|   142k|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 142k]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|   142k|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|   142k|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 0, False: 142k]
  ------------------
  278|      0|      return false;
  279|      0|    }
  280|       |
  281|   142k|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|   142k|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 69.7k, False: 72.9k]
  ------------------
  285|   725k|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 655k, False: 69.7k]
  ------------------
  286|   655k|        *oit = old_base;
  287|   655k|        ++oit;
  288|   655k|        ++num_decoded_points_;
  289|   655k|      }
  290|  69.7k|      continue;
  291|  69.7k|    }
  292|       |
  293|  72.9k|    DRACO_DCHECK_EQ(true, num_remaining_points != 0);
  294|       |
  295|       |    // Fast decoding of remaining bits if number of points is 1 or 2.
  296|  72.9k|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 1.33k, False: 71.5k]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|  1.33k|      axes_[0] = axis;
  300|  10.6k|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 9.33k, False: 1.33k]
  ------------------
  301|  9.33k|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|  9.33k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 216, False: 9.12k]
  |  |  ------------------
  ------------------
  302|  9.33k|      }
  303|  3.67k|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 2.34k, False: 1.33k]
  ------------------
  304|  21.0k|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 18.7k, False: 2.34k]
  ------------------
  305|  18.7k|          p_[axes_[j]] = 0;
  306|  18.7k|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|  18.7k|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 2.74k, False: 15.9k]
  ------------------
  308|  2.74k|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 0, False: 2.74k]
  ------------------
  309|  2.74k|                    num_remaining_bits, &p_[axes_[j]])) {
  310|      0|              return false;
  311|      0|            }
  312|  2.74k|          }
  313|  18.7k|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|  18.7k|        }
  315|  2.34k|        *oit = p_;
  316|  2.34k|        ++oit;
  317|  2.34k|        ++num_decoded_points_;
  318|  2.34k|      }
  319|  1.33k|      continue;
  320|  1.33k|    }
  321|       |
  322|  71.5k|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 71.5k]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|  71.5k|    const int num_remaining_bits = bit_length_ - level;
  327|  71.5k|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|  71.5k|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|  71.5k|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|  71.5k|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|  71.5k|    uint32_t number = 0;
  334|  71.5k|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|  71.5k|    uint32_t first_half = num_remaining_points / 2;
  337|  71.5k|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 13, False: 71.5k]
  ------------------
  338|       |      // Invalid |number|.
  339|     13|      return false;
  340|     13|    }
  341|  71.5k|    first_half -= number;
  342|  71.5k|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|  71.5k|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 42.3k, False: 29.1k]
  ------------------
  345|  42.3k|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 40.9k, False: 1.39k]
  ------------------
  346|  40.9k|        std::swap(first_half, second_half);
  347|  40.9k|      }
  348|  42.3k|    }
  349|       |
  350|  71.5k|    levels_stack_[stack_pos][axis] += 1;
  351|  71.5k|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|  71.5k|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 71.5k, False: 51]
  ------------------
  353|  71.5k|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|  71.5k|    }
  355|  71.5k|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 71.2k, False: 265]
  ------------------
  356|  71.2k|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|  71.2k|    }
  358|  71.5k|  }
  359|      1|  return true;
  360|     14|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EE14DecodingStatusC2Ejjj:
  134|   142k|        : num_remaining_points(num_remaining_points_),
  135|   142k|          last_axis(last_axis_),
  136|   142k|          stack_pos(stack_pos_) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EE7GetAxisEjRKNSt3__16vectorIjNS2_9allocatorIjEEEEj:
  231|   142k|    uint32_t last_axis) {
  232|   142k|  if (!Policy::select_axis) {
  ------------------
  |  Branch (232:7): [True: 142k, Folded]
  ------------------
  233|   142k|    return DRACO_INCREMENT_MOD(last_axis, dimension_);
  ------------------
  |  |   24|   142k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 36.2k, False: 106k]
  |  |  ------------------
  ------------------
  234|   142k|  }
  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|   142k|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EE12DecodeNumberEiPj:
  127|  71.5k|  void DecodeNumber(int nbits, uint32_t *value) {
  128|  71.5k|    numbers_decoder_.DecodeLeastSignificantBits32(nbits, value);
  129|  71.5k|  }
_ZNK5draco33DynamicIntegerPointsKdTreeDecoderILi1EE18num_decoded_pointsEv:
  118|      4|  uint32_t num_decoded_points() const { return num_decoded_points_; }
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_j:
  185|     14|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|     14|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 0, False: 14]
  ------------------
  187|      0|    return false;
  188|      0|  }
  189|     14|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 2, False: 12]
  ------------------
  190|      2|    return false;
  191|      2|  }
  192|     12|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 0, False: 12]
  ------------------
  193|      0|    return false;
  194|      0|  }
  195|     12|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 2, False: 10]
  ------------------
  196|      2|    return true;
  197|      2|  }
  198|     10|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 0, False: 10]
  ------------------
  199|      0|    return false;
  200|      0|  }
  201|     10|  num_decoded_points_ = 0;
  202|       |
  203|     10|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 0, False: 10]
  ------------------
  204|      0|    return false;
  205|      0|  }
  206|     10|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 3, False: 7]
  ------------------
  207|      3|    return false;
  208|      3|  }
  209|      7|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 6, False: 1]
  ------------------
  210|      6|    return false;
  211|      6|  }
  212|      1|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 0, False: 1]
  ------------------
  213|      0|    return false;
  214|      0|  }
  215|       |
  216|      1|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 1, False: 0]
  ------------------
  217|      1|    return false;
  218|      1|  }
  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|      1|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE14DecodeInternalINS_34PointAttributeVectorOutputIteratorIjEEEEbjRT_:
  253|      1|    uint32_t num_points, OutputIteratorT &oit) {
  254|      1|  typedef DecodingStatus Status;
  255|      1|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|      1|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|      1|  DecodingStatus init_status(num_points, 0, 0);
  258|      1|  std::stack<Status> status_stack;
  259|      1|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|      5|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 5, False: 0]
  ------------------
  263|      5|    const DecodingStatus status = status_stack.top();
  264|      5|    status_stack.pop();
  265|       |
  266|      5|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|      5|    const uint32_t last_axis = status.last_axis;
  268|      5|    const uint32_t stack_pos = status.stack_pos;
  269|      5|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|      5|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|      5|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 5]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|      5|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|      5|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 0, False: 5]
  ------------------
  278|      0|      return false;
  279|      0|    }
  280|       |
  281|      5|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|      5|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 0, False: 5]
  ------------------
  285|      0|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 0, False: 0]
  ------------------
  286|      0|        *oit = old_base;
  287|      0|        ++oit;
  288|      0|        ++num_decoded_points_;
  289|      0|      }
  290|      0|      continue;
  291|      0|    }
  292|       |
  293|      5|    DRACO_DCHECK_EQ(true, num_remaining_points != 0);
  294|       |
  295|       |    // Fast decoding of remaining bits if number of points is 1 or 2.
  296|      5|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 0, False: 5]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|      0|      axes_[0] = axis;
  300|      0|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 0, False: 0]
  ------------------
  301|      0|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|      0|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  302|      0|      }
  303|      0|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 0, False: 0]
  ------------------
  304|      0|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 0, False: 0]
  ------------------
  305|      0|          p_[axes_[j]] = 0;
  306|      0|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|      0|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 0, False: 0]
  ------------------
  308|      0|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 0, False: 0]
  ------------------
  309|      0|                    num_remaining_bits, &p_[axes_[j]])) {
  310|      0|              return false;
  311|      0|            }
  312|      0|          }
  313|      0|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|      0|        }
  315|      0|        *oit = p_;
  316|      0|        ++oit;
  317|      0|        ++num_decoded_points_;
  318|      0|      }
  319|      0|      continue;
  320|      0|    }
  321|       |
  322|      5|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 5]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|      5|    const int num_remaining_bits = bit_length_ - level;
  327|      5|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|      5|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|      5|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|      5|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|      5|    uint32_t number = 0;
  334|      5|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|      5|    uint32_t first_half = num_remaining_points / 2;
  337|      5|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 1, False: 4]
  ------------------
  338|       |      // Invalid |number|.
  339|      1|      return false;
  340|      1|    }
  341|      4|    first_half -= number;
  342|      4|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|      4|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 4, False: 0]
  ------------------
  345|      4|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 0, False: 4]
  ------------------
  346|      0|        std::swap(first_half, second_half);
  347|      0|      }
  348|      4|    }
  349|       |
  350|      4|    levels_stack_[stack_pos][axis] += 1;
  351|      4|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|      4|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 4, False: 0]
  ------------------
  353|      4|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|      4|    }
  355|      4|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 4, False: 0]
  ------------------
  356|      4|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|      4|    }
  358|      4|  }
  359|      0|  return true;
  360|      1|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE14DecodingStatusC2Ejjj:
  134|     66|        : num_remaining_points(num_remaining_points_),
  135|     66|          last_axis(last_axis_),
  136|     66|          stack_pos(stack_pos_) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE12DecodeNumberEiPj:
  127|     33|  void DecodeNumber(int nbits, uint32_t *value) {
  128|     33|    numbers_decoder_.DecodeLeastSignificantBits32(nbits, value);
  129|     33|  }
_ZNK5draco33DynamicIntegerPointsKdTreeDecoderILi2EE18num_decoded_pointsEv:
  118|      2|  uint32_t num_decoded_points() const { return num_decoded_points_; }
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EEC2Ej:
   86|     16|      : bit_length_(0),
   87|     16|        num_points_(0),
   88|     16|        num_decoded_points_(0),
   89|     16|        dimension_(dimension),
   90|     16|        p_(dimension, 0),
   91|     16|        axes_(dimension, 0),
   92|       |        // Init the stack with the maximum depth of the tree.
   93|       |        // +1 for a second leaf.
   94|     16|        base_stack_(32 * dimension + 1, VectorUint32(dimension, 0)),
   95|     16|        levels_stack_(32 * dimension + 1, VectorUint32(dimension, 0)) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi3EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_j:
  185|      3|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|      3|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 0, False: 3]
  ------------------
  187|      0|    return false;
  188|      0|  }
  189|      3|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 1, False: 2]
  ------------------
  190|      1|    return false;
  191|      1|  }
  192|      2|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 0, False: 2]
  ------------------
  193|      0|    return false;
  194|      0|  }
  195|      2|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 0, False: 2]
  ------------------
  196|      0|    return true;
  197|      0|  }
  198|      2|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 0, False: 2]
  ------------------
  199|      0|    return false;
  200|      0|  }
  201|      2|  num_decoded_points_ = 0;
  202|       |
  203|      2|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 0, False: 2]
  ------------------
  204|      0|    return false;
  205|      0|  }
  206|      2|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 2, False: 0]
  ------------------
  207|      2|    return false;
  208|      2|  }
  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|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_j:
  185|    101|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|    101|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 0, False: 101]
  ------------------
  187|      0|    return false;
  188|      0|  }
  189|    101|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 0, False: 101]
  ------------------
  190|      0|    return false;
  191|      0|  }
  192|    101|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 0, False: 101]
  ------------------
  193|      0|    return false;
  194|      0|  }
  195|    101|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 0, False: 101]
  ------------------
  196|      0|    return true;
  197|      0|  }
  198|    101|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 2, False: 99]
  ------------------
  199|      2|    return false;
  200|      2|  }
  201|     99|  num_decoded_points_ = 0;
  202|       |
  203|     99|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 4, False: 95]
  ------------------
  204|      4|    return false;
  205|      4|  }
  206|     95|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 1, False: 94]
  ------------------
  207|      1|    return false;
  208|      1|  }
  209|     94|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 0, False: 94]
  ------------------
  210|      0|    return false;
  211|      0|  }
  212|     94|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 1, False: 93]
  ------------------
  213|      1|    return false;
  214|      1|  }
  215|       |
  216|     93|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 36, False: 57]
  ------------------
  217|     36|    return false;
  218|     36|  }
  219|       |
  220|     57|  numbers_decoder_.EndDecoding();
  221|     57|  remaining_bits_decoder_.EndDecoding();
  222|     57|  axis_decoder_.EndDecoding();
  223|     57|  half_decoder_.EndDecoding();
  224|       |
  225|     57|  return true;
  226|     93|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EE14DecodeInternalINS_34PointAttributeVectorOutputIteratorIjEEEEbjRT_:
  253|     93|    uint32_t num_points, OutputIteratorT &oit) {
  254|     93|  typedef DecodingStatus Status;
  255|     93|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|     93|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|     93|  DecodingStatus init_status(num_points, 0, 0);
  258|     93|  std::stack<Status> status_stack;
  259|     93|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|  1.86M|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 1.86M, False: 57]
  ------------------
  263|  1.86M|    const DecodingStatus status = status_stack.top();
  264|  1.86M|    status_stack.pop();
  265|       |
  266|  1.86M|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|  1.86M|    const uint32_t last_axis = status.last_axis;
  268|  1.86M|    const uint32_t stack_pos = status.stack_pos;
  269|  1.86M|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|  1.86M|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|  1.86M|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 1.86M]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|  1.86M|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|  1.86M|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 0, False: 1.86M]
  ------------------
  278|      0|      return false;
  279|      0|    }
  280|       |
  281|  1.86M|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|  1.86M|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 824k, False: 1.03M]
  ------------------
  285|  82.2M|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 81.4M, False: 824k]
  ------------------
  286|  81.4M|        *oit = old_base;
  287|  81.4M|        ++oit;
  288|  81.4M|        ++num_decoded_points_;
  289|  81.4M|      }
  290|   824k|      continue;
  291|   824k|    }
  292|       |
  293|  1.03M|    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.03M|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 70.8k, False: 966k]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|  70.8k|      axes_[0] = axis;
  300|   117k|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 46.5k, False: 70.8k]
  ------------------
  301|  46.5k|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|  46.5k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 15.1k, False: 31.3k]
  |  |  ------------------
  ------------------
  302|  46.5k|      }
  303|   179k|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 108k, False: 70.8k]
  ------------------
  304|   281k|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 172k, False: 108k]
  ------------------
  305|   172k|          p_[axes_[j]] = 0;
  306|   172k|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|   172k|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 147k, False: 25.0k]
  ------------------
  308|   147k|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 32, False: 147k]
  ------------------
  309|   147k|                    num_remaining_bits, &p_[axes_[j]])) {
  310|     32|              return false;
  311|     32|            }
  312|   147k|          }
  313|   172k|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|   172k|        }
  315|   108k|        *oit = p_;
  316|   108k|        ++oit;
  317|   108k|        ++num_decoded_points_;
  318|   108k|      }
  319|  70.8k|      continue;
  320|  70.8k|    }
  321|       |
  322|   966k|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 966k]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|   966k|    const int num_remaining_bits = bit_length_ - level;
  327|   966k|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|   966k|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|   966k|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|   966k|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|   966k|    uint32_t number = 0;
  334|   966k|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|   966k|    uint32_t first_half = num_remaining_points / 2;
  337|   966k|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 4, False: 966k]
  ------------------
  338|       |      // Invalid |number|.
  339|      4|      return false;
  340|      4|    }
  341|   966k|    first_half -= number;
  342|   966k|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|   966k|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 919k, False: 47.3k]
  ------------------
  345|   919k|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 872k, False: 46.4k]
  ------------------
  346|   872k|        std::swap(first_half, second_half);
  347|   872k|      }
  348|   919k|    }
  349|       |
  350|   966k|    levels_stack_[stack_pos][axis] += 1;
  351|   966k|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|   966k|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 948k, False: 17.6k]
  ------------------
  353|   948k|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|   948k|    }
  355|   966k|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 913k, False: 53.2k]
  ------------------
  356|   913k|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|   913k|    }
  358|   966k|  }
  359|     57|  return true;
  360|     93|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EE14DecodingStatusC2Ejjj:
  134|  1.86M|        : num_remaining_points(num_remaining_points_),
  135|  1.86M|          last_axis(last_axis_),
  136|  1.86M|          stack_pos(stack_pos_) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EE12DecodeNumberEiPj:
  127|   966k|  void DecodeNumber(int nbits, uint32_t *value) {
  128|   966k|    numbers_decoder_.DecodeLeastSignificantBits32(nbits, value);
  129|   966k|  }
_ZNK5draco33DynamicIntegerPointsKdTreeDecoderILi4EE18num_decoded_pointsEv:
  118|     57|  uint32_t num_decoded_points() const { return num_decoded_points_; }
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EEC2Ej:
   86|    115|      : bit_length_(0),
   87|    115|        num_points_(0),
   88|    115|        num_decoded_points_(0),
   89|    115|        dimension_(dimension),
   90|    115|        p_(dimension, 0),
   91|    115|        axes_(dimension, 0),
   92|       |        // Init the stack with the maximum depth of the tree.
   93|       |        // +1 for a second leaf.
   94|    115|        base_stack_(32 * dimension + 1, VectorUint32(dimension, 0)),
   95|    115|        levels_stack_(32 * dimension + 1, VectorUint32(dimension, 0)) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi5EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_j:
  185|     88|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|     88|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 0, False: 88]
  ------------------
  187|      0|    return false;
  188|      0|  }
  189|     88|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 2, False: 86]
  ------------------
  190|      2|    return false;
  191|      2|  }
  192|     86|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 0, False: 86]
  ------------------
  193|      0|    return false;
  194|      0|  }
  195|     86|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 0, False: 86]
  ------------------
  196|      0|    return true;
  197|      0|  }
  198|     86|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 0, False: 86]
  ------------------
  199|      0|    return false;
  200|      0|  }
  201|     86|  num_decoded_points_ = 0;
  202|       |
  203|     86|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 7, False: 79]
  ------------------
  204|      7|    return false;
  205|      7|  }
  206|     79|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 3, False: 76]
  ------------------
  207|      3|    return false;
  208|      3|  }
  209|     76|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 6, False: 70]
  ------------------
  210|      6|    return false;
  211|      6|  }
  212|     70|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 0, False: 70]
  ------------------
  213|      0|    return false;
  214|      0|  }
  215|       |
  216|     70|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 23, False: 47]
  ------------------
  217|     23|    return false;
  218|     23|  }
  219|       |
  220|     47|  numbers_decoder_.EndDecoding();
  221|     47|  remaining_bits_decoder_.EndDecoding();
  222|     47|  axis_decoder_.EndDecoding();
  223|     47|  half_decoder_.EndDecoding();
  224|       |
  225|     47|  return true;
  226|     70|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi5EE14DecodeInternalINS_34PointAttributeVectorOutputIteratorIjEEEEbjRT_:
  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|  2.17M|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 2.17M, False: 47]
  ------------------
  263|  2.17M|    const DecodingStatus status = status_stack.top();
  264|  2.17M|    status_stack.pop();
  265|       |
  266|  2.17M|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|  2.17M|    const uint32_t last_axis = status.last_axis;
  268|  2.17M|    const uint32_t stack_pos = status.stack_pos;
  269|  2.17M|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|  2.17M|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|  2.17M|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 2.17M]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|  2.17M|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|  2.17M|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 0, False: 2.17M]
  ------------------
  278|      0|      return false;
  279|      0|    }
  280|       |
  281|  2.17M|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|  2.17M|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 925k, False: 1.24M]
  ------------------
  285|  80.9M|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 80.0M, False: 925k]
  ------------------
  286|  80.0M|        *oit = old_base;
  287|  80.0M|        ++oit;
  288|  80.0M|        ++num_decoded_points_;
  289|  80.0M|      }
  290|   925k|      continue;
  291|   925k|    }
  292|       |
  293|  1.24M|    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.24M|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 38.5k, False: 1.20M]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|  38.5k|      axes_[0] = axis;
  300|   158k|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 119k, False: 38.5k]
  ------------------
  301|   119k|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|   119k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 11.1k, False: 108k]
  |  |  ------------------
  ------------------
  302|   119k|      }
  303|  96.2k|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 57.7k, False: 38.5k]
  ------------------
  304|   314k|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 257k, False: 57.7k]
  ------------------
  305|   257k|          p_[axes_[j]] = 0;
  306|   257k|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|   257k|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 86.7k, False: 170k]
  ------------------
  308|  86.7k|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 21, False: 86.7k]
  ------------------
  309|  86.7k|                    num_remaining_bits, &p_[axes_[j]])) {
  310|     21|              return false;
  311|     21|            }
  312|  86.7k|          }
  313|   256k|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|   256k|        }
  315|  57.7k|        *oit = p_;
  316|  57.7k|        ++oit;
  317|  57.7k|        ++num_decoded_points_;
  318|  57.7k|      }
  319|  38.5k|      continue;
  320|  38.5k|    }
  321|       |
  322|  1.20M|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 1.20M]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|  1.20M|    const int num_remaining_bits = bit_length_ - level;
  327|  1.20M|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|  1.20M|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|  1.20M|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|  1.20M|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|  1.20M|    uint32_t number = 0;
  334|  1.20M|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|  1.20M|    uint32_t first_half = num_remaining_points / 2;
  337|  1.20M|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 2, False: 1.20M]
  ------------------
  338|       |      // Invalid |number|.
  339|      2|      return false;
  340|      2|    }
  341|  1.20M|    first_half -= number;
  342|  1.20M|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|  1.20M|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 1.17M, False: 26.7k]
  ------------------
  345|  1.17M|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 1.11M, False: 64.2k]
  ------------------
  346|  1.11M|        std::swap(first_half, second_half);
  347|  1.11M|      }
  348|  1.17M|    }
  349|       |
  350|  1.20M|    levels_stack_[stack_pos][axis] += 1;
  351|  1.20M|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|  1.20M|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 1.15M, False: 47.9k]
  ------------------
  353|  1.15M|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|  1.15M|    }
  355|  1.20M|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 1.01M, False: 193k]
  ------------------
  356|  1.01M|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|  1.01M|    }
  358|  1.20M|  }
  359|     47|  return true;
  360|     70|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi5EE14DecodingStatusC2Ejjj:
  134|  2.17M|        : num_remaining_points(num_remaining_points_),
  135|  2.17M|          last_axis(last_axis_),
  136|  2.17M|          stack_pos(stack_pos_) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi5EE7GetAxisEjRKNSt3__16vectorIjNS2_9allocatorIjEEEEj:
  231|  2.17M|    uint32_t last_axis) {
  232|  2.17M|  if (!Policy::select_axis) {
  ------------------
  |  Branch (232:7): [True: 2.17M, Folded]
  ------------------
  233|  2.17M|    return DRACO_INCREMENT_MOD(last_axis, dimension_);
  ------------------
  |  |   24|  2.17M|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 792k, False: 1.37M]
  |  |  ------------------
  ------------------
  234|  2.17M|  }
  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.17M|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi5EE12DecodeNumberEiPj:
  127|  1.20M|  void DecodeNumber(int nbits, uint32_t *value) {
  128|  1.20M|    numbers_decoder_.DecodeLeastSignificantBits32(nbits, value);
  129|  1.20M|  }
_ZNK5draco33DynamicIntegerPointsKdTreeDecoderILi5EE18num_decoded_pointsEv:
  118|     47|  uint32_t num_decoded_points() const { return num_decoded_points_; }
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi6EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_j:
  185|     69|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|     69|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 0, False: 69]
  ------------------
  187|      0|    return false;
  188|      0|  }
  189|     69|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 0, False: 69]
  ------------------
  190|      0|    return false;
  191|      0|  }
  192|     69|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 0, False: 69]
  ------------------
  193|      0|    return false;
  194|      0|  }
  195|     69|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 8, False: 61]
  ------------------
  196|      8|    return true;
  197|      8|  }
  198|     61|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 2, False: 59]
  ------------------
  199|      2|    return false;
  200|      2|  }
  201|     59|  num_decoded_points_ = 0;
  202|       |
  203|     59|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 2, False: 57]
  ------------------
  204|      2|    return false;
  205|      2|  }
  206|     57|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 0, False: 57]
  ------------------
  207|      0|    return false;
  208|      0|  }
  209|     57|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 3, False: 54]
  ------------------
  210|      3|    return false;
  211|      3|  }
  212|     54|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 2, False: 52]
  ------------------
  213|      2|    return false;
  214|      2|  }
  215|       |
  216|     52|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 27, False: 25]
  ------------------
  217|     27|    return false;
  218|     27|  }
  219|       |
  220|     25|  numbers_decoder_.EndDecoding();
  221|     25|  remaining_bits_decoder_.EndDecoding();
  222|     25|  axis_decoder_.EndDecoding();
  223|     25|  half_decoder_.EndDecoding();
  224|       |
  225|     25|  return true;
  226|     52|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi6EE14DecodeInternalINS_34PointAttributeVectorOutputIteratorIjEEEEbjRT_:
  253|     52|    uint32_t num_points, OutputIteratorT &oit) {
  254|     52|  typedef DecodingStatus Status;
  255|     52|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|     52|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|     52|  DecodingStatus init_status(num_points, 0, 0);
  258|     52|  std::stack<Status> status_stack;
  259|     52|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|   182k|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 182k, False: 25]
  ------------------
  263|   182k|    const DecodingStatus status = status_stack.top();
  264|   182k|    status_stack.pop();
  265|       |
  266|   182k|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|   182k|    const uint32_t last_axis = status.last_axis;
  268|   182k|    const uint32_t stack_pos = status.stack_pos;
  269|   182k|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|   182k|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|   182k|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 182k]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|   182k|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|   182k|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 6, False: 182k]
  ------------------
  278|      6|      return false;
  279|      6|    }
  280|       |
  281|   182k|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|   182k|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 107, False: 182k]
  ------------------
  285|  1.07M|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 1.07M, False: 107]
  ------------------
  286|  1.07M|        *oit = old_base;
  287|  1.07M|        ++oit;
  288|  1.07M|        ++num_decoded_points_;
  289|  1.07M|      }
  290|    107|      continue;
  291|    107|    }
  292|       |
  293|   182k|    DRACO_DCHECK_EQ(true, num_remaining_points != 0);
  294|       |
  295|       |    // Fast decoding of remaining bits if number of points is 1 or 2.
  296|   182k|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 163, False: 182k]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|    163|      axes_[0] = axis;
  300|  11.9k|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 11.7k, False: 163]
  ------------------
  301|  11.7k|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|  11.7k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 152, False: 11.5k]
  |  |  ------------------
  ------------------
  302|  11.7k|      }
  303|    376|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 224, False: 152]
  ------------------
  304|  15.1k|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 14.9k, False: 213]
  ------------------
  305|  14.9k|          p_[axes_[j]] = 0;
  306|  14.9k|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|  14.9k|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 14.3k, False: 609]
  ------------------
  308|  14.3k|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 11, False: 14.3k]
  ------------------
  309|  14.3k|                    num_remaining_bits, &p_[axes_[j]])) {
  310|     11|              return false;
  311|     11|            }
  312|  14.3k|          }
  313|  14.9k|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|  14.9k|        }
  315|    213|        *oit = p_;
  316|    213|        ++oit;
  317|    213|        ++num_decoded_points_;
  318|    213|      }
  319|    152|      continue;
  320|    163|    }
  321|       |
  322|   182k|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 182k]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|   182k|    const int num_remaining_bits = bit_length_ - level;
  327|   182k|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|   182k|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|   182k|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|   182k|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|   182k|    uint32_t number = 0;
  334|   182k|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|   182k|    uint32_t first_half = num_remaining_points / 2;
  337|   182k|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 10, False: 182k]
  ------------------
  338|       |      // Invalid |number|.
  339|     10|      return false;
  340|     10|    }
  341|   182k|    first_half -= number;
  342|   182k|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|   182k|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 182k, False: 29]
  ------------------
  345|   182k|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 156k, False: 25.2k]
  ------------------
  346|   156k|        std::swap(first_half, second_half);
  347|   156k|      }
  348|   182k|    }
  349|       |
  350|   182k|    levels_stack_[stack_pos][axis] += 1;
  351|   182k|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|   182k|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 156k, False: 25.1k]
  ------------------
  353|   156k|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|   156k|    }
  355|   182k|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 25.4k, False: 156k]
  ------------------
  356|  25.4k|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|  25.4k|    }
  358|   182k|  }
  359|     25|  return true;
  360|     52|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi6EE14DecodingStatusC2Ejjj:
  134|   182k|        : num_remaining_points(num_remaining_points_),
  135|   182k|          last_axis(last_axis_),
  136|   182k|          stack_pos(stack_pos_) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi6EE12DecodeNumberEiPj:
  127|   182k|  void DecodeNumber(int nbits, uint32_t *value) {
  128|   182k|    numbers_decoder_.DecodeLeastSignificantBits32(nbits, value);
  129|   182k|  }
_ZNK5draco33DynamicIntegerPointsKdTreeDecoderILi6EE18num_decoded_pointsEv:
  118|     33|  uint32_t num_decoded_points() const { return num_decoded_points_; }
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi6EEC2Ej:
   86|     69|      : bit_length_(0),
   87|     69|        num_points_(0),
   88|     69|        num_decoded_points_(0),
   89|     69|        dimension_(dimension),
   90|     69|        p_(dimension, 0),
   91|     69|        axes_(dimension, 0),
   92|       |        // Init the stack with the maximum depth of the tree.
   93|       |        // +1 for a second leaf.
   94|     69|        base_stack_(32 * dimension + 1, VectorUint32(dimension, 0)),
   95|     69|        levels_stack_(32 * dimension + 1, VectorUint32(dimension, 0)) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_:
  178|     14|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|     14|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|     14|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EEC2Ej:
   86|     23|      : bit_length_(0),
   87|     23|        num_points_(0),
   88|     23|        num_decoded_points_(0),
   89|     23|        dimension_(dimension),
   90|     23|        p_(dimension, 0),
   91|     23|        axes_(dimension, 0),
   92|       |        // Init the stack with the maximum depth of the tree.
   93|       |        // +1 for a second leaf.
   94|     23|        base_stack_(32 * dimension + 1, VectorUint32(dimension, 0)),
   95|     23|        levels_stack_(32 * dimension + 1, VectorUint32(dimension, 0)) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi1EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_:
  178|     18|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|     18|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|     18|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_:
  178|     10|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|     10|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|     10|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi3EEC2Ej:
   86|      6|      : bit_length_(0),
   87|      6|        num_points_(0),
   88|      6|        num_decoded_points_(0),
   89|      6|        dimension_(dimension),
   90|      6|        p_(dimension, 0),
   91|      6|        axes_(dimension, 0),
   92|       |        // Init the stack with the maximum depth of the tree.
   93|       |        // +1 for a second leaf.
   94|      6|        base_stack_(32 * dimension + 1, VectorUint32(dimension, 0)),
   95|      6|        levels_stack_(32 * dimension + 1, VectorUint32(dimension, 0)) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi3EE12DecodePointsINS_34PointAttributeVectorOutputIteratorIjEEEEbPNS_13DecoderBufferERT_:
  178|      2|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|      2|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|      2|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi5EEC2Ej:
   86|     88|      : bit_length_(0),
   87|     88|        num_points_(0),
   88|     88|        num_decoded_points_(0),
   89|     88|        dimension_(dimension),
   90|     88|        p_(dimension, 0),
   91|     88|        axes_(dimension, 0),
   92|       |        // Init the stack with the maximum depth of the tree.
   93|       |        // +1 for a second leaf.
   94|     88|        base_stack_(32 * dimension + 1, VectorUint32(dimension, 0)),
   95|     88|        levels_stack_(32 * dimension + 1, VectorUint32(dimension, 0)) {}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE7GetAxisEjRKNSt3__16vectorIjNS2_9allocatorIjEEEEj:
  231|  4.65k|    uint32_t last_axis) {
  232|  4.65k|  if (!Policy::select_axis) {
  ------------------
  |  Branch (232:7): [True: 4.65k, Folded]
  ------------------
  233|  4.65k|    return DRACO_INCREMENT_MOD(last_axis, dimension_);
  ------------------
  |  |   24|  4.65k|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 1.20k, False: 3.45k]
  |  |  ------------------
  ------------------
  234|  4.65k|  }
  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.65k|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE7GetAxisEjRKNSt3__16vectorIjNS2_9allocatorIjEEEEj:
  231|     46|    uint32_t last_axis) {
  232|     46|  if (!Policy::select_axis) {
  ------------------
  |  Branch (232:7): [True: 46, Folded]
  ------------------
  233|     46|    return DRACO_INCREMENT_MOD(last_axis, dimension_);
  ------------------
  |  |   24|     46|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 21, False: 25]
  |  |  ------------------
  ------------------
  234|     46|  }
  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|     46|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EE7GetAxisEjRKNSt3__16vectorIjNS2_9allocatorIjEEEEj:
  231|  1.86M|    uint32_t last_axis) {
  232|  1.86M|  if (!Policy::select_axis) {
  ------------------
  |  Branch (232:7): [True: 1.86M, Folded]
  ------------------
  233|  1.86M|    return DRACO_INCREMENT_MOD(last_axis, dimension_);
  ------------------
  |  |   24|  1.86M|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 1.64M, False: 215k]
  |  |  ------------------
  ------------------
  234|  1.86M|  }
  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|  1.86M|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi6EE7GetAxisEjRKNSt3__16vectorIjNS2_9allocatorIjEEEEj:
  231|   182k|    uint32_t last_axis) {
  232|   182k|  if (!Policy::select_axis) {
  ------------------
  |  Branch (232:7): [Folded, False: 182k]
  ------------------
  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|   182k|  uint32_t best_axis = 0;
  237|   182k|  if (num_remaining_points < 64) {
  ------------------
  |  Branch (237:7): [True: 182k, False: 61]
  ------------------
  238|  27.8M|    for (uint32_t axis = 1; axis < dimension_; ++axis) {
  ------------------
  |  Branch (238:29): [True: 27.6M, False: 182k]
  ------------------
  239|  27.6M|      if (levels[best_axis] > levels[axis]) {
  ------------------
  |  Branch (239:11): [True: 180k, False: 27.4M]
  ------------------
  240|   180k|        best_axis = axis;
  241|   180k|      }
  242|  27.6M|    }
  243|   182k|  } else {
  244|     61|    axis_decoder_.DecodeLeastSignificantBits32(4, &best_axis);
  245|     61|  }
  246|       |
  247|   182k|  return best_axis;
  248|   182k|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_:
  178|      2|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|      2|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|      2|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi0EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_j:
  185|      2|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|      2|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 0, False: 2]
  ------------------
  187|      0|    return false;
  188|      0|  }
  189|      2|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 0, False: 2]
  ------------------
  190|      0|    return false;
  191|      0|  }
  192|      2|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 0, False: 2]
  ------------------
  193|      0|    return false;
  194|      0|  }
  195|      2|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 0, False: 2]
  ------------------
  196|      0|    return true;
  197|      0|  }
  198|      2|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 0, False: 2]
  ------------------
  199|      0|    return false;
  200|      0|  }
  201|      2|  num_decoded_points_ = 0;
  202|       |
  203|      2|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 2, False: 0]
  ------------------
  204|      2|    return false;
  205|      2|  }
  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|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_:
  178|      2|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|      2|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|      2|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_j:
  185|      2|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|      2|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 0, False: 2]
  ------------------
  187|      0|    return false;
  188|      0|  }
  189|      2|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 0, False: 2]
  ------------------
  190|      0|    return false;
  191|      0|  }
  192|      2|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 0, False: 2]
  ------------------
  193|      0|    return false;
  194|      0|  }
  195|      2|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 0, False: 2]
  ------------------
  196|      0|    return true;
  197|      0|  }
  198|      2|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 0, False: 2]
  ------------------
  199|      0|    return false;
  200|      0|  }
  201|      2|  num_decoded_points_ = 0;
  202|       |
  203|      2|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 1, False: 1]
  ------------------
  204|      1|    return false;
  205|      1|  }
  206|      1|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 0, False: 1]
  ------------------
  207|      0|    return false;
  208|      0|  }
  209|      1|  if (!axis_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (209:7): [True: 0, False: 1]
  ------------------
  210|      0|    return false;
  211|      0|  }
  212|      1|  if (!half_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (212:7): [True: 0, False: 1]
  ------------------
  213|      0|    return false;
  214|      0|  }
  215|       |
  216|      1|  if (!DecodeInternal(num_points_, oit)) {
  ------------------
  |  Branch (216:7): [True: 1, False: 0]
  ------------------
  217|      1|    return false;
  218|      1|  }
  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|      1|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi2EE14DecodeInternalINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbjRT_:
  253|      1|    uint32_t num_points, OutputIteratorT &oit) {
  254|      1|  typedef DecodingStatus Status;
  255|      1|  base_stack_[0] = VectorUint32(dimension_, 0);
  256|      1|  levels_stack_[0] = VectorUint32(dimension_, 0);
  257|      1|  DecodingStatus init_status(num_points, 0, 0);
  258|      1|  std::stack<Status> status_stack;
  259|      1|  status_stack.push(init_status);
  260|       |
  261|       |  // TODO(b/199760123): Use preallocated vector instead of stack.
  262|     41|  while (!status_stack.empty()) {
  ------------------
  |  Branch (262:10): [True: 41, False: 0]
  ------------------
  263|     41|    const DecodingStatus status = status_stack.top();
  264|     41|    status_stack.pop();
  265|       |
  266|     41|    const uint32_t num_remaining_points = status.num_remaining_points;
  267|     41|    const uint32_t last_axis = status.last_axis;
  268|     41|    const uint32_t stack_pos = status.stack_pos;
  269|     41|    const VectorUint32 &old_base = base_stack_[stack_pos];
  270|     41|    const VectorUint32 &levels = levels_stack_[stack_pos];
  271|       |
  272|     41|    if (num_remaining_points > num_points) {
  ------------------
  |  Branch (272:9): [True: 0, False: 41]
  ------------------
  273|      0|      return false;
  274|      0|    }
  275|       |
  276|     41|    const uint32_t axis = GetAxis(num_remaining_points, levels, last_axis);
  277|     41|    if (axis >= dimension_) {
  ------------------
  |  Branch (277:9): [True: 0, False: 41]
  ------------------
  278|      0|      return false;
  279|      0|    }
  280|       |
  281|     41|    const uint32_t level = levels[axis];
  282|       |
  283|       |    // All axes have been fully subdivided, just output points.
  284|     41|    if ((bit_length_ - level) == 0) {
  ------------------
  |  Branch (284:9): [True: 0, False: 41]
  ------------------
  285|      0|      for (uint32_t i = 0; i < num_remaining_points; i++) {
  ------------------
  |  Branch (285:28): [True: 0, False: 0]
  ------------------
  286|      0|        *oit = old_base;
  287|      0|        ++oit;
  288|      0|        ++num_decoded_points_;
  289|      0|      }
  290|      0|      continue;
  291|      0|    }
  292|       |
  293|     41|    DRACO_DCHECK_EQ(true, num_remaining_points != 0);
  294|       |
  295|       |    // Fast decoding of remaining bits if number of points is 1 or 2.
  296|     41|    if (num_remaining_points <= 2) {
  ------------------
  |  Branch (296:9): [True: 13, False: 28]
  ------------------
  297|       |      // TODO(b/199760123): |axes_| not necessary, remove would change
  298|       |      // bitstream!
  299|     13|      axes_[0] = axis;
  300|     39|      for (uint32_t i = 1; i < dimension_; i++) {
  ------------------
  |  Branch (300:28): [True: 26, False: 13]
  ------------------
  301|     26|        axes_[i] = DRACO_INCREMENT_MOD(axes_[i - 1], dimension_);
  ------------------
  |  |   24|     26|#define DRACO_INCREMENT_MOD(I, M) (((I) == ((M)-1)) ? 0 : ((I) + 1))
  |  |  ------------------
  |  |  |  Branch (24:36): [True: 6, False: 20]
  |  |  ------------------
  ------------------
  302|     26|      }
  303|     35|      for (uint32_t i = 0; i < num_remaining_points; ++i) {
  ------------------
  |  Branch (303:28): [True: 23, False: 12]
  ------------------
  304|     89|        for (uint32_t j = 0; j < dimension_; j++) {
  ------------------
  |  Branch (304:30): [True: 67, False: 22]
  ------------------
  305|     67|          p_[axes_[j]] = 0;
  306|     67|          const uint32_t num_remaining_bits = bit_length_ - levels[axes_[j]];
  307|     67|          if (num_remaining_bits) {
  ------------------
  |  Branch (307:15): [True: 67, False: 0]
  ------------------
  308|     67|            if (!remaining_bits_decoder_.DecodeLeastSignificantBits32(
  ------------------
  |  Branch (308:17): [True: 1, False: 66]
  ------------------
  309|     67|                    num_remaining_bits, &p_[axes_[j]])) {
  310|      1|              return false;
  311|      1|            }
  312|     67|          }
  313|     66|          p_[axes_[j]] = old_base[axes_[j]] | p_[axes_[j]];
  314|     66|        }
  315|     22|        *oit = p_;
  316|     22|        ++oit;
  317|     22|        ++num_decoded_points_;
  318|     22|      }
  319|     12|      continue;
  320|     13|    }
  321|       |
  322|     28|    if (num_decoded_points_ > num_points_) {
  ------------------
  |  Branch (322:9): [True: 0, False: 28]
  ------------------
  323|      0|      return false;
  324|      0|    }
  325|       |
  326|     28|    const int num_remaining_bits = bit_length_ - level;
  327|     28|    const uint32_t modifier = 1 << (num_remaining_bits - 1);
  328|     28|    base_stack_[stack_pos + 1] = old_base;         // copy
  329|     28|    base_stack_[stack_pos + 1][axis] += modifier;  // new base
  330|       |
  331|     28|    const int incoming_bits = MostSignificantBit(num_remaining_points);
  332|       |
  333|     28|    uint32_t number = 0;
  334|     28|    DecodeNumber(incoming_bits, &number);
  335|       |
  336|     28|    uint32_t first_half = num_remaining_points / 2;
  337|     28|    if (first_half < number) {
  ------------------
  |  Branch (337:9): [True: 0, False: 28]
  ------------------
  338|       |      // Invalid |number|.
  339|      0|      return false;
  340|      0|    }
  341|     28|    first_half -= number;
  342|     28|    uint32_t second_half = num_remaining_points - first_half;
  343|       |
  344|     28|    if (first_half != second_half) {
  ------------------
  |  Branch (344:9): [True: 23, False: 5]
  ------------------
  345|     23|      if (!half_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (345:11): [True: 23, False: 0]
  ------------------
  346|     23|        std::swap(first_half, second_half);
  347|     23|      }
  348|     23|    }
  349|       |
  350|     28|    levels_stack_[stack_pos][axis] += 1;
  351|     28|    levels_stack_[stack_pos + 1] = levels_stack_[stack_pos];  // copy
  352|     28|    if (first_half) {
  ------------------
  |  Branch (352:9): [True: 28, False: 0]
  ------------------
  353|     28|      status_stack.push(DecodingStatus(first_half, axis, stack_pos));
  354|     28|    }
  355|     28|    if (second_half) {
  ------------------
  |  Branch (355:9): [True: 28, False: 0]
  ------------------
  356|     28|      status_stack.push(DecodingStatus(second_half, axis, stack_pos + 1));
  357|     28|    }
  358|     28|  }
  359|      0|  return true;
  360|      1|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi3EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_:
  178|      3|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|      3|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|      3|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi3EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_j:
  185|      3|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|      3|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 0, False: 3]
  ------------------
  187|      0|    return false;
  188|      0|  }
  189|      3|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 2, False: 1]
  ------------------
  190|      2|    return false;
  191|      2|  }
  192|      1|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 0, False: 1]
  ------------------
  193|      0|    return false;
  194|      0|  }
  195|      1|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 0, False: 1]
  ------------------
  196|      0|    return true;
  197|      0|  }
  198|      1|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 0, False: 1]
  ------------------
  199|      0|    return false;
  200|      0|  }
  201|      1|  num_decoded_points_ = 0;
  202|       |
  203|      1|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 0, False: 1]
  ------------------
  204|      0|    return false;
  205|      0|  }
  206|      1|  if (!remaining_bits_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (206:7): [True: 1, False: 0]
  ------------------
  207|      1|    return false;
  208|      1|  }
  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|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_:
  178|     14|    DecoderBuffer *buffer, OutputIteratorT &oit) {
  179|     14|  return DecodePoints(buffer, oit, std::numeric_limits<uint32_t>::max());
  180|     14|}
_ZN5draco33DynamicIntegerPointsKdTreeDecoderILi4EE12DecodePointsINS_24ConversionOutputIteratorINSt3__120back_insert_iteratorINS4_6vectorINS_7VectorDIjLi3EEENS4_9allocatorIS8_EEEEEENS_9ConverterEEEEEbPNS_13DecoderBufferERT_j:
  185|     14|    DecoderBuffer *buffer, OutputIteratorT &oit, uint32_t oit_max_points) {
  186|     14|  if (!buffer->Decode(&bit_length_)) {
  ------------------
  |  Branch (186:7): [True: 0, False: 14]
  ------------------
  187|      0|    return false;
  188|      0|  }
  189|     14|  if (bit_length_ > 32) {
  ------------------
  |  Branch (189:7): [True: 0, False: 14]
  ------------------
  190|      0|    return false;
  191|      0|  }
  192|     14|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (192:7): [True: 0, False: 14]
  ------------------
  193|      0|    return false;
  194|      0|  }
  195|     14|  if (num_points_ == 0) {
  ------------------
  |  Branch (195:7): [True: 4, False: 10]
  ------------------
  196|      4|    return true;
  197|      4|  }
  198|     10|  if (num_points_ > oit_max_points) {
  ------------------
  |  Branch (198:7): [True: 0, False: 10]
  ------------------
  199|      0|    return false;
  200|      0|  }
  201|     10|  num_decoded_points_ = 0;
  202|       |
  203|     10|  if (!numbers_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (203:7): [True: 10, False: 0]
  ------------------
  204|     10|    return false;
  205|     10|  }
  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|     23|    : num_points_(0), compression_level_(0), num_points_from_header_(0) {
   66|     23|  qinfo_.quantization_bits = 0;
   67|     23|  qinfo_.range = 0;
   68|     23|}
_ZN5draco22FloatPointsTreeDecoder30DecodePointCloudKdTreeInternalEPNS_13DecoderBufferEPNSt3__16vectorINS_7VectorDIjLi3EEENS3_9allocatorIS6_EEEE:
   71|     21|    DecoderBuffer *buffer, std::vector<Point3ui> *qpoints) {
   72|     21|  if (!buffer->Decode(&qinfo_.quantization_bits)) {
  ------------------
  |  Branch (72:7): [True: 0, False: 21]
  ------------------
   73|      0|    return false;
   74|      0|  }
   75|     21|  if (qinfo_.quantization_bits > 31) {
  ------------------
  |  Branch (75:7): [True: 0, False: 21]
  ------------------
   76|      0|    return false;
   77|      0|  }
   78|     21|  if (!buffer->Decode(&qinfo_.range)) {
  ------------------
  |  Branch (78:7): [True: 0, False: 21]
  ------------------
   79|      0|    return false;
   80|      0|  }
   81|     21|  if (!buffer->Decode(&num_points_)) {
  ------------------
  |  Branch (81:7): [True: 0, False: 21]
  ------------------
   82|      0|    return false;
   83|      0|  }
   84|     21|  if (num_points_from_header_ > 0 && num_points_ != num_points_from_header_) {
  ------------------
  |  Branch (84:7): [True: 0, False: 21]
  |  Branch (84:38): [True: 0, False: 0]
  ------------------
   85|      0|    return false;
   86|      0|  }
   87|     21|  if (!buffer->Decode(&compression_level_)) {
  ------------------
  |  Branch (87:7): [True: 0, False: 21]
  ------------------
   88|      0|    return false;
   89|      0|  }
   90|       |
   91|       |  // Only allow compression level in [0..6].
   92|     21|  if (6 < compression_level_) {
  ------------------
  |  Branch (92:7): [True: 0, False: 21]
  ------------------
   93|      0|    DRACO_LOGE("FloatPointsTreeDecoder: compression level %i not supported.\n",
  ------------------
  |  |   31|      0|#define DRACO_LOGE printf
  ------------------
   94|      0|               compression_level_);
   95|      0|    return false;
   96|      0|  }
   97|       |
   98|     21|  std::back_insert_iterator<std::vector<Point3ui>> oit_qpoints =
   99|     21|      std::back_inserter(*qpoints);
  100|     21|  ConversionOutputIterator<std::back_insert_iterator<std::vector<Point3ui>>,
  101|     21|                           Converter>
  102|     21|      oit(oit_qpoints);
  103|     21|  if (num_points_ > 0) {
  ------------------
  |  Branch (103:7): [True: 21, False: 0]
  ------------------
  104|     21|    qpoints->reserve(num_points_);
  105|     21|    switch (compression_level_) {
  106|      2|      case 0: {
  ------------------
  |  Branch (106:7): [True: 2, False: 19]
  ------------------
  107|      2|        DynamicIntegerPointsKdTreeDecoder<0> qpoints_decoder(3);
  108|      2|        qpoints_decoder.DecodePoints(buffer, oit);
  109|      2|        break;
  110|      0|      }
  111|      0|      case 1: {
  ------------------
  |  Branch (111:7): [True: 0, False: 21]
  ------------------
  112|      0|        DynamicIntegerPointsKdTreeDecoder<1> qpoints_decoder(3);
  113|      0|        qpoints_decoder.DecodePoints(buffer, oit);
  114|      0|        break;
  115|      0|      }
  116|      2|      case 2: {
  ------------------
  |  Branch (116:7): [True: 2, False: 19]
  ------------------
  117|      2|        DynamicIntegerPointsKdTreeDecoder<2> qpoints_decoder(3);
  118|      2|        qpoints_decoder.DecodePoints(buffer, oit);
  119|      2|        break;
  120|      0|      }
  121|      3|      case 3: {
  ------------------
  |  Branch (121:7): [True: 3, False: 18]
  ------------------
  122|      3|        DynamicIntegerPointsKdTreeDecoder<3> qpoints_decoder(3);
  123|      3|        qpoints_decoder.DecodePoints(buffer, oit);
  124|      3|        break;
  125|      0|      }
  126|     14|      case 4: {
  ------------------
  |  Branch (126:7): [True: 14, False: 7]
  ------------------
  127|     14|        DynamicIntegerPointsKdTreeDecoder<4> qpoints_decoder(3);
  128|     14|        qpoints_decoder.DecodePoints(buffer, oit);
  129|     14|        break;
  130|      0|      }
  131|      0|      case 5: {
  ------------------
  |  Branch (131:7): [True: 0, False: 21]
  ------------------
  132|      0|        DynamicIntegerPointsKdTreeDecoder<5> qpoints_decoder(3);
  133|      0|        qpoints_decoder.DecodePoints(buffer, oit);
  134|      0|        break;
  135|      0|      }
  136|      0|      case 6: {
  ------------------
  |  Branch (136:7): [True: 0, False: 21]
  ------------------
  137|      0|        DynamicIntegerPointsKdTreeDecoder<6> qpoints_decoder(3);
  138|      0|        qpoints_decoder.DecodePoints(buffer, oit);
  139|      0|        break;
  140|      0|      }
  141|      0|      default:
  ------------------
  |  Branch (141:7): [True: 0, False: 21]
  ------------------
  142|      0|        return false;
  143|     21|    }
  144|     21|  }
  145|       |
  146|     21|  if (qpoints->size() != num_points_) {
  ------------------
  |  Branch (146:7): [True: 21, False: 0]
  ------------------
  147|     21|    return false;
  148|     21|  }
  149|      0|  return true;
  150|     21|}
_ZN5draco24ConversionOutputIteratorINSt3__120back_insert_iteratorINS1_6vectorINS_7VectorDIjLi3EEENS1_9allocatorIS5_EEEEEENS_9ConverterEEC2ES9_:
   43|     21|  explicit ConversionOutputIterator(OutputIterator oit) : oit_(oit) {}
_ZN5draco24ConversionOutputIteratorINSt3__120back_insert_iteratorINS1_6vectorINS_7VectorDIjLi3EEENS1_9allocatorIS5_EEEEEENS_9ConverterEEdeEv:
   54|     22|  Self &operator*() { return *this; }
_ZN5draco24ConversionOutputIteratorINSt3__120back_insert_iteratorINS1_6vectorINS_7VectorDIjLi3EEENS1_9allocatorIS5_EEEEEENS_9ConverterEEaSERKNS3_IjNS6_IjEEEE:
   55|     22|  const Self &operator=(const SourceType &source) {
   56|     22|    *oit_ = Converter()(source);
   57|     22|    return *this;
   58|     22|  }
_ZN5draco9ConverterclERKNSt3__16vectorIjNS1_9allocatorIjEEEE:
   29|     22|  Point3ui operator()(const std::vector<uint32_t> &v) {
   30|     22|    return Point3ui(v[0], v[1], v[2]);
   31|     22|  }
_ZN5draco24ConversionOutputIteratorINSt3__120back_insert_iteratorINS1_6vectorINS_7VectorDIjLi3EEENS1_9allocatorIS5_EEEEEENS_9ConverterEEppEv:
   45|     22|  const Self &operator++() {
   46|     22|    ++oit_;
   47|     22|    return *this;
   48|     22|  }

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

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

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

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

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

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

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

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

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

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

_ZN5draco13DecoderBuffer28DecodeLeastSignificantBits32EjPj:
   57|  20.4M|  bool DecodeLeastSignificantBits32(uint32_t nbits, uint32_t *out_value) {
   58|  20.4M|    if (!bit_decoder_active()) {
  ------------------
  |  Branch (58:9): [True: 0, False: 20.4M]
  ------------------
   59|      0|      return false;
   60|      0|    }
   61|  20.4M|    return bit_decoder_.GetBits(nbits, out_value);
   62|  20.4M|  }
_ZN5draco13DecoderBuffer6DecodeEPvm:
   76|  5.99M|  bool Decode(void *out_data, size_t size_to_decode) {
   77|  5.99M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (77:9): [True: 45, False: 5.99M]
  ------------------
   78|     45|      return false;  // Buffer overflow.
   79|     45|    }
   80|  5.99M|    memcpy(out_data, (data_ + pos_), size_to_decode);
   81|  5.99M|    pos_ += size_to_decode;
   82|  5.99M|    return true;
   83|  5.99M|  }
_ZN5draco13DecoderBuffer7AdvanceEl:
  105|  10.8k|  void Advance(int64_t bytes) { pos_ += bytes; }
_ZN5draco13DecoderBuffer21set_bitstream_versionEt:
  111|  1.43k|  void set_bitstream_version(uint16_t version) { bitstream_version_ = version; }
_ZNK5draco13DecoderBuffer9data_headEv:
  114|  12.1k|  const char *data_head() const { return data_ + pos_; }
_ZNK5draco13DecoderBuffer14remaining_sizeEv:
  115|   187k|  int64_t remaining_size() const { return data_size_ - pos_; }
_ZNK5draco13DecoderBuffer12decoded_sizeEv:
  116|    549|  int64_t decoded_size() const { return pos_; }
_ZNK5draco13DecoderBuffer18bit_decoder_activeEv:
  117|  20.4M|  bool bit_decoder_active() const { return bit_mode_; }
_ZNK5draco13DecoderBuffer17bitstream_versionEv:
  120|  60.0k|  uint16_t bitstream_version() const { return bitstream_version_; }
_ZN5draco13DecoderBuffer10BitDecoder5resetEPKvm:
  130|    711|    inline void reset(const void *b, size_t s) {
  131|    711|      bit_offset_ = 0;
  132|    711|      bit_buffer_ = static_cast<const uint8_t *>(b);
  133|    711|      bit_buffer_end_ = bit_buffer_ + s;
  134|    711|    }
_ZNK5draco13DecoderBuffer10BitDecoder11BitsDecodedEv:
  137|    592|    inline uint64_t BitsDecoded() const {
  138|    592|      return static_cast<uint64_t>(bit_offset_);
  139|    592|    }
_ZN5draco13DecoderBuffer10BitDecoder7GetBitsEjPj:
  160|  20.4M|    inline bool GetBits(uint32_t nbits, uint32_t *x) {
  161|  20.4M|      if (nbits > 32) {
  ------------------
  |  Branch (161:11): [True: 0, False: 20.4M]
  ------------------
  162|      0|        return false;
  163|      0|      }
  164|  20.4M|      uint32_t value = 0;
  165|  47.8M|      for (uint32_t bit = 0; bit < nbits; ++bit) {
  ------------------
  |  Branch (165:30): [True: 27.4M, False: 20.4M]
  ------------------
  166|  27.4M|        value |= GetBit() << bit;
  167|  27.4M|      }
  168|  20.4M|      *x = value;
  169|  20.4M|      return true;
  170|  20.4M|    }
_ZN5draco13DecoderBuffer10BitDecoder6GetBitEv:
  175|  27.4M|    inline int GetBit() {
  176|  27.4M|      const size_t off = bit_offset_;
  177|  27.4M|      const size_t byte_offset = off >> 3;
  178|  27.4M|      const int bit_shift = static_cast<int>(off & 0x7);
  179|  27.4M|      if (bit_buffer_ + byte_offset < bit_buffer_end_) {
  ------------------
  |  Branch (179:11): [True: 26.7M, False: 719k]
  ------------------
  180|  26.7M|        const int bit = (bit_buffer_[byte_offset] >> bit_shift) & 1;
  181|  26.7M|        bit_offset_ = off + 1;
  182|  26.7M|        return bit;
  183|  26.7M|      }
  184|   719k|      return 0;
  185|  27.4M|    }
_ZN5draco13DecoderBuffer6DecodeIhEEbPT_:
   68|  12.9M|  bool Decode(T *out_val) {
   69|  12.9M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 213, False: 12.8M]
  ------------------
   70|    213|      return false;
   71|    213|    }
   72|  12.8M|    pos_ += sizeof(T);
   73|  12.8M|    return true;
   74|  12.9M|  }
_ZN5draco13DecoderBuffer4PeekIhEEbPT_:
   87|  12.9M|  bool Peek(T *out_val) {
   88|  12.9M|    const size_t size_to_decode = sizeof(T);
   89|  12.9M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 213, False: 12.8M]
  ------------------
   90|    213|      return false;  // Buffer overflow.
   91|    213|    }
   92|  12.8M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  12.8M|    return true;
   94|  12.9M|  }
_ZN5draco13DecoderBuffer6DecodeIiEEbPT_:
   68|  1.77k|  bool Decode(T *out_val) {
   69|  1.77k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 0, False: 1.77k]
  ------------------
   70|      0|      return false;
   71|      0|    }
   72|  1.77k|    pos_ += sizeof(T);
   73|  1.77k|    return true;
   74|  1.77k|  }
_ZN5draco13DecoderBuffer4PeekIiEEbPT_:
   87|  1.77k|  bool Peek(T *out_val) {
   88|  1.77k|    const size_t size_to_decode = sizeof(T);
   89|  1.77k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 0, False: 1.77k]
  ------------------
   90|      0|      return false;  // Buffer overflow.
   91|      0|    }
   92|  1.77k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.77k|    return true;
   94|  1.77k|  }
_ZN5draco13DecoderBuffer6DecodeIjEEbPT_:
   68|   866k|  bool Decode(T *out_val) {
   69|   866k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 32, False: 866k]
  ------------------
   70|     32|      return false;
   71|     32|    }
   72|   866k|    pos_ += sizeof(T);
   73|   866k|    return true;
   74|   866k|  }
_ZN5draco13DecoderBuffer4PeekIjEEbPT_:
   87|   866k|  bool Peek(T *out_val) {
   88|   866k|    const size_t size_to_decode = sizeof(T);
   89|   866k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 32, False: 866k]
  ------------------
   90|     32|      return false;  // Buffer overflow.
   91|     32|    }
   92|   866k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|   866k|    return true;
   94|   866k|  }
_ZN5draco13DecoderBuffer6DecodeIaEEbPT_:
   68|  3.02k|  bool Decode(T *out_val) {
   69|  3.02k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 0, False: 3.02k]
  ------------------
   70|      0|      return false;
   71|      0|    }
   72|  3.02k|    pos_ += sizeof(T);
   73|  3.02k|    return true;
   74|  3.02k|  }
_ZN5draco13DecoderBuffer4PeekIaEEbPT_:
   87|  3.02k|  bool Peek(T *out_val) {
   88|  3.02k|    const size_t size_to_decode = sizeof(T);
   89|  3.02k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 0, False: 3.02k]
  ------------------
   90|      0|      return false;  // Buffer overflow.
   91|      0|    }
   92|  3.02k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  3.02k|    return true;
   94|  3.02k|  }
_ZN5draco13DecoderBuffer6DecodeINS_13HoleEventDataEEEbPT_:
   68|   343k|  bool Decode(T *out_val) {
   69|   343k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 34, False: 343k]
  ------------------
   70|     34|      return false;
   71|     34|    }
   72|   343k|    pos_ += sizeof(T);
   73|   343k|    return true;
   74|   343k|  }
_ZN5draco13DecoderBuffer4PeekINS_13HoleEventDataEEEbPT_:
   87|   343k|  bool Peek(T *out_val) {
   88|   343k|    const size_t size_to_decode = sizeof(T);
   89|   343k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 34, False: 343k]
  ------------------
   90|     34|      return false;  // Buffer overflow.
   91|     34|    }
   92|   343k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|   343k|    return true;
   94|   343k|  }
_ZN5draco13DecoderBuffer6DecodeItEEbPT_:
   68|  83.1k|  bool Decode(T *out_val) {
   69|  83.1k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 1, False: 83.1k]
  ------------------
   70|      1|      return false;
   71|      1|    }
   72|  83.1k|    pos_ += sizeof(T);
   73|  83.1k|    return true;
   74|  83.1k|  }
_ZN5draco13DecoderBuffer4PeekItEEbPT_:
   87|  83.1k|  bool Peek(T *out_val) {
   88|  83.1k|    const size_t size_to_decode = sizeof(T);
   89|  83.1k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 1, False: 83.1k]
  ------------------
   90|      1|      return false;  // Buffer overflow.
   91|      1|    }
   92|  83.1k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  83.1k|    return true;
   94|  83.1k|  }
_ZN5draco13DecoderBuffer6DecodeImEEbPT_:
   68|    180|  bool Decode(T *out_val) {
   69|    180|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 0, False: 180]
  ------------------
   70|      0|      return false;
   71|      0|    }
   72|    180|    pos_ += sizeof(T);
   73|    180|    return true;
   74|    180|  }
_ZN5draco13DecoderBuffer4PeekImEEbPT_:
   87|    180|  bool Peek(T *out_val) {
   88|    180|    const size_t size_to_decode = sizeof(T);
   89|    180|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 0, False: 180]
  ------------------
   90|      0|      return false;  // Buffer overflow.
   91|      0|    }
   92|    180|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|    180|    return true;
   94|    180|  }
_ZN5draco13DecoderBuffer6DecodeIfEEbPT_:
   68|     67|  bool Decode(T *out_val) {
   69|     67|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 0, False: 67]
  ------------------
   70|      0|      return false;
   71|      0|    }
   72|     67|    pos_ += sizeof(T);
   73|     67|    return true;
   74|     67|  }
_ZN5draco13DecoderBuffer4PeekIfEEbPT_:
   87|     67|  bool Peek(T *out_val) {
   88|     67|    const size_t size_to_decode = sizeof(T);
   89|     67|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 0, False: 67]
  ------------------
   90|      0|      return false;  // Buffer overflow.
   91|      0|    }
   92|     67|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|     67|    return true;
   94|     67|  }

_ZNK5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EE5valueEv:
   73|   183M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EE5valueEv:
   73|   181M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEgeERKj:
   98|  1.13M|  constexpr bool operator>=(const ValueTypeT &val) const {
   99|  1.13M|    return value_ >= val;
  100|  1.13M|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EE5valueEv:
   73|  28.3M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EE5valueEv:
   73|   401M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKj:
   90|  2.97M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEaSERKS2_:
  151|  19.2M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  19.2M|    value_ = i.value_;
  153|  19.2M|    return *this;
  154|  19.2M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKS2_:
  151|  3.41M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  3.41M|    value_ = i.value_;
  153|  3.41M|    return *this;
  154|  3.41M|  }
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEppEv:
  102|  2.97M|  inline ThisIndexType &operator++() {
  103|  2.97M|    ++value_;
  104|  2.97M|    return *this;
  105|  2.97M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEeqERKS2_:
   75|   301M|  constexpr bool operator==(const IndexType &i) const {
   76|   301M|    return value_ == i.value_;
   77|   301M|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EE5valueEv:
   73|  86.2M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEeqERKS2_:
   75|  19.4M|  constexpr bool operator==(const IndexType &i) const {
   76|  19.4M|    return value_ == i.value_;
   77|  19.4M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEmiERKj:
  131|  47.0M|  constexpr ThisIndexType operator-(const ValueTypeT &val) const {
  132|  47.0M|    return ThisIndexType(value_ - val);
  133|  47.0M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEplERKj:
  125|  89.6M|  constexpr ThisIndexType operator+(const ValueTypeT &val) const {
  126|  89.6M|    return ThisIndexType(value_ + val);
  127|  89.6M|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEeqERKS2_:
   75|  1.10M|  constexpr bool operator==(const IndexType &i) const {
   76|  1.10M|    return value_ == i.value_;
   77|  1.10M|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEneERKS2_:
   81|  28.4M|  constexpr bool operator!=(const IndexType &i) const {
   82|  28.4M|    return value_ != i.value_;
   83|  28.4M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEneERKS2_:
   81|  64.5M|  constexpr bool operator!=(const IndexType &i) const {
   82|  64.5M|    return value_ != i.value_;
   83|  64.5M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEppEv:
  102|  70.4M|  inline ThisIndexType &operator++() {
  103|  70.4M|    ++value_;
  104|  70.4M|    return *this;
  105|  70.4M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEaSERKS2_:
  151|  59.9M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  59.9M|    value_ = i.value_;
  153|  59.9M|    return *this;
  154|  59.9M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEaSERKS2_:
  151|   119M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|   119M|    value_ = i.value_;
  153|   119M|    return *this;
  154|   119M|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEgeERKj:
   98|  5.51M|  constexpr bool operator>=(const ValueTypeT &val) const {
   99|  5.51M|    return value_ >= val;
  100|  5.51M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEltERKj:
   90|  1.13M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ej:
   71|   161M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2ERKS2_:
   70|  2.64G|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2Ej:
   71|  20.5M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2ERKS2_:
   70|  2.05G|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ev:
   69|  10.8M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEplERKj:
  125|  6.78M|  constexpr ThisIndexType operator+(const ValueTypeT &val) const {
  126|  6.78M|    return ThisIndexType(value_ + val);
  127|  6.78M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2Ej:
   71|  30.8M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKS2_:
   87|  3.36M|  constexpr bool operator<(const IndexType &i) const {
   88|  3.36M|    return value_ < i.value_;
   89|  3.36M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2ERKS2_:
   70|   197M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ev:
   69|  3.81M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2ERKS2_:
   70|  5.87M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2Ej:
   71|   178M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2ERKS2_:
   70|   231M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEaSERKS2_:
  151|   726k|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|   726k|    value_ = i.value_;
  153|   726k|    return *this;
  154|   726k|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEpLERKj:
  139|  1.13M|  inline ThisIndexType operator+=(const ValueTypeT &val) {
  140|  1.13M|    value_ += val;
  141|  1.13M|    return *this;
  142|  1.13M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKj:
  155|  3.79M|  inline ThisIndexType &operator=(const ValueTypeT &val) {
  156|  3.79M|    value_ = val;
  157|  3.79M|    return *this;
  158|  3.79M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ej:
   71|  14.8k|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKj:
   90|  1.97M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEppEv:
  102|  1.97M|  inline ThisIndexType &operator++() {
  103|  1.97M|    ++value_;
  104|  1.97M|    return *this;
  105|  1.97M|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEltERKj:
   90|  4.30M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZNK5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEltERKj:
   90|    223|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEppEv:
  102|   167M|  inline ThisIndexType &operator++() {
  103|   167M|    ++value_;
  104|   167M|    return *this;
  105|   167M|  }
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEppEv:
  102|    204|  inline ThisIndexType &operator++() {
  103|    204|    ++value_;
  104|    204|    return *this;
  105|    204|  }
_ZNK5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEgeERKj:
   98|   163M|  constexpr bool operator>=(const ValueTypeT &val) const {
   99|   163M|    return value_ >= val;
  100|   163M|  }

_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   73|  8.62M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  8.62M|    return vector_[index.value()];
   75|  8.62M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE4sizeEv:
   59|  4.30M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE5clearEv:
   48|  1.83k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE6resizeEmRKS5_:
   51|  5.48k|  void resize(size_t size, const ValueTypeT &val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   70|  9.81M|  inline reference operator[](const IndexTypeT &index) {
   71|  9.81M|    return vector_[index.value()];
   72|  9.81M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE9push_backERKS8_:
   62|   131k|  void push_back(const ValueTypeT &val) { vector_.push_back(val); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE4sizeEv:
   59|  2.27M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE6resizeEmRKS8_:
   51|    349|  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|  1.13M|  inline reference operator[](const IndexTypeT &index) {
   71|  1.13M|    return vector_[index.value()];
   72|  1.13M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEixERKS3_:
   73|  2.44M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  2.44M|    return vector_[index.value()];
   75|  2.44M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE4sizeEv:
   59|  21.6M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE4sizeEv:
   59|  1.17M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   73|  55.8M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  55.8M|    return vector_[index.value()];
   75|  55.8M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   73|  68.5M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  68.5M|    return vector_[index.value()];
   75|  68.5M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   70|  49.4M|  inline reference operator[](const IndexTypeT &index) {
   71|  49.4M|    return vector_[index.value()];
   72|  49.4M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   73|  10.9M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  10.9M|    return vector_[index.value()];
   75|  10.9M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   70|  37.4M|  inline reference operator[](const IndexTypeT &index) {
   71|  37.4M|    return vector_[index.value()];
   72|  37.4M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE9push_backERKS5_:
   62|  12.9M|  void push_back(const ValueTypeT &val) { vector_.push_back(val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   70|  26.3M|  inline reference operator[](const IndexTypeT &index) {
   71|  26.3M|    return vector_[index.value()];
   72|  26.3M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE6resizeEmRKi:
   51|    153|  void resize(size_t size, const ValueTypeT &val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEixERKS3_:
   70|   160k|  inline reference operator[](const IndexTypeT &index) {
   71|   160k|    return vector_[index.value()];
   72|   160k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEC2Ev:
   39|  5.50k|  IndexTypeVector() {}
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4sizeEv:
   59|  43.4k|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaEC2Ev:
   39|  5.30k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEC2Ev:
   39|    632|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EC2Ev:
   39|    632|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEC2Ev:
   39|    632|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_EC2Ev:
   39|    632|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE5clearEv:
   48|  1.52k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4swapERS4_:
   55|  1.52k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT> &arg) {
   56|  1.52k|    vector_.swap(arg.vector_);
   57|  1.52k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE5clearEv:
   48|  1.52k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE4swapERS4_:
   55|  1.52k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT> &arg) {
   56|  1.52k|    vector_.swap(arg.vector_);
   57|  1.52k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE6assignEmRKS5_:
   52|    632|  void assign(size_t size, const ValueTypeT &val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_E6assignEmRKS3_:
   52|    632|  void assign(size_t size, const ValueTypeT &val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE7reserveEm:
   49|    632|  void reserve(size_t size) { vector_.reserve(size); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEC2Ev:
   39|  1.05k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEC2Ev:
   39|  9.82k|  IndexTypeVector() {}

_ZN5draco14DataTypeLengthENS_8DataTypeE:
   19|  15.4k|int32_t DataTypeLength(DataType dt) {
   20|  15.4k|  switch (dt) {
   21|  7.57k|    case DT_INT8:
  ------------------
  |  Branch (21:5): [True: 7.57k, False: 7.89k]
  ------------------
   22|  8.32k|    case DT_UINT8:
  ------------------
  |  Branch (22:5): [True: 750, False: 14.7k]
  ------------------
   23|  8.32k|      return 1;
   24|  2.02k|    case DT_INT16:
  ------------------
  |  Branch (24:5): [True: 2.02k, False: 13.4k]
  ------------------
   25|  2.11k|    case DT_UINT16:
  ------------------
  |  Branch (25:5): [True: 96, False: 15.3k]
  ------------------
   26|  2.11k|      return 2;
   27|  4.20k|    case DT_INT32:
  ------------------
  |  Branch (27:5): [True: 4.20k, False: 11.2k]
  ------------------
   28|  4.45k|    case DT_UINT32:
  ------------------
  |  Branch (28:5): [True: 257, False: 15.2k]
  ------------------
   29|  4.45k|      return 4;
   30|     14|    case DT_INT64:
  ------------------
  |  Branch (30:5): [True: 14, False: 15.4k]
  ------------------
   31|     55|    case DT_UINT64:
  ------------------
  |  Branch (31:5): [True: 41, False: 15.4k]
  ------------------
   32|     55|      return 8;
   33|    487|    case DT_FLOAT32:
  ------------------
  |  Branch (33:5): [True: 487, False: 14.9k]
  ------------------
   34|    487|      return 4;
   35|      6|    case DT_FLOAT64:
  ------------------
  |  Branch (35:5): [True: 6, False: 15.4k]
  ------------------
   36|      6|      return 8;
   37|     21|    case DT_BOOL:
  ------------------
  |  Branch (37:5): [True: 21, False: 15.4k]
  ------------------
   38|     21|      return 1;
   39|      0|    default:
  ------------------
  |  Branch (39:5): [True: 0, False: 15.4k]
  ------------------
   40|      0|      return -1;
   41|  15.4k|  }
   42|  15.4k|}

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

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

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

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

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

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

_ZN5draco8StatusOrINSt3__110unique_ptrINS_17PointCloudDecoderENS1_14default_deleteIS3_EEEEEC2EOS6_:
   39|    380|  StatusOr(T &&value) : status_(OkStatus()), value_(std::move(value)) {}
_ZN5draco8StatusOrINSt3__110unique_ptrINS_11MeshDecoderENS1_14default_deleteIS3_EEEEEC2EOS6_:
   39|  1.05k|  StatusOr(T &&value) : status_(OkStatus()), value_(std::move(value)) {}
_ZN5draco8StatusOrINS_19EncodedGeometryTypeEEC2ERKNS_6StatusE:
   37|      2|  StatusOr(const Status &status) : status_(status) {}
_ZN5draco8StatusOrINS_19EncodedGeometryTypeEEC2EOS1_:
   39|  1.43k|  StatusOr(T &&value) : status_(OkStatus()), value_(std::move(value)) {}
_ZNK5draco8StatusOrINS_19EncodedGeometryTypeEE2okEv:
   53|  1.43k|  bool ok() const { return status_.ok(); }
_ZNK5draco8StatusOrINS_19EncodedGeometryTypeEE6statusEv:
   43|      2|  const Status &status() const { return status_; }
_ZN5draco8StatusOrINSt3__110unique_ptrINS_10PointCloudENS1_14default_deleteIS3_EEEEEC2ERKNS_6StatusE:
   37|  1.38k|  StatusOr(const Status &status) : status_(status) {}
_ZNO5draco8StatusOrINS_19EncodedGeometryTypeEE5valueEv:
   46|  1.43k|  T &&value() && { return std::move(value_); }
_ZN5draco8StatusOrINSt3__110unique_ptrINS_10PointCloudENS1_14default_deleteIS3_EEEEEC2EOS6_:
   39|     58|  StatusOr(T &&value) : status_(OkStatus()), value_(std::move(value)) {}
_ZNK5draco8StatusOrINSt3__110unique_ptrINS_17PointCloudDecoderENS1_14default_deleteIS3_EEEEE2okEv:
   53|    380|  bool ok() const { return status_.ok(); }
_ZNO5draco8StatusOrINSt3__110unique_ptrINS_17PointCloudDecoderENS1_14default_deleteIS3_EEEEE5valueEv:
   46|    380|  T &&value() && { return std::move(value_); }
_ZNK5draco8StatusOrINSt3__110unique_ptrINS_11MeshDecoderENS1_14default_deleteIS3_EEEEE2okEv:
   53|  1.05k|  bool ok() const { return status_.ok(); }
_ZNO5draco8StatusOrINSt3__110unique_ptrINS_11MeshDecoderENS1_14default_deleteIS3_EEEEE5valueEv:
   46|  1.05k|  T &&value() && { return std::move(value_); }

_ZN5draco12DecodeVarintIjEEbPT_PNS_13DecoderBufferE:
   63|   373k|bool DecodeVarint(IntTypeT *out_val, DecoderBuffer *buffer) {
   64|   373k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 373k, Folded]
  ------------------
   65|   373k|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 99, False: 373k]
  ------------------
   66|     99|      return false;
   67|     99|    }
   68|   373k|  } 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|   373k|  return true;
   77|   373k|}
mesh_edgebreaker_decoder_impl.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  95.2k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  95.2k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  95.2k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 30, False: 95.2k]
  ------------------
   33|     30|    return false;
   34|     30|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  95.2k|  uint8_t in;
   39|  95.2k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 39, False: 95.2k]
  ------------------
   40|     39|    return false;
   41|     39|  }
   42|  95.2k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 5.76k, False: 89.4k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  5.76k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 150, False: 5.61k]
  ------------------
   45|    150|      return false;
   46|    150|    }
   47|       |    // Append decoded info from this byte.
   48|  5.61k|    *out_val <<= 7;
   49|  5.61k|    *out_val |= in & ((1 << 7) - 1);
   50|  89.4k|  } else {
   51|       |    // Last byte reached
   52|  89.4k|    *out_val = in;
   53|  89.4k|  }
   54|  95.0k|  return true;
   55|  95.2k|}
mesh_sequential_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  1.13k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  1.13k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  1.13k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 1, False: 1.13k]
  ------------------
   33|      1|    return false;
   34|      1|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  1.13k|  uint8_t in;
   39|  1.13k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 0, False: 1.13k]
  ------------------
   40|      0|    return false;
   41|      0|  }
   42|  1.13k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 222, False: 908]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    222|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 5, False: 217]
  ------------------
   45|      5|      return false;
   46|      5|    }
   47|       |    // Append decoded info from this byte.
   48|    217|    *out_val <<= 7;
   49|    217|    *out_val |= in & ((1 << 7) - 1);
   50|    908|  } else {
   51|       |    // Last byte reached
   52|    908|    *out_val = in;
   53|    908|  }
   54|  1.12k|  return true;
   55|  1.13k|}
_ZN5draco12DecodeVarintImEEbPT_PNS_13DecoderBufferE:
   63|    494|bool DecodeVarint(IntTypeT *out_val, DecoderBuffer *buffer) {
   64|    494|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 494, Folded]
  ------------------
   65|    494|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 0, False: 494]
  ------------------
   66|      0|      return false;
   67|      0|    }
   68|    494|  } 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|    494|  return true;
   77|    494|}
decoder_buffer.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|    397|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|    397|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|    397|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 0, False: 397]
  ------------------
   33|      0|    return false;
   34|      0|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|    397|  uint8_t in;
   39|    397|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 0, False: 397]
  ------------------
   40|      0|    return false;
   41|      0|  }
   42|    397|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 27, False: 370]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|     27|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 0, False: 27]
  ------------------
   45|      0|      return false;
   46|      0|    }
   47|       |    // Append decoded info from this byte.
   48|     27|    *out_val <<= 7;
   49|     27|    *out_val |= in & ((1 << 7) - 1);
   50|    370|  } else {
   51|       |    // Last byte reached
   52|    370|    *out_val = in;
   53|    370|  }
   54|    397|  return true;
   55|    397|}
metadata_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   263k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|   263k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   263k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 8, False: 263k]
  ------------------
   33|      8|    return false;
   34|      8|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   263k|  uint8_t in;
   39|   263k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 3, False: 263k]
  ------------------
   40|      3|    return false;
   41|      3|  }
   42|   263k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.46k, False: 261k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.46k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 40, False: 1.42k]
  ------------------
   45|     40|      return false;
   46|     40|    }
   47|       |    // Append decoded info from this byte.
   48|  1.42k|    *out_val <<= 7;
   49|  1.42k|    *out_val |= in & ((1 << 7) - 1);
   50|   261k|  } else {
   51|       |    // Last byte reached
   52|   261k|    *out_val = in;
   53|   261k|  }
   54|   262k|  return true;
   55|   263k|}
_ZN5draco12DecodeVarintIiEEbPT_PNS_13DecoderBufferE:
   63|  2.56k|bool DecodeVarint(IntTypeT *out_val, DecoderBuffer *buffer) {
   64|  2.56k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [Folded, False: 2.56k]
  ------------------
   65|      0|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 0, False: 0]
  ------------------
   66|      0|      return false;
   67|      0|    }
   68|  2.56k|  } else {
   69|       |    // IntTypeT is a signed value. Decode the symbol and convert to signed.
   70|  2.56k|    typename std::make_unsigned<IntTypeT>::type symbol;
   71|  2.56k|    if (!DecodeVarintUnsigned(1, &symbol, buffer)) {
  ------------------
  |  Branch (71:9): [True: 41, False: 2.52k]
  ------------------
   72|     41|      return false;
   73|     41|    }
   74|  2.52k|    *out_val = ConvertSymbolToSignedInt(symbol);
   75|  2.52k|  }
   76|  2.52k|  return true;
   77|  2.56k|}
kd_tree_attributes_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  3.00k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  3.00k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  3.00k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 25, False: 2.97k]
  ------------------
   33|     25|    return false;
   34|     25|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  2.97k|  uint8_t in;
   39|  2.97k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 16, False: 2.96k]
  ------------------
   40|     16|    return false;
   41|     16|  }
   42|  2.96k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 442, False: 2.52k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    442|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 125, False: 317]
  ------------------
   45|    125|      return false;
   46|    125|    }
   47|       |    // Append decoded info from this byte.
   48|    317|    *out_val <<= 7;
   49|    317|    *out_val |= in & ((1 << 7) - 1);
   50|  2.52k|  } else {
   51|       |    // Last byte reached
   52|  2.52k|    *out_val = in;
   53|  2.52k|  }
   54|  2.83k|  return true;
   55|  2.96k|}
sequential_integer_attribute_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|    434|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|    434|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|    434|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 3, False: 431]
  ------------------
   33|      3|    return false;
   34|      3|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|    431|  uint8_t in;
   39|    431|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 0, False: 431]
  ------------------
   40|      0|    return false;
   41|      0|  }
   42|    431|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 56, False: 375]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|     56|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 15, False: 41]
  ------------------
   45|     15|      return false;
   46|     15|    }
   47|       |    // Append decoded info from this byte.
   48|     41|    *out_val <<= 7;
   49|     41|    *out_val |= in & ((1 << 7) - 1);
   50|    375|  } else {
   51|       |    // Last byte reached
   52|    375|    *out_val = in;
   53|    375|  }
   54|    416|  return true;
   55|    431|}
rans_bit_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  10.5k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  10.5k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  10.5k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 4, False: 10.5k]
  ------------------
   33|      4|    return false;
   34|      4|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  10.5k|  uint8_t in;
   39|  10.5k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 0, False: 10.5k]
  ------------------
   40|      0|    return false;
   41|      0|  }
   42|  10.5k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 314, False: 10.2k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    314|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 20, False: 294]
  ------------------
   45|     20|      return false;
   46|     20|    }
   47|       |    // Append decoded info from this byte.
   48|    294|    *out_val <<= 7;
   49|    294|    *out_val |= in & ((1 << 7) - 1);
   50|  10.2k|  } else {
   51|       |    // Last byte reached
   52|  10.2k|    *out_val = in;
   53|  10.2k|  }
   54|  10.5k|  return true;
   55|  10.5k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|    641|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|    641|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|    641|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 1, False: 640]
  ------------------
   33|      1|    return false;
   34|      1|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|    640|  uint8_t in;
   39|    640|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 0, False: 640]
  ------------------
   40|      0|    return false;
   41|      0|  }
   42|    640|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 230, False: 410]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    230|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 5, False: 225]
  ------------------
   45|      5|      return false;
   46|      5|    }
   47|       |    // Append decoded info from this byte.
   48|    225|    *out_val <<= 7;
   49|    225|    *out_val |= in & ((1 << 7) - 1);
   50|    410|  } else {
   51|       |    // Last byte reached
   52|    410|    *out_val = in;
   53|    410|  }
   54|    635|  return true;
   55|    640|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|    416|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|    416|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|    416|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 0, False: 416]
  ------------------
   33|      0|    return false;
   34|      0|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|    416|  uint8_t in;
   39|    416|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 0, False: 416]
  ------------------
   40|      0|    return false;
   41|      0|  }
   42|    416|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 292, False: 124]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    292|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 0, False: 292]
  ------------------
   45|      0|      return false;
   46|      0|    }
   47|       |    // Append decoded info from this byte.
   48|    292|    *out_val <<= 7;
   49|    292|    *out_val |= in & ((1 << 7) - 1);
   50|    292|  } else {
   51|       |    // Last byte reached
   52|    124|    *out_val = in;
   53|    124|  }
   54|    416|  return true;
   55|    416|}
attributes_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  11.1k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  11.1k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  11.1k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 8, False: 11.1k]
  ------------------
   33|      8|    return false;
   34|      8|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  11.1k|  uint8_t in;
   39|  11.1k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 2, False: 11.1k]
  ------------------
   40|      2|    return false;
   41|      2|  }
   42|  11.1k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 922, False: 10.2k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    922|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 40, False: 882]
  ------------------
   45|     40|      return false;
   46|     40|    }
   47|       |    // Append decoded info from this byte.
   48|    882|    *out_val <<= 7;
   49|    882|    *out_val |= in & ((1 << 7) - 1);
   50|  10.2k|  } else {
   51|       |    // Last byte reached
   52|  10.2k|    *out_val = in;
   53|  10.2k|  }
   54|  11.0k|  return true;
   55|  11.1k|}

_ZNK5draco7VectorDIfLi3EEixEi:
  113|  3.47k|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIfLi3EEixEi:
  112|  4.63k|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIfLi3EEmiERKS1_:
  137|    386|  Self operator-(const Self &o) const {
  138|    386|    Self ret;
  139|  1.54k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 1.15k, False: 386]
  ------------------
  140|  1.15k|      ret[i] = (*this)[i] - o[i];
  141|  1.15k|    }
  142|    386|    return ret;
  143|    386|  }
_ZN5draco7VectorDIfLi3EEC2Ev:
   40|    965|  VectorD() {
   41|  3.86k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 2.89k, False: 965]
  ------------------
   42|  2.89k|      (*this)[i] = Scalar(0);
   43|  2.89k|    }
   44|    965|  }
_ZN5draco7VectorDIjLi3EEixEi:
  112|     66|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIlLi3EEixEi:
  113|  48.0M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIlLi3EEmiERKS1_:
  137|  3.93M|  Self operator-(const Self &o) const {
  138|  3.93M|    Self ret;
  139|  15.7M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 11.8M, False: 3.93M]
  ------------------
  140|  11.8M|      ret[i] = (*this)[i] - o[i];
  141|  11.8M|    }
  142|  3.93M|    return ret;
  143|  3.93M|  }
_ZN5draco12CrossProductIlEENS_7VectorDIT_Li3EEERKS3_S5_:
  318|  1.96M|                                 const VectorD<ScalarT, 3> &v) {
  319|       |  // Preventing accidental use with uint32_t and the like.
  320|  1.96M|  static_assert(std::is_signed<ScalarT>::value,
  321|  1.96M|                "ScalarT must be a signed type. ");
  322|  1.96M|  VectorD<ScalarT, 3> r;
  323|  1.96M|  r[0] = (u[1] * v[2]) - (u[2] * v[1]);
  324|  1.96M|  r[1] = (u[2] * v[0]) - (u[0] * v[2]);
  325|  1.96M|  r[2] = (u[0] * v[1]) - (u[1] * v[0]);
  326|  1.96M|  return r;
  327|  1.96M|}
_ZN5draco7VectorDIlLi3EE4dataEv:
  282|  1.96M|  Scalar *data() { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE4dataEv:
  283|  1.96M|  const Scalar *data() const { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE6AbsSumEv:
  237|   378k|  Scalar AbsSum() const {
  238|   378k|    Scalar result(0);
  239|  1.49M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (239:21): [True: 1.13M, False: 364k]
  ------------------
  240|  1.13M|      Scalar next_value = std::abs(v_[i]);
  241|  1.13M|      if (result > std::numeric_limits<Scalar>::max() - next_value) {
  ------------------
  |  Branch (241:11): [True: 14.2k, False: 1.11M]
  ------------------
  242|       |        // Return the max if adding would have caused an overflow.
  243|  14.2k|        return std::numeric_limits<Scalar>::max();
  244|  14.2k|      }
  245|  1.11M|      result += next_value;
  246|  1.11M|    }
  247|   364k|    return result;
  248|   378k|  }
_ZNK5draco7VectorDIlLi3EEdvERKl:
  182|   273k|  Self operator/(const Scalar &o) const {
  183|   273k|    Self ret;
  184|  1.09M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (184:21): [True: 821k, False: 273k]
  ------------------
  185|   821k|      ret[i] = (*this)[i] / o;
  186|   821k|    }
  187|   273k|    return ret;
  188|   273k|  }
_ZN5draco7VectorDIlLi3EEixEi:
  112|  56.6M|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEixEi:
  112|  2.17M|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EE4dataEv:
  282|  1.13M|  Scalar *data() { return &(v_[0]); }
_ZNK5draco7VectorDIiLi3EEngEv:
  120|   362k|  Self operator-() const {
  121|   362k|    Self ret;
  122|  1.45M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (122:21): [True: 1.08M, False: 362k]
  ------------------
  123|  1.08M|      ret[i] = -(*this)[i];
  124|  1.08M|    }
  125|   362k|    return ret;
  126|   362k|  }
_ZNK5draco7VectorDIiLi3EEixEi:
  113|  1.08M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEmiERKS1_:
  137|   189k|  Self operator-(const Self &o) const {
  138|   189k|    Self ret;
  139|   568k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 378k, False: 189k]
  ------------------
  140|   378k|      ret[i] = (*this)[i] - o[i];
  141|   378k|    }
  142|   189k|    return ret;
  143|   189k|  }
_ZN5draco7VectorDIjLi2EEixEi:
  112|  2.27M|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEixEi:
  113|  3.40M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIiLi2EEixEi:
  112|  6.20M|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEplERKS1_:
  129|   378k|  Self operator+(const Self &o) const {
  130|   378k|    Self ret;
  131|  1.13M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 757k, False: 378k]
  ------------------
  132|   757k|      ret[i] = (*this)[i] + o[i];
  133|   757k|    }
  134|   378k|    return ret;
  135|   378k|  }
_ZNK5draco7VectorDIiLi2EEixEi:
  113|  6.11M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIiLi2EEmiERKS1_:
  137|   148k|  Self operator-(const Self &o) const {
  138|   148k|    Self ret;
  139|   445k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 296k, False: 148k]
  ------------------
  140|   296k|      ret[i] = (*this)[i] - o[i];
  141|   296k|    }
  142|   148k|    return ret;
  143|   148k|  }
_ZNK5draco7VectorDIiLi2EEplERKS1_:
  129|   148k|  Self operator+(const Self &o) const {
  130|   148k|    Self ret;
  131|   445k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 296k, False: 148k]
  ------------------
  132|   296k|      ret[i] = (*this)[i] + o[i];
  133|   296k|    }
  134|   148k|    return ret;
  135|   148k|  }
_ZNK5draco7VectorDIfLi2EEeqERKS1_:
  206|  36.3k|  bool operator==(const Self &o) const {
  207|   108k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (207:21): [True: 72.5k, False: 36.1k]
  ------------------
  208|  72.5k|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (208:11): [True: 193, False: 72.3k]
  ------------------
  209|    193|        return false;
  210|    193|      }
  211|  72.5k|    }
  212|  36.1k|    return true;
  213|  36.3k|  }
_ZNK5draco7VectorDIfLi2EEixEi:
  113|   436k|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIfLi3EE11SquaredNormEv:
  234|    193|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIfLi3EE3DotERKS1_:
  250|    193|  Scalar Dot(const Self &o) const {
  251|    193|    Scalar ret(0);
  252|    772|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (252:21): [True: 579, False: 193]
  ------------------
  253|    579|      ret += (*this)[i] * o[i];
  254|    579|    }
  255|    193|    return ret;
  256|    193|  }
_ZNK5draco7VectorDIfLi2EEmiERKS1_:
  137|    193|  Self operator-(const Self &o) const {
  138|    193|    Self ret;
  139|    579|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 386, False: 193]
  ------------------
  140|    386|      ret[i] = (*this)[i] - o[i];
  141|    386|    }
  142|    193|    return ret;
  143|    193|  }
_ZN5draco7VectorDIfLi2EEC2Ev:
   40|    386|  VectorD() {
   41|  1.15k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 772, False: 386]
  ------------------
   42|    772|      (*this)[i] = Scalar(0);
   43|    772|    }
   44|    386|  }
_ZN5draco7VectorDIfLi2EEC2ERKfS3_:
   52|  72.8k|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|  72.8k|    DRACO_DCHECK_EQ(dimension, 2);
   54|  72.8k|    v_[0] = c0;
   55|  72.8k|    v_[1] = c1;
   56|  72.8k|  }
_ZN5draco7VectorDIfLi2EEixEi:
  112|  1.53k|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIlLi2EEeqERKS1_:
  206|    882|  bool operator==(const Self &o) const {
  207|  1.21k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (207:21): [True: 1.10k, False: 103]
  ------------------
  208|  1.10k|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (208:11): [True: 779, False: 328]
  ------------------
  209|    779|        return false;
  210|    779|      }
  211|  1.10k|    }
  212|    103|    return true;
  213|    882|  }
_ZNK5draco7VectorDIlLi2EEixEi:
  113|  21.2k|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIlLi3EEC2Ev:
   40|  10.8M|  VectorD() {
   41|  43.5M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 32.6M, False: 10.8M]
  ------------------
   42|  32.6M|      (*this)[i] = Scalar(0);
   43|  32.6M|    }
   44|  10.8M|  }
_ZNK5draco7VectorDIlLi3EE11SquaredNormEv:
  234|  1.50k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIlLi3EE3DotERKS1_:
  250|  2.23k|  Scalar Dot(const Self &o) const {
  251|  2.23k|    Scalar ret(0);
  252|  8.92k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (252:21): [True: 6.69k, False: 2.23k]
  ------------------
  253|  6.69k|      ret += (*this)[i] * o[i];
  254|  6.69k|    }
  255|  2.23k|    return ret;
  256|  2.23k|  }
_ZNK5draco7VectorDIlLi2EEmiERKS1_:
  137|    730|  Self operator-(const Self &o) const {
  138|    730|    Self ret;
  139|  2.19k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 1.46k, False: 730]
  ------------------
  140|  1.46k|      ret[i] = (*this)[i] - o[i];
  141|  1.46k|    }
  142|    730|    return ret;
  143|    730|  }
_ZNK5draco7VectorDIlLi2EEmlERKl:
  174|  2.16k|  Self operator*(const Scalar &o) const {
  175|  2.16k|    Self ret;
  176|  6.49k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 4.33k, False: 2.16k]
  ------------------
  177|  4.33k|      ret[i] = (*this)[i] * o;
  178|  4.33k|    }
  179|  2.16k|    return ret;
  180|  2.16k|  }
_ZNK5draco7VectorDIlLi2EEplERKS1_:
  129|    722|  Self operator+(const Self &o) const {
  130|    722|    Self ret;
  131|  2.16k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 1.44k, False: 722]
  ------------------
  132|  1.44k|      ret[i] = (*this)[i] + o[i];
  133|  1.44k|    }
  134|    722|    return ret;
  135|    722|  }
_ZN5dracomlIlLi2EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  292|    722|    const ScalarT &o, const VectorD<ScalarT, dimension_t> &v) {
  293|    722|  return v * o;
  294|    722|}
_ZNK5draco7VectorDIlLi3EEplERKS1_:
  129|    722|  Self operator+(const Self &o) const {
  130|    722|    Self ret;
  131|  2.88k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 2.16k, False: 722]
  ------------------
  132|  2.16k|      ret[i] = (*this)[i] + o[i];
  133|  2.16k|    }
  134|    722|    return ret;
  135|    722|  }
_ZN5dracomlIlLi3EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  292|    722|    const ScalarT &o, const VectorD<ScalarT, dimension_t> &v) {
  293|    722|  return v * o;
  294|    722|}
_ZNK5draco7VectorDIlLi3EEmlERKl:
  174|    722|  Self operator*(const Scalar &o) const {
  175|    722|    Self ret;
  176|  2.88k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 2.16k, False: 722]
  ------------------
  177|  2.16k|      ret[i] = (*this)[i] * o;
  178|  2.16k|    }
  179|    722|    return ret;
  180|    722|  }
_ZN5draco7VectorDIlLi2EEC2ERKlS3_:
   52|  2.48k|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|  2.48k|    DRACO_DCHECK_EQ(dimension, 2);
   54|  2.48k|    v_[0] = c0;
   55|  2.48k|    v_[1] = c1;
   56|  2.48k|  }
_ZN5draco7VectorDIlLi2EEC2Ev:
   40|  5.06k|  VectorD() {
   41|  15.1k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 10.1k, False: 5.06k]
  ------------------
   42|  10.1k|      (*this)[i] = Scalar(0);
   43|  10.1k|    }
   44|  5.06k|  }
_ZN5draco7VectorDImLi2EEC2IlLi2EEERKNS0_IT_XT0_EEE:
  102|  1.44k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  4.33k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 2.88k, False: 1.44k]
  ------------------
  104|  2.88k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 2.88k, False: 0]
  ------------------
  105|  2.88k|        v_[i] = Scalar(src_vector[i]);
  106|  2.88k|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  2.88k|    }
  110|  1.44k|  }
_ZNK5draco7VectorDImLi2EEplERKS1_:
  129|    125|  Self operator+(const Self &o) const {
  130|    125|    Self ret;
  131|    375|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 250, False: 125]
  ------------------
  132|    250|      ret[i] = (*this)[i] + o[i];
  133|    250|    }
  134|    125|    return ret;
  135|    125|  }
_ZN5draco7VectorDImLi2EEC2Ev:
   40|    722|  VectorD() {
   41|  2.16k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 1.44k, False: 722]
  ------------------
   42|  1.44k|      (*this)[i] = Scalar(0);
   43|  1.44k|    }
   44|    722|  }
_ZNK5draco7VectorDImLi2EEixEi:
  113|  4.33k|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDImLi2EEixEi:
  112|  2.88k|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIlLi2EEC2ImLi2EEERKNS0_IT_XT0_EEE:
  102|    722|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  2.16k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 1.44k, False: 722]
  ------------------
  104|  1.44k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 1.44k, False: 0]
  ------------------
  105|  1.44k|        v_[i] = Scalar(src_vector[i]);
  106|  1.44k|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  1.44k|    }
  110|    722|  }
_ZNK5draco7VectorDIlLi2EEdvERKl:
  182|    722|  Self operator/(const Scalar &o) const {
  183|    722|    Self ret;
  184|  2.16k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (184:21): [True: 1.44k, False: 722]
  ------------------
  185|  1.44k|      ret[i] = (*this)[i] / o;
  186|  1.44k|    }
  187|    722|    return ret;
  188|    722|  }
_ZNK5draco7VectorDImLi2EEmiERKS1_:
  137|    597|  Self operator-(const Self &o) const {
  138|    597|    Self ret;
  139|  1.79k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 1.19k, False: 597]
  ------------------
  140|  1.19k|      ret[i] = (*this)[i] - o[i];
  141|  1.19k|    }
  142|    597|    return ret;
  143|    597|  }
_ZN5draco7VectorDIlLi2EEixEi:
  112|  20.2k|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEC2Ev:
   40|   363k|  VectorD() {
   41|  1.45M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 1.08M, False: 363k]
  ------------------
   42|  1.08M|      (*this)[i] = Scalar(0);
   43|  1.08M|    }
   44|   363k|  }
_ZN5draco7VectorDIiLi2EEC2ERKiS3_:
   52|  1.33M|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|  1.33M|    DRACO_DCHECK_EQ(dimension, 2);
   54|  1.33M|    v_[0] = c0;
   55|  1.33M|    v_[1] = c1;
   56|  1.33M|  }
_ZN5draco7VectorDIjLi2EEC2IiLi2EEERKNS0_IT_XT0_EEE:
  102|  1.13M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  3.40M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 2.27M, False: 1.13M]
  ------------------
  104|  2.27M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 2.27M, False: 0]
  ------------------
  105|  2.27M|        v_[i] = Scalar(src_vector[i]);
  106|  2.27M|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  2.27M|    }
  110|  1.13M|  }
_ZN5draco7VectorDIjLi2EEC2Ev:
   40|   568k|  VectorD() {
   41|  1.70M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 1.13M, False: 568k]
  ------------------
   42|  1.13M|      (*this)[i] = Scalar(0);
   43|  1.13M|    }
   44|   568k|  }
_ZN5draco7VectorDIiLi2EEC2IjLi2EEERKNS0_IT_XT0_EEE:
  102|   568k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  1.70M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 1.13M, False: 568k]
  ------------------
  104|  1.13M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 1.13M, False: 0]
  ------------------
  105|  1.13M|        v_[i] = Scalar(src_vector[i]);
  106|  1.13M|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  1.13M|    }
  110|   568k|  }
_ZN5draco7VectorDIiLi2EEC2ERKS1_:
   88|   809k|  VectorD(const Self &o) {
   89|  2.42M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (89:21): [True: 1.61M, False: 809k]
  ------------------
   90|  1.61M|      (*this)[i] = o[i];
   91|  1.61M|    }
   92|   809k|  }
_ZN5draco7VectorDIiLi2EEC2Ev:
   40|   296k|  VectorD() {
   41|   890k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 593k, False: 296k]
  ------------------
   42|   593k|      (*this)[i] = Scalar(0);
   43|   593k|    }
   44|   296k|  }
_ZN5draco7VectorDIjLi3EEC2ERKS1_:
   88|     22|  VectorD(const Self &o) {
   89|     88|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (89:21): [True: 66, False: 22]
  ------------------
   90|     66|      (*this)[i] = o[i];
   91|     66|    }
   92|     22|  }
_ZNK5draco7VectorDIjLi3EEixEi:
  113|     66|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIjLi3EEC2ERKjS3_S3_:
   59|     22|      : v_({{c0, c1, c2}}) {
   60|     22|    DRACO_DCHECK_EQ(dimension, 3);
   61|     22|  }

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

_ZNK5draco11CornerTable12num_verticesEv:
   73|  8.73M|  inline int num_vertices() const {
   74|  8.73M|    return static_cast<int>(vertex_corners_.size());
   75|  8.73M|  }
_ZNK5draco11CornerTable11num_cornersEv:
   76|  1.13M|  inline int num_corners() const {
   77|  1.13M|    return static_cast<int>(corner_to_vertex_map_.size());
   78|  1.13M|  }
_ZNK5draco11CornerTable9num_facesEv:
   79|  42.0k|  inline int num_faces() const {
   80|  42.0k|    return static_cast<int>(corner_to_vertex_map_.size() / 3);
   81|  42.0k|  }
_ZNK5draco11CornerTable8OppositeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   83|  55.8M|  inline CornerIndex Opposite(CornerIndex corner) const {
   84|  55.8M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (84:9): [True: 0, False: 55.8M]
  ------------------
   85|      0|      return corner;
   86|      0|    }
   87|  55.8M|    return opposite_corners_[corner];
   88|  55.8M|  }
_ZNK5draco11CornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   89|  73.8M|  inline CornerIndex Next(CornerIndex corner) const {
   90|  73.8M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (90:9): [True: 3.33M, False: 70.4M]
  ------------------
   91|  3.33M|      return corner;
   92|  3.33M|    }
   93|  70.4M|    return LocalIndex(++corner) ? corner : corner - 3;
  ------------------
  |  Branch (93:12): [True: 53.4M, False: 16.9M]
  ------------------
   94|  73.8M|  }
_ZNK5draco11CornerTable8PreviousENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   95|  61.1M|  inline CornerIndex Previous(CornerIndex corner) const {
   96|  61.1M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (96:9): [True: 386k, False: 60.7M]
  ------------------
   97|   386k|      return corner;
   98|   386k|    }
   99|  60.7M|    return LocalIndex(corner) ? corner - 1 : corner + 2;
  ------------------
  |  Branch (99:12): [True: 30.0M, False: 30.7M]
  ------------------
  100|  61.1M|  }
_ZNK5draco11CornerTable6VertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  68.5M|  inline VertexIndex Vertex(CornerIndex corner) const {
  102|  68.5M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (102:9): [True: 0, False: 68.5M]
  ------------------
  103|      0|      return kInvalidVertexIndex;
  104|      0|    }
  105|  68.5M|    return ConfidentVertex(corner);
  106|  68.5M|  }
_ZNK5draco11CornerTable15ConfidentVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  68.5M|  inline VertexIndex ConfidentVertex(CornerIndex corner) const {
  108|  68.5M|    DRACO_DCHECK_GE(corner.value(), 0);
  109|  68.5M|    DRACO_DCHECK_LT(corner.value(), num_corners());
  110|  68.5M|    return corner_to_vertex_map_[corner];
  111|  68.5M|  }
_ZNK5draco11CornerTable4FaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  112|  4.49M|  inline FaceIndex Face(CornerIndex corner) const {
  113|  4.49M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (113:9): [True: 0, False: 4.49M]
  ------------------
  114|      0|      return kInvalidFaceIndex;
  115|      0|    }
  116|  4.49M|    return FaceIndex(corner.value() / 3);
  117|  4.49M|  }
_ZNK5draco11CornerTable10LocalIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  128|   131M|  inline int LocalIndex(CornerIndex corner) const { return corner.value() % 3; }
_ZNK5draco11CornerTable14LeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  150|  10.9M|  inline CornerIndex LeftMostCorner(VertexIndex v) const {
  151|  10.9M|    return vertex_corners_[v];
  152|  10.9M|  }
_ZNK5draco11CornerTable12IsOnBoundaryENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  185|   333k|  inline bool IsOnBoundary(VertexIndex vert) const {
  186|   333k|    const CornerIndex corner = LeftMostCorner(vert);
  187|   333k|    if (SwingLeft(corner) == kInvalidCornerIndex) {
  ------------------
  |  Branch (187:9): [True: 1.22k, False: 332k]
  ------------------
  188|  1.22k|      return true;
  189|  1.22k|    }
  190|   332k|    return false;
  191|   333k|  }
_ZNK5draco11CornerTable10SwingRightENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  200|  16.4M|  inline CornerIndex SwingRight(CornerIndex corner) const {
  201|  16.4M|    return Previous(Opposite(Previous(corner)));
  202|  16.4M|  }
_ZNK5draco11CornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  205|  9.33M|  inline CornerIndex SwingLeft(CornerIndex corner) const {
  206|  9.33M|    return Next(Opposite(Next(corner)));
  207|  9.33M|  }
_ZNK5draco11CornerTable13GetLeftCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  217|   377k|  inline CornerIndex GetLeftCorner(CornerIndex corner_id) const {
  218|   377k|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (218:9): [True: 0, False: 377k]
  ------------------
  219|      0|      return kInvalidCornerIndex;
  220|      0|    }
  221|   377k|    return Opposite(Previous(corner_id));
  222|   377k|  }
_ZNK5draco11CornerTable14GetRightCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  223|   709k|  inline CornerIndex GetRightCorner(CornerIndex corner_id) const {
  224|   709k|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (224:9): [True: 0, False: 709k]
  ------------------
  225|      0|      return kInvalidCornerIndex;
  226|      0|    }
  227|   709k|    return Opposite(Next(corner_id));
  228|   709k|  }
_ZN5draco11CornerTable17SetOppositeCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_:
  248|  37.4M|                                CornerIndex opp_corner_id) {
  249|  37.4M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  250|  37.4M|    opposite_corners_[corner_id] = opp_corner_id;
  251|  37.4M|  }
_ZN5draco11CornerTable17MapCornerToVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEE:
  265|  49.4M|  inline void MapCornerToVertex(CornerIndex corner_id, VertexIndex vert_id) {
  266|  49.4M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  267|  49.4M|    corner_to_vertex_map_[corner_id] = vert_id;
  268|  49.4M|  }
_ZN5draco11CornerTable12AddNewVertexEv:
  270|  12.9M|  VertexIndex AddNewVertex() {
  271|  12.9M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  272|       |    // Add a new invalid vertex.
  273|  12.9M|    vertex_corners_.push_back(kInvalidCornerIndex);
  274|  12.9M|    return VertexIndex(static_cast<uint32_t>(vertex_corners_.size() - 1));
  275|  12.9M|  }
_ZN5draco11CornerTable17SetLeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEE:
  292|  25.0M|  void SetLeftMostCorner(VertexIndex vert, CornerIndex corner) {
  293|  25.0M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  294|  25.0M|    if (vert != kInvalidVertexIndex) {
  ------------------
  |  Branch (294:9): [True: 25.0M, False: 0]
  ------------------
  295|  25.0M|      vertex_corners_[vert] = corner;
  296|  25.0M|    }
  297|  25.0M|  }
_ZN5draco11CornerTable18MakeVertexIsolatedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  328|  1.39M|  void MakeVertexIsolated(VertexIndex vert) {
  329|  1.39M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  330|  1.39M|    vertex_corners_[vert] = kInvalidCornerIndex;
  331|  1.39M|  }

_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE3EndEv:
  244|  2.22M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEE4NextEv:
  247|  1.90M|  void Next() {
  248|  1.90M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 1.89M, False: 5.52k]
  ------------------
  249|  1.89M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  1.89M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 6.77k, False: 1.89M]
  ------------------
  251|       |        // Open boundary reached.
  252|  6.77k|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  6.77k|        left_traversal_ = false;
  254|  1.89M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 316k, False: 1.57M]
  ------------------
  255|       |        // End reached.
  256|   316k|        corner_ = kInvalidCornerIndex;
  257|   316k|      }
  258|  1.89M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  5.52k|      corner_ = corner_table_->SwingRight(corner_);
  262|  5.52k|    }
  263|  1.90M|  }
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE6CornerEv:
  241|  3.80M|  CornerIndex Corner() const { return corner_; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE3EndEv:
  244|   118k|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE6CornerEv:
  241|   125k|  CornerIndex Corner() const { return corner_; }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE4NextEv:
  247|  62.8k|  void Next() {
  248|  62.8k|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 60.4k, False: 2.44k]
  ------------------
  249|  60.4k|      corner_ = corner_table_->SwingLeft(corner_);
  250|  60.4k|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 54.4k, False: 6.01k]
  ------------------
  251|       |        // Open boundary reached.
  252|  54.4k|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  54.4k|        left_traversal_ = false;
  254|  54.4k|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 785, False: 5.23k]
  ------------------
  255|       |        // End reached.
  256|    785|        corner_ = kInvalidCornerIndex;
  257|    785|      }
  258|  60.4k|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  2.44k|      corner_ = corner_table_->SwingRight(corner_);
  262|  2.44k|    }
  263|  62.8k|  }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|  55.1k|      : corner_table_(table),
  236|  55.1k|        start_corner_(corner_id),
  237|  55.1k|        corner_(start_corner_),
  238|  55.1k|        left_traversal_(true) {}
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|   323k|      : corner_table_(table),
  236|   323k|        start_corner_(corner_id),
  237|   323k|        corner_(start_corner_),
  238|   323k|        left_traversal_(true) {}

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

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

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

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

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

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

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

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

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

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

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

_ZNK5draco10PointCloud14num_attributesEv:
   75|    370|  int32_t num_attributes() const {
   76|    370|    return static_cast<int32_t>(attributes_.size());
   77|    370|  }
_ZNK5draco10PointCloud9attributeEi:
   78|  1.37k|  const PointAttribute *attribute(int32_t att_id) const {
   79|  1.37k|    DRACO_DCHECK_LE(0, att_id);
   80|  1.37k|    DRACO_DCHECK_LT(att_id, static_cast<int32_t>(attributes_.size()));
   81|  1.37k|    return attributes_[att_id].get();
   82|  1.37k|  }
_ZN5draco10PointCloud9attributeEi:
   86|  19.4k|  PointAttribute *attribute(int32_t att_id) {
   87|  19.4k|    DRACO_DCHECK_LE(0, att_id);
   88|  19.4k|    DRACO_DCHECK_LT(att_id, static_cast<int32_t>(attributes_.size()));
   89|  19.4k|    return attributes_[att_id].get();
   90|  19.4k|  }
_ZNK5draco10PointCloud10num_pointsEv:
  195|  13.1k|  PointIndex::ValueType num_points() const { return num_points_; }
_ZN5draco10PointCloud14set_num_pointsEj:
  200|    763|  void set_num_points(PointIndex::ValueType num) { num_points_ = num; }
_ZN5draco10PointCloudD2Ev:
   36|  1.43k|  virtual ~PointCloud() = default;

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

