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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

_ZN5draco17OctahedronToolBoxC2Ev:
   53|  3.56k|      : quantization_bits_(-1),
   54|  3.56k|        max_quantized_value_(-1),
   55|  3.56k|        max_value_(-1),
   56|  3.56k|        dequantization_scale_(1.f),
   57|  3.56k|        center_value_(-1) {}
_ZN5draco17OctahedronToolBox19SetQuantizationBitsEi:
   59|  3.22k|  bool SetQuantizationBits(int32_t q) {
   60|  3.22k|    if (q < 2 || q > 30) {
  ------------------
  |  Branch (60:9): [True: 965, False: 2.25k]
  |  Branch (60:18): [True: 195, False: 2.06k]
  ------------------
   61|  1.16k|      return false;
   62|  1.16k|    }
   63|  2.06k|    quantization_bits_ = q;
   64|  2.06k|    max_quantized_value_ = (1u << quantization_bits_) - 1;
   65|  2.06k|    max_value_ = max_quantized_value_ - 1;
   66|  2.06k|    dequantization_scale_ = 2.f / max_value_;
   67|  2.06k|    center_value_ = max_value_ / 2;
   68|  2.06k|    return true;
   69|  3.22k|  }
_ZNK5draco17OctahedronToolBox28CanonicalizeOctahedralCoordsEiiPiS1_:
   76|  2.87M|                                           int32_t *out_t) const {
   77|  2.87M|    if ((s == 0 && t == 0) || (s == 0 && t == max_value_) ||
  ------------------
  |  Branch (77:10): [True: 2.43k, False: 2.87M]
  |  Branch (77:20): [True: 0, False: 2.43k]
  |  Branch (77:32): [True: 2.43k, False: 2.87M]
  |  Branch (77:42): [True: 0, False: 2.43k]
  ------------------
   78|  2.87M|        (s == max_value_ && t == 0)) {
  ------------------
  |  Branch (78:10): [True: 2.09M, False: 774k]
  |  Branch (78:29): [True: 4.80k, False: 2.09M]
  ------------------
   79|  4.80k|      s = max_value_;
   80|  4.80k|      t = max_value_;
   81|  2.86M|    } else if (s == 0 && t > center_value_) {
  ------------------
  |  Branch (81:16): [True: 2.43k, False: 2.86M]
  |  Branch (81:26): [True: 646, False: 1.78k]
  ------------------
   82|    646|      t = center_value_ - (t - center_value_);
   83|  2.86M|    } else if (s == max_value_ && t < center_value_) {
  ------------------
  |  Branch (83:16): [True: 2.09M, False: 773k]
  |  Branch (83:35): [True: 5.02k, False: 2.08M]
  ------------------
   84|  5.02k|      t = center_value_ + (center_value_ - t);
   85|  2.86M|    } else if (t == max_value_ && s < center_value_) {
  ------------------
  |  Branch (85:16): [True: 2.09M, False: 770k]
  |  Branch (85:35): [True: 191, False: 2.09M]
  ------------------
   86|    191|      s = center_value_ + (center_value_ - s);
   87|  2.86M|    } else if (t == 0 && s > center_value_) {
  ------------------
  |  Branch (87:16): [True: 3.94k, False: 2.85M]
  |  Branch (87:26): [True: 1.75k, False: 2.18k]
  ------------------
   88|  1.75k|      s = center_value_ - (s - center_value_);
   89|  1.75k|    }
   90|       |
   91|  2.87M|    *out_s = s;
   92|  2.87M|    *out_t = t;
   93|  2.87M|  }
_ZNK5draco17OctahedronToolBox40IntegerVectorToQuantizedOctahedralCoordsEPKiPiS3_:
   99|  2.87M|                                                       int32_t *out_t) const {
  100|  2.87M|    DRACO_DCHECK_EQ(
  101|  2.87M|        std::abs(int_vec[0]) + std::abs(int_vec[1]) + std::abs(int_vec[2]),
  102|  2.87M|        center_value_);
  103|  2.87M|    int32_t s, t;
  104|  2.87M|    if (int_vec[0] >= 0) {
  ------------------
  |  Branch (104:9): [True: 1.12M, False: 1.74M]
  ------------------
  105|       |      // Right hemisphere.
  106|  1.12M|      s = (int_vec[1] + center_value_);
  107|  1.12M|      t = (int_vec[2] + center_value_);
  108|  1.74M|    } else {
  109|       |      // Left hemisphere.
  110|  1.74M|      if (int_vec[1] < 0) {
  ------------------
  |  Branch (110:11): [True: 35.5k, False: 1.70M]
  ------------------
  111|  35.5k|        s = std::abs(int_vec[2]);
  112|  1.70M|      } else {
  113|  1.70M|        s = (max_value_ - std::abs(int_vec[2]));
  114|  1.70M|      }
  115|  1.74M|      if (int_vec[2] < 0) {
  ------------------
  |  Branch (115:11): [True: 40.9k, False: 1.70M]
  ------------------
  116|  40.9k|        t = std::abs(int_vec[1]);
  117|  1.70M|      } else {
  118|  1.70M|        t = (max_value_ - std::abs(int_vec[1]));
  119|  1.70M|      }
  120|  1.74M|    }
  121|  2.87M|    CanonicalizeOctahedralCoords(s, t, out_s, out_t);
  122|  2.87M|  }
_ZNK5draco17OctahedronToolBox37QuantizedOctahedralCoordsToUnitVectorEiiPf:
  198|   310k|                                                    float *out_vector) const {
  199|   310k|    OctahedralCoordsToUnitVector(in_s * dequantization_scale_ - 1.f,
  200|   310k|                                 in_t * dequantization_scale_ - 1.f,
  201|   310k|                                 out_vector);
  202|   310k|  }
_ZNK5draco17OctahedronToolBox11IsInDiamondERKiS2_:
  205|  2.73M|  inline bool IsInDiamond(const int32_t &s, const int32_t &t) const {
  206|       |    // Expect center already at origin.
  207|  2.73M|    DRACO_DCHECK_LE(s, center_value_);
  208|  2.73M|    DRACO_DCHECK_LE(t, center_value_);
  209|  2.73M|    DRACO_DCHECK_GE(s, -center_value_);
  210|  2.73M|    DRACO_DCHECK_GE(t, -center_value_);
  211|  2.73M|    const uint32_t st =
  212|  2.73M|        static_cast<uint32_t>(std::abs(s)) + static_cast<uint32_t>(std::abs(t));
  213|  2.73M|    return st <= center_value_;
  214|  2.73M|  }
_ZNK5draco17OctahedronToolBox13InvertDiamondEPiS1_:
  216|  3.64M|  void InvertDiamond(int32_t *s, int32_t *t) const {
  217|       |    // Expect center already at origin.
  218|  3.64M|    DRACO_DCHECK_LE(*s, center_value_);
  219|  3.64M|    DRACO_DCHECK_LE(*t, center_value_);
  220|  3.64M|    DRACO_DCHECK_GE(*s, -center_value_);
  221|  3.64M|    DRACO_DCHECK_GE(*t, -center_value_);
  222|  3.64M|    int32_t sign_s = 0;
  223|  3.64M|    int32_t sign_t = 0;
  224|  3.64M|    if (*s >= 0 && *t >= 0) {
  ------------------
  |  Branch (224:9): [True: 3.19M, False: 448k]
  |  Branch (224:20): [True: 3.03M, False: 158k]
  ------------------
  225|  3.03M|      sign_s = 1;
  226|  3.03M|      sign_t = 1;
  227|  3.03M|    } else if (*s <= 0 && *t <= 0) {
  ------------------
  |  Branch (227:16): [True: 478k, False: 127k]
  |  Branch (227:27): [True: 328k, False: 150k]
  ------------------
  228|   328k|      sign_s = -1;
  229|   328k|      sign_t = -1;
  230|   328k|    } else {
  231|   277k|      sign_s = (*s > 0) ? 1 : -1;
  ------------------
  |  Branch (231:16): [True: 127k, False: 150k]
  ------------------
  232|   277k|      sign_t = (*t > 0) ? 1 : -1;
  ------------------
  |  Branch (232:16): [True: 150k, False: 127k]
  ------------------
  233|   277k|    }
  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|  3.64M|    const uint32_t corner_point_s = sign_s * center_value_;
  239|  3.64M|    const uint32_t corner_point_t = sign_t * center_value_;
  240|  3.64M|    uint32_t us = *s;
  241|  3.64M|    uint32_t ut = *t;
  242|  3.64M|    us = us + us - corner_point_s;
  243|  3.64M|    ut = ut + ut - corner_point_t;
  244|  3.64M|    if (sign_s * sign_t >= 0) {
  ------------------
  |  Branch (244:9): [True: 3.36M, False: 277k]
  ------------------
  245|  3.36M|      uint32_t temp = us;
  246|  3.36M|      us = -ut;
  247|  3.36M|      ut = -temp;
  248|  3.36M|    } else {
  249|   277k|      std::swap(us, ut);
  250|   277k|    }
  251|  3.64M|    us = us + corner_point_s;
  252|  3.64M|    ut = ut + corner_point_t;
  253|       |
  254|  3.64M|    *s = us;
  255|  3.64M|    *t = ut;
  256|  3.64M|    *s /= 2;
  257|  3.64M|    *t /= 2;
  258|  3.64M|  }
_ZNK5draco17OctahedronToolBox6ModMaxEi:
  272|  5.47M|  int32_t ModMax(int32_t x) const {
  273|  5.47M|    if (x > this->center_value()) {
  ------------------
  |  Branch (273:9): [True: 16.8k, False: 5.45M]
  ------------------
  274|  16.8k|      return x - this->max_quantized_value();
  275|  16.8k|    }
  276|  5.45M|    if (x < -this->center_value()) {
  ------------------
  |  Branch (276:9): [True: 1.88k, False: 5.45M]
  ------------------
  277|  1.88k|      return x + this->max_quantized_value();
  278|  1.88k|    }
  279|  5.45M|    return x;
  280|  5.45M|  }
_ZNK5draco17OctahedronToolBox17quantization_bitsEv:
  291|  1.92k|  int32_t quantization_bits() const { return quantization_bits_; }
_ZNK5draco17OctahedronToolBox19max_quantized_valueEv:
  292|  18.7k|  int32_t max_quantized_value() const { return max_quantized_value_; }
_ZNK5draco17OctahedronToolBox12center_valueEv:
  294|  16.4M|  int32_t center_value() const { return center_value_; }
_ZNK5draco17OctahedronToolBox28OctahedralCoordsToUnitVectorEffPf:
  298|   310k|                                           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|   310k|    float y = in_s_scaled;
  329|   310k|    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|   310k|    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|   310k|    float x_offset = -x;
  342|   310k|    x_offset = x_offset < 0 ? 0 : x_offset;
  ------------------
  |  Branch (342:16): [True: 10.6k, False: 299k]
  ------------------
  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|   310k|    y += y < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (347:10): [True: 99.4k, False: 210k]
  ------------------
  348|   310k|    z += z < 0 ? x_offset : -x_offset;
  ------------------
  |  Branch (348:10): [True: 73.7k, False: 236k]
  ------------------
  349|       |
  350|       |    // Normalize the computed vector.
  351|   310k|    const float norm_squared = x * x + y * y + z * z;
  352|   310k|    if (norm_squared < 1e-6) {
  ------------------
  |  Branch (352:9): [True: 0, False: 310k]
  ------------------
  353|      0|      out_vector[0] = 0;
  354|      0|      out_vector[1] = 0;
  355|      0|      out_vector[2] = 0;
  356|   310k|    } else {
  357|   310k|      const float d = 1.0f / std::sqrt(norm_squared);
  358|   310k|      out_vector[0] = x * d;
  359|   310k|      out_vector[1] = y * d;
  360|   310k|      out_vector[2] = z * d;
  361|   310k|    }
  362|   310k|  }
_ZNK5draco17OctahedronToolBox25CanonicalizeIntegerVectorIiEEvPT_:
  173|  2.87M|  void CanonicalizeIntegerVector(T *vec) const {
  174|  2.87M|    static_assert(std::is_integral<T>::value, "T must be an integral type.");
  175|  2.87M|    static_assert(std::is_signed<T>::value, "T must be a signed type.");
  176|  2.87M|    const int64_t abs_sum = static_cast<int64_t>(std::abs(vec[0])) +
  177|  2.87M|                            static_cast<int64_t>(std::abs(vec[1])) +
  178|  2.87M|                            static_cast<int64_t>(std::abs(vec[2]));
  179|       |
  180|  2.87M|    if (abs_sum == 0) {
  ------------------
  |  Branch (180:9): [True: 2.67M, False: 199k]
  ------------------
  181|  2.67M|      vec[0] = center_value_;  // vec[1] == v[2] == 0
  182|  2.67M|    } else {
  183|   199k|      vec[0] =
  184|   199k|          (static_cast<int64_t>(vec[0]) * static_cast<int64_t>(center_value_)) /
  185|   199k|          abs_sum;
  186|   199k|      vec[1] =
  187|   199k|          (static_cast<int64_t>(vec[1]) * static_cast<int64_t>(center_value_)) /
  188|   199k|          abs_sum;
  189|   199k|      if (vec[2] >= 0) {
  ------------------
  |  Branch (189:11): [True: 106k, False: 93.7k]
  ------------------
  190|   106k|        vec[2] = center_value_ - std::abs(vec[0]) - std::abs(vec[1]);
  191|   106k|      } else {
  192|  93.7k|        vec[2] = -(center_value_ - std::abs(vec[0]) - std::abs(vec[1]));
  193|  93.7k|      }
  194|   199k|    }
  195|  2.87M|  }

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

_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    473|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    473|            attribute, transform, mesh_data),
   52|    473|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  193|    458|                                                                *buffer) {
  194|    458|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  195|    458|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    458|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (195:7): [True: 23, False: 435]
  ------------------
  196|       |    // Decode prediction mode.
  197|     23|    uint8_t mode;
  198|     23|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (198:9): [True: 1, False: 22]
  ------------------
  199|      1|      return false;
  200|      1|    }
  201|       |
  202|     22|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (202:9): [True: 16, False: 6]
  ------------------
  203|       |      // Unsupported mode.
  204|     16|      return false;
  205|     16|    }
  206|     22|  }
  207|    441|#endif
  208|       |
  209|       |  // Encode selected edges using separate rans bit coder for each context.
  210|  1.92k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (210:19): [True: 1.60k, False: 318]
  ------------------
  211|  1.60k|    uint32_t num_flags;
  212|  1.60k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (212:9): [True: 20, False: 1.58k]
  ------------------
  213|     20|      return false;
  214|     20|    }
  215|  1.58k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (215:9): [True: 65, False: 1.51k]
  ------------------
  216|     65|      return false;
  217|     65|    }
  218|  1.51k|    if (num_flags > 0) {
  ------------------
  |  Branch (218:9): [True: 612, False: 905]
  ------------------
  219|    612|      is_crease_edge_[i].resize(num_flags);
  220|    612|      RAnsBitDecoder decoder;
  221|    612|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (221:11): [True: 38, False: 574]
  ------------------
  222|     38|        return false;
  223|     38|      }
  224|  1.50M|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (224:28): [True: 1.49M, False: 574]
  ------------------
  225|  1.49M|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  226|  1.49M|      }
  227|    574|      decoder.EndDecoding();
  228|    574|    }
  229|  1.51k|  }
  230|    318|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  231|    318|                                     MeshDataT>::DecodePredictionData(buffer);
  232|    441|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    289|                          const PointIndex * /* entry_to_point_id_map */) {
   87|    289|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    289|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  1.44k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 1.15k, False: 289]
  ------------------
   93|  1.15k|    pred_vals[i].resize(num_components, 0);
   94|  1.15k|  }
   95|    289|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    289|                                         out_data);
   97|       |
   98|    289|  const CornerTable *const table = this->mesh_data().corner_table();
   99|    289|  const std::vector<int32_t> *const vertex_to_data_map =
  100|    289|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    289|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    289|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    289|  const int corner_map_size =
  109|    289|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|   920k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 920k, False: 157]
  ------------------
  111|   920k|    const CornerIndex start_corner_id =
  112|   920k|        this->mesh_data().data_to_corner_map()->at(p);
  113|       |
  114|   920k|    CornerIndex corner_id(start_corner_id);
  115|   920k|    int num_parallelograms = 0;
  116|   920k|    bool first_pass = true;
  117|  2.04M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (117:12): [True: 1.16M, False: 886k]
  ------------------
  118|  1.16M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (118:11): [True: 87.8k, False: 1.07M]
  ------------------
  119|  1.16M|              p, corner_id, table, *vertex_to_data_map, out_data,
  120|  1.16M|              num_components, &(pred_vals[num_parallelograms][0]))) {
  121|       |        // Parallelogram prediction applied and stored in
  122|       |        // |pred_vals[num_parallelograms]|
  123|  87.8k|        ++num_parallelograms;
  124|       |        // Stop processing when we reach the maximum number of allowed
  125|       |        // parallelograms.
  126|  87.8k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (126:13): [True: 632, False: 87.2k]
  ------------------
  127|    632|          break;
  128|    632|        }
  129|  87.8k|      }
  130|       |
  131|       |      // Proceed to the next corner attached to the vertex. First swing left
  132|       |      // and if we reach a boundary, swing right from the start corner.
  133|  1.16M|      if (first_pass) {
  ------------------
  |  Branch (133:11): [True: 1.11M, False: 41.4k]
  ------------------
  134|  1.11M|        corner_id = table->SwingLeft(corner_id);
  135|  1.11M|      } else {
  136|  41.4k|        corner_id = table->SwingRight(corner_id);
  137|  41.4k|      }
  138|  1.16M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (138:11): [True: 33.0k, False: 1.12M]
  ------------------
  139|  33.0k|        break;
  140|  33.0k|      }
  141|  1.12M|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (141:11): [True: 907k, False: 219k]
  |  Branch (141:47): [True: 886k, False: 20.2k]
  ------------------
  142|   886k|        first_pass = false;
  143|   886k|        corner_id = table->SwingRight(start_corner_id);
  144|   886k|      }
  145|  1.12M|    }
  146|       |
  147|       |    // Check which of the available parallelograms are actually used and compute
  148|       |    // the final predicted value.
  149|   920k|    int num_used_parallelograms = 0;
  150|   920k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (150:9): [True: 55.1k, False: 865k]
  ------------------
  151|  9.08M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (151:23): [True: 9.02M, False: 55.1k]
  ------------------
  152|  9.02M|        multi_pred_vals[i] = 0;
  153|  9.02M|      }
  154|       |      // Check which parallelograms are actually used.
  155|   142k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (155:23): [True: 87.8k, False: 55.0k]
  ------------------
  156|  87.8k|        const int context = num_parallelograms - 1;
  157|  87.8k|        const int pos = is_crease_edge_pos[context]++;
  158|  87.8k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (158:13): [True: 132, False: 87.7k]
  ------------------
  159|    132|          return false;
  160|    132|        }
  161|  87.7k|        const bool is_crease = is_crease_edge_[context][pos];
  162|  87.7k|        if (!is_crease) {
  ------------------
  |  Branch (162:13): [True: 14.3k, False: 73.3k]
  ------------------
  163|  14.3k|          ++num_used_parallelograms;
  164|  1.53M|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (164:27): [True: 1.51M, False: 14.3k]
  ------------------
  165|  1.51M|            multi_pred_vals[j] =
  166|  1.51M|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  167|  1.51M|          }
  168|  14.3k|        }
  169|  87.7k|      }
  170|  55.1k|    }
  171|   920k|    const int dst_offset = p * num_components;
  172|   920k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (172:9): [True: 913k, False: 6.82k]
  ------------------
  173|       |      // No parallelogram was valid.
  174|       |      // We use the last decoded point as a reference.
  175|   913k|      const int src_offset = (p - 1) * num_components;
  176|   913k|      this->transform().ComputeOriginalValue(
  177|   913k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  178|   913k|    } else {
  179|       |      // Compute the correction from the predicted value.
  180|   771k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (180:23): [True: 764k, False: 6.82k]
  ------------------
  181|   764k|        multi_pred_vals[c] /= num_used_parallelograms;
  182|   764k|      }
  183|  6.82k|      this->transform().ComputeOriginalValue(
  184|  6.82k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  185|  6.82k|    }
  186|   920k|  }
  187|    157|  return true;
  188|    289|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   50|    499|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   51|    499|            attribute, transform, mesh_data),
   52|    499|        selected_mode_(Mode::OPTIMAL_MULTI_PARALLELOGRAM) {}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  193|    486|                                                                *buffer) {
  194|    486|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  195|    486|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    486|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (195:7): [True: 3, False: 483]
  ------------------
  196|       |    // Decode prediction mode.
  197|      3|    uint8_t mode;
  198|      3|    if (!buffer->Decode(&mode)) {
  ------------------
  |  Branch (198:9): [True: 1, False: 2]
  ------------------
  199|      1|      return false;
  200|      1|    }
  201|       |
  202|      2|    if (mode != Mode::OPTIMAL_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (202:9): [True: 1, False: 1]
  ------------------
  203|       |      // Unsupported mode.
  204|      1|      return false;
  205|      1|    }
  206|      2|  }
  207|    484|#endif
  208|       |
  209|       |  // Encode selected edges using separate rans bit coder for each context.
  210|  2.09k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (210:19): [True: 1.73k, False: 358]
  ------------------
  211|  1.73k|    uint32_t num_flags;
  212|  1.73k|    if (!DecodeVarint<uint32_t>(&num_flags, buffer)) {
  ------------------
  |  Branch (212:9): [True: 17, False: 1.71k]
  ------------------
  213|     17|      return false;
  214|     17|    }
  215|  1.71k|    if (num_flags > this->mesh_data().corner_table()->num_corners()) {
  ------------------
  |  Branch (215:9): [True: 79, False: 1.63k]
  ------------------
  216|     79|      return false;
  217|     79|    }
  218|  1.63k|    if (num_flags > 0) {
  ------------------
  |  Branch (218:9): [True: 612, False: 1.02k]
  ------------------
  219|    612|      is_crease_edge_[i].resize(num_flags);
  220|    612|      RAnsBitDecoder decoder;
  221|    612|      if (!decoder.StartDecoding(buffer)) {
  ------------------
  |  Branch (221:11): [True: 30, False: 582]
  ------------------
  222|     30|        return false;
  223|     30|      }
  224|   873k|      for (uint32_t j = 0; j < num_flags; ++j) {
  ------------------
  |  Branch (224:28): [True: 872k, False: 582]
  ------------------
  225|   872k|        is_crease_edge_[i][j] = decoder.DecodeNextBit();
  226|   872k|      }
  227|    582|      decoder.EndDecoding();
  228|    582|    }
  229|  1.63k|  }
  230|    358|  return MeshPredictionSchemeDecoder<DataTypeT, TransformT,
  231|    358|                                     MeshDataT>::DecodePredictionData(buffer);
  232|    484|}
_ZN5draco56MeshPredictionSchemeConstrainedMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   86|    317|                          const PointIndex * /* entry_to_point_id_map */) {
   87|    317|  this->transform().Init(num_components);
   88|       |
   89|       |  // Predicted values for all simple parallelograms encountered at any given
   90|       |  // vertex.
   91|    317|  std::vector<DataTypeT> pred_vals[kMaxNumParallelograms];
   92|  1.58k|  for (int i = 0; i < kMaxNumParallelograms; ++i) {
  ------------------
  |  Branch (92:19): [True: 1.26k, False: 317]
  ------------------
   93|  1.26k|    pred_vals[i].resize(num_components, 0);
   94|  1.26k|  }
   95|    317|  this->transform().ComputeOriginalValue(pred_vals[0].data(), in_corr,
   96|    317|                                         out_data);
   97|       |
   98|    317|  const CornerTable *const table = this->mesh_data().corner_table();
   99|    317|  const std::vector<int32_t> *const vertex_to_data_map =
  100|    317|      this->mesh_data().vertex_to_data_map();
  101|       |
  102|       |  // Current position in the |is_crease_edge_| array for each context.
  103|    317|  std::vector<int> is_crease_edge_pos(kMaxNumParallelograms, 0);
  104|       |
  105|       |  // Used to store predicted value for multi-parallelogram prediction.
  106|    317|  std::vector<DataTypeT> multi_pred_vals(num_components);
  107|       |
  108|    317|  const int corner_map_size =
  109|    317|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  110|   135k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (110:19): [True: 135k, False: 163]
  ------------------
  111|   135k|    const CornerIndex start_corner_id =
  112|   135k|        this->mesh_data().data_to_corner_map()->at(p);
  113|       |
  114|   135k|    CornerIndex corner_id(start_corner_id);
  115|   135k|    int num_parallelograms = 0;
  116|   135k|    bool first_pass = true;
  117|   823k|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (117:12): [True: 788k, False: 35.0k]
  ------------------
  118|   788k|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (118:11): [True: 231k, False: 556k]
  ------------------
  119|   788k|              p, corner_id, table, *vertex_to_data_map, out_data,
  120|   788k|              num_components, &(pred_vals[num_parallelograms][0]))) {
  121|       |        // Parallelogram prediction applied and stored in
  122|       |        // |pred_vals[num_parallelograms]|
  123|   231k|        ++num_parallelograms;
  124|       |        // Stop processing when we reach the maximum number of allowed
  125|       |        // parallelograms.
  126|   231k|        if (num_parallelograms == kMaxNumParallelograms) {
  ------------------
  |  Branch (126:13): [True: 480, False: 231k]
  ------------------
  127|    480|          break;
  128|    480|        }
  129|   231k|      }
  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|   787k|      if (first_pass) {
  ------------------
  |  Branch (133:11): [True: 711k, False: 76.4k]
  ------------------
  134|   711k|        corner_id = table->SwingLeft(corner_id);
  135|   711k|      } else {
  136|  76.4k|        corner_id = table->SwingRight(corner_id);
  137|  76.4k|      }
  138|   787k|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (138:11): [True: 100k, False: 687k]
  ------------------
  139|   100k|        break;
  140|   100k|      }
  141|   687k|      if (corner_id == kInvalidCornerIndex && first_pass) {
  ------------------
  |  Branch (141:11): [True: 67.3k, False: 620k]
  |  Branch (141:47): [True: 35.0k, False: 32.2k]
  ------------------
  142|  35.0k|        first_pass = false;
  143|  35.0k|        corner_id = table->SwingRight(start_corner_id);
  144|  35.0k|      }
  145|   687k|    }
  146|       |
  147|       |    // Check which of the available parallelograms are actually used and compute
  148|       |    // the final predicted value.
  149|   135k|    int num_used_parallelograms = 0;
  150|   135k|    if (num_parallelograms > 0) {
  ------------------
  |  Branch (150:9): [True: 133k, False: 2.14k]
  ------------------
  151|  10.7M|      for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (151:23): [True: 10.6M, False: 133k]
  ------------------
  152|  10.6M|        multi_pred_vals[i] = 0;
  153|  10.6M|      }
  154|       |      // Check which parallelograms are actually used.
  155|   365k|      for (int i = 0; i < num_parallelograms; ++i) {
  ------------------
  |  Branch (155:23): [True: 231k, False: 133k]
  ------------------
  156|   231k|        const int context = num_parallelograms - 1;
  157|   231k|        const int pos = is_crease_edge_pos[context]++;
  158|   231k|        if (is_crease_edge_[context].size() <= pos) {
  ------------------
  |  Branch (158:13): [True: 154, False: 231k]
  ------------------
  159|    154|          return false;
  160|    154|        }
  161|   231k|        const bool is_crease = is_crease_edge_[context][pos];
  162|   231k|        if (!is_crease) {
  ------------------
  |  Branch (162:13): [True: 9.06k, False: 222k]
  ------------------
  163|  9.06k|          ++num_used_parallelograms;
  164|   877k|          for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (164:27): [True: 868k, False: 9.06k]
  ------------------
  165|   868k|            multi_pred_vals[j] =
  166|   868k|                AddAsUnsigned(multi_pred_vals[j], pred_vals[i][j]);
  167|   868k|          }
  168|  9.06k|        }
  169|   231k|      }
  170|   133k|    }
  171|   135k|    const int dst_offset = p * num_components;
  172|   135k|    if (num_used_parallelograms == 0) {
  ------------------
  |  Branch (172:9): [True: 131k, False: 4.15k]
  ------------------
  173|       |      // No parallelogram was valid.
  174|       |      // We use the last decoded point as a reference.
  175|   131k|      const int src_offset = (p - 1) * num_components;
  176|   131k|      this->transform().ComputeOriginalValue(
  177|   131k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  178|   131k|    } else {
  179|       |      // Compute the correction from the predicted value.
  180|   468k|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (180:23): [True: 464k, False: 4.15k]
  ------------------
  181|   464k|        multi_pred_vals[c] /= num_used_parallelograms;
  182|   464k|      }
  183|  4.15k|      this->transform().ComputeOriginalValue(
  184|  4.15k|          multi_pred_vals.data(), in_corr + dst_offset, out_data + dst_offset);
  185|  4.15k|    }
  186|   135k|  }
  187|    163|  return true;
  188|    317|}

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

_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|   903k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   278k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|   724k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|   189k|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  2.70k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  2.70k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE9mesh_dataEv:
   38|  7.81M|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|  2.69k|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|  2.69k|        mesh_data_(mesh_data) {}
_ZNK5draco27MeshPredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE9mesh_dataEv:
   38|  3.26M|  const MeshData &mesh_data() const { return mesh_data_; }
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    234|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    234|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    194|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    194|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    228|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    228|        mesh_data_(mesh_data) {}
_ZN5draco27MeshPredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   34|    164|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform),
   35|    164|        mesh_data_(mesh_data) {}

_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    464|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    234|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    234|    DRACO_DCHECK_EQ(i, 0);
   70|    234|    (void)i;
   71|    234|    return GeometryAttribute::POSITION;
   72|    234|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    233|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    233|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 233]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    233|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 3, False: 230]
  ------------------
   79|      3|      return false;  // Currently works only for 3 component positions.
   80|      3|    }
   81|    230|    predictor_.SetPositionAttribute(*att);
   82|    230|    return true;
   83|    233|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    228|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    228|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 6, False: 222]
  ------------------
  145|      6|    return false;
  146|      6|  }
  147|       |
  148|    222|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    222|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    222|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 65, False: 157]
  ------------------
  150|     65|    uint8_t prediction_mode;
  151|     65|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 64]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|     64|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 1, False: 63]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      1|      return false;
  157|      1|    }
  158|       |
  159|     63|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 63]
  ------------------
  160|     63|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     63|  }
  164|    220|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    220|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 12, False: 208]
  ------------------
  168|     12|    return false;
  169|     12|  }
  170|       |
  171|    208|  return true;
  172|    220|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    208|                                      const PointIndex *entry_to_point_id_map) {
  103|    208|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    208|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    208|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    208|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    208|  const int corner_map_size =
  111|    208|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    208|  VectorD<int32_t, 3> pred_normal_3d;
  114|    208|  int32_t pred_normal_oct[2];
  115|       |
  116|   903k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 903k, False: 208]
  ------------------
  117|   903k|    const CornerIndex corner_id =
  118|   903k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   903k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   903k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   903k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   903k|                    octahedron_tool_box_.center_value());
  125|   903k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 741k, False: 161k]
  ------------------
  126|   741k|      pred_normal_3d = -pred_normal_3d;
  127|   741k|    }
  128|   903k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   903k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   903k|    const int data_offset = data_id * 2;
  132|   903k|    this->transform().ComputeOriginalValue(
  133|   903k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   903k|  }
  135|    208|  flip_normal_bit_decoder_.EndDecoding();
  136|    208|  return true;
  137|    208|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    208|  void SetQuantizationBits(int q) {
   85|    208|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    208|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    384|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    194|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    194|    DRACO_DCHECK_EQ(i, 0);
   70|    194|    (void)i;
   71|    194|    return GeometryAttribute::POSITION;
   72|    194|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    192|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    192|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 192]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    192|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 2, False: 190]
  ------------------
   79|      2|      return false;  // Currently works only for 3 component positions.
   80|      2|    }
   81|    190|    predictor_.SetPositionAttribute(*att);
   82|    190|    return true;
   83|    192|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    190|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    190|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 6, False: 184]
  ------------------
  145|      6|    return false;
  146|      6|  }
  147|       |
  148|    184|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    184|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    184|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 43, False: 141]
  ------------------
  150|     43|    uint8_t prediction_mode;
  151|     43|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 42]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|     42|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 1, False: 41]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      1|      return false;
  157|      1|    }
  158|       |
  159|     41|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 41]
  ------------------
  160|     41|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     41|  }
  164|    182|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    182|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 7, False: 175]
  ------------------
  168|      7|    return false;
  169|      7|  }
  170|       |
  171|    175|  return true;
  172|    182|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    175|                                      const PointIndex *entry_to_point_id_map) {
  103|    175|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    175|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    175|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    175|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    175|  const int corner_map_size =
  111|    175|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    175|  VectorD<int32_t, 3> pred_normal_3d;
  114|    175|  int32_t pred_normal_oct[2];
  115|       |
  116|   278k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 278k, False: 175]
  ------------------
  117|   278k|    const CornerIndex corner_id =
  118|   278k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   278k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   278k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   278k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   278k|                    octahedron_tool_box_.center_value());
  125|   278k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 222k, False: 55.9k]
  ------------------
  126|   222k|      pred_normal_3d = -pred_normal_3d;
  127|   222k|    }
  128|   278k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   278k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   278k|    const int data_offset = data_id * 2;
  132|   278k|    this->transform().ComputeOriginalValue(
  133|   278k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   278k|  }
  135|    175|  flip_normal_bit_decoder_.EndDecoding();
  136|    175|  return true;
  137|    175|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    175|  void SetQuantizationBits(int q) {
   85|    175|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    175|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    453|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    228|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    228|    DRACO_DCHECK_EQ(i, 0);
   70|    228|    (void)i;
   71|    228|    return GeometryAttribute::POSITION;
   72|    228|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    227|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    227|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 227]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    227|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 2, False: 225]
  ------------------
   79|      2|      return false;  // Currently works only for 3 component positions.
   80|      2|    }
   81|    225|    predictor_.SetPositionAttribute(*att);
   82|    225|    return true;
   83|    227|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    225|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    225|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 7, False: 218]
  ------------------
  145|      7|    return false;
  146|      7|  }
  147|       |
  148|    218|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    218|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    218|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 64, False: 154]
  ------------------
  150|     64|    uint8_t prediction_mode;
  151|     64|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 63]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|     63|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 7, False: 56]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      7|      return false;
  157|      7|    }
  158|       |
  159|     56|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 56]
  ------------------
  160|     56|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     56|  }
  164|    210|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    210|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 7, False: 203]
  ------------------
  168|      7|    return false;
  169|      7|  }
  170|       |
  171|    203|  return true;
  172|    210|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    203|                                      const PointIndex *entry_to_point_id_map) {
  103|    203|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    203|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    203|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    203|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    203|  const int corner_map_size =
  111|    203|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    203|  VectorD<int32_t, 3> pred_normal_3d;
  114|    203|  int32_t pred_normal_oct[2];
  115|       |
  116|   724k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 724k, False: 203]
  ------------------
  117|   724k|    const CornerIndex corner_id =
  118|   724k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   724k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   724k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   724k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   724k|                    octahedron_tool_box_.center_value());
  125|   724k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 364k, False: 359k]
  ------------------
  126|   364k|      pred_normal_3d = -pred_normal_3d;
  127|   364k|    }
  128|   724k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   724k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   724k|    const int data_offset = data_id * 2;
  132|   724k|    this->transform().ComputeOriginalValue(
  133|   724k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   724k|  }
  135|    203|  flip_normal_bit_decoder_.EndDecoding();
  136|    203|  return true;
  137|    203|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    203|  void SetQuantizationBits(int q) {
   85|    203|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    203|  }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    326|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    164|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    164|    DRACO_DCHECK_EQ(i, 0);
   70|    164|    (void)i;
   71|    164|    return GeometryAttribute::POSITION;
   72|    164|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    163|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    163|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 163]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    163|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 1, False: 162]
  ------------------
   79|      1|      return false;  // Currently works only for 3 component positions.
   80|      1|    }
   81|    162|    predictor_.SetPositionAttribute(*att);
   82|    162|    return true;
   83|    163|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    162|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    162|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 9, False: 153]
  ------------------
  145|      9|    return false;
  146|      9|  }
  147|       |
  148|    153|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    153|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    153|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 16, False: 137]
  ------------------
  150|     16|    uint8_t prediction_mode;
  151|     16|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 0, False: 16]
  ------------------
  152|      0|      return false;
  153|      0|    }
  154|     16|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 1, False: 15]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      1|      return false;
  157|      1|    }
  158|       |
  159|     15|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 15]
  ------------------
  160|     15|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|     15|  }
  164|    152|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    152|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 4, False: 148]
  ------------------
  168|      4|    return false;
  169|      4|  }
  170|       |
  171|    148|  return true;
  172|    152|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    148|                                      const PointIndex *entry_to_point_id_map) {
  103|    148|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    148|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    148|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    148|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    148|  const int corner_map_size =
  111|    148|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    148|  VectorD<int32_t, 3> pred_normal_3d;
  114|    148|  int32_t pred_normal_oct[2];
  115|       |
  116|   189k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 189k, False: 148]
  ------------------
  117|   189k|    const CornerIndex corner_id =
  118|   189k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   189k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   189k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   189k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   189k|                    octahedron_tool_box_.center_value());
  125|   189k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 174k, False: 14.3k]
  ------------------
  126|   174k|      pred_normal_3d = -pred_normal_3d;
  127|   174k|    }
  128|   189k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   189k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   189k|    const int data_offset = data_id * 2;
  132|   189k|    this->transform().ComputeOriginalValue(
  133|   189k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   189k|  }
  135|    148|  flip_normal_bit_decoder_.EndDecoding();
  136|    148|  return true;
  137|    148|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    148|  void SetQuantizationBits(int q) {
   85|    148|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    148|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    480|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    480|            attribute, transform, mesh_data),
   37|    480|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetNumParentAttributesEv:
   66|    955|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE22GetParentAttributeTypeEi:
   68|    480|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    480|    DRACO_DCHECK_EQ(i, 0);
   70|    480|    (void)i;
   71|    480|    return GeometryAttribute::POSITION;
   72|    480|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    477|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    477|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 477]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    477|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 2, False: 475]
  ------------------
   79|      2|      return false;  // Currently works only for 3 component positions.
   80|      2|    }
   81|    475|    predictor_.SetPositionAttribute(*att);
   82|    475|    return true;
   83|    477|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    474|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    474|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 35, False: 439]
  ------------------
  145|     35|    return false;
  146|     35|  }
  147|       |
  148|    439|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    439|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    439|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 242, False: 197]
  ------------------
  150|    242|    uint8_t prediction_mode;
  151|    242|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 2, False: 240]
  ------------------
  152|      2|      return false;
  153|      2|    }
  154|    240|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 3, False: 237]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      3|      return false;
  157|      3|    }
  158|       |
  159|    237|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 237]
  ------------------
  160|    237|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|    237|  }
  164|    434|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    434|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 24, False: 410]
  ------------------
  168|     24|    return false;
  169|     24|  }
  170|       |
  171|    410|  return true;
  172|    434|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    410|                                      const PointIndex *entry_to_point_id_map) {
  103|    410|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    410|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    410|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    410|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    410|  const int corner_map_size =
  111|    410|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    410|  VectorD<int32_t, 3> pred_normal_3d;
  114|    410|  int32_t pred_normal_oct[2];
  115|       |
  116|   487k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 487k, False: 410]
  ------------------
  117|   487k|    const CornerIndex corner_id =
  118|   487k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   487k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   487k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   487k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   487k|                    octahedron_tool_box_.center_value());
  125|   487k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 225k, False: 261k]
  ------------------
  126|   225k|      pred_normal_3d = -pred_normal_3d;
  127|   225k|    }
  128|   487k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   487k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   487k|    const int data_offset = data_id * 2;
  132|   487k|    this->transform().ComputeOriginalValue(
  133|   487k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   487k|  }
  135|    410|  flip_normal_bit_decoder_.EndDecoding();
  136|    410|  return true;
  137|    410|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE19SetQuantizationBitsEi:
   84|    410|  void SetQuantizationBits(int q) {
   85|    410|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    410|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    496|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    496|            attribute, transform, mesh_data),
   37|    496|        predictor_(mesh_data) {}
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetNumParentAttributesEv:
   66|    987|  int GetNumParentAttributes() const override { return 1; }
_ZNK5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE22GetParentAttributeTypeEi:
   68|    496|  GeometryAttribute::Type GetParentAttributeType(int i) const override {
   69|    496|    DRACO_DCHECK_EQ(i, 0);
   70|    496|    (void)i;
   71|    496|    return GeometryAttribute::POSITION;
   72|    496|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18SetParentAttributeEPKNS_14PointAttributeE:
   74|    494|  bool SetParentAttribute(const PointAttribute *att) override {
   75|    494|    if (att->attribute_type() != GeometryAttribute::POSITION) {
  ------------------
  |  Branch (75:9): [True: 0, False: 494]
  ------------------
   76|      0|      return false;  // Invalid attribute type.
   77|      0|    }
   78|    494|    if (att->num_components() != 3) {
  ------------------
  |  Branch (78:9): [True: 3, False: 491]
  ------------------
   79|      3|      return false;  // Currently works only for 3 component positions.
   80|      3|    }
   81|    491|    predictor_.SetPositionAttribute(*att);
   82|    491|    return true;
   83|    494|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20DecodePredictionDataEPNS_13DecoderBufferE:
  142|    486|                                                                *buffer) {
  143|       |  // Get data needed for transform
  144|    486|  if (!this->transform().DecodeTransformData(buffer)) {
  ------------------
  |  Branch (144:7): [True: 58, False: 428]
  ------------------
  145|     58|    return false;
  146|     58|  }
  147|       |
  148|    428|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  149|    428|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|    428|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (149:7): [True: 143, False: 285]
  ------------------
  150|    143|    uint8_t prediction_mode;
  151|    143|    if (!buffer->Decode(&prediction_mode)) {
  ------------------
  |  Branch (151:9): [True: 1, False: 142]
  ------------------
  152|      1|      return false;
  153|      1|    }
  154|    142|    if (prediction_mode > TRIANGLE_AREA) {
  ------------------
  |  Branch (154:9): [True: 2, False: 140]
  ------------------
  155|       |      // Invalid prediction mode.
  156|      2|      return false;
  157|      2|    }
  158|       |
  159|    140|    if (!predictor_.SetNormalPredictionMode(
  ------------------
  |  Branch (159:9): [True: 0, False: 140]
  ------------------
  160|    140|            NormalPredictionMode(prediction_mode))) {
  161|      0|      return false;
  162|      0|    }
  163|    140|  }
  164|    425|#endif
  165|       |
  166|       |  // Init normal flips.
  167|    425|  if (!flip_normal_bit_decoder_.StartDecoding(buffer)) {
  ------------------
  |  Branch (167:7): [True: 23, False: 402]
  ------------------
  168|     23|    return false;
  169|     23|  }
  170|       |
  171|    402|  return true;
  172|    425|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
  102|    402|                                      const PointIndex *entry_to_point_id_map) {
  103|    402|  this->SetQuantizationBits(this->transform().quantization_bits());
  104|    402|  predictor_.SetEntryToPointIdMap(entry_to_point_id_map);
  105|    402|  DRACO_DCHECK(this->IsInitialized());
  106|       |
  107|       |  // Expecting in_data in octahedral coordinates, i.e., portable attribute.
  108|    402|  DRACO_DCHECK_EQ(num_components, 2);
  109|       |
  110|    402|  const int corner_map_size =
  111|    402|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
  112|       |
  113|    402|  VectorD<int32_t, 3> pred_normal_3d;
  114|    402|  int32_t pred_normal_oct[2];
  115|       |
  116|   290k|  for (int data_id = 0; data_id < corner_map_size; ++data_id) {
  ------------------
  |  Branch (116:25): [True: 290k, False: 402]
  ------------------
  117|   290k|    const CornerIndex corner_id =
  118|   290k|        this->mesh_data().data_to_corner_map()->at(data_id);
  119|   290k|    predictor_.ComputePredictedValue(corner_id, pred_normal_3d.data());
  120|       |
  121|       |    // Compute predicted octahedral coordinates.
  122|   290k|    octahedron_tool_box_.CanonicalizeIntegerVector(pred_normal_3d.data());
  123|   290k|    DRACO_DCHECK_EQ(pred_normal_3d.AbsSum(),
  124|   290k|                    octahedron_tool_box_.center_value());
  125|   290k|    if (flip_normal_bit_decoder_.DecodeNextBit()) {
  ------------------
  |  Branch (125:9): [True: 210k, False: 80.2k]
  ------------------
  126|   210k|      pred_normal_3d = -pred_normal_3d;
  127|   210k|    }
  128|   290k|    octahedron_tool_box_.IntegerVectorToQuantizedOctahedralCoords(
  129|   290k|        pred_normal_3d.data(), pred_normal_oct, pred_normal_oct + 1);
  130|       |
  131|   290k|    const int data_offset = data_id * 2;
  132|   290k|    this->transform().ComputeOriginalValue(
  133|   290k|        pred_normal_oct, in_corr + data_offset, out_data + data_offset);
  134|   290k|  }
  135|    402|  flip_normal_bit_decoder_.EndDecoding();
  136|    402|  return true;
  137|    402|}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE19SetQuantizationBitsEi:
   84|    402|  void SetQuantizationBits(int q) {
   85|    402|    octahedron_tool_box_.SetQuantizationBits(q);
   86|    402|  }
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    234|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    234|            attribute, transform, mesh_data),
   37|    234|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    194|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    194|            attribute, transform, mesh_data),
   37|    194|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    228|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    228|            attribute, transform, mesh_data),
   37|    228|        predictor_(mesh_data) {}
_ZN5draco42MeshPredictionSchemeGeometricNormalDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   35|    164|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   36|    164|            attribute, transform, mesh_data),
   37|    164|        predictor_(mesh_data) {}

_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    297|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    297|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 58, False: 239]
  ------------------
  105|     58|      this->normal_prediction_mode_ = mode;
  106|     58|      return true;
  107|    239|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 239, False: 0]
  ------------------
  108|    239|      this->normal_prediction_mode_ = mode;
  109|    239|      return true;
  110|    239|    }
  111|      0|    return false;
  112|    297|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   903k|                             DataTypeT *prediction) override {
   42|   903k|    DRACO_DCHECK(this->IsInitialized());
   43|   903k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   903k|    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|   903k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   903k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   903k|    VectorD<int64_t, 3> normal;
   53|   903k|    CornerIndex c_next, c_prev;
   54|  1.87M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 967k, False: 903k]
  ------------------
   55|       |      // Getting corners.
   56|   967k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 312, False: 966k]
  ------------------
   57|    312|        c_next = corner_table->Next(corner_id);
   58|    312|        c_prev = corner_table->Previous(corner_id);
   59|   966k|      } else {
   60|   966k|        c_next = corner_table->Next(cit.Corner());
   61|   966k|        c_prev = corner_table->Previous(cit.Corner());
   62|   966k|      }
   63|   967k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   967k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   967k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   967k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   967k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   967k|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|   967k|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|   967k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   967k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   967k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   967k|      cit.Next();
   81|   967k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   903k|    constexpr int64_t upper_bound = 1 << 29;
   85|   903k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 208, False: 902k]
  ------------------
   86|    208|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    208|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 63, False: 145]
  ------------------
   88|     63|        const int64_t quotient = abs_sum / upper_bound;
   89|     63|        normal = normal / quotient;
   90|     63|      }
   91|   902k|    } else {
   92|   902k|      const int64_t abs_sum = normal.AbsSum();
   93|   902k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 3.44k, False: 899k]
  ------------------
   94|  3.44k|        const int64_t quotient = abs_sum / upper_bound;
   95|  3.44k|        normal = normal / quotient;
   96|  3.44k|      }
   97|   902k|    }
   98|   903k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   903k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   903k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   903k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   903k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    235|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    235|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 39, False: 196]
  ------------------
  105|     39|      this->normal_prediction_mode_ = mode;
  106|     39|      return true;
  107|    196|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 196, False: 0]
  ------------------
  108|    196|      this->normal_prediction_mode_ = mode;
  109|    196|      return true;
  110|    196|    }
  111|      0|    return false;
  112|    235|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   278k|                             DataTypeT *prediction) override {
   42|   278k|    DRACO_DCHECK(this->IsInitialized());
   43|   278k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   278k|    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|   278k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   278k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   278k|    VectorD<int64_t, 3> normal;
   53|   278k|    CornerIndex c_next, c_prev;
   54|  1.93M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.66M, False: 278k]
  ------------------
   55|       |      // Getting corners.
   56|  1.66M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 234, False: 1.66M]
  ------------------
   57|    234|        c_next = corner_table->Next(corner_id);
   58|    234|        c_prev = corner_table->Previous(corner_id);
   59|  1.66M|      } else {
   60|  1.66M|        c_next = corner_table->Next(cit.Corner());
   61|  1.66M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.66M|      }
   63|  1.66M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.66M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.66M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.66M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.66M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.66M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.66M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.66M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.66M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.66M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.66M|      cit.Next();
   81|  1.66M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   278k|    constexpr int64_t upper_bound = 1 << 29;
   85|   278k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 156, False: 278k]
  ------------------
   86|    156|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    156|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 52, False: 104]
  ------------------
   88|     52|        const int64_t quotient = abs_sum / upper_bound;
   89|     52|        normal = normal / quotient;
   90|     52|      }
   91|   278k|    } else {
   92|   278k|      const int64_t abs_sum = normal.AbsSum();
   93|   278k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 97.6k, False: 180k]
  ------------------
   94|  97.6k|        const int64_t quotient = abs_sum / upper_bound;
   95|  97.6k|        normal = normal / quotient;
   96|  97.6k|      }
   97|   278k|    }
   98|   278k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   278k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   278k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   278k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   278k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    284|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    284|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 55, False: 229]
  ------------------
  105|     55|      this->normal_prediction_mode_ = mode;
  106|     55|      return true;
  107|    229|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 229, False: 0]
  ------------------
  108|    229|      this->normal_prediction_mode_ = mode;
  109|    229|      return true;
  110|    229|    }
  111|      0|    return false;
  112|    284|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   724k|                             DataTypeT *prediction) override {
   42|   724k|    DRACO_DCHECK(this->IsInitialized());
   43|   724k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   724k|    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|   724k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   724k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   724k|    VectorD<int64_t, 3> normal;
   53|   724k|    CornerIndex c_next, c_prev;
   54|  1.48M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 760k, False: 724k]
  ------------------
   55|       |      // Getting corners.
   56|   760k|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 324, False: 760k]
  ------------------
   57|    324|        c_next = corner_table->Next(corner_id);
   58|    324|        c_prev = corner_table->Previous(corner_id);
   59|   760k|      } else {
   60|   760k|        c_next = corner_table->Next(cit.Corner());
   61|   760k|        c_prev = corner_table->Previous(cit.Corner());
   62|   760k|      }
   63|   760k|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|   760k|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|   760k|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|   760k|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|   760k|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|   760k|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|   760k|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|   760k|      normal_data[0] = normal_data[0] + cross_data[0];
   77|   760k|      normal_data[1] = normal_data[1] + cross_data[1];
   78|   760k|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|   760k|      cit.Next();
   81|   760k|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   724k|    constexpr int64_t upper_bound = 1 << 29;
   85|   724k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 216, False: 724k]
  ------------------
   86|    216|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|    216|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 55, False: 161]
  ------------------
   88|     55|        const int64_t quotient = abs_sum / upper_bound;
   89|     55|        normal = normal / quotient;
   90|     55|      }
   91|   724k|    } else {
   92|   724k|      const int64_t abs_sum = normal.AbsSum();
   93|   724k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 3.12k, False: 720k]
  ------------------
   94|  3.12k|        const int64_t quotient = abs_sum / upper_bound;
   95|  3.12k|        normal = normal / quotient;
   96|  3.12k|      }
   97|   724k|    }
   98|   724k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   724k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   724k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   724k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   724k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    179|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    179|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 14, False: 165]
  ------------------
  105|     14|      this->normal_prediction_mode_ = mode;
  106|     14|      return true;
  107|    165|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 165, False: 0]
  ------------------
  108|    165|      this->normal_prediction_mode_ = mode;
  109|    165|      return true;
  110|    165|    }
  111|      0|    return false;
  112|    179|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   189k|                             DataTypeT *prediction) override {
   42|   189k|    DRACO_DCHECK(this->IsInitialized());
   43|   189k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   189k|    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|   189k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   189k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   189k|    VectorD<int64_t, 3> normal;
   53|   189k|    CornerIndex c_next, c_prev;
   54|  1.31M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.12M, False: 189k]
  ------------------
   55|       |      // Getting corners.
   56|  1.12M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 78, False: 1.12M]
  ------------------
   57|     78|        c_next = corner_table->Next(corner_id);
   58|     78|        c_prev = corner_table->Previous(corner_id);
   59|  1.12M|      } else {
   60|  1.12M|        c_next = corner_table->Next(cit.Corner());
   61|  1.12M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.12M|      }
   63|  1.12M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.12M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.12M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.12M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.12M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.12M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.12M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.12M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.12M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.12M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.12M|      cit.Next();
   81|  1.12M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   189k|    constexpr int64_t upper_bound = 1 << 29;
   85|   189k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 52, False: 189k]
  ------------------
   86|     52|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|     52|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 17, False: 35]
  ------------------
   88|     17|        const int64_t quotient = abs_sum / upper_bound;
   89|     17|        normal = normal / quotient;
   90|     17|      }
   91|   189k|    } else {
   92|   189k|      const int64_t abs_sum = normal.AbsSum();
   93|   189k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 67.1k, False: 121k]
  ------------------
   94|  67.1k|        const int64_t quotient = abs_sum / upper_bound;
   95|  67.1k|        normal = normal / quotient;
   96|  67.1k|      }
   97|   189k|    }
   98|   189k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   189k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   189k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   189k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   189k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    480|      : Base(md) {
   35|    480|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    480|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    717|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    717|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 208, False: 509]
  ------------------
  105|    208|      this->normal_prediction_mode_ = mode;
  106|    208|      return true;
  107|    509|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 509, False: 0]
  ------------------
  108|    509|      this->normal_prediction_mode_ = mode;
  109|    509|      return true;
  110|    509|    }
  111|      0|    return false;
  112|    717|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   487k|                             DataTypeT *prediction) override {
   42|   487k|    DRACO_DCHECK(this->IsInitialized());
   43|   487k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   487k|    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|   487k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   487k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   487k|    VectorD<int64_t, 3> normal;
   53|   487k|    CornerIndex c_next, c_prev;
   54|  1.60M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.11M, False: 487k]
  ------------------
   55|       |      // Getting corners.
   56|  1.11M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 447k, False: 670k]
  ------------------
   57|   447k|        c_next = corner_table->Next(corner_id);
   58|   447k|        c_prev = corner_table->Previous(corner_id);
   59|   670k|      } else {
   60|   670k|        c_next = corner_table->Next(cit.Corner());
   61|   670k|        c_prev = corner_table->Previous(cit.Corner());
   62|   670k|      }
   63|  1.11M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.11M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.11M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.11M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.11M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.11M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.11M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.11M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.11M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.11M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.11M|      cit.Next();
   81|  1.11M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   487k|    constexpr int64_t upper_bound = 1 << 29;
   85|   487k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 75.7k, False: 411k]
  ------------------
   86|  75.7k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  75.7k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 458, False: 75.2k]
  ------------------
   88|    458|        const int64_t quotient = abs_sum / upper_bound;
   89|    458|        normal = normal / quotient;
   90|    458|      }
   91|   411k|    } else {
   92|   411k|      const int64_t abs_sum = normal.AbsSum();
   93|   411k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 2.20k, False: 409k]
  ------------------
   94|  2.20k|        const int64_t quotient = abs_sum / upper_bound;
   95|  2.20k|        normal = normal / quotient;
   96|  2.20k|      }
   97|   411k|    }
   98|   487k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   487k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   487k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   487k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   487k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    496|      : Base(md) {
   35|    496|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    496|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE23SetNormalPredictionModeENS_20NormalPredictionModeE:
  103|    636|  bool SetNormalPredictionMode(NormalPredictionMode mode) override {
  104|    636|    if (mode == ONE_TRIANGLE) {
  ------------------
  |  Branch (104:9): [True: 127, False: 509]
  ------------------
  105|    127|      this->normal_prediction_mode_ = mode;
  106|    127|      return true;
  107|    509|    } else if (mode == TRIANGLE_AREA) {
  ------------------
  |  Branch (107:16): [True: 509, False: 0]
  ------------------
  108|    509|      this->normal_prediction_mode_ = mode;
  109|    509|      return true;
  110|    509|    }
  111|      0|    return false;
  112|    636|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPi:
   41|   290k|                             DataTypeT *prediction) override {
   42|   290k|    DRACO_DCHECK(this->IsInitialized());
   43|   290k|    typedef typename MeshDataT::CornerTable CornerTable;
   44|   290k|    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|   290k|    VertexCornersIterator<CornerTable> cit(corner_table, corner_id);
   48|       |    // Position of central vertex does not change in loop.
   49|   290k|    const VectorD<int64_t, 3> pos_cent = this->GetPositionForCorner(corner_id);
   50|       |    // Computing normals for triangles and adding them up.
   51|       |
   52|   290k|    VectorD<int64_t, 3> normal;
   53|   290k|    CornerIndex c_next, c_prev;
   54|  1.99M|    while (!cit.End()) {
  ------------------
  |  Branch (54:12): [True: 1.70M, False: 290k]
  ------------------
   55|       |      // Getting corners.
   56|  1.70M|      if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (56:11): [True: 393k, False: 1.30M]
  ------------------
   57|   393k|        c_next = corner_table->Next(corner_id);
   58|   393k|        c_prev = corner_table->Previous(corner_id);
   59|  1.30M|      } else {
   60|  1.30M|        c_next = corner_table->Next(cit.Corner());
   61|  1.30M|        c_prev = corner_table->Previous(cit.Corner());
   62|  1.30M|      }
   63|  1.70M|      const VectorD<int64_t, 3> pos_next = this->GetPositionForCorner(c_next);
   64|  1.70M|      const VectorD<int64_t, 3> pos_prev = this->GetPositionForCorner(c_prev);
   65|       |
   66|       |      // Computing delta vectors to next and prev.
   67|  1.70M|      const VectorD<int64_t, 3> delta_next = pos_next - pos_cent;
   68|  1.70M|      const VectorD<int64_t, 3> delta_prev = pos_prev - pos_cent;
   69|       |
   70|       |      // Computing cross product.
   71|  1.70M|      const VectorD<int64_t, 3> cross = CrossProduct(delta_next, delta_prev);
   72|       |
   73|       |      // Prevent signed integer overflows by doing math as unsigned.
   74|  1.70M|      auto normal_data = reinterpret_cast<uint64_t *>(normal.data());
   75|  1.70M|      auto cross_data = reinterpret_cast<const uint64_t *>(cross.data());
   76|  1.70M|      normal_data[0] = normal_data[0] + cross_data[0];
   77|  1.70M|      normal_data[1] = normal_data[1] + cross_data[1];
   78|  1.70M|      normal_data[2] = normal_data[2] + cross_data[2];
   79|       |
   80|  1.70M|      cit.Next();
   81|  1.70M|    }
   82|       |
   83|       |    // Convert to int32_t, make sure entries are not too large.
   84|   290k|    constexpr int64_t upper_bound = 1 << 29;
   85|   290k|    if (this->normal_prediction_mode_ == ONE_TRIANGLE) {
  ------------------
  |  Branch (85:9): [True: 66.4k, False: 223k]
  ------------------
   86|  66.4k|      const int32_t abs_sum = static_cast<int32_t>(normal.AbsSum());
   87|  66.4k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (87:11): [True: 324, False: 66.1k]
  ------------------
   88|    324|        const int64_t quotient = abs_sum / upper_bound;
   89|    324|        normal = normal / quotient;
   90|    324|      }
   91|   223k|    } else {
   92|   223k|      const int64_t abs_sum = normal.AbsSum();
   93|   223k|      if (abs_sum > upper_bound) {
  ------------------
  |  Branch (93:11): [True: 2.95k, False: 220k]
  ------------------
   94|  2.95k|        const int64_t quotient = abs_sum / upper_bound;
   95|  2.95k|        normal = normal / quotient;
   96|  2.95k|      }
   97|   223k|    }
   98|   290k|    DRACO_DCHECK_LE(normal.AbsSum(), upper_bound);
   99|   290k|    prediction[0] = static_cast<int32_t>(normal[0]);
  100|   290k|    prediction[1] = static_cast<int32_t>(normal[1]);
  101|   290k|    prediction[2] = static_cast<int32_t>(normal[2]);
  102|   290k|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    234|      : Base(md) {
   35|    234|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    234|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    194|      : Base(md) {
   35|    194|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    194|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   34|    228|      : Base(md) {
   35|    228|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    228|  };
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorAreaIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   34|    164|      : Base(md) {
   35|    164|    this->SetNormalPredictionMode(TRIANGLE_AREA);
   36|    164|  };

_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.83M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.83M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.83M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.83M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.83M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.83M|    return GetPositionForDataId(data_id);
   77|  2.83M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  2.83M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.83M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.83M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.83M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.83M|    VectorD<int64_t, 3> pos;
   68|  2.83M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.83M|    return pos;
   70|  2.83M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    230|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    230|    pos_attribute_ = &position_attribute;
   43|    230|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    208|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    208|    entry_to_point_id_map_ = map;
   46|    208|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.59M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.59M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.59M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.59M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.59M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.59M|    return GetPositionForDataId(data_id);
   77|  3.59M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  3.59M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.59M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.59M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.59M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.59M|    VectorD<int64_t, 3> pos;
   68|  3.59M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.59M|    return pos;
   70|  3.59M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    190|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    190|    pos_attribute_ = &position_attribute;
   43|    190|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    175|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    175|    entry_to_point_id_map_ = map;
   46|    175|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.24M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.24M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.24M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.24M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.24M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.24M|    return GetPositionForDataId(data_id);
   77|  2.24M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  2.24M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.24M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.24M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.24M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.24M|    VectorD<int64_t, 3> pos;
   68|  2.24M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.24M|    return pos;
   70|  2.24M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    225|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    225|    pos_attribute_ = &position_attribute;
   43|    225|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    203|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    203|    entry_to_point_id_map_ = map;
   46|    203|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.44M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.44M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.44M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.44M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.44M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.44M|    return GetPositionForDataId(data_id);
   77|  2.44M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  2.44M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.44M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.44M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.44M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.44M|    VectorD<int64_t, 3> pos;
   68|  2.44M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.44M|    return pos;
   70|  2.44M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    162|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    162|    pos_attribute_ = &position_attribute;
   43|    162|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    148|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    148|    entry_to_point_id_map_ = map;
   46|    148|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    480|      : pos_attribute_(nullptr),
   36|    480|        entry_to_point_id_map_(nullptr),
   37|    480|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    480|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  2.72M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  2.72M|    DRACO_DCHECK(this->IsInitialized());
   73|  2.72M|    const auto corner_table = mesh_data_.corner_table();
   74|  2.72M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  2.72M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  2.72M|    return GetPositionForDataId(data_id);
   77|  2.72M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20GetPositionForDataIdEi:
   63|  2.72M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  2.72M|    DRACO_DCHECK(this->IsInitialized());
   65|  2.72M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  2.72M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  2.72M|    VectorD<int64_t, 3> pos;
   68|  2.72M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  2.72M|    return pos;
   70|  2.72M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    475|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    475|    pos_attribute_ = &position_attribute;
   43|    475|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    410|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    410|    entry_to_point_id_map_ = map;
   46|    410|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    496|      : pos_attribute_(nullptr),
   36|    496|        entry_to_point_id_map_(nullptr),
   37|    496|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    496|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.69M|  VectorD<int64_t, 3> GetPositionForCorner(CornerIndex ci) const {
   72|  3.69M|    DRACO_DCHECK(this->IsInitialized());
   73|  3.69M|    const auto corner_table = mesh_data_.corner_table();
   74|  3.69M|    const auto vert_id = corner_table->Vertex(ci).value();
   75|  3.69M|    const auto data_id = mesh_data_.vertex_to_data_map()->at(vert_id);
   76|  3.69M|    return GetPositionForDataId(data_id);
   77|  3.69M|  }
_ZNK5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20GetPositionForDataIdEi:
   63|  3.69M|  VectorD<int64_t, 3> GetPositionForDataId(int data_id) const {
   64|  3.69M|    DRACO_DCHECK(this->IsInitialized());
   65|  3.69M|    const auto point_id = entry_to_point_id_map_[data_id];
   66|  3.69M|    const auto pos_val_id = pos_attribute_->mapped_index(point_id);
   67|  3.69M|    VectorD<int64_t, 3> pos;
   68|  3.69M|    pos_attribute_->ConvertValue(pos_val_id, &pos[0]);
   69|  3.69M|    return pos;
   70|  3.69M|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    491|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    491|    pos_attribute_ = &position_attribute;
   43|    491|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    402|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    402|    entry_to_point_id_map_ = map;
   46|    402|  }
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    234|      : pos_attribute_(nullptr),
   36|    234|        entry_to_point_id_map_(nullptr),
   37|    234|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    234|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    194|      : pos_attribute_(nullptr),
   36|    194|        entry_to_point_id_map_(nullptr),
   37|    194|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    194|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS5_:
   35|    228|      : pos_attribute_(nullptr),
   36|    228|        entry_to_point_id_map_(nullptr),
   37|    228|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEED2Ev:
   38|    228|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS5_:
   35|    164|      : pos_attribute_(nullptr),
   36|    164|        entry_to_point_id_map_(nullptr),
   37|    164|        mesh_data_(md) {}
_ZN5draco48MeshPredictionSchemeGeometricNormalPredictorBaseIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEED2Ev:
   38|    164|  virtual ~MeshPredictionSchemeGeometricNormalPredictorBase() {}

_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    343|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    343|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    317|                          const PointIndex * /* entry_to_point_id_map */) {
   64|    317|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    317|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    317|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    317|      new DataTypeT[num_components]());
   70|       |
   71|    317|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    317|  const CornerTable *const table = this->mesh_data().corner_table();
   74|    317|  const std::vector<int32_t> *const vertex_to_data_map =
   75|    317|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    317|  const int corner_map_size =
   78|    317|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|  1.34M|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (79:19): [True: 1.34M, False: 317]
  ------------------
   80|  1.34M|    const CornerIndex start_corner_id =
   81|  1.34M|        this->mesh_data().data_to_corner_map()->at(p);
   82|       |
   83|  1.34M|    CornerIndex corner_id(start_corner_id);
   84|  1.34M|    int num_parallelograms = 0;
   85|  37.9M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (85:21): [True: 36.5M, False: 1.34M]
  ------------------
   86|  36.5M|      pred_vals[i] = static_cast<DataTypeT>(0);
   87|  36.5M|    }
   88|  3.53M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (88:12): [True: 2.18M, False: 1.34M]
  ------------------
   89|  2.18M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (89:11): [True: 333k, False: 1.85M]
  ------------------
   90|  2.18M|              p, corner_id, table, *vertex_to_data_map, out_data,
   91|  2.18M|              num_components, parallelogram_pred_vals.get())) {
   92|  16.0M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (92:25): [True: 15.7M, False: 333k]
  ------------------
   93|  15.7M|          pred_vals[c] =
   94|  15.7M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   95|  15.7M|        }
   96|   333k|        ++num_parallelograms;
   97|   333k|      }
   98|       |
   99|       |      // Proceed to the next corner attached to the vertex.
  100|  2.18M|      corner_id = table->SwingRight(corner_id);
  101|  2.18M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (101:11): [True: 165k, False: 2.02M]
  ------------------
  102|   165k|        corner_id = kInvalidCornerIndex;
  103|   165k|      }
  104|  2.18M|    }
  105|       |
  106|  1.34M|    const int dst_offset = p * num_components;
  107|  1.34M|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (107:9): [True: 1.17M, False: 176k]
  ------------------
  108|       |      // No parallelogram was valid.
  109|       |      // We use the last decoded point as a reference.
  110|  1.17M|      const int src_offset = (p - 1) * num_components;
  111|  1.17M|      this->transform().ComputeOriginalValue(
  112|  1.17M|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  113|  1.17M|    } else {
  114|       |      // Compute the correction from the predicted value.
  115|  8.27M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (115:23): [True: 8.10M, False: 176k]
  ------------------
  116|  8.10M|        pred_vals[c] /= num_parallelograms;
  117|  8.10M|      }
  118|   176k|      this->transform().ComputeOriginalValue(
  119|   176k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  120|   176k|    }
  121|  1.34M|  }
  122|    317|  return true;
  123|    317|}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2EPKNS_14PointAttributeERKS2_RKS5_:
   43|    557|      : MeshPredictionSchemeDecoder<DataTypeT, TransformT, MeshDataT>(
   44|    557|            attribute, transform, mesh_data) {}
_ZN5draco45MeshPredictionSchemeMultiParallelogramDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   63|    526|                          const PointIndex * /* entry_to_point_id_map */) {
   64|    526|  this->transform().Init(num_components);
   65|       |
   66|       |  // For storage of prediction values (already initialized to zero).
   67|    526|  std::unique_ptr<DataTypeT[]> pred_vals(new DataTypeT[num_components]());
   68|    526|  std::unique_ptr<DataTypeT[]> parallelogram_pred_vals(
   69|    526|      new DataTypeT[num_components]());
   70|       |
   71|    526|  this->transform().ComputeOriginalValue(pred_vals.get(), in_corr, out_data);
   72|       |
   73|    526|  const CornerTable *const table = this->mesh_data().corner_table();
   74|    526|  const std::vector<int32_t> *const vertex_to_data_map =
   75|    526|      this->mesh_data().vertex_to_data_map();
   76|       |
   77|    526|  const int corner_map_size =
   78|    526|      static_cast<int>(this->mesh_data().data_to_corner_map()->size());
   79|   774k|  for (int p = 1; p < corner_map_size; ++p) {
  ------------------
  |  Branch (79:19): [True: 774k, False: 526]
  ------------------
   80|   774k|    const CornerIndex start_corner_id =
   81|   774k|        this->mesh_data().data_to_corner_map()->at(p);
   82|       |
   83|   774k|    CornerIndex corner_id(start_corner_id);
   84|   774k|    int num_parallelograms = 0;
   85|  25.1M|    for (int i = 0; i < num_components; ++i) {
  ------------------
  |  Branch (85:21): [True: 24.3M, False: 774k]
  ------------------
   86|  24.3M|      pred_vals[i] = static_cast<DataTypeT>(0);
   87|  24.3M|    }
   88|  5.32M|    while (corner_id != kInvalidCornerIndex) {
  ------------------
  |  Branch (88:12): [True: 4.55M, False: 774k]
  ------------------
   89|  4.55M|      if (ComputeParallelogramPrediction(
  ------------------
  |  Branch (89:11): [True: 1.50M, False: 3.05M]
  ------------------
   90|  4.55M|              p, corner_id, table, *vertex_to_data_map, out_data,
   91|  4.55M|              num_components, parallelogram_pred_vals.get())) {
   92|  48.5M|        for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (92:25): [True: 47.0M, False: 1.50M]
  ------------------
   93|  47.0M|          pred_vals[c] =
   94|  47.0M|              AddAsUnsigned(pred_vals[c], parallelogram_pred_vals[c]);
   95|  47.0M|        }
   96|  1.50M|        ++num_parallelograms;
   97|  1.50M|      }
   98|       |
   99|       |      // Proceed to the next corner attached to the vertex.
  100|  4.55M|      corner_id = table->SwingRight(corner_id);
  101|  4.55M|      if (corner_id == start_corner_id) {
  ------------------
  |  Branch (101:11): [True: 752k, False: 3.79M]
  ------------------
  102|   752k|        corner_id = kInvalidCornerIndex;
  103|   752k|      }
  104|  4.55M|    }
  105|       |
  106|   774k|    const int dst_offset = p * num_components;
  107|   774k|    if (num_parallelograms == 0) {
  ------------------
  |  Branch (107:9): [True: 4.12k, False: 770k]
  ------------------
  108|       |      // No parallelogram was valid.
  109|       |      // We use the last decoded point as a reference.
  110|  4.12k|      const int src_offset = (p - 1) * num_components;
  111|  4.12k|      this->transform().ComputeOriginalValue(
  112|  4.12k|          out_data + src_offset, in_corr + dst_offset, out_data + dst_offset);
  113|   770k|    } else {
  114|       |      // Compute the correction from the predicted value.
  115|  24.9M|      for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (115:23): [True: 24.2M, False: 770k]
  ------------------
  116|  24.2M|        pred_vals[c] /= num_parallelograms;
  117|  24.2M|      }
  118|   770k|      this->transform().ComputeOriginalValue(
  119|   770k|          pred_vals.get(), in_corr + dst_offset, out_data + dst_offset);
  120|   770k|    }
  121|   774k|  }
  122|    526|  return true;
  123|    526|}

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

_ZN5draco30ComputeParallelogramPredictionINS_24MeshAttributeCornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  4.63M|    int num_components, DataTypeT *out_prediction) {
   49|  4.63M|  const CornerIndex oci = table->Opposite(ci);
   50|  4.63M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 3.09M, False: 1.54M]
  ------------------
   51|  3.09M|    return false;
   52|  3.09M|  }
   53|  1.54M|  int vert_opp, vert_next, vert_prev;
   54|  1.54M|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  1.54M|                                        &vert_opp, &vert_next, &vert_prev);
   56|  1.54M|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 896k, False: 651k]
  |  Branch (56:35): [True: 711k, False: 185k]
  ------------------
   57|   711k|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 691k, False: 20.0k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|   691k|    const int v_opp_off = vert_opp * num_components;
   60|   691k|    const int v_next_off = vert_next * num_components;
   61|   691k|    const int v_prev_off = vert_prev * num_components;
   62|  37.3M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 36.6M, False: 691k]
  ------------------
   63|  36.6M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  36.6M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  36.6M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  36.6M|      const int64_t result =
   67|  36.6M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  36.6M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  36.6M|    }
   71|   691k|    return true;
   72|   691k|  }
   73|   857k|  return false;  // Not all data is available for prediction
   74|  1.54M|}
_ZN5draco23GetParallelogramEntriesINS_24MeshAttributeCornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  1.54M|    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.54M|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  1.54M|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  1.54M|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  1.54M|}
_ZN5draco30ComputeParallelogramPredictionINS_11CornerTableEiEEbiNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPKT0_iPSF_:
   48|  5.59M|    int num_components, DataTypeT *out_prediction) {
   49|  5.59M|  const CornerIndex oci = table->Opposite(ci);
   50|  5.59M|  if (oci == kInvalidCornerIndex) {
  ------------------
  |  Branch (50:7): [True: 53.7k, False: 5.54M]
  ------------------
   51|  53.7k|    return false;
   52|  53.7k|  }
   53|  5.54M|  int vert_opp, vert_next, vert_prev;
   54|  5.54M|  GetParallelogramEntries<CornerTableT>(oci, table, vertex_to_data_map,
   55|  5.54M|                                        &vert_opp, &vert_next, &vert_prev);
   56|  5.54M|  if (vert_opp < data_entry_id && vert_next < data_entry_id &&
  ------------------
  |  Branch (56:7): [True: 2.86M, False: 2.67M]
  |  Branch (56:35): [True: 2.25M, False: 616k]
  ------------------
   57|  2.25M|      vert_prev < data_entry_id) {
  ------------------
  |  Branch (57:7): [True: 1.98M, False: 261k]
  ------------------
   58|       |    // Apply the parallelogram prediction.
   59|  1.98M|    const int v_opp_off = vert_opp * num_components;
   60|  1.98M|    const int v_next_off = vert_next * num_components;
   61|  1.98M|    const int v_prev_off = vert_prev * num_components;
   62|  80.2M|    for (int c = 0; c < num_components; ++c) {
  ------------------
  |  Branch (62:21): [True: 78.2M, False: 1.98M]
  ------------------
   63|  78.2M|      const int64_t in_data_next_off = in_data[v_next_off + c];
   64|  78.2M|      const int64_t in_data_prev_off = in_data[v_prev_off + c];
   65|  78.2M|      const int64_t in_data_opp_off = in_data[v_opp_off + c];
   66|  78.2M|      const int64_t result =
   67|  78.2M|          (in_data_next_off + in_data_prev_off) - in_data_opp_off;
   68|       |
   69|  78.2M|      out_prediction[c] = static_cast<DataTypeT>(result);
   70|  78.2M|    }
   71|  1.98M|    return true;
   72|  1.98M|  }
   73|  3.55M|  return false;  // Not all data is available for prediction
   74|  5.54M|}
_ZN5draco23GetParallelogramEntriesINS_11CornerTableEEEvNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKT_RKNSt3__16vectorIiNS8_9allocatorIiEEEEPiSF_SF_:
   31|  5.54M|    int *next_entry, int *prev_entry) {
   32|       |  // One vertex of the input |table| correspond to exactly one attribute value
   33|       |  // entry. The |table| can be either CornerTable for per-vertex attributes,
   34|       |  // or MeshAttributeCornerTable for attributes with interior seams.
   35|  5.54M|  *opp_entry = vertex_to_data_map[table->Vertex(ci).value()];
   36|  5.54M|  *next_entry = vertex_to_data_map[table->Vertex(table->Next(ci)).value()];
   37|  5.54M|  *prev_entry = vertex_to_data_map[table->Vertex(table->Previous(ci)).value()];
   38|  5.54M|}

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

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

_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEC2ERKS3_:
   38|    291|      : pos_attribute_(nullptr),
   39|    291|        entry_to_point_id_map_(nullptr),
   40|    291|        mesh_data_(md) {}
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    287|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    287|    pos_attribute_ = &position_attribute;
   43|    287|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE18ResizeOrientationsEi:
   73|    275|  void ResizeOrientations(int num_orientations) {
   74|    275|    orientations_.resize(num_orientations);
   75|    275|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE15set_orientationEib:
   71|  3.54G|  void set_orientation(int i, bool v) { orientations_[i] = v; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    223|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    223|    entry_to_point_id_map_ = map;
   46|    223|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21ComputePredictedValueILb0EEEbNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
   93|   493k|                                                 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|   493k|  const CornerIndex next_corner_id = mesh_data_.corner_table()->Next(corner_id);
   98|   493k|  const CornerIndex prev_corner_id =
   99|   493k|      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|   493k|  int next_data_id, prev_data_id;
  103|       |
  104|   493k|  int next_vert_id, prev_vert_id;
  105|   493k|  next_vert_id = mesh_data_.corner_table()->Vertex(next_corner_id).value();
  106|   493k|  prev_vert_id = mesh_data_.corner_table()->Vertex(prev_corner_id).value();
  107|       |
  108|   493k|  next_data_id = mesh_data_.vertex_to_data_map()->at(next_vert_id);
  109|   493k|  prev_data_id = mesh_data_.vertex_to_data_map()->at(prev_vert_id);
  110|       |
  111|   493k|  typedef VectorD<int64_t, 2> Vec2;
  112|   493k|  typedef VectorD<int64_t, 3> Vec3;
  113|   493k|  typedef VectorD<uint64_t, 2> Vec2u;
  114|       |
  115|   493k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (115:7): [True: 340k, False: 152k]
  |  Branch (115:33): [True: 188k, False: 152k]
  ------------------
  116|       |    // Both other corners have available UV coordinates for prediction.
  117|   188k|    const Vec2 n_uv = GetTexCoordForEntryId(next_data_id, data);
  118|   188k|    const Vec2 p_uv = GetTexCoordForEntryId(prev_data_id, data);
  119|   188k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (119:9): [True: 166k, False: 21.2k]
  ------------------
  120|       |      // We cannot do a reliable prediction on degenerated UV triangles.
  121|   166k|      predicted_value_[0] = p_uv[0];
  122|   166k|      predicted_value_[1] = p_uv[1];
  123|   166k|      return true;
  124|   166k|    }
  125|       |
  126|       |    // Get positions at all corners.
  127|  21.2k|    const Vec3 tip_pos = GetPositionForEntryId(data_id);
  128|  21.2k|    const Vec3 next_pos = GetPositionForEntryId(next_data_id);
  129|  21.2k|    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|  21.2k|    const Vec3 pn = prev_pos - next_pos;
  146|  21.2k|    const uint64_t pn_norm2_squared = pn.SquaredNorm();
  147|  21.2k|    if (pn_norm2_squared != 0) {
  ------------------
  |  Branch (147:9): [True: 926, False: 20.3k]
  ------------------
  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|    926|      const Vec3 cn = tip_pos - next_pos;
  153|    926|      const int64_t cn_dot_pn = pn.Dot(cn);
  154|       |
  155|    926|      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|    926|      const int64_t n_uv_absmax_element =
  164|    926|          std::max(std::abs(n_uv[0]), std::abs(n_uv[1]));
  165|    926|      if (n_uv_absmax_element >
  ------------------
  |  Branch (165:11): [True: 45, False: 881]
  ------------------
  166|    926|          std::numeric_limits<int64_t>::max() / pn_norm2_squared) {
  167|       |        // Return false if the below multiplication would overflow.
  168|     45|        return false;
  169|     45|      }
  170|    881|      const int64_t pn_uv_absmax_element =
  171|    881|          std::max(std::abs(pn_uv[0]), std::abs(pn_uv[1]));
  172|    881|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (172:11): [True: 37, False: 844]
  ------------------
  173|    881|          std::numeric_limits<int64_t>::max() / pn_uv_absmax_element) {
  174|       |        // Return false if squared length calculation would overflow.
  175|     37|        return false;
  176|     37|      }
  177|    844|      const Vec2 x_uv = n_uv * pn_norm2_squared + (cn_dot_pn * pn_uv);
  178|    844|      const int64_t pn_absmax_element =
  179|    844|          std::max(std::max(std::abs(pn[0]), std::abs(pn[1])), std::abs(pn[2]));
  180|    844|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (180:11): [True: 16, False: 828]
  ------------------
  181|    844|          std::numeric_limits<int64_t>::max() / pn_absmax_element) {
  182|       |        // Return false if squared length calculation would overflow.
  183|     16|        return false;
  184|     16|      }
  185|       |
  186|       |      // Compute squared length of vector CX in position coordinate system:
  187|    828|      const Vec3 x_pos = next_pos + (cn_dot_pn * pn) / pn_norm2_squared;
  188|    828|      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|    828|      Vec2 cx_uv(pn_uv[1], -pn_uv[0]);  // Rotated PN_UV.
  205|       |      // Compute CX.Norm2() * PN.Norm2()
  206|    828|      const uint64_t norm_squared =
  207|    828|          IntSqrt(cx_norm2_squared * pn_norm2_squared);
  208|       |      // Final cx_uv in the scaled coordinate space.
  209|    828|      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|    828|      Vec2 predicted_uv;
  214|    828|      if (is_encoder_t) {
  ------------------
  |  Branch (214:11): [Folded, False: 828]
  ------------------
  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|    828|      } else {
  231|       |        // When decoding the data, we already know which orientation to use.
  232|    828|        if (orientations_.empty()) {
  ------------------
  |  Branch (232:13): [True: 3, False: 825]
  ------------------
  233|      3|          return false;
  234|      3|        }
  235|    825|        const bool orientation = orientations_.back();
  236|    825|        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|    825|        if (orientation) {
  ------------------
  |  Branch (239:13): [True: 430, False: 395]
  ------------------
  240|    430|          predicted_uv = Vec2(Vec2u(x_uv) + Vec2u(cx_uv)) / pn_norm2_squared;
  241|    430|        } else {
  242|    395|          predicted_uv = Vec2(Vec2u(x_uv) - Vec2u(cx_uv)) / pn_norm2_squared;
  243|    395|        }
  244|    825|      }
  245|    825|      predicted_value_[0] = static_cast<int>(predicted_uv[0]);
  246|    825|      predicted_value_[1] = static_cast<int>(predicted_uv[1]);
  247|    825|      return true;
  248|    828|    }
  249|  21.2k|  }
  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|   325k|  int data_offset = 0;
  254|   325k|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (254:7): [True: 172k, False: 152k]
  ------------------
  255|       |    // Use the value on the previous corner as the prediction.
  256|   172k|    data_offset = prev_data_id * kNumComponents;
  257|   172k|  }
  258|   325k|  if (next_data_id < data_id) {
  ------------------
  |  Branch (258:7): [True: 20.3k, False: 305k]
  ------------------
  259|       |    // Use the value on the next corner as the prediction.
  260|  20.3k|    data_offset = next_data_id * kNumComponents;
  261|   305k|  } else {
  262|       |    // None of the other corners have a valid value. Use the last encoded value
  263|       |    // as the prediction if possible.
  264|   305k|    if (data_id > 0) {
  ------------------
  |  Branch (264:9): [True: 304k, False: 223]
  ------------------
  265|   304k|      data_offset = (data_id - 1) * kNumComponents;
  266|   304k|    } else {
  267|       |      // We are encoding the first value. Predict 0.
  268|    669|      for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (268:23): [True: 446, False: 223]
  ------------------
  269|    446|        predicted_value_[i] = 0;
  270|    446|      }
  271|    223|      return true;
  272|    223|    }
  273|   305k|  }
  274|   975k|  for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (274:19): [True: 650k, False: 325k]
  ------------------
  275|   650k|    predicted_value_[i] = data[data_offset + i];
  276|   650k|  }
  277|   325k|  return true;
  278|   325k|}
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetTexCoordForEntryIdEiPKi:
   58|   376k|                                            const DataTypeT *data) const {
   59|   376k|    const int data_offset = entry_id * kNumComponents;
   60|   376k|    return VectorD<int64_t, 2>(data[data_offset], data[data_offset + 1]);
   61|   376k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE21GetPositionForEntryIdEi:
   49|  63.7k|  VectorD<int64_t, 3> GetPositionForEntryId(int entry_id) const {
   50|  63.7k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   51|  63.7k|    VectorD<int64_t, 3> pos;
   52|  63.7k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   53|  63.7k|                                 &pos[0]);
   54|  63.7k|    return pos;
   55|  63.7k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEE15predicted_valueEv:
   69|   493k|  const DataTypeT *predicted_value() const { return predicted_value_; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEEC2ERKS3_:
   38|    277|      : pos_attribute_(nullptr),
   39|    277|        entry_to_point_id_map_(nullptr),
   40|    277|        mesh_data_(md) {}
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetPositionAttributeERKNS_14PointAttributeE:
   41|    276|  void SetPositionAttribute(const PointAttribute &position_attribute) {
   42|    276|    pos_attribute_ = &position_attribute;
   43|    276|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE18ResizeOrientationsEi:
   73|    272|  void ResizeOrientations(int num_orientations) {
   74|    272|    orientations_.resize(num_orientations);
   75|    272|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE15set_orientationEib:
   71|  8.69G|  void set_orientation(int i, bool v) { orientations_[i] = v; }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE20SetEntryToPointIdMapEPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   44|    217|  void SetEntryToPointIdMap(const PointIndex *map) {
   45|    217|    entry_to_point_id_map_ = map;
   46|    217|  }
_ZN5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21ComputePredictedValueILb0EEEbNS_9IndexTypeIjNS_21CornerIndex_tag_type_EEEPKii:
   93|   221k|                                                 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|   221k|  const CornerIndex next_corner_id = mesh_data_.corner_table()->Next(corner_id);
   98|   221k|  const CornerIndex prev_corner_id =
   99|   221k|      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|   221k|  int next_data_id, prev_data_id;
  103|       |
  104|   221k|  int next_vert_id, prev_vert_id;
  105|   221k|  next_vert_id = mesh_data_.corner_table()->Vertex(next_corner_id).value();
  106|   221k|  prev_vert_id = mesh_data_.corner_table()->Vertex(prev_corner_id).value();
  107|       |
  108|   221k|  next_data_id = mesh_data_.vertex_to_data_map()->at(next_vert_id);
  109|   221k|  prev_data_id = mesh_data_.vertex_to_data_map()->at(prev_vert_id);
  110|       |
  111|   221k|  typedef VectorD<int64_t, 2> Vec2;
  112|   221k|  typedef VectorD<int64_t, 3> Vec3;
  113|   221k|  typedef VectorD<uint64_t, 2> Vec2u;
  114|       |
  115|   221k|  if (prev_data_id < data_id && next_data_id < data_id) {
  ------------------
  |  Branch (115:7): [True: 220k, False: 304]
  |  Branch (115:33): [True: 220k, False: 310]
  ------------------
  116|       |    // Both other corners have available UV coordinates for prediction.
  117|   220k|    const Vec2 n_uv = GetTexCoordForEntryId(next_data_id, data);
  118|   220k|    const Vec2 p_uv = GetTexCoordForEntryId(prev_data_id, data);
  119|   220k|    if (p_uv == n_uv) {
  ------------------
  |  Branch (119:9): [True: 206k, False: 13.4k]
  ------------------
  120|       |      // We cannot do a reliable prediction on degenerated UV triangles.
  121|   206k|      predicted_value_[0] = p_uv[0];
  122|   206k|      predicted_value_[1] = p_uv[1];
  123|   206k|      return true;
  124|   206k|    }
  125|       |
  126|       |    // Get positions at all corners.
  127|  13.4k|    const Vec3 tip_pos = GetPositionForEntryId(data_id);
  128|  13.4k|    const Vec3 next_pos = GetPositionForEntryId(next_data_id);
  129|  13.4k|    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|  13.4k|    const Vec3 pn = prev_pos - next_pos;
  146|  13.4k|    const uint64_t pn_norm2_squared = pn.SquaredNorm();
  147|  13.4k|    if (pn_norm2_squared != 0) {
  ------------------
  |  Branch (147:9): [True: 1.88k, False: 11.5k]
  ------------------
  148|       |      // Compute the projection of C onto PN by computing dot product of CN with
  149|       |      // PN and normalizing it by length of PN. This gives us a factor |s| where
  150|       |      // |s = PN.Dot(CN) / PN.SquaredNorm2()|. This factor can be used to
  151|       |      // compute X in UV space |X_UV| as |X_UV = N_UV + s * PN_UV|.
  152|  1.88k|      const Vec3 cn = tip_pos - next_pos;
  153|  1.88k|      const int64_t cn_dot_pn = pn.Dot(cn);
  154|       |
  155|  1.88k|      const Vec2 pn_uv = p_uv - n_uv;
  156|       |      // Because we perform all computations with integers, we don't explicitly
  157|       |      // compute the normalized factor |s|, but rather we perform all operations
  158|       |      // over UV vectors in a non-normalized coordinate system scaled with a
  159|       |      // scaling factor |pn_norm2_squared|:
  160|       |      //
  161|       |      //      x_uv = X_UV * PN.Norm2Squared()
  162|       |      //
  163|  1.88k|      const int64_t n_uv_absmax_element =
  164|  1.88k|          std::max(std::abs(n_uv[0]), std::abs(n_uv[1]));
  165|  1.88k|      if (n_uv_absmax_element >
  ------------------
  |  Branch (165:11): [True: 28, False: 1.85k]
  ------------------
  166|  1.88k|          std::numeric_limits<int64_t>::max() / pn_norm2_squared) {
  167|       |        // Return false if the below multiplication would overflow.
  168|     28|        return false;
  169|     28|      }
  170|  1.85k|      const int64_t pn_uv_absmax_element =
  171|  1.85k|          std::max(std::abs(pn_uv[0]), std::abs(pn_uv[1]));
  172|  1.85k|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (172:11): [True: 27, False: 1.82k]
  ------------------
  173|  1.85k|          std::numeric_limits<int64_t>::max() / pn_uv_absmax_element) {
  174|       |        // Return false if squared length calculation would overflow.
  175|     27|        return false;
  176|     27|      }
  177|  1.82k|      const Vec2 x_uv = n_uv * pn_norm2_squared + (cn_dot_pn * pn_uv);
  178|  1.82k|      const int64_t pn_absmax_element =
  179|  1.82k|          std::max(std::max(std::abs(pn[0]), std::abs(pn[1])), std::abs(pn[2]));
  180|  1.82k|      if (std::abs(cn_dot_pn) >
  ------------------
  |  Branch (180:11): [True: 10, False: 1.81k]
  ------------------
  181|  1.82k|          std::numeric_limits<int64_t>::max() / pn_absmax_element) {
  182|       |        // Return false if squared length calculation would overflow.
  183|     10|        return false;
  184|     10|      }
  185|       |
  186|       |      // Compute squared length of vector CX in position coordinate system:
  187|  1.81k|      const Vec3 x_pos = next_pos + (cn_dot_pn * pn) / pn_norm2_squared;
  188|  1.81k|      const uint64_t cx_norm2_squared = (tip_pos - x_pos).SquaredNorm();
  189|       |
  190|       |      // Compute vector CX_UV in the uv space by rotating vector PN_UV by 90
  191|       |      // degrees and scaling it with factor CX.Norm2() / PN.Norm2():
  192|       |      //
  193|       |      //     CX_UV = (CX.Norm2() / PN.Norm2()) * Rot(PN_UV)
  194|       |      //
  195|       |      // To preserve precision, we perform all operations in scaled space as
  196|       |      // explained above, so we want the final vector to be:
  197|       |      //
  198|       |      //     cx_uv = CX_UV * PN.Norm2Squared()
  199|       |      //
  200|       |      // We can then rewrite the formula as:
  201|       |      //
  202|       |      //     cx_uv = CX.Norm2() * PN.Norm2() * Rot(PN_UV)
  203|       |      //
  204|  1.81k|      Vec2 cx_uv(pn_uv[1], -pn_uv[0]);  // Rotated PN_UV.
  205|       |      // Compute CX.Norm2() * PN.Norm2()
  206|  1.81k|      const uint64_t norm_squared =
  207|  1.81k|          IntSqrt(cx_norm2_squared * pn_norm2_squared);
  208|       |      // Final cx_uv in the scaled coordinate space.
  209|  1.81k|      cx_uv = cx_uv * norm_squared;
  210|       |
  211|       |      // Predicted uv coordinate is then computed by either adding or
  212|       |      // subtracting CX_UV to/from X_UV.
  213|  1.81k|      Vec2 predicted_uv;
  214|  1.81k|      if (is_encoder_t) {
  ------------------
  |  Branch (214:11): [Folded, False: 1.81k]
  ------------------
  215|       |        // When encoding, compute both possible vectors and determine which one
  216|       |        // results in a better prediction.
  217|       |        // Both vectors need to be transformed back from the scaled space to
  218|       |        // the real UV coordinate space.
  219|      0|        const Vec2 predicted_uv_0((x_uv + cx_uv) / pn_norm2_squared);
  220|      0|        const Vec2 predicted_uv_1((x_uv - cx_uv) / pn_norm2_squared);
  221|      0|        const Vec2 c_uv = GetTexCoordForEntryId(data_id, data);
  222|      0|        if ((c_uv - predicted_uv_0).SquaredNorm() <
  ------------------
  |  Branch (222:13): [True: 0, False: 0]
  ------------------
  223|      0|            (c_uv - predicted_uv_1).SquaredNorm()) {
  224|      0|          predicted_uv = predicted_uv_0;
  225|      0|          orientations_.push_back(true);
  226|      0|        } else {
  227|      0|          predicted_uv = predicted_uv_1;
  228|      0|          orientations_.push_back(false);
  229|      0|        }
  230|  1.81k|      } else {
  231|       |        // When decoding the data, we already know which orientation to use.
  232|  1.81k|        if (orientations_.empty()) {
  ------------------
  |  Branch (232:13): [True: 5, False: 1.81k]
  ------------------
  233|      5|          return false;
  234|      5|        }
  235|  1.81k|        const bool orientation = orientations_.back();
  236|  1.81k|        orientations_.pop_back();
  237|       |        // Perform operations in unsigned type to avoid signed integer overflow.
  238|       |        // Note that the result will be the same (for non-overflowing values).
  239|  1.81k|        if (orientation) {
  ------------------
  |  Branch (239:13): [True: 507, False: 1.30k]
  ------------------
  240|    507|          predicted_uv = Vec2(Vec2u(x_uv) + Vec2u(cx_uv)) / pn_norm2_squared;
  241|  1.30k|        } else {
  242|  1.30k|          predicted_uv = Vec2(Vec2u(x_uv) - Vec2u(cx_uv)) / pn_norm2_squared;
  243|  1.30k|        }
  244|  1.81k|      }
  245|  1.81k|      predicted_value_[0] = static_cast<int>(predicted_uv[0]);
  246|  1.81k|      predicted_value_[1] = static_cast<int>(predicted_uv[1]);
  247|  1.81k|      return true;
  248|  1.81k|    }
  249|  13.4k|  }
  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|  12.1k|  int data_offset = 0;
  254|  12.1k|  if (prev_data_id < data_id) {
  ------------------
  |  Branch (254:7): [True: 11.8k, False: 304]
  ------------------
  255|       |    // Use the value on the previous corner as the prediction.
  256|  11.8k|    data_offset = prev_data_id * kNumComponents;
  257|  11.8k|  }
  258|  12.1k|  if (next_data_id < data_id) {
  ------------------
  |  Branch (258:7): [True: 11.5k, False: 600]
  ------------------
  259|       |    // Use the value on the next corner as the prediction.
  260|  11.5k|    data_offset = next_data_id * kNumComponents;
  261|  11.5k|  } else {
  262|       |    // None of the other corners have a valid value. Use the last encoded value
  263|       |    // as the prediction if possible.
  264|    600|    if (data_id > 0) {
  ------------------
  |  Branch (264:9): [True: 383, False: 217]
  ------------------
  265|    383|      data_offset = (data_id - 1) * kNumComponents;
  266|    383|    } else {
  267|       |      // We are encoding the first value. Predict 0.
  268|    651|      for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (268:23): [True: 434, False: 217]
  ------------------
  269|    434|        predicted_value_[i] = 0;
  270|    434|      }
  271|    217|      return true;
  272|    217|    }
  273|    600|  }
  274|  35.8k|  for (int i = 0; i < kNumComponents; ++i) {
  ------------------
  |  Branch (274:19): [True: 23.9k, False: 11.9k]
  ------------------
  275|  23.9k|    predicted_value_[i] = data[data_offset + i];
  276|  23.9k|  }
  277|  11.9k|  return true;
  278|  12.1k|}
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetTexCoordForEntryIdEiPKi:
   58|   440k|                                            const DataTypeT *data) const {
   59|   440k|    const int data_offset = entry_id * kNumComponents;
   60|   440k|    return VectorD<int64_t, 2>(data[data_offset], data[data_offset + 1]);
   61|   440k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE21GetPositionForEntryIdEi:
   49|  40.3k|  VectorD<int64_t, 3> GetPositionForEntryId(int entry_id) const {
   50|  40.3k|    const PointIndex point_id = entry_to_point_id_map_[entry_id];
   51|  40.3k|    VectorD<int64_t, 3> pos;
   52|  40.3k|    pos_attribute_->ConvertValue(pos_attribute_->mapped_index(point_id),
   53|  40.3k|                                 &pos[0]);
   54|  40.3k|    return pos;
   55|  40.3k|  }
_ZNK5draco46MeshPredictionSchemeTexCoordsPortablePredictorIiNS_24MeshPredictionSchemeDataINS_11CornerTableEEEE15predicted_valueEv:
   69|   220k|  const DataTypeT *predicted_value() const { return predicted_value_; }

_ZNK5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|    212|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    617|  bool AreCorrectionsPositive() override {
   71|    617|    return transform_.AreCorrectionsPositive();
   72|    617|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    199|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|    199|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 36, False: 163]
  ------------------
   50|     36|      return false;
   51|     36|    }
   52|    163|    return true;
   53|    199|  }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE9transformEv:
   81|  1.31M|  inline Transform &transform() { return transform_; }
_ZNK5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22GetNumParentAttributesEv:
   58|    265|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE22AreCorrectionsPositiveEv:
   70|    639|  bool AreCorrectionsPositive() override {
   71|    639|    return transform_.AreCorrectionsPositive();
   72|    639|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|    252|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|    252|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 30, False: 222]
  ------------------
   50|     30|      return false;
   51|     30|    }
   52|    222|    return true;
   53|    252|  }
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE9transformEv:
   81|  1.42M|  inline Transform &transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   46|  5.92k|      : attribute_(attribute), transform_(transform) {}
_ZNK5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22GetNumParentAttributesEv:
   58|  3.95k|  int GetNumParentAttributes() const override { return 0; }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE22AreCorrectionsPositiveEv:
   70|  5.66k|  bool AreCorrectionsPositive() override {
   71|  5.66k|    return transform_.AreCorrectionsPositive();
   72|  5.66k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE20DecodePredictionDataEPNS_13DecoderBufferE:
   48|  4.35k|  bool DecodePredictionData(DecoderBuffer *buffer) override {
   49|  4.35k|    if (!transform_.DecodeTransformData(buffer)) {
  ------------------
  |  Branch (49:9): [True: 284, False: 4.06k]
  ------------------
   50|    284|      return false;
   51|    284|    }
   52|  4.06k|    return true;
   53|  4.35k|  }
_ZN5draco23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE9transformEv:
   81|  8.38M|  inline Transform &transform() { return transform_; }
_ZN5draco23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    640|      : attribute_(attribute), transform_(transform) {}
_ZN5draco23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   46|    657|      : attribute_(attribute), transform_(transform) {}

_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    640|                                 const PointCloudDecoder *decoder) {
  188|    640|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    640|      method, att_id, decoder, TransformT());
  190|    640|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    640|                                 const TransformT &transform) {
  156|    640|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 640]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    640|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|    640|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 640, 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|    640|    const MeshDecoder *const mesh_decoder =
  167|    640|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|    640|    auto ret = CreateMeshPredictionScheme<
  170|    640|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    640|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    640|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    640|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 428, False: 212]
  ------------------
  174|    428|      return ret;
  175|    428|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    640|  }
  178|       |  // Create delta decoder.
  179|    212|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    212|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    640|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    250|      uint16_t bitstream_version) {
  143|    250|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    250|        method, attribute, transform, mesh_data, bitstream_version);
  145|    250|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    250|        uint16_t bitstream_version) {
  127|    250|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 234, False: 16]
  ------------------
  128|    234|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    234|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    234|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    234|                                                  mesh_data));
  132|    234|      }
  133|     16|      return nullptr;
  134|    250|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    199|      uint16_t bitstream_version) {
  143|    199|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    199|        method, attribute, transform, mesh_data, bitstream_version);
  145|    199|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_49PredictionSchemeNormalOctahedronDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE2EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  126|    199|        uint16_t bitstream_version) {
  127|    199|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (127:11): [True: 194, False: 5]
  ------------------
  128|    194|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  129|    194|            new MeshPredictionSchemeGeometricNormalDecoder<
  130|    194|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  131|    194|                                                  mesh_data));
  132|    194|      }
  133|      5|      return nullptr;
  134|    199|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|    657|                                 const PointCloudDecoder *decoder) {
  188|    657|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|    657|      method, att_id, decoder, TransformT());
  190|    657|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|    657|                                 const TransformT &transform) {
  156|    657|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 657]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|    657|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|    657|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 657, 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|    657|    const MeshDecoder *const mesh_decoder =
  167|    657|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|    657|    auto ret = CreateMeshPredictionScheme<
  170|    657|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|    657|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|    657|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|    657|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 392, False: 265]
  ------------------
  174|    392|      return ret;
  175|    392|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|    657|  }
  178|       |  // Create delta decoder.
  179|    265|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    265|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|    657|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    229|      uint16_t bitstream_version) {
  143|    229|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    229|        method, attribute, transform, mesh_data, bitstream_version);
  145|    229|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    229|        uint16_t bitstream_version) {
  111|    229|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 228, False: 1]
  ------------------
  112|    228|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    228|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    228|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    228|                                                  mesh_data));
  116|    228|      }
  117|      1|      return nullptr;
  118|    229|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|    166|      uint16_t bitstream_version) {
  143|    166|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|    166|        method, attribute, transform, mesh_data, bitstream_version);
  145|    166|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE3EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
  110|    166|        uint16_t bitstream_version) {
  111|    166|      if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (111:11): [True: 164, False: 2]
  ------------------
  112|    164|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  113|    164|            new MeshPredictionSchemeGeometricNormalDecoder<
  114|    164|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
  115|    164|                                                  mesh_data));
  116|    164|      }
  117|      2|      return nullptr;
  118|    166|    }
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderE:
  187|  5.92k|                                 const PointCloudDecoder *decoder) {
  188|  5.92k|  return CreatePredictionSchemeForDecoder<DataTypeT, TransformT>(
  189|  5.92k|      method, att_id, decoder, TransformT());
  190|  5.92k|}
_ZN5draco32CreatePredictionSchemeForDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIT_T0_EENS3_14default_deleteIS8_EEEENS_22PredictionSchemeMethodEiPKNS_17PointCloudDecoderERKS7_:
  155|  5.92k|                                 const TransformT &transform) {
  156|  5.92k|  if (method == PREDICTION_NONE) {
  ------------------
  |  Branch (156:7): [True: 0, False: 5.92k]
  ------------------
  157|      0|    return nullptr;
  158|      0|  }
  159|  5.92k|  const PointAttribute *const att = decoder->point_cloud()->attribute(att_id);
  160|  5.92k|  if (decoder->GetGeometryType() == TRIANGULAR_MESH) {
  ------------------
  |  Branch (160:7): [True: 5.92k, False: 0]
  ------------------
  161|       |    // Cast the decoder to mesh decoder. This is not necessarily safe if there
  162|       |    // is some other decoder decides to use TRIANGULAR_MESH as the return type,
  163|       |    // but unfortunately there is not nice work around for this without using
  164|       |    // RTTI (double dispatch and similar concepts will not work because of the
  165|       |    // template nature of the prediction schemes).
  166|  5.92k|    const MeshDecoder *const mesh_decoder =
  167|  5.92k|        static_cast<const MeshDecoder *>(decoder);
  168|       |
  169|  5.92k|    auto ret = CreateMeshPredictionScheme<
  170|  5.92k|        MeshDecoder, PredictionSchemeDecoder<DataTypeT, TransformT>,
  171|  5.92k|        MeshPredictionSchemeDecoderFactory<DataTypeT>>(
  172|  5.92k|        mesh_decoder, method, att_id, transform, decoder->bitstream_version());
  173|  5.92k|    if (ret) {
  ------------------
  |  Branch (173:9): [True: 5.39k, False: 526]
  ------------------
  174|  5.39k|      return ret;
  175|  5.39k|    }
  176|       |    // Otherwise try to create another prediction scheme.
  177|  5.92k|  }
  178|       |  // Create delta decoder.
  179|    526|  return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
  180|    526|      new PredictionSchemeDeltaDecoder<DataTypeT, TransformT>(att, transform));
  181|  5.92k|}
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  2.70k|      uint16_t bitstream_version) {
  143|  2.70k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  2.70k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  2.70k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_24MeshAttributeCornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  2.70k|        uint16_t bitstream_version) {
   53|  2.70k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 893, False: 1.80k]
  ------------------
   54|    893|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    893|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    893|                                                         MeshDataT>(
   57|    893|                attribute, transform, mesh_data));
   58|    893|      }
   59|  1.80k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  1.80k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 343, False: 1.46k]
  ------------------
   61|    343|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    343|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    343|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    343|                                                  mesh_data));
   65|    343|      }
   66|  1.46k|#endif
   67|  1.46k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 473, False: 992]
  ------------------
   68|    473|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    473|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    473|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    473|                                                  mesh_data));
   72|    473|      }
   73|    992|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|    992|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 221, False: 771]
  ------------------
   75|    221|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    221|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    221|                                                     MeshDataT>(
   78|    221|                attribute, transform, mesh_data, bitstream_version));
   79|    221|      }
   80|    771|#endif
   81|    771|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 291, False: 480]
  ------------------
   82|    291|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    291|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    291|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    291|                                                  mesh_data));
   86|    291|      }
   87|    480|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    480|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 480, False: 0]
  ------------------
   89|    480|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    480|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    480|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    480|                                                  mesh_data));
   93|    480|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  2.70k|    }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiEclINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEEEENSt3__110unique_ptrINS_23PredictionSchemeDecoderIiT_EENS8_14default_deleteISC_EEEENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKSB_RKT0_t:
  142|  2.69k|      uint16_t bitstream_version) {
  143|  2.69k|    return DispatchFunctor<TransformT, MeshDataT, TransformT::GetType()>()(
  144|  2.69k|        method, attribute, transform, mesh_data, bitstream_version);
  145|  2.69k|  }
_ZN5draco34MeshPredictionSchemeDecoderFactoryIiE15DispatchFunctorINS_37PredictionSchemeWrapDecodingTransformIiiEENS_24MeshPredictionSchemeDataINS_11CornerTableEEELNS_29PredictionSchemeTransformTypeE1EEclENS_22PredictionSchemeMethodEPKNS_14PointAttributeERKS4_RKS7_t:
   52|  2.69k|        uint16_t bitstream_version) {
   53|  2.69k|      if (method == MESH_PREDICTION_PARALLELOGRAM) {
  ------------------
  |  Branch (53:11): [True: 664, False: 2.03k]
  ------------------
   54|    664|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   55|    664|            new MeshPredictionSchemeParallelogramDecoder<DataTypeT, TransformT,
   56|    664|                                                         MeshDataT>(
   57|    664|                attribute, transform, mesh_data));
   58|    664|      }
   59|  2.03k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   60|  2.03k|      else if (method == MESH_PREDICTION_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (60:16): [True: 557, False: 1.47k]
  ------------------
   61|    557|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   62|    557|            new MeshPredictionSchemeMultiParallelogramDecoder<
   63|    557|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   64|    557|                                                  mesh_data));
   65|    557|      }
   66|  1.47k|#endif
   67|  1.47k|      else if (method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM) {
  ------------------
  |  Branch (67:16): [True: 499, False: 978]
  ------------------
   68|    499|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   69|    499|            new MeshPredictionSchemeConstrainedMultiParallelogramDecoder<
   70|    499|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   71|    499|                                                  mesh_data));
   72|    499|      }
   73|    978|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   74|    978|      else if (method == MESH_PREDICTION_TEX_COORDS_DEPRECATED) {
  ------------------
  |  Branch (74:16): [True: 205, False: 773]
  ------------------
   75|    205|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   76|    205|            new MeshPredictionSchemeTexCoordsDecoder<DataTypeT, TransformT,
   77|    205|                                                     MeshDataT>(
   78|    205|                attribute, transform, mesh_data, bitstream_version));
   79|    205|      }
   80|    773|#endif
   81|    773|      else if (method == MESH_PREDICTION_TEX_COORDS_PORTABLE) {
  ------------------
  |  Branch (81:16): [True: 277, False: 496]
  ------------------
   82|    277|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   83|    277|            new MeshPredictionSchemeTexCoordsPortableDecoder<
   84|    277|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   85|    277|                                                  mesh_data));
   86|    277|      }
   87|    496|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
   88|    496|      else if (method == MESH_PREDICTION_GEOMETRIC_NORMAL) {
  ------------------
  |  Branch (88:16): [True: 496, False: 0]
  ------------------
   89|    496|        return std::unique_ptr<PredictionSchemeDecoder<DataTypeT, TransformT>>(
   90|    496|            new MeshPredictionSchemeGeometricNormalDecoder<
   91|    496|                DataTypeT, TransformT, MeshDataT>(attribute, transform,
   92|    496|                                                  mesh_data));
   93|    496|      }
   94|      0|#endif
   95|      0|      return nullptr;
   96|  2.69k|    }

_ZN5draco28PredictionSchemeDeltaDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    163|    const PointIndex *) {
   50|    163|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    163|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    163|  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|   136k|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 135k, False: 163]
  ------------------
   57|   135k|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|   135k|                                           in_corr + i, out_data + i);
   59|   135k|  }
   60|    163|  return true;
   61|    163|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    222|    const PointIndex *) {
   50|    222|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    222|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    222|  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|   505k|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 505k, False: 222]
  ------------------
   57|   505k|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|   505k|                                           in_corr + i, out_data + i);
   59|   505k|  }
   60|    222|  return true;
   61|    222|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    526|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEE21ComputeOriginalValuesEPKiPiiiPKNS_9IndexTypeIjNS_20PointIndex_tag_type_EEE:
   49|    421|    const PointIndex *) {
   50|    421|  this->transform().Init(num_components);
   51|       |  // Decode the original value for the first element.
   52|    421|  std::unique_ptr<DataTypeT[]> zero_vals(new DataTypeT[num_components]());
   53|    421|  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|  1.46M|  for (int i = num_components; i < size; i += num_components) {
  ------------------
  |  Branch (56:32): [True: 1.46M, False: 421]
  ------------------
   57|  1.46M|    this->transform().ComputeOriginalValue(out_data + i - num_components,
   58|  1.46M|                                           in_corr + i, out_data + i);
   59|  1.46M|  }
   60|    421|  return true;
   61|    421|}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    212|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}
_ZN5draco28PredictionSchemeDeltaDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEC2EPKNS_14PointAttributeERKS2_:
   35|    265|      : PredictionSchemeDecoder<DataTypeT, TransformT>(attribute, transform) {}

_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_49PredictionSchemeNormalOctahedronDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    640|    uint16_t bitstream_version) {
   38|    640|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|    640|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 640, False: 0]
  ------------------
   40|    640|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 120, False: 520]
  ------------------
   41|    520|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 4, False: 516]
  ------------------
   42|    516|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 2, False: 514]
  ------------------
   43|    514|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 0, False: 514]
  ------------------
   44|    514|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 457, False: 57]
  ------------------
   45|    589|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 6, False: 51]
  ------------------
   46|    589|    const CornerTable *const ct = source->GetCornerTable();
   47|    589|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|    589|        source->GetAttributeEncodingData(att_id);
   49|    589|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 140, False: 449]
  |  Branch (49:26): [True: 0, False: 449]
  ------------------
   50|       |      // No connectivity data found.
   51|    140|      return nullptr;
   52|    140|    }
   53|       |    // Connectivity data exists.
   54|    449|    const MeshAttributeCornerTable *const att_ct =
   55|    449|        source->GetAttributeCornerTable(att_id);
   56|    449|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 250, False: 199]
  ------------------
   57|    250|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    250|      MeshData md;
   59|    250|      md.Set(source->mesh(), att_ct,
   60|    250|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    250|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    250|      MeshPredictionSchemeFactoryT factory;
   63|    250|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    250|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 234, False: 16]
  ------------------
   65|    234|        return ret;
   66|    234|      }
   67|    250|    } else {
   68|    199|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    199|      MeshData md;
   70|    199|      md.Set(source->mesh(), ct,
   71|    199|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    199|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    199|      MeshPredictionSchemeFactoryT factory;
   74|    199|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    199|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 194, False: 5]
  ------------------
   76|    194|        return ret;
   77|    194|      }
   78|    199|    }
   79|    449|  }
   80|     72|  return nullptr;
   81|    640|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_62PredictionSchemeNormalOctahedronCanonicalizedDecodingTransformIiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|    657|    uint16_t bitstream_version) {
   38|    657|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|    657|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 657, False: 0]
  ------------------
   40|    657|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 20, False: 637]
  ------------------
   41|    637|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 33, False: 604]
  ------------------
   42|    604|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 4, False: 600]
  ------------------
   43|    600|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 15, False: 585]
  ------------------
   44|    585|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 458, False: 127]
  ------------------
   45|    578|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 48, False: 79]
  ------------------
   46|    578|    const CornerTable *const ct = source->GetCornerTable();
   47|    578|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|    578|        source->GetAttributeEncodingData(att_id);
   49|    578|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 183, False: 395]
  |  Branch (49:26): [True: 0, False: 395]
  ------------------
   50|       |      // No connectivity data found.
   51|    183|      return nullptr;
   52|    183|    }
   53|       |    // Connectivity data exists.
   54|    395|    const MeshAttributeCornerTable *const att_ct =
   55|    395|        source->GetAttributeCornerTable(att_id);
   56|    395|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 229, False: 166]
  ------------------
   57|    229|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|    229|      MeshData md;
   59|    229|      md.Set(source->mesh(), att_ct,
   60|    229|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|    229|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|    229|      MeshPredictionSchemeFactoryT factory;
   63|    229|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|    229|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 228, False: 1]
  ------------------
   65|    228|        return ret;
   66|    228|      }
   67|    229|    } else {
   68|    166|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|    166|      MeshData md;
   70|    166|      md.Set(source->mesh(), ct,
   71|    166|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|    166|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|    166|      MeshPredictionSchemeFactoryT factory;
   74|    166|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|    166|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 164, False: 2]
  ------------------
   76|    164|        return ret;
   77|    164|      }
   78|    166|    }
   79|    395|  }
   80|     82|  return nullptr;
   81|    657|}
_ZN5draco26CreateMeshPredictionSchemeINS_11MeshDecoderENS_23PredictionSchemeDecoderIiNS_37PredictionSchemeWrapDecodingTransformIiiEEEENS_34MeshPredictionSchemeDecoderFactoryIiEEEENSt3__110unique_ptrIT0_NS8_14default_deleteISA_EEEEPKT_NS_22PredictionSchemeMethodEiRKNSA_9TransformEt:
   37|  5.92k|    uint16_t bitstream_version) {
   38|  5.92k|  const PointAttribute *const att = source->point_cloud()->attribute(att_id);
   39|  5.92k|  if (source->GetGeometryType() == TRIANGULAR_MESH &&
  ------------------
  |  Branch (39:7): [True: 5.92k, False: 0]
  ------------------
   40|  5.92k|      (method == MESH_PREDICTION_PARALLELOGRAM ||
  ------------------
  |  Branch (40:8): [True: 1.68k, False: 4.24k]
  ------------------
   41|  4.24k|       method == MESH_PREDICTION_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (41:8): [True: 969, False: 3.27k]
  ------------------
   42|  3.27k|       method == MESH_PREDICTION_CONSTRAINED_MULTI_PARALLELOGRAM ||
  ------------------
  |  Branch (42:8): [True: 999, False: 2.27k]
  ------------------
   43|  2.27k|       method == MESH_PREDICTION_TEX_COORDS_PORTABLE ||
  ------------------
  |  Branch (43:8): [True: 573, False: 1.69k]
  ------------------
   44|  1.69k|       method == MESH_PREDICTION_GEOMETRIC_NORMAL ||
  ------------------
  |  Branch (44:8): [True: 989, False: 710]
  ------------------
   45|  5.64k|       method == MESH_PREDICTION_TEX_COORDS_DEPRECATED)) {
  ------------------
  |  Branch (45:8): [True: 426, False: 284]
  ------------------
   46|  5.64k|    const CornerTable *const ct = source->GetCornerTable();
   47|  5.64k|    const MeshAttributeIndicesEncodingData *const encoding_data =
   48|  5.64k|        source->GetAttributeEncodingData(att_id);
   49|  5.64k|    if (ct == nullptr || encoding_data == nullptr) {
  ------------------
  |  Branch (49:9): [True: 242, False: 5.39k]
  |  Branch (49:26): [True: 0, False: 5.39k]
  ------------------
   50|       |      // No connectivity data found.
   51|    242|      return nullptr;
   52|    242|    }
   53|       |    // Connectivity data exists.
   54|  5.39k|    const MeshAttributeCornerTable *const att_ct =
   55|  5.39k|        source->GetAttributeCornerTable(att_id);
   56|  5.39k|    if (att_ct != nullptr) {
  ------------------
  |  Branch (56:9): [True: 2.70k, False: 2.69k]
  ------------------
   57|  2.70k|      typedef MeshPredictionSchemeData<MeshAttributeCornerTable> MeshData;
   58|  2.70k|      MeshData md;
   59|  2.70k|      md.Set(source->mesh(), att_ct,
   60|  2.70k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   61|  2.70k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   62|  2.70k|      MeshPredictionSchemeFactoryT factory;
   63|  2.70k|      auto ret = factory(method, att, transform, md, bitstream_version);
   64|  2.70k|      if (ret) {
  ------------------
  |  Branch (64:11): [True: 2.70k, False: 0]
  ------------------
   65|  2.70k|        return ret;
   66|  2.70k|      }
   67|  2.70k|    } else {
   68|  2.69k|      typedef MeshPredictionSchemeData<CornerTable> MeshData;
   69|  2.69k|      MeshData md;
   70|  2.69k|      md.Set(source->mesh(), ct,
   71|  2.69k|             &encoding_data->encoded_attribute_value_index_to_corner_map,
   72|  2.69k|             &encoding_data->vertex_to_encoded_attribute_value_index_map);
   73|  2.69k|      MeshPredictionSchemeFactoryT factory;
   74|  2.69k|      auto ret = factory(method, att, transform, md, bitstream_version);
   75|  2.69k|      if (ret) {
  ------------------
  |  Branch (75:11): [True: 2.69k, False: 0]
  ------------------
   76|  2.69k|        return ret;
   77|  2.69k|      }
   78|  2.69k|    }
   79|  5.39k|  }
   80|    284|  return nullptr;
   81|  5.92k|}

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

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

_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE14IsInBottomLeftERKNS_7VectorDIiLi2EEE:
   92|  1.41M|  bool IsInBottomLeft(const Point2 &p) const {
   93|  1.41M|    if (p[0] == 0 && p[1] == 0) {
  ------------------
  |  Branch (93:9): [True: 1.05M, False: 359k]
  |  Branch (93:22): [True: 935k, False: 123k]
  ------------------
   94|   935k|      return true;
   95|   935k|    }
   96|   483k|    return (p[0] < 0 && p[1] <= 0);
  ------------------
  |  Branch (96:13): [True: 226k, False: 256k]
  |  Branch (96:25): [True: 143k, False: 83.9k]
  ------------------
   97|  1.41M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE16GetRotationCountENS_7VectorDIiLi2EEE:
   50|  1.41M|  int32_t GetRotationCount(Point2 pred) const {
   51|  1.41M|    const DataType sign_x = pred[0];
   52|  1.41M|    const DataType sign_y = pred[1];
   53|       |
   54|  1.41M|    int32_t rotation_count = 0;
   55|  1.41M|    if (sign_x == 0) {
  ------------------
  |  Branch (55:9): [True: 1.05M, False: 359k]
  ------------------
   56|  1.05M|      if (sign_y == 0) {
  ------------------
  |  Branch (56:11): [True: 935k, False: 123k]
  ------------------
   57|   935k|        rotation_count = 0;
   58|   935k|      } else if (sign_y > 0) {
  ------------------
  |  Branch (58:18): [True: 94.0k, False: 29.7k]
  ------------------
   59|  94.0k|        rotation_count = 3;
   60|  94.0k|      } else {
   61|  29.7k|        rotation_count = 1;
   62|  29.7k|      }
   63|  1.05M|    } else if (sign_x > 0) {
  ------------------
  |  Branch (63:16): [True: 132k, False: 226k]
  ------------------
   64|   132k|      if (sign_y >= 0) {
  ------------------
  |  Branch (64:11): [True: 75.7k, False: 56.6k]
  ------------------
   65|  75.7k|        rotation_count = 2;
   66|  75.7k|      } else {
   67|  56.6k|        rotation_count = 1;
   68|  56.6k|      }
   69|   226k|    } else {
   70|   226k|      if (sign_y <= 0) {
  ------------------
  |  Branch (70:11): [True: 143k, False: 83.9k]
  ------------------
   71|   143k|        rotation_count = 0;
   72|   143k|      } else {
   73|  83.9k|        rotation_count = 3;
   74|  83.9k|      }
   75|   226k|    }
   76|  1.41M|    return rotation_count;
   77|  1.41M|  }
_ZNK5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiE11RotatePointENS_7VectorDIiLi2EEEi:
   79|   680k|  Point2 RotatePoint(Point2 p, int32_t rotation_count) const {
   80|   680k|    switch (rotation_count) {
   81|   264k|      case 1:
  ------------------
  |  Branch (81:7): [True: 264k, False: 415k]
  ------------------
   82|   264k|        return Point2(p[1], -p[0]);
   83|   151k|      case 2:
  ------------------
  |  Branch (83:7): [True: 151k, False: 528k]
  ------------------
   84|   151k|        return Point2(-p[0], -p[1]);
   85|   264k|      case 3:
  ------------------
  |  Branch (85:7): [True: 264k, False: 415k]
  ------------------
   86|   264k|        return Point2(-p[1], p[0]);
   87|      0|      default:
  ------------------
  |  Branch (87:7): [True: 0, False: 680k]
  ------------------
   88|      0|        return p;
   89|   680k|    }
   90|   680k|  }
_ZN5draco58PredictionSchemeNormalOctahedronCanonicalizedTransformBaseIiEC2Ev:
   40|    657|  PredictionSchemeNormalOctahedronCanonicalizedTransformBase() : Base() {}

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

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

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

_ZNK5draco33PredictionSchemeWrapTransformBaseIiE22AreCorrectionsPositiveEv:
   60|  5.66k|  bool AreCorrectionsPositive() const { return false; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE13set_min_valueERKi:
  100|  4.96k|  inline void set_min_value(const DataTypeT &v) { min_value_ = v; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE13set_max_valueERKi:
  102|  4.96k|  inline void set_max_value(const DataTypeT &v) { max_value_ = v; }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE20InitCorrectionBoundsEv:
   83|  4.96k|  bool InitCorrectionBounds() {
   84|  4.96k|    const int64_t dif =
   85|  4.96k|        static_cast<int64_t>(max_value_) - static_cast<int64_t>(min_value_);
   86|  4.96k|    if (dif < 0 || dif >= std::numeric_limits<DataTypeT>::max()) {
  ------------------
  |  Branch (86:9): [True: 0, False: 4.96k]
  |  Branch (86:20): [True: 27, False: 4.93k]
  ------------------
   87|     27|      return false;
   88|     27|    }
   89|  4.93k|    max_dif_ = 1 + static_cast<DataTypeT>(dif);
   90|  4.93k|    max_correction_ = max_dif_ / 2;
   91|  4.93k|    min_correction_ = -max_correction_;
   92|  4.93k|    if ((max_dif_ & 1) == 0) {
  ------------------
  |  Branch (92:9): [True: 2.11k, False: 2.81k]
  ------------------
   93|  2.11k|      max_correction_ -= 1;
   94|  2.11k|    }
   95|  4.93k|    return true;
   96|  4.96k|  }
_ZN5draco33PredictionSchemeWrapTransformBaseIiE4InitEi:
   55|  4.04k|  void Init(int num_components) {
   56|  4.04k|    num_components_ = num_components;
   57|  4.04k|    clamped_value_.resize(num_components);
   58|  4.04k|  }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE19ClampPredictedValueEPKi:
   63|  8.38M|      const DataTypeT *predicted_val) const {
   64|   182M|    for (int i = 0; i < this->num_components(); ++i) {
  ------------------
  |  Branch (64:21): [True: 173M, False: 8.38M]
  ------------------
   65|   173M|      if (predicted_val[i] > max_value_) {
  ------------------
  |  Branch (65:11): [True: 222k, False: 173M]
  ------------------
   66|   222k|        clamped_value_[i] = max_value_;
   67|   173M|      } else if (predicted_val[i] < min_value_) {
  ------------------
  |  Branch (67:18): [True: 10.6M, False: 162M]
  ------------------
   68|  10.6M|        clamped_value_[i] = min_value_;
   69|   162M|      } else {
   70|   162M|        clamped_value_[i] = predicted_val[i];
   71|   162M|      }
   72|   173M|    }
   73|  8.38M|    return clamped_value_.data();
   74|  8.38M|  }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE14num_componentsEv:
   98|   364M|  inline int num_components() const { return num_components_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE9max_valueEv:
  101|   173M|  inline DataTypeT max_value() const { return max_value_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE7max_difEv:
  103|   460k|  inline DataTypeT max_dif() const { return max_dif_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE9min_valueEv:
   99|   173M|  inline DataTypeT min_value() const { return min_value_; }
_ZNK5draco33PredictionSchemeWrapTransformBaseIiE17quantization_bitsEv:
   77|    812|  int quantization_bits() const {
   78|    812|    DRACO_DCHECK(false);
   79|    812|    return -1;
   80|    812|  }
_ZN5draco33PredictionSchemeWrapTransformBaseIiEC2Ev:
   44|  5.92k|      : num_components_(0),
   45|  5.92k|        min_value_(0),
   46|  5.92k|        max_value_(0),
   47|  5.92k|        max_dif_(0),
   48|  5.92k|        max_correction_(0),
   49|  5.92k|        min_correction_(0) {}

_ZN5draco26SequentialAttributeDecoderC2Ev:
   20|  23.8k|    : decoder_(nullptr), attribute_(nullptr), attribute_id_(-1) {}
_ZN5draco26SequentialAttributeDecoder4InitEPNS_17PointCloudDecoderEi:
   23|  23.8k|                                      int attribute_id) {
   24|  23.8k|  decoder_ = decoder;
   25|  23.8k|  attribute_ = decoder->point_cloud()->attribute(attribute_id);
   26|  23.8k|  attribute_id_ = attribute_id;
   27|  23.8k|  return true;
   28|  23.8k|}
_ZN5draco26SequentialAttributeDecoder23DecodePortableAttributeERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   38|  13.2k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   39|  13.2k|  if (attribute_->num_components() <= 0 ||
  ------------------
  |  Branch (39:7): [True: 0, False: 13.2k]
  ------------------
   40|  13.2k|      !attribute_->Reset(point_ids.size())) {
  ------------------
  |  Branch (40:7): [True: 0, False: 13.2k]
  ------------------
   41|      0|    return false;
   42|      0|  }
   43|  13.2k|  if (!DecodeValues(point_ids, in_buffer)) {
  ------------------
  |  Branch (43:7): [True: 2.67k, False: 10.5k]
  ------------------
   44|  2.67k|    return false;
   45|  2.67k|  }
   46|  10.5k|  return true;
   47|  13.2k|}
_ZN5draco26SequentialAttributeDecoder35DecodeDataNeededByPortableTransformERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
   50|  5.02k|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
   51|       |  // Default implementation does not apply any transform.
   52|  5.02k|  return true;
   53|  5.02k|}
_ZN5draco26SequentialAttributeDecoder34TransformAttributeToOriginalFormatERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEE:
   56|    642|    const std::vector<PointIndex> &point_ids) {
   57|       |  // Default implementation does not apply any transform.
   58|    642|  return true;
   59|    642|}
_ZN5draco26SequentialAttributeDecoder20GetPortableAttributeEv:
   61|  9.88k|const PointAttribute *SequentialAttributeDecoder::GetPortableAttribute() {
   62|       |  // If needed, copy point to attribute value index mapping from the final
   63|       |  // attribute to the portable attribute.
   64|  9.88k|  if (!attribute_->is_mapping_identity() && portable_attribute_ &&
  ------------------
  |  Branch (64:7): [True: 6.88k, False: 2.99k]
  |  Branch (64:45): [True: 6.32k, False: 561]
  ------------------
   65|  6.32k|      portable_attribute_->is_mapping_identity()) {
  ------------------
  |  Branch (65:7): [True: 4.97k, False: 1.34k]
  ------------------
   66|  4.97k|    portable_attribute_->SetExplicitMapping(attribute_->indices_map_size());
   67|  4.97k|    for (PointIndex i(0);
   68|  26.2M|         i < static_cast<uint32_t>(attribute_->indices_map_size()); ++i) {
  ------------------
  |  Branch (68:10): [True: 26.2M, False: 4.97k]
  ------------------
   69|  26.2M|      portable_attribute_->SetPointMapEntry(i, attribute_->mapped_index(i));
   70|  26.2M|    }
   71|  4.97k|  }
   72|  9.88k|  return portable_attribute_.get();
   73|  9.88k|}
_ZN5draco26SequentialAttributeDecoder20InitPredictionSchemeEPNS_25PredictionSchemeInterfaceE:
   76|  7.22k|    PredictionSchemeInterface *ps) {
   77|  9.97k|  for (int i = 0; i < ps->GetNumParentAttributes(); ++i) {
  ------------------
  |  Branch (77:19): [True: 2.79k, False: 7.18k]
  ------------------
   78|  2.79k|    const int att_id = decoder_->point_cloud()->GetNamedAttributeId(
   79|  2.79k|        ps->GetParentAttributeType(i));
   80|  2.79k|    if (att_id == -1) {
  ------------------
  |  Branch (80:9): [True: 8, False: 2.78k]
  ------------------
   81|      8|      return false;  // Requested attribute does not exist.
   82|      8|    }
   83|  2.78k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   84|  2.78k|    if (decoder_->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  2.78k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (84:9): [True: 0, False: 2.78k]
  ------------------
   85|      0|      if (!ps->SetParentAttribute(decoder_->point_cloud()->attribute(att_id))) {
  ------------------
  |  Branch (85:11): [True: 0, False: 0]
  ------------------
   86|      0|        return false;
   87|      0|      }
   88|      0|    } else
   89|  2.78k|#endif
   90|  2.78k|    {
   91|  2.78k|      const PointAttribute *const pa = decoder_->GetPortableAttribute(att_id);
   92|  2.78k|      if (pa == nullptr || !ps->SetParentAttribute(pa)) {
  ------------------
  |  Branch (92:11): [True: 6, False: 2.77k]
  |  Branch (92:28): [True: 21, False: 2.75k]
  ------------------
   93|     27|        return false;
   94|     27|      }
   95|  2.78k|    }
   96|  2.78k|  }
   97|  7.18k|  return true;
   98|  7.22k|}
_ZN5draco26SequentialAttributeDecoder12DecodeValuesERKNSt3__16vectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_9allocatorIS5_EEEEPNS_13DecoderBufferE:
  101|    872|    const std::vector<PointIndex> &point_ids, DecoderBuffer *in_buffer) {
  102|    872|  const int32_t num_values = static_cast<uint32_t>(point_ids.size());
  103|    872|  const int entry_size = static_cast<int>(attribute_->byte_stride());
  104|    872|  std::unique_ptr<uint8_t[]> value_data_ptr(new uint8_t[entry_size]);
  105|    872|  uint8_t *const value_data = value_data_ptr.get();
  106|    872|  int out_byte_pos = 0;
  107|       |  // Decode raw attribute values in their original format.
  108|  7.76k|  for (int i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (108:19): [True: 7.02k, False: 744]
  ------------------
  109|  7.02k|    if (!in_buffer->Decode(value_data, entry_size)) {
  ------------------
  |  Branch (109:9): [True: 128, False: 6.89k]
  ------------------
  110|    128|      return false;
  111|    128|    }
  112|  6.89k|    attribute_->buffer()->Write(out_byte_pos, value_data, entry_size);
  113|  6.89k|    out_byte_pos += entry_size;
  114|  6.89k|  }
  115|    744|  return true;
  116|    872|}

_ZNK5draco26SequentialAttributeDecoder9attributeEv:
   53|  10.3k|  const PointAttribute *attribute() const { return attribute_; }
_ZN5draco26SequentialAttributeDecoder9attributeEv:
   54|  10.5M|  PointAttribute *attribute() { return attribute_; }
_ZNK5draco26SequentialAttributeDecoder12attribute_idEv:
   55|  7.22k|  int attribute_id() const { return attribute_id_; }
_ZNK5draco26SequentialAttributeDecoder7decoderEv:
   56|  37.8k|  PointCloudDecoder *decoder() const { return decoder_; }
_ZN5draco26SequentialAttributeDecoder20SetPortableAttributeENSt3__110unique_ptrINS_14PointAttributeENS1_14default_deleteIS3_EEEE:
   69|  11.7k|  void SetPortableAttribute(std::unique_ptr<PointAttribute> att) {
   70|  11.7k|    portable_attribute_ = std::move(att);
   71|  11.7k|  }
_ZN5draco26SequentialAttributeDecoder18portable_attributeEv:
   73|  40.5k|  PointAttribute *portable_attribute() { return portable_attribute_.get(); }
_ZN5draco26SequentialAttributeDecoderD2Ev:
   29|  23.8k|  virtual ~SequentialAttributeDecoder() = default;

_ZN5draco37SequentialAttributeDecodersControllerC2ENSt3__110unique_ptrINS_15PointsSequencerENS1_14default_deleteIS3_EEEE:
   26|  34.2k|    : sequencer_(std::move(sequencer)) {}
_ZN5draco37SequentialAttributeDecodersController27DecodeAttributesDecoderDataEPNS_13DecoderBufferE:
   29|  9.93k|    DecoderBuffer *buffer) {
   30|  9.93k|  if (!AttributesDecoder::DecodeAttributesDecoderData(buffer)) {
  ------------------
  |  Branch (30:7): [True: 243, False: 9.69k]
  ------------------
   31|    243|    return false;
   32|    243|  }
   33|       |  // Decode unique ids of all sequential encoders and create them.
   34|  9.69k|  const int32_t num_attributes = GetNumAttributes();
   35|  9.69k|  sequential_decoders_.resize(num_attributes);
   36|  33.5k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (36:19): [True: 23.8k, False: 9.66k]
  ------------------
   37|  23.8k|    uint8_t decoder_type;
   38|  23.8k|    if (!buffer->Decode(&decoder_type)) {
  ------------------
  |  Branch (38:9): [True: 9, False: 23.8k]
  ------------------
   39|      9|      return false;
   40|      9|    }
   41|       |    // Create the decoder from the id.
   42|  23.8k|    sequential_decoders_[i] = CreateSequentialDecoder(decoder_type);
   43|  23.8k|    if (!sequential_decoders_[i]) {
  ------------------
  |  Branch (43:9): [True: 17, False: 23.8k]
  ------------------
   44|     17|      return false;
   45|     17|    }
   46|  23.8k|    if (!sequential_decoders_[i]->Init(GetDecoder(), GetAttributeId(i))) {
  ------------------
  |  Branch (46:9): [True: 4, False: 23.8k]
  ------------------
   47|      4|      return false;
   48|      4|    }
   49|  23.8k|  }
   50|  9.66k|  return true;
   51|  9.69k|}
_ZN5draco37SequentialAttributeDecodersController16DecodeAttributesEPNS_13DecoderBufferE:
   54|  6.36k|    DecoderBuffer *buffer) {
   55|  6.36k|  if (!sequencer_ || !sequencer_->GenerateSequence(&point_ids_)) {
  ------------------
  |  Branch (55:7): [True: 0, False: 6.36k]
  |  Branch (55:22): [True: 14, False: 6.34k]
  ------------------
   56|     14|    return false;
   57|     14|  }
   58|       |  // Initialize point to attribute value mapping for all decoded attributes.
   59|  6.34k|  const int32_t num_attributes = GetNumAttributes();
   60|  24.7k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (60:19): [True: 18.4k, False: 6.34k]
  ------------------
   61|  18.4k|    PointAttribute *const pa =
   62|  18.4k|        GetDecoder()->point_cloud()->attribute(GetAttributeId(i));
   63|  18.4k|    if (!sequencer_->UpdatePointToAttributeIndexMapping(pa)) {
  ------------------
  |  Branch (63:9): [True: 3, False: 18.4k]
  ------------------
   64|      3|      return false;
   65|      3|    }
   66|  18.4k|  }
   67|  6.34k|  return AttributesDecoder::DecodeAttributes(buffer);
   68|  6.34k|}
_ZN5draco37SequentialAttributeDecodersController24DecodePortableAttributesEPNS_13DecoderBufferE:
   71|  6.34k|    DecoderBuffer *in_buffer) {
   72|  6.34k|  const int32_t num_attributes = GetNumAttributes();
   73|  16.9k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (73:19): [True: 13.2k, False: 3.66k]
  ------------------
   74|  13.2k|    if (!sequential_decoders_[i]->DecodePortableAttribute(point_ids_,
  ------------------
  |  Branch (74:9): [True: 2.67k, False: 10.5k]
  ------------------
   75|  13.2k|                                                          in_buffer)) {
   76|  2.67k|      return false;
   77|  2.67k|    }
   78|  13.2k|  }
   79|  3.66k|  return true;
   80|  6.34k|}
_ZN5draco37SequentialAttributeDecodersController36DecodeDataNeededByPortableTransformsEPNS_13DecoderBufferE:
   83|  3.66k|    DecodeDataNeededByPortableTransforms(DecoderBuffer *in_buffer) {
   84|  3.66k|  const int32_t num_attributes = GetNumAttributes();
   85|  9.35k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (85:19): [True: 6.60k, False: 2.74k]
  ------------------
   86|  6.60k|    if (!sequential_decoders_[i]->DecodeDataNeededByPortableTransform(
  ------------------
  |  Branch (86:9): [True: 917, False: 5.69k]
  ------------------
   87|  6.60k|            point_ids_, in_buffer)) {
   88|    917|      return false;
   89|    917|    }
   90|  6.60k|  }
   91|  2.74k|  return true;
   92|  3.66k|}
_ZN5draco37SequentialAttributeDecodersController35TransformAttributesToOriginalFormatEv:
   95|  2.74k|    TransformAttributesToOriginalFormat() {
   96|  2.74k|  const int32_t num_attributes = GetNumAttributes();
   97|  7.24k|  for (int i = 0; i < num_attributes; ++i) {
  ------------------
  |  Branch (97:19): [True: 4.90k, False: 2.33k]
  ------------------
   98|       |    // Check whether the attribute transform should be skipped.
   99|  4.90k|    if (GetDecoder()->options()) {
  ------------------
  |  Branch (99:9): [True: 4.90k, False: 0]
  ------------------
  100|  4.90k|      const PointAttribute *const attribute =
  101|  4.90k|          sequential_decoders_[i]->attribute();
  102|  4.90k|      const PointAttribute *const portable_attribute =
  103|  4.90k|          sequential_decoders_[i]->GetPortableAttribute();
  104|  4.90k|      if (portable_attribute &&
  ------------------
  |  Branch (104:11): [True: 4.26k, False: 642]
  |  Branch (104:11): [True: 813, False: 4.09k]
  ------------------
  105|  4.26k|          GetDecoder()->options()->GetAttributeBool(
  ------------------
  |  Branch (105:11): [True: 813, False: 3.45k]
  ------------------
  106|  4.26k|              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|    813|        sequential_decoders_[i]->attribute()->CopyFrom(*portable_attribute);
  113|    813|        continue;
  114|    813|      }
  115|  4.90k|    }
  116|  4.09k|    if (!sequential_decoders_[i]->TransformAttributeToOriginalFormat(
  ------------------
  |  Branch (116:9): [True: 412, False: 3.68k]
  ------------------
  117|  4.09k|            point_ids_)) {
  118|    412|      return false;
  119|    412|    }
  120|  4.09k|  }
  121|  2.33k|  return true;
  122|  2.74k|}
_ZN5draco37SequentialAttributeDecodersController23CreateSequentialDecoderEh:
  126|  23.8k|    uint8_t decoder_type) {
  127|  23.8k|  switch (decoder_type) {
  128|  2.14k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_GENERIC:
  ------------------
  |  Branch (128:5): [True: 2.14k, False: 21.6k]
  ------------------
  129|  2.14k|      return std::unique_ptr<SequentialAttributeDecoder>(
  130|  2.14k|          new SequentialAttributeDecoder());
  131|  19.4k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_INTEGER:
  ------------------
  |  Branch (131:5): [True: 19.4k, False: 4.39k]
  ------------------
  132|  19.4k|      return std::unique_ptr<SequentialAttributeDecoder>(
  133|  19.4k|          new SequentialIntegerAttributeDecoder());
  134|    711|    case SEQUENTIAL_ATTRIBUTE_ENCODER_QUANTIZATION:
  ------------------
  |  Branch (134:5): [True: 711, False: 23.1k]
  ------------------
  135|    711|      return std::unique_ptr<SequentialAttributeDecoder>(
  136|    711|          new SequentialQuantizationAttributeDecoder());
  137|      0|#ifdef DRACO_NORMAL_ENCODING_SUPPORTED
  138|  1.51k|    case SEQUENTIAL_ATTRIBUTE_ENCODER_NORMALS:
  ------------------
  |  Branch (138:5): [True: 1.51k, False: 22.3k]
  ------------------
  139|  1.51k|      return std::unique_ptr<SequentialNormalAttributeDecoder>(
  140|  1.51k|          new SequentialNormalAttributeDecoder());
  141|      0|#endif
  142|     17|    default:
  ------------------
  |  Branch (142:5): [True: 17, False: 23.8k]
  ------------------
  143|     17|      break;
  144|  23.8k|  }
  145|       |  // Unknown or unsupported decoder type.
  146|     17|  return nullptr;
  147|  23.8k|}

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

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

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

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

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

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

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

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

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

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

_ZN5draco10AnsDecoderC2Ev:
   56|  35.0k|  AnsDecoder() : buf(nullptr), buf_offset(0), state(0) {}
rans_bit_decoder.cc:_ZN5dracoL13ans_read_initEPNS_10AnsDecoderEPKhi:
  300|  22.0k|                                const uint8_t *const buf, int offset) {
  301|  22.0k|  unsigned x;
  302|  22.0k|  if (offset < 1) {
  ------------------
  |  Branch (302:7): [True: 28, False: 22.0k]
  ------------------
  303|     28|    return 1;
  304|     28|  }
  305|  22.0k|  ans->buf = buf;
  306|  22.0k|  x = buf[offset - 1] >> 6;
  307|  22.0k|  if (x == 0) {
  ------------------
  |  Branch (307:7): [True: 19.3k, False: 2.65k]
  ------------------
  308|  19.3k|    ans->buf_offset = offset - 1;
  309|  19.3k|    ans->state = buf[offset - 1] & 0x3F;
  310|  19.3k|  } else if (x == 1) {
  ------------------
  |  Branch (310:14): [True: 2.34k, False: 311]
  ------------------
  311|  2.34k|    if (offset < 2) {
  ------------------
  |  Branch (311:9): [True: 0, False: 2.34k]
  ------------------
  312|      0|      return 1;
  313|      0|    }
  314|  2.34k|    ans->buf_offset = offset - 2;
  315|  2.34k|    ans->state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  316|  2.34k|  } else if (x == 2) {
  ------------------
  |  Branch (316:14): [True: 300, False: 11]
  ------------------
  317|    300|    if (offset < 3) {
  ------------------
  |  Branch (317:9): [True: 1, False: 299]
  ------------------
  318|      1|      return 1;
  319|      1|    }
  320|    299|    ans->buf_offset = offset - 3;
  321|    299|    ans->state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  322|    299|  } else {
  323|     11|    return 1;
  324|     11|  }
  325|  22.0k|  ans->state += DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  22.0k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  326|  22.0k|  if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   64|  22.0k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
                if (ans->state >= DRACO_ANS_L_BASE * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  22.0k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (326:7): [True: 1, False: 22.0k]
  ------------------
  327|      1|    return 1;
  328|      1|  }
  329|  22.0k|  return 0;
  330|  22.0k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|  2.34k|static uint32_t mem_get_le16(const void *vmem) {
   68|  2.34k|  uint32_t val;
   69|  2.34k|  const uint8_t *mem = (const uint8_t *)vmem;
   70|       |
   71|  2.34k|  val = mem[1] << 8;
   72|  2.34k|  val |= mem[0];
   73|  2.34k|  return val;
   74|  2.34k|}
rans_bit_decoder.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    299|static uint32_t mem_get_le24(const void *vmem) {
   77|    299|  uint32_t val;
   78|    299|  const uint8_t *mem = (const uint8_t *)vmem;
   79|       |
   80|    299|  val = mem[2] << 16;
   81|    299|  val |= mem[1] << 8;
   82|    299|  val |= mem[0];
   83|    299|  return val;
   84|    299|}
rans_bit_decoder.cc:_ZN5dracoL14rabs_desc_readEPNS_10AnsDecoderEh:
  166|  12.3G|static inline int rabs_desc_read(struct AnsDecoder *ans, AnsP8 p0) {
  167|  12.3G|  int val;
  168|       |#if DRACO_ANS_IMPL1
  169|       |  unsigned l_s;
  170|       |#else
  171|  12.3G|  unsigned quot, rem, x, xn;
  172|  12.3G|#endif
  173|  12.3G|  const AnsP8 p = DRACO_ANS_P8_PRECISION - p0;
  ------------------
  |  |   63|  12.3G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  174|  12.3G|  if (ans->state < DRACO_ANS_L_BASE && ans->buf_offset > 0) {
  ------------------
  |  |   64|  24.7G|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  |  Branch (174:7): [True: 11.3G, False: 1.01G]
  |  Branch (174:40): [True: 159k, False: 11.3G]
  ------------------
  175|   159k|    ans->state = ans->state * DRACO_ANS_IO_BASE + ans->buf[--ans->buf_offset];
  ------------------
  |  |   65|   159k|#define DRACO_ANS_IO_BASE 256
  ------------------
  176|   159k|  }
  177|       |#if DRACO_ANS_IMPL1
  178|       |  val = ans->state % DRACO_ANS_P8_PRECISION < p;
  179|       |  l_s = val ? p : p0;
  180|       |  ans->state = (ans->state / DRACO_ANS_P8_PRECISION) * l_s +
  181|       |               ans->state % DRACO_ANS_P8_PRECISION - (!val * p);
  182|       |#else
  183|  12.3G|  x = ans->state;
  184|  12.3G|  quot = x / DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|  12.3G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  185|  12.3G|  rem = x % DRACO_ANS_P8_PRECISION;
  ------------------
  |  |   63|  12.3G|#define DRACO_ANS_P8_PRECISION 256u
  ------------------
  186|  12.3G|  xn = quot * p;
  187|  12.3G|  val = rem < p;
  188|  12.3G|  if (UNPREDICTABLE(val)) {
  ------------------
  |  |  165|  24.7G|#define UNPREDICTABLE(x) x
  |  |  ------------------
  |  |  |  Branch (165:26): [True: 11.3G, False: 985M]
  |  |  ------------------
  ------------------
  189|  11.3G|    ans->state = xn + rem;
  190|  11.3G|  } else {
  191|       |    // ans->state = quot * p0 + rem - p;
  192|   985M|    ans->state = x - xn - p;
  193|   985M|  }
  194|  12.3G|#endif
  195|  12.3G|  return val;
  196|  12.3G|}
rans_bit_decoder.cc:_ZN5dracoL12ans_read_endEPNS_10AnsDecoderE:
  332|  48.4k|static inline int ans_read_end(struct AnsDecoder *const ans) {
  333|  48.4k|  return ans->state == DRACO_ANS_L_BASE;
  ------------------
  |  |   64|  48.4k|#define DRACO_ANS_L_BASE (4096u)
  ------------------
  334|  48.4k|}
_ZN5draco11RAnsDecoderILi12EEC2Ev:
  416|  4.83k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi12EE24rans_build_look_up_tableEPKjj:
  481|  2.77k|                                       uint32_t num_symbols) {
  482|  2.77k|    lut_table_.resize(rans_precision);
  483|  2.77k|    probability_table_.resize(num_symbols);
  484|  2.77k|    uint32_t cum_prob = 0;
  485|  2.77k|    uint32_t act_prob = 0;
  486|  27.6k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 25.0k, False: 2.59k]
  ------------------
  487|  25.0k|      probability_table_[i].prob = token_probs[i];
  488|  25.0k|      probability_table_[i].cum_prob = cum_prob;
  489|  25.0k|      cum_prob += token_probs[i];
  490|  25.0k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 185, False: 24.8k]
  ------------------
  491|    185|        return false;
  492|    185|      }
  493|  9.65M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 9.63M, False: 24.8k]
  ------------------
  494|  9.63M|        lut_table_[j] = i;
  495|  9.63M|      }
  496|  24.8k|      act_prob = cum_prob;
  497|  24.8k|    }
  498|  2.59k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 297, False: 2.29k]
  ------------------
  499|    297|      return false;
  500|    297|    }
  501|  2.29k|    return true;
  502|  2.59k|  }
_ZN5draco11RAnsDecoderILi12EE9read_initEPKhi:
  421|  1.95k|  inline int read_init(const uint8_t *const buf, int offset) {
  422|  1.95k|    unsigned x;
  423|  1.95k|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 204, False: 1.74k]
  ------------------
  424|    204|      return 1;
  425|    204|    }
  426|  1.74k|    ans_.buf = buf;
  427|  1.74k|    x = buf[offset - 1] >> 6;
  428|  1.74k|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 1.05k, False: 694]
  ------------------
  429|  1.05k|      ans_.buf_offset = offset - 1;
  430|  1.05k|      ans_.state = buf[offset - 1] & 0x3F;
  431|  1.05k|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 309, False: 385]
  ------------------
  432|    309|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 70, False: 239]
  ------------------
  433|     70|        return 1;
  434|     70|      }
  435|    239|      ans_.buf_offset = offset - 2;
  436|    239|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    385|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 267, False: 118]
  ------------------
  438|    267|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 74, False: 193]
  ------------------
  439|     74|        return 1;
  440|     74|      }
  441|    193|      ans_.buf_offset = offset - 3;
  442|    193|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    193|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 118, False: 0]
  ------------------
  444|    118|      ans_.buf_offset = offset - 4;
  445|    118|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|    118|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|  1.60k|    ans_.state += l_rans_base;
  450|  1.60k|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|  1.60k|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 112, False: 1.49k]
  ------------------
  451|    112|      return 1;
  452|    112|    }
  453|  1.49k|    return 0;
  454|  1.60k|  }
symbol_decoding.cc:_ZN5dracoL12mem_get_le16EPKv:
   67|    404|static uint32_t mem_get_le16(const void *vmem) {
   68|    404|  uint32_t val;
   69|    404|  const uint8_t *mem = (const uint8_t *)vmem;
   70|       |
   71|    404|  val = mem[1] << 8;
   72|    404|  val |= mem[0];
   73|    404|  return val;
   74|    404|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le24EPKv:
   76|    295|static uint32_t mem_get_le24(const void *vmem) {
   77|    295|  uint32_t val;
   78|    295|  const uint8_t *mem = (const uint8_t *)vmem;
   79|       |
   80|    295|  val = mem[2] << 16;
   81|    295|  val |= mem[1] << 8;
   82|    295|  val |= mem[0];
   83|    295|  return val;
   84|    295|}
symbol_decoding.cc:_ZN5dracoL12mem_get_le32EPKv:
   86|    451|static inline uint32_t mem_get_le32(const void *vmem) {
   87|    451|  uint32_t val;
   88|    451|  const uint8_t *mem = (const uint8_t *)vmem;
   89|       |
   90|    451|  val = mem[3] << 24;
   91|    451|  val |= mem[2] << 16;
   92|    451|  val |= mem[1] << 8;
   93|    451|  val |= mem[0];
   94|    451|  return val;
   95|    451|}
_ZN5draco11RAnsDecoderILi12EE9rans_readEv:
  462|   116M|  inline int rans_read() {
  463|   116M|    unsigned rem;
  464|   116M|    unsigned quo;
  465|   116M|    struct rans_dec_sym sym;
  466|   116M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 102M, False: 14.2M]
  |  Branch (466:40): [True: 26.1k, False: 102M]
  ------------------
  467|  26.1k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  26.1k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  26.1k|    }
  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|   116M|    quo = ans_.state / rans_precision;
  472|   116M|    rem = ans_.state % rans_precision;
  473|   116M|    fetch_sym(&sym, rem);
  474|   116M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   116M|    return sym.val;
  476|   116M|  }
_ZN5draco11RAnsDecoderILi12EE9fetch_symEPNS_12rans_dec_symEj:
  505|   116M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   116M|    uint32_t symbol = lut_table_[rem];
  507|   116M|    out->val = symbol;
  508|   116M|    out->prob = probability_table_[symbol].prob;
  509|   116M|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   116M|  }
_ZN5draco11RAnsDecoderILi12EE8read_endEv:
  456|  1.41k|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi13EEC2Ev:
  416|    537|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi13EE24rans_build_look_up_tableEPKjj:
  481|    398|                                       uint32_t num_symbols) {
  482|    398|    lut_table_.resize(rans_precision);
  483|    398|    probability_table_.resize(num_symbols);
  484|    398|    uint32_t cum_prob = 0;
  485|    398|    uint32_t act_prob = 0;
  486|  12.3k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 12.0k, False: 368]
  ------------------
  487|  12.0k|      probability_table_[i].prob = token_probs[i];
  488|  12.0k|      probability_table_[i].cum_prob = cum_prob;
  489|  12.0k|      cum_prob += token_probs[i];
  490|  12.0k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 30, False: 11.9k]
  ------------------
  491|     30|        return false;
  492|     30|      }
  493|  2.88M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 2.86M, False: 11.9k]
  ------------------
  494|  2.86M|        lut_table_[j] = i;
  495|  2.86M|      }
  496|  11.9k|      act_prob = cum_prob;
  497|  11.9k|    }
  498|    368|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 31, False: 337]
  ------------------
  499|     31|      return false;
  500|     31|    }
  501|    337|    return true;
  502|    368|  }
_ZN5draco11RAnsDecoderILi13EE9read_initEPKhi:
  421|    252|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    252|    unsigned x;
  423|    252|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 9, False: 243]
  ------------------
  424|      9|      return 1;
  425|      9|    }
  426|    243|    ans_.buf = buf;
  427|    243|    x = buf[offset - 1] >> 6;
  428|    243|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 142, False: 101]
  ------------------
  429|    142|      ans_.buf_offset = offset - 1;
  430|    142|      ans_.state = buf[offset - 1] & 0x3F;
  431|    142|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 37, False: 64]
  ------------------
  432|     37|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 13, False: 24]
  ------------------
  433|     13|        return 1;
  434|     13|      }
  435|     24|      ans_.buf_offset = offset - 2;
  436|     24|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     64|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 30, False: 34]
  ------------------
  438|     30|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 14, False: 16]
  ------------------
  439|     14|        return 1;
  440|     14|      }
  441|     16|      ans_.buf_offset = offset - 3;
  442|     16|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     34|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 34, False: 0]
  ------------------
  444|     34|      ans_.buf_offset = offset - 4;
  445|     34|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     34|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|    216|    ans_.state += l_rans_base;
  450|    216|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    216|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 23, False: 193]
  ------------------
  451|     23|      return 1;
  452|     23|    }
  453|    193|    return 0;
  454|    216|  }
_ZN5draco11RAnsDecoderILi13EE9rans_readEv:
  462|  11.9M|  inline int rans_read() {
  463|  11.9M|    unsigned rem;
  464|  11.9M|    unsigned quo;
  465|  11.9M|    struct rans_dec_sym sym;
  466|  11.9M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 11.9M, False: 12.4k]
  |  Branch (466:40): [True: 3.01k, False: 11.9M]
  ------------------
  467|  3.01k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  3.01k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  3.01k|    }
  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|  11.9M|    quo = ans_.state / rans_precision;
  472|  11.9M|    rem = ans_.state % rans_precision;
  473|  11.9M|    fetch_sym(&sym, rem);
  474|  11.9M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  11.9M|    return sym.val;
  476|  11.9M|  }
_ZN5draco11RAnsDecoderILi13EE9fetch_symEPNS_12rans_dec_symEj:
  505|  11.9M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  11.9M|    uint32_t symbol = lut_table_[rem];
  507|  11.9M|    out->val = symbol;
  508|  11.9M|    out->prob = probability_table_[symbol].prob;
  509|  11.9M|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  11.9M|  }
_ZN5draco11RAnsDecoderILi13EE8read_endEv:
  456|    193|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi15EEC2Ev:
  416|    442|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi15EE24rans_build_look_up_tableEPKjj:
  481|    305|                                       uint32_t num_symbols) {
  482|    305|    lut_table_.resize(rans_precision);
  483|    305|    probability_table_.resize(num_symbols);
  484|    305|    uint32_t cum_prob = 0;
  485|    305|    uint32_t act_prob = 0;
  486|  10.9k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 10.6k, False: 279]
  ------------------
  487|  10.6k|      probability_table_[i].prob = token_probs[i];
  488|  10.6k|      probability_table_[i].cum_prob = cum_prob;
  489|  10.6k|      cum_prob += token_probs[i];
  490|  10.6k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 26, False: 10.6k]
  ------------------
  491|     26|        return false;
  492|     26|      }
  493|  8.15M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 8.14M, False: 10.6k]
  ------------------
  494|  8.14M|        lut_table_[j] = i;
  495|  8.14M|      }
  496|  10.6k|      act_prob = cum_prob;
  497|  10.6k|    }
  498|    279|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 47, False: 232]
  ------------------
  499|     47|      return false;
  500|     47|    }
  501|    232|    return true;
  502|    279|  }
_ZN5draco11RAnsDecoderILi15EE9read_initEPKhi:
  421|    147|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    147|    unsigned x;
  423|    147|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 12, False: 135]
  ------------------
  424|     12|      return 1;
  425|     12|    }
  426|    135|    ans_.buf = buf;
  427|    135|    x = buf[offset - 1] >> 6;
  428|    135|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 29, False: 106]
  ------------------
  429|     29|      ans_.buf_offset = offset - 1;
  430|     29|      ans_.state = buf[offset - 1] & 0x3F;
  431|    106|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 22, False: 84]
  ------------------
  432|     22|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 12, False: 10]
  ------------------
  433|     12|        return 1;
  434|     12|      }
  435|     10|      ans_.buf_offset = offset - 2;
  436|     10|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     84|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 29, False: 55]
  ------------------
  438|     29|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 12, False: 17]
  ------------------
  439|     12|        return 1;
  440|     12|      }
  441|     17|      ans_.buf_offset = offset - 3;
  442|     17|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     55|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 55, False: 0]
  ------------------
  444|     55|      ans_.buf_offset = offset - 4;
  445|     55|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     55|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|    111|    ans_.state += l_rans_base;
  450|    111|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    111|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 37, False: 74]
  ------------------
  451|     37|      return 1;
  452|     37|    }
  453|     74|    return 0;
  454|    111|  }
_ZN5draco11RAnsDecoderILi15EE9rans_readEv:
  462|   572k|  inline int rans_read() {
  463|   572k|    unsigned rem;
  464|   572k|    unsigned quo;
  465|   572k|    struct rans_dec_sym sym;
  466|   572k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 204k, False: 368k]
  |  Branch (466:40): [True: 291, False: 203k]
  ------------------
  467|    291|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|    291|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|    291|    }
  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|   572k|    quo = ans_.state / rans_precision;
  472|   572k|    rem = ans_.state % rans_precision;
  473|   572k|    fetch_sym(&sym, rem);
  474|   572k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   572k|    return sym.val;
  476|   572k|  }
_ZN5draco11RAnsDecoderILi15EE9fetch_symEPNS_12rans_dec_symEj:
  505|   572k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   572k|    uint32_t symbol = lut_table_[rem];
  507|   572k|    out->val = symbol;
  508|   572k|    out->prob = probability_table_[symbol].prob;
  509|   572k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   572k|  }
_ZN5draco11RAnsDecoderILi15EE8read_endEv:
  456|     74|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi16EEC2Ev:
  416|    374|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi16EE24rans_build_look_up_tableEPKjj:
  481|    232|                                       uint32_t num_symbols) {
  482|    232|    lut_table_.resize(rans_precision);
  483|    232|    probability_table_.resize(num_symbols);
  484|    232|    uint32_t cum_prob = 0;
  485|    232|    uint32_t act_prob = 0;
  486|  15.7k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 15.5k, False: 210]
  ------------------
  487|  15.5k|      probability_table_[i].prob = token_probs[i];
  488|  15.5k|      probability_table_[i].cum_prob = cum_prob;
  489|  15.5k|      cum_prob += token_probs[i];
  490|  15.5k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 22, False: 15.5k]
  ------------------
  491|     22|        return false;
  492|     22|      }
  493|  11.8M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 11.8M, False: 15.5k]
  ------------------
  494|  11.8M|        lut_table_[j] = i;
  495|  11.8M|      }
  496|  15.5k|      act_prob = cum_prob;
  497|  15.5k|    }
  498|    210|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 47, False: 163]
  ------------------
  499|     47|      return false;
  500|     47|    }
  501|    163|    return true;
  502|    210|  }
_ZN5draco11RAnsDecoderILi16EE9read_initEPKhi:
  421|     88|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     88|    unsigned x;
  423|     88|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 10, False: 78]
  ------------------
  424|     10|      return 1;
  425|     10|    }
  426|     78|    ans_.buf = buf;
  427|     78|    x = buf[offset - 1] >> 6;
  428|     78|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 38, False: 40]
  ------------------
  429|     38|      ans_.buf_offset = offset - 1;
  430|     38|      ans_.state = buf[offset - 1] & 0x3F;
  431|     40|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 16, False: 24]
  ------------------
  432|     16|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 2, False: 14]
  ------------------
  433|      2|        return 1;
  434|      2|      }
  435|     14|      ans_.buf_offset = offset - 2;
  436|     14|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     24|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 11, False: 13]
  ------------------
  438|     11|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 0, False: 11]
  ------------------
  439|      0|        return 1;
  440|      0|      }
  441|     11|      ans_.buf_offset = offset - 3;
  442|     11|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     13|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 13, False: 0]
  ------------------
  444|     13|      ans_.buf_offset = offset - 4;
  445|     13|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     13|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     76|    ans_.state += l_rans_base;
  450|     76|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     76|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 10, False: 66]
  ------------------
  451|     10|      return 1;
  452|     10|    }
  453|     66|    return 0;
  454|     76|  }
_ZN5draco11RAnsDecoderILi16EE9rans_readEv:
  462|   449k|  inline int rans_read() {
  463|   449k|    unsigned rem;
  464|   449k|    unsigned quo;
  465|   449k|    struct rans_dec_sym sym;
  466|   450k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 133k, False: 316k]
  |  Branch (466:40): [True: 1.06k, False: 132k]
  ------------------
  467|  1.06k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  1.06k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  1.06k|    }
  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|   449k|    quo = ans_.state / rans_precision;
  472|   449k|    rem = ans_.state % rans_precision;
  473|   449k|    fetch_sym(&sym, rem);
  474|   449k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   449k|    return sym.val;
  476|   449k|  }
_ZN5draco11RAnsDecoderILi16EE9fetch_symEPNS_12rans_dec_symEj:
  505|   449k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   449k|    uint32_t symbol = lut_table_[rem];
  507|   449k|    out->val = symbol;
  508|   449k|    out->prob = probability_table_[symbol].prob;
  509|   449k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   449k|  }
_ZN5draco11RAnsDecoderILi16EE8read_endEv:
  456|     66|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi18EEC2Ev:
  416|    401|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi18EE24rans_build_look_up_tableEPKjj:
  481|    250|                                       uint32_t num_symbols) {
  482|    250|    lut_table_.resize(rans_precision);
  483|    250|    probability_table_.resize(num_symbols);
  484|    250|    uint32_t cum_prob = 0;
  485|    250|    uint32_t act_prob = 0;
  486|  4.89k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 4.67k, False: 217]
  ------------------
  487|  4.67k|      probability_table_[i].prob = token_probs[i];
  488|  4.67k|      probability_table_[i].cum_prob = cum_prob;
  489|  4.67k|      cum_prob += token_probs[i];
  490|  4.67k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 33, False: 4.64k]
  ------------------
  491|     33|        return false;
  492|     33|      }
  493|  51.6M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 51.6M, False: 4.64k]
  ------------------
  494|  51.6M|        lut_table_[j] = i;
  495|  51.6M|      }
  496|  4.64k|      act_prob = cum_prob;
  497|  4.64k|    }
  498|    217|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 40, False: 177]
  ------------------
  499|     40|      return false;
  500|     40|    }
  501|    177|    return true;
  502|    217|  }
_ZN5draco11RAnsDecoderILi18EE9read_initEPKhi:
  421|     95|  inline int read_init(const uint8_t *const buf, int offset) {
  422|     95|    unsigned x;
  423|     95|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 3, False: 92]
  ------------------
  424|      3|      return 1;
  425|      3|    }
  426|     92|    ans_.buf = buf;
  427|     92|    x = buf[offset - 1] >> 6;
  428|     92|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 29, False: 63]
  ------------------
  429|     29|      ans_.buf_offset = offset - 1;
  430|     29|      ans_.state = buf[offset - 1] & 0x3F;
  431|     63|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 26, False: 37]
  ------------------
  432|     26|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 9, False: 17]
  ------------------
  433|      9|        return 1;
  434|      9|      }
  435|     17|      ans_.buf_offset = offset - 2;
  436|     17|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     37|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 14, False: 23]
  ------------------
  438|     14|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 11, False: 3]
  ------------------
  439|     11|        return 1;
  440|     11|      }
  441|      3|      ans_.buf_offset = offset - 3;
  442|      3|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     23|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 23, False: 0]
  ------------------
  444|     23|      ans_.buf_offset = offset - 4;
  445|     23|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     23|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     72|    ans_.state += l_rans_base;
  450|     72|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     72|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 10, False: 62]
  ------------------
  451|     10|      return 1;
  452|     10|    }
  453|     62|    return 0;
  454|     72|  }
_ZN5draco11RAnsDecoderILi18EE9rans_readEv:
  462|  71.4k|  inline int rans_read() {
  463|  71.4k|    unsigned rem;
  464|  71.4k|    unsigned quo;
  465|  71.4k|    struct rans_dec_sym sym;
  466|  73.2k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 52.0k, False: 21.2k]
  |  Branch (466:40): [True: 1.81k, False: 50.2k]
  ------------------
  467|  1.81k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  1.81k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  1.81k|    }
  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.4k|    quo = ans_.state / rans_precision;
  472|  71.4k|    rem = ans_.state % rans_precision;
  473|  71.4k|    fetch_sym(&sym, rem);
  474|  71.4k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  71.4k|    return sym.val;
  476|  71.4k|  }
_ZN5draco11RAnsDecoderILi18EE9fetch_symEPNS_12rans_dec_symEj:
  505|  71.4k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  71.4k|    uint32_t symbol = lut_table_[rem];
  507|  71.4k|    out->val = symbol;
  508|  71.4k|    out->prob = probability_table_[symbol].prob;
  509|  71.4k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  71.4k|  }
_ZN5draco11RAnsDecoderILi18EE8read_endEv:
  456|     62|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi19EEC2Ev:
  416|    428|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi19EE24rans_build_look_up_tableEPKjj:
  481|    270|                                       uint32_t num_symbols) {
  482|    270|    lut_table_.resize(rans_precision);
  483|    270|    probability_table_.resize(num_symbols);
  484|    270|    uint32_t cum_prob = 0;
  485|    270|    uint32_t act_prob = 0;
  486|  4.49k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 4.24k, False: 248]
  ------------------
  487|  4.24k|      probability_table_[i].prob = token_probs[i];
  488|  4.24k|      probability_table_[i].cum_prob = cum_prob;
  489|  4.24k|      cum_prob += token_probs[i];
  490|  4.24k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 22, False: 4.22k]
  ------------------
  491|     22|        return false;
  492|     22|      }
  493|   105M|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 105M, False: 4.22k]
  ------------------
  494|   105M|        lut_table_[j] = i;
  495|   105M|      }
  496|  4.22k|      act_prob = cum_prob;
  497|  4.22k|    }
  498|    248|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 65, False: 183]
  ------------------
  499|     65|      return false;
  500|     65|    }
  501|    183|    return true;
  502|    248|  }
_ZN5draco11RAnsDecoderILi19EE9read_initEPKhi:
  421|    104|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    104|    unsigned x;
  423|    104|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 6, False: 98]
  ------------------
  424|      6|      return 1;
  425|      6|    }
  426|     98|    ans_.buf = buf;
  427|     98|    x = buf[offset - 1] >> 6;
  428|     98|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 25, False: 73]
  ------------------
  429|     25|      ans_.buf_offset = offset - 1;
  430|     25|      ans_.state = buf[offset - 1] & 0x3F;
  431|     73|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 28, False: 45]
  ------------------
  432|     28|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 9, False: 19]
  ------------------
  433|      9|        return 1;
  434|      9|      }
  435|     19|      ans_.buf_offset = offset - 2;
  436|     19|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|     45|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 7, False: 38]
  ------------------
  438|      7|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 3, False: 4]
  ------------------
  439|      3|        return 1;
  440|      3|      }
  441|      4|      ans_.buf_offset = offset - 3;
  442|      4|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|     38|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 38, False: 0]
  ------------------
  444|     38|      ans_.buf_offset = offset - 4;
  445|     38|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|     38|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|     86|    ans_.state += l_rans_base;
  450|     86|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|     86|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 8, False: 78]
  ------------------
  451|      8|      return 1;
  452|      8|    }
  453|     78|    return 0;
  454|     86|  }
_ZN5draco11RAnsDecoderILi19EE9rans_readEv:
  462|   111k|  inline int rans_read() {
  463|   111k|    unsigned rem;
  464|   111k|    unsigned quo;
  465|   111k|    struct rans_dec_sym sym;
  466|   113k|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 90.8k, False: 22.1k]
  |  Branch (466:40): [True: 1.38k, False: 89.5k]
  ------------------
  467|  1.38k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  1.38k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  1.38k|    }
  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|   111k|    quo = ans_.state / rans_precision;
  472|   111k|    rem = ans_.state % rans_precision;
  473|   111k|    fetch_sym(&sym, rem);
  474|   111k|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|   111k|    return sym.val;
  476|   111k|  }
_ZN5draco11RAnsDecoderILi19EE9fetch_symEPNS_12rans_dec_symEj:
  505|   111k|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|   111k|    uint32_t symbol = lut_table_[rem];
  507|   111k|    out->val = symbol;
  508|   111k|    out->prob = probability_table_[symbol].prob;
  509|   111k|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|   111k|  }
_ZN5draco11RAnsDecoderILi19EE8read_endEv:
  456|     78|  inline int read_end() { return ans_.state == l_rans_base; }
_ZN5draco11RAnsDecoderILi20EEC2Ev:
  416|  1.88k|  RAnsDecoder() {}
_ZN5draco11RAnsDecoderILi20EE24rans_build_look_up_tableEPKjj:
  481|  1.13k|                                       uint32_t num_symbols) {
  482|  1.13k|    lut_table_.resize(rans_precision);
  483|  1.13k|    probability_table_.resize(num_symbols);
  484|  1.13k|    uint32_t cum_prob = 0;
  485|  1.13k|    uint32_t act_prob = 0;
  486|  46.3k|    for (uint32_t i = 0; i < num_symbols; ++i) {
  ------------------
  |  Branch (486:26): [True: 45.2k, False: 1.09k]
  ------------------
  487|  45.2k|      probability_table_[i].prob = token_probs[i];
  488|  45.2k|      probability_table_[i].cum_prob = cum_prob;
  489|  45.2k|      cum_prob += token_probs[i];
  490|  45.2k|      if (cum_prob > rans_precision) {
  ------------------
  |  Branch (490:11): [True: 42, False: 45.1k]
  ------------------
  491|     42|        return false;
  492|     42|      }
  493|  1.04G|      for (uint32_t j = act_prob; j < cum_prob; ++j) {
  ------------------
  |  Branch (493:35): [True: 1.04G, False: 45.1k]
  ------------------
  494|  1.04G|        lut_table_[j] = i;
  495|  1.04G|      }
  496|  45.1k|      act_prob = cum_prob;
  497|  45.1k|    }
  498|  1.09k|    if (cum_prob != rans_precision) {
  ------------------
  |  Branch (498:9): [True: 135, False: 956]
  ------------------
  499|    135|      return false;
  500|    135|    }
  501|    956|    return true;
  502|  1.09k|  }
_ZN5draco11RAnsDecoderILi20EE9read_initEPKhi:
  421|    549|  inline int read_init(const uint8_t *const buf, int offset) {
  422|    549|    unsigned x;
  423|    549|    if (offset < 1) {
  ------------------
  |  Branch (423:9): [True: 50, False: 499]
  ------------------
  424|     50|      return 1;
  425|     50|    }
  426|    499|    ans_.buf = buf;
  427|    499|    x = buf[offset - 1] >> 6;
  428|    499|    if (x == 0) {
  ------------------
  |  Branch (428:9): [True: 134, False: 365]
  ------------------
  429|    134|      ans_.buf_offset = offset - 1;
  430|    134|      ans_.state = buf[offset - 1] & 0x3F;
  431|    365|    } else if (x == 1) {
  ------------------
  |  Branch (431:16): [True: 107, False: 258]
  ------------------
  432|    107|      if (offset < 2) {
  ------------------
  |  Branch (432:11): [True: 26, False: 81]
  ------------------
  433|     26|        return 1;
  434|     26|      }
  435|     81|      ans_.buf_offset = offset - 2;
  436|     81|      ans_.state = mem_get_le16(buf + offset - 2) & 0x3FFF;
  437|    258|    } else if (x == 2) {
  ------------------
  |  Branch (437:16): [True: 88, False: 170]
  ------------------
  438|     88|      if (offset < 3) {
  ------------------
  |  Branch (438:11): [True: 37, False: 51]
  ------------------
  439|     37|        return 1;
  440|     37|      }
  441|     51|      ans_.buf_offset = offset - 3;
  442|     51|      ans_.state = mem_get_le24(buf + offset - 3) & 0x3FFFFF;
  443|    170|    } else if (x == 3) {
  ------------------
  |  Branch (443:16): [True: 170, False: 0]
  ------------------
  444|    170|      ans_.buf_offset = offset - 4;
  445|    170|      ans_.state = mem_get_le32(buf + offset - 4) & 0x3FFFFFFF;
  446|    170|    } else {
  447|      0|      return 1;
  448|      0|    }
  449|    436|    ans_.state += l_rans_base;
  450|    436|    if (ans_.state >= l_rans_base * DRACO_ANS_IO_BASE) {
  ------------------
  |  |   65|    436|#define DRACO_ANS_IO_BASE 256
  ------------------
  |  Branch (450:9): [True: 65, False: 371]
  ------------------
  451|     65|      return 1;
  452|     65|    }
  453|    371|    return 0;
  454|    436|  }
_ZN5draco11RAnsDecoderILi20EE9rans_readEv:
  462|  1.04M|  inline int rans_read() {
  463|  1.04M|    unsigned rem;
  464|  1.04M|    unsigned quo;
  465|  1.04M|    struct rans_dec_sym sym;
  466|  1.05M|    while (ans_.state < l_rans_base && ans_.buf_offset > 0) {
  ------------------
  |  Branch (466:12): [True: 762k, False: 293k]
  |  Branch (466:40): [True: 5.32k, False: 756k]
  ------------------
  467|  5.32k|      ans_.state = ans_.state * DRACO_ANS_IO_BASE + ans_.buf[--ans_.buf_offset];
  ------------------
  |  |   65|  5.32k|#define DRACO_ANS_IO_BASE 256
  ------------------
  468|  5.32k|    }
  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.04M|    quo = ans_.state / rans_precision;
  472|  1.04M|    rem = ans_.state % rans_precision;
  473|  1.04M|    fetch_sym(&sym, rem);
  474|  1.04M|    ans_.state = quo * sym.prob + rem - sym.cum_prob;
  475|  1.04M|    return sym.val;
  476|  1.04M|  }
_ZN5draco11RAnsDecoderILi20EE9fetch_symEPNS_12rans_dec_symEj:
  505|  1.04M|  inline void fetch_sym(struct rans_dec_sym *out, uint32_t rem) {
  506|  1.04M|    uint32_t symbol = lut_table_[rem];
  507|  1.04M|    out->val = symbol;
  508|  1.04M|    out->prob = probability_table_[symbol].prob;
  509|  1.04M|    out->cum_prob = probability_table_[symbol].cum_prob;
  510|  1.04M|  }
_ZN5draco11RAnsDecoderILi20EE8read_endEv:
  456|    371|  inline int read_end() { return ans_.state == l_rans_base; }

_ZN5draco17RAnsSymbolDecoderILi5EEC2Ev:
   33|  1.41k|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi5EE6CreateEPNS_13DecoderBufferE:
   59|  1.41k|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|  1.41k|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 1.41k]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|  1.41k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|  1.41k|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|  1.41k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 158, False: 1.25k]
  ------------------
   67|    158|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 7, False: 151]
  ------------------
   68|      7|      return false;
   69|      7|    }
   70|       |
   71|    158|  } else
   72|  1.25k|#endif
   73|  1.25k|  {
   74|  1.25k|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 42, False: 1.21k]
  ------------------
   75|     42|      return false;
   76|     42|    }
   77|  1.25k|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|  1.36k|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 140, False: 1.22k]
  ------------------
   83|    140|    return false;
   84|    140|  }
   85|  1.22k|  probability_table_.resize(num_symbols_);
   86|  1.22k|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 372, False: 856]
  ------------------
   87|    372|    return true;
   88|    372|  }
   89|       |  // Decode the table.
   90|  14.3k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 13.8k, False: 557]
  ------------------
   91|  13.8k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  13.8k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 71, False: 13.7k]
  ------------------
   95|     71|      return false;
   96|     71|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  13.7k|    const int token = prob_data & 3;
  102|  13.7k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 4.10k, False: 9.64k]
  ------------------
  103|  4.10k|      const uint32_t offset = prob_data >> 2;
  104|  4.10k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 199, False: 3.90k]
  ------------------
  105|    199|        return false;
  106|    199|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   121k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 117k, False: 3.90k]
  ------------------
  109|   117k|        probability_table_[i + j] = 0;
  110|   117k|      }
  111|  3.90k|      i += offset;
  112|  9.64k|    } else {
  113|  9.64k|      const int extra_bytes = token;
  114|  9.64k|      uint32_t prob = prob_data >> 2;
  115|  16.1k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 6.57k, False: 9.61k]
  ------------------
  116|  6.57k|        uint8_t eb;
  117|  6.57k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 29, False: 6.54k]
  ------------------
  118|     29|          return false;
  119|     29|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  6.54k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  6.54k|      }
  124|  9.61k|      probability_table_[i] = prob;
  125|  9.61k|    }
  126|  13.7k|  }
  127|    557|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 137, False: 420]
  ------------------
  128|    137|    return false;
  129|    137|  }
  130|    420|  return true;
  131|    557|}
_ZN5draco17RAnsSymbolDecoderILi5EE13StartDecodingEPNS_13DecoderBufferE:
  135|    745|    DecoderBuffer *buffer) {
  136|    745|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    745|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    745|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    745|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 60, False: 685]
  ------------------
  140|     60|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 4, False: 56]
  ------------------
  141|      4|      return false;
  142|      4|    }
  143|       |
  144|     60|  } else
  145|    685|#endif
  146|    685|  {
  147|    685|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 18, False: 667]
  ------------------
  148|     18|      return false;
  149|     18|    }
  150|    685|  }
  151|    723|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 89, False: 634]
  ------------------
  152|     89|    return false;
  153|     89|  }
  154|    634|  const uint8_t *const data_head =
  155|    634|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    634|  buffer->Advance(bytes_encoded);
  158|    634|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 170, False: 464]
  ------------------
  159|    170|    return false;
  160|    170|  }
  161|    464|  return true;
  162|    634|}
_ZNK5draco17RAnsSymbolDecoderILi5EE11num_symbolsEv:
   38|    524|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi5EE12DecodeSymbolEv:
   43|  16.7M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi5EE11EndDecodingEv:
  165|    389|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    389|  ans_.read_end();
  167|    389|}
_ZN5draco17RAnsSymbolDecoderILi1EEC2Ev:
   33|    642|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi1EE6CreateEPNS_13DecoderBufferE:
   59|    642|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    642|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 642]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    642|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    642|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    642|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 65, False: 577]
  ------------------
   67|     65|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 5, False: 60]
  ------------------
   68|      5|      return false;
   69|      5|    }
   70|       |
   71|     65|  } else
   72|    577|#endif
   73|    577|  {
   74|    577|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 13, False: 564]
  ------------------
   75|     13|      return false;
   76|     13|    }
   77|    577|  }
   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|    624|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 59, False: 565]
  ------------------
   83|     59|    return false;
   84|     59|  }
   85|    565|  probability_table_.resize(num_symbols_);
   86|    565|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 32, False: 533]
  ------------------
   87|     32|    return true;
   88|     32|  }
   89|       |  // Decode the table.
   90|  1.74M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.74M, False: 381]
  ------------------
   91|  1.74M|    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.74M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 63, False: 1.74M]
  ------------------
   95|     63|      return false;
   96|     63|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  1.74M|    const int token = prob_data & 3;
  102|  1.74M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 857k, False: 886k]
  ------------------
  103|   857k|      const uint32_t offset = prob_data >> 2;
  104|   857k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 64, False: 856k]
  ------------------
  105|     64|        return false;
  106|     64|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  45.3M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 44.4M, False: 856k]
  ------------------
  109|  44.4M|        probability_table_[i + j] = 0;
  110|  44.4M|      }
  111|   856k|      i += offset;
  112|   886k|    } else {
  113|   886k|      const int extra_bytes = token;
  114|   886k|      uint32_t prob = prob_data >> 2;
  115|  1.66M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 776k, False: 886k]
  ------------------
  116|   776k|        uint8_t eb;
  117|   776k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 25, False: 776k]
  ------------------
  118|     25|          return false;
  119|     25|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   776k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   776k|      }
  124|   886k|      probability_table_[i] = prob;
  125|   886k|    }
  126|  1.74M|  }
  127|    381|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 159, False: 222]
  ------------------
  128|    159|    return false;
  129|    159|  }
  130|    222|  return true;
  131|    381|}
_ZNK5draco17RAnsSymbolDecoderILi1EE11num_symbolsEv:
   38|    254|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi1EE13StartDecodingEPNS_13DecoderBufferE:
  135|    222|    DecoderBuffer *buffer) {
  136|    222|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    222|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    222|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    222|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 4, False: 218]
  ------------------
  140|      4|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 3]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|      4|  } else
  145|    218|#endif
  146|    218|  {
  147|    218|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 15, False: 203]
  ------------------
  148|     15|      return false;
  149|     15|    }
  150|    218|  }
  151|    206|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 44, False: 162]
  ------------------
  152|     44|    return false;
  153|     44|  }
  154|    162|  const uint8_t *const data_head =
  155|    162|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    162|  buffer->Advance(bytes_encoded);
  158|    162|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 39, False: 123]
  ------------------
  159|     39|    return false;
  160|     39|  }
  161|    123|  return true;
  162|    162|}
_ZN5draco17RAnsSymbolDecoderILi1EE12DecodeSymbolEv:
   43|  33.0M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi1EE11EndDecodingEv:
  165|    123|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    123|  ans_.read_end();
  167|    123|}
_ZN5draco17RAnsSymbolDecoderILi2EEC2Ev:
   33|    536|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi2EE6CreateEPNS_13DecoderBufferE:
   59|    536|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    536|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 536]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    536|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    536|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    536|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 61, False: 475]
  ------------------
   67|     61|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 61]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     61|  } else
   72|    475|#endif
   73|    475|  {
   74|    475|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 12, False: 463]
  ------------------
   75|     12|      return false;
   76|     12|    }
   77|    475|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    524|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 39, False: 485]
  ------------------
   83|     39|    return false;
   84|     39|  }
   85|    485|  probability_table_.resize(num_symbols_);
   86|    485|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 10, False: 475]
  ------------------
   87|     10|    return true;
   88|     10|  }
   89|       |  // Decode the table.
   90|   422k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 422k, False: 352]
  ------------------
   91|   422k|    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|   422k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 48, False: 422k]
  ------------------
   95|     48|      return false;
   96|     48|    }
   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|   422k|    const int token = prob_data & 3;
  102|   422k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 254k, False: 167k]
  ------------------
  103|   254k|      const uint32_t offset = prob_data >> 2;
  104|   254k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 44, False: 254k]
  ------------------
  105|     44|        return false;
  106|     44|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  4.68M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 4.42M, False: 254k]
  ------------------
  109|  4.42M|        probability_table_[i + j] = 0;
  110|  4.42M|      }
  111|   254k|      i += offset;
  112|   254k|    } else {
  113|   167k|      const int extra_bytes = token;
  114|   167k|      uint32_t prob = prob_data >> 2;
  115|   308k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 140k, False: 167k]
  ------------------
  116|   140k|        uint8_t eb;
  117|   140k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 31, False: 140k]
  ------------------
  118|     31|          return false;
  119|     31|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   140k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   140k|      }
  124|   167k|      probability_table_[i] = prob;
  125|   167k|    }
  126|   422k|  }
  127|    352|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 37, False: 315]
  ------------------
  128|     37|    return false;
  129|     37|  }
  130|    315|  return true;
  131|    352|}
_ZNK5draco17RAnsSymbolDecoderILi2EE11num_symbolsEv:
   38|    325|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi2EE13StartDecodingEPNS_13DecoderBufferE:
  135|    315|    DecoderBuffer *buffer) {
  136|    315|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    315|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    315|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    315|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 29, False: 286]
  ------------------
  140|     29|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 29]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     29|  } else
  145|    286|#endif
  146|    286|  {
  147|    286|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 3, False: 283]
  ------------------
  148|      3|      return false;
  149|      3|    }
  150|    286|  }
  151|    312|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 74, False: 238]
  ------------------
  152|     74|    return false;
  153|     74|  }
  154|    238|  const uint8_t *const data_head =
  155|    238|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    238|  buffer->Advance(bytes_encoded);
  158|    238|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 36, False: 202]
  ------------------
  159|     36|    return false;
  160|     36|  }
  161|    202|  return true;
  162|    238|}
_ZN5draco17RAnsSymbolDecoderILi2EE12DecodeSymbolEv:
   43|  1.88M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi2EE11EndDecodingEv:
  165|    202|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    202|  ans_.read_end();
  167|    202|}
_ZN5draco17RAnsSymbolDecoderILi3EEC2Ev:
   33|    545|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi3EE6CreateEPNS_13DecoderBufferE:
   59|    545|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    545|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 545]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    545|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    545|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    545|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 81, False: 464]
  ------------------
   67|     81|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 80]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     81|  } else
   72|    464|#endif
   73|    464|  {
   74|    464|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 456]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    464|  }
   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|    536|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 18, False: 518]
  ------------------
   83|     18|    return false;
   84|     18|  }
   85|    518|  probability_table_.resize(num_symbols_);
   86|    518|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 14, False: 504]
  ------------------
   87|     14|    return true;
   88|     14|  }
   89|       |  // Decode the table.
   90|  28.0k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 27.6k, False: 394]
  ------------------
   91|  27.6k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  27.6k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 46, False: 27.5k]
  ------------------
   95|     46|      return false;
   96|     46|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  27.5k|    const int token = prob_data & 3;
  102|  27.5k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 8.40k, False: 19.1k]
  ------------------
  103|  8.40k|      const uint32_t offset = prob_data >> 2;
  104|  8.40k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 44, False: 8.36k]
  ------------------
  105|     44|        return false;
  106|     44|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   370k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 362k, False: 8.36k]
  ------------------
  109|   362k|        probability_table_[i + j] = 0;
  110|   362k|      }
  111|  8.36k|      i += offset;
  112|  19.1k|    } else {
  113|  19.1k|      const int extra_bytes = token;
  114|  19.1k|      uint32_t prob = prob_data >> 2;
  115|  35.6k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 16.4k, False: 19.1k]
  ------------------
  116|  16.4k|        uint8_t eb;
  117|  16.4k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 20, False: 16.4k]
  ------------------
  118|     20|          return false;
  119|     20|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  16.4k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  16.4k|      }
  124|  19.1k|      probability_table_[i] = prob;
  125|  19.1k|    }
  126|  27.5k|  }
  127|    394|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 46, False: 348]
  ------------------
  128|     46|    return false;
  129|     46|  }
  130|    348|  return true;
  131|    394|}
_ZNK5draco17RAnsSymbolDecoderILi3EE11num_symbolsEv:
   38|    362|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi3EE13StartDecodingEPNS_13DecoderBufferE:
  135|    348|    DecoderBuffer *buffer) {
  136|    348|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    348|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    348|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    348|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 64, False: 284]
  ------------------
  140|     64|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 64]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     64|  } else
  145|    284|#endif
  146|    284|  {
  147|    284|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 16, False: 268]
  ------------------
  148|     16|      return false;
  149|     16|    }
  150|    284|  }
  151|    332|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 128, False: 204]
  ------------------
  152|    128|    return false;
  153|    128|  }
  154|    204|  const uint8_t *const data_head =
  155|    204|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    204|  buffer->Advance(bytes_encoded);
  158|    204|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 54, False: 150]
  ------------------
  159|     54|    return false;
  160|     54|  }
  161|    150|  return true;
  162|    204|}
_ZN5draco17RAnsSymbolDecoderILi3EE12DecodeSymbolEv:
   43|  6.24M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi3EE11EndDecodingEv:
  165|    150|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    150|  ans_.read_end();
  167|    150|}
_ZN5draco17RAnsSymbolDecoderILi4EEC2Ev:
   33|    388|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi4EE6CreateEPNS_13DecoderBufferE:
   59|    388|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    388|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 388]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    388|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    388|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    388|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 14, False: 374]
  ------------------
   67|     14|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 14]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     14|  } else
   72|    374|#endif
   73|    374|  {
   74|    374|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 7, False: 367]
  ------------------
   75|      7|      return false;
   76|      7|    }
   77|    374|  }
   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|    381|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 14, False: 367]
  ------------------
   83|     14|    return false;
   84|     14|  }
   85|    367|  probability_table_.resize(num_symbols_);
   86|    367|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 17, False: 350]
  ------------------
   87|     17|    return true;
   88|     17|  }
   89|       |  // Decode the table.
   90|   892k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 892k, False: 257]
  ------------------
   91|   892k|    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|   892k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 38, False: 892k]
  ------------------
   95|     38|      return false;
   96|     38|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   892k|    const int token = prob_data & 3;
  102|   892k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 879k, False: 12.4k]
  ------------------
  103|   879k|      const uint32_t offset = prob_data >> 2;
  104|   879k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 42, False: 879k]
  ------------------
  105|     42|        return false;
  106|     42|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  50.9M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 50.0M, False: 879k]
  ------------------
  109|  50.0M|        probability_table_[i + j] = 0;
  110|  50.0M|      }
  111|   879k|      i += offset;
  112|   879k|    } else {
  113|  12.4k|      const int extra_bytes = token;
  114|  12.4k|      uint32_t prob = prob_data >> 2;
  115|  20.2k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 7.87k, False: 12.4k]
  ------------------
  116|  7.87k|        uint8_t eb;
  117|  7.87k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 13, False: 7.86k]
  ------------------
  118|     13|          return false;
  119|     13|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  7.86k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  7.86k|      }
  124|  12.4k|      probability_table_[i] = prob;
  125|  12.4k|    }
  126|   892k|  }
  127|    257|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 28, False: 229]
  ------------------
  128|     28|    return false;
  129|     28|  }
  130|    229|  return true;
  131|    257|}
_ZNK5draco17RAnsSymbolDecoderILi4EE11num_symbolsEv:
   38|    246|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi4EE13StartDecodingEPNS_13DecoderBufferE:
  135|    229|    DecoderBuffer *buffer) {
  136|    229|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    229|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    229|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    229|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 1, False: 228]
  ------------------
  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|    228|#endif
  146|    228|  {
  147|    228|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 14, False: 214]
  ------------------
  148|     14|      return false;
  149|     14|    }
  150|    228|  }
  151|    215|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 14, False: 201]
  ------------------
  152|     14|    return false;
  153|     14|  }
  154|    201|  const uint8_t *const data_head =
  155|    201|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    201|  buffer->Advance(bytes_encoded);
  158|    201|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 41, False: 160]
  ------------------
  159|     41|    return false;
  160|     41|  }
  161|    160|  return true;
  162|    201|}
_ZN5draco17RAnsSymbolDecoderILi4EE12DecodeSymbolEv:
   43|  9.44M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi4EE11EndDecodingEv:
  165|    160|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    160|  ans_.read_end();
  167|    160|}
_ZN5draco17RAnsSymbolDecoderILi6EEC2Ev:
   33|    455|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi6EE6CreateEPNS_13DecoderBufferE:
   59|    455|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    455|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 455]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    455|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    455|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    455|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 84, False: 371]
  ------------------
   67|     84|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 84]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     84|  } else
   72|    371|#endif
   73|    371|  {
   74|    371|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 9, False: 362]
  ------------------
   75|      9|      return false;
   76|      9|    }
   77|    371|  }
   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|    446|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 46, False: 400]
  ------------------
   83|     46|    return false;
   84|     46|  }
   85|    400|  probability_table_.resize(num_symbols_);
   86|    400|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 7, False: 393]
  ------------------
   87|      7|    return true;
   88|      7|  }
   89|       |  // Decode the table.
   90|  9.71k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 9.39k, False: 313]
  ------------------
   91|  9.39k|    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|  9.39k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 42, False: 9.35k]
  ------------------
   95|     42|      return false;
   96|     42|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  9.35k|    const int token = prob_data & 3;
  102|  9.35k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 4.67k, False: 4.67k]
  ------------------
  103|  4.67k|      const uint32_t offset = prob_data >> 2;
  104|  4.67k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 22, False: 4.65k]
  ------------------
  105|     22|        return false;
  106|     22|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   173k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 169k, False: 4.65k]
  ------------------
  109|   169k|        probability_table_[i + j] = 0;
  110|   169k|      }
  111|  4.65k|      i += offset;
  112|  4.67k|    } else {
  113|  4.67k|      const int extra_bytes = token;
  114|  4.67k|      uint32_t prob = prob_data >> 2;
  115|  7.61k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 2.95k, False: 4.66k]
  ------------------
  116|  2.95k|        uint8_t eb;
  117|  2.95k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 16, False: 2.94k]
  ------------------
  118|     16|          return false;
  119|     16|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  2.94k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  2.94k|      }
  124|  4.66k|      probability_table_[i] = prob;
  125|  4.66k|    }
  126|  9.35k|  }
  127|    313|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 25, False: 288]
  ------------------
  128|     25|    return false;
  129|     25|  }
  130|    288|  return true;
  131|    313|}
_ZNK5draco17RAnsSymbolDecoderILi6EE11num_symbolsEv:
   38|    295|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi6EE13StartDecodingEPNS_13DecoderBufferE:
  135|    288|    DecoderBuffer *buffer) {
  136|    288|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    288|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    288|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    288|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 54, False: 234]
  ------------------
  140|     54|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 3, False: 51]
  ------------------
  141|      3|      return false;
  142|      3|    }
  143|       |
  144|     54|  } else
  145|    234|#endif
  146|    234|  {
  147|    234|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 6, False: 228]
  ------------------
  148|      6|      return false;
  149|      6|    }
  150|    234|  }
  151|    279|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 87, False: 192]
  ------------------
  152|     87|    return false;
  153|     87|  }
  154|    192|  const uint8_t *const data_head =
  155|    192|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    192|  buffer->Advance(bytes_encoded);
  158|    192|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 49, False: 143]
  ------------------
  159|     49|    return false;
  160|     49|  }
  161|    143|  return true;
  162|    192|}
_ZN5draco17RAnsSymbolDecoderILi6EE12DecodeSymbolEv:
   43|  6.25M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi6EE11EndDecodingEv:
  165|    143|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    143|  ans_.read_end();
  167|    143|}
_ZN5draco17RAnsSymbolDecoderILi7EEC2Ev:
   33|    399|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi7EE6CreateEPNS_13DecoderBufferE:
   59|    399|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    399|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 399]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    399|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    399|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    399|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 53, False: 346]
  ------------------
   67|     53|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 53]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     53|  } else
   72|    346|#endif
   73|    346|  {
   74|    346|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 338]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    346|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    391|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 16, False: 375]
  ------------------
   83|     16|    return false;
   84|     16|  }
   85|    375|  probability_table_.resize(num_symbols_);
   86|    375|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 14, False: 361]
  ------------------
   87|     14|    return true;
   88|     14|  }
   89|       |  // Decode the table.
   90|  1.45M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.45M, False: 232]
  ------------------
   91|  1.45M|    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.45M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 64, False: 1.45M]
  ------------------
   95|     64|      return false;
   96|     64|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  1.45M|    const int token = prob_data & 3;
  102|  1.45M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 433k, False: 1.01M]
  ------------------
  103|   433k|      const uint32_t offset = prob_data >> 2;
  104|   433k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 41, False: 433k]
  ------------------
  105|     41|        return false;
  106|     41|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  19.9M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 19.5M, False: 433k]
  ------------------
  109|  19.5M|        probability_table_[i + j] = 0;
  110|  19.5M|      }
  111|   433k|      i += offset;
  112|  1.01M|    } else {
  113|  1.01M|      const int extra_bytes = token;
  114|  1.01M|      uint32_t prob = prob_data >> 2;
  115|  1.65M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 634k, False: 1.01M]
  ------------------
  116|   634k|        uint8_t eb;
  117|   634k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 24, False: 634k]
  ------------------
  118|     24|          return false;
  119|     24|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   634k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   634k|      }
  124|  1.01M|      probability_table_[i] = prob;
  125|  1.01M|    }
  126|  1.45M|  }
  127|    232|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 25, False: 207]
  ------------------
  128|     25|    return false;
  129|     25|  }
  130|    207|  return true;
  131|    232|}
_ZNK5draco17RAnsSymbolDecoderILi7EE11num_symbolsEv:
   38|    221|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi7EE13StartDecodingEPNS_13DecoderBufferE:
  135|    207|    DecoderBuffer *buffer) {
  136|    207|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    207|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    207|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    207|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 29, False: 178]
  ------------------
  140|     29|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 3, False: 26]
  ------------------
  141|      3|      return false;
  142|      3|    }
  143|       |
  144|     29|  } else
  145|    178|#endif
  146|    178|  {
  147|    178|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 9, False: 169]
  ------------------
  148|      9|      return false;
  149|      9|    }
  150|    178|  }
  151|    195|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 54, False: 141]
  ------------------
  152|     54|    return false;
  153|     54|  }
  154|    141|  const uint8_t *const data_head =
  155|    141|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    141|  buffer->Advance(bytes_encoded);
  158|    141|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 31, False: 110]
  ------------------
  159|     31|    return false;
  160|     31|  }
  161|    110|  return true;
  162|    141|}
_ZN5draco17RAnsSymbolDecoderILi7EE12DecodeSymbolEv:
   43|  21.9M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi7EE11EndDecodingEv:
  165|    110|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    110|  ans_.read_end();
  167|    110|}
_ZN5draco17RAnsSymbolDecoderILi8EEC2Ev:
   33|    452|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi8EE6CreateEPNS_13DecoderBufferE:
   59|    452|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    452|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 452]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    452|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    452|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    452|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 88, False: 364]
  ------------------
   67|     88|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 86]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     88|  } else
   72|    364|#endif
   73|    364|  {
   74|    364|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 11, False: 353]
  ------------------
   75|     11|      return false;
   76|     11|    }
   77|    364|  }
   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|    439|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 34, False: 405]
  ------------------
   83|     34|    return false;
   84|     34|  }
   85|    405|  probability_table_.resize(num_symbols_);
   86|    405|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 12, False: 393]
  ------------------
   87|     12|    return true;
   88|     12|  }
   89|       |  // Decode the table.
   90|   896k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 896k, False: 291]
  ------------------
   91|   896k|    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|   896k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 48, False: 896k]
  ------------------
   95|     48|      return false;
   96|     48|    }
   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|   896k|    const int token = prob_data & 3;
  102|   896k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 229k, False: 666k]
  ------------------
  103|   229k|      const uint32_t offset = prob_data >> 2;
  104|   229k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 35, False: 229k]
  ------------------
  105|     35|        return false;
  106|     35|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  11.3M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 11.1M, False: 229k]
  ------------------
  109|  11.1M|        probability_table_[i + j] = 0;
  110|  11.1M|      }
  111|   229k|      i += offset;
  112|   666k|    } else {
  113|   666k|      const int extra_bytes = token;
  114|   666k|      uint32_t prob = prob_data >> 2;
  115|   888k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 221k, False: 666k]
  ------------------
  116|   221k|        uint8_t eb;
  117|   221k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 19, False: 221k]
  ------------------
  118|     19|          return false;
  119|     19|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   221k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   221k|      }
  124|   666k|      probability_table_[i] = prob;
  125|   666k|    }
  126|   896k|  }
  127|    291|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 25, False: 266]
  ------------------
  128|     25|    return false;
  129|     25|  }
  130|    266|  return true;
  131|    291|}
_ZNK5draco17RAnsSymbolDecoderILi8EE11num_symbolsEv:
   38|    278|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi8EE13StartDecodingEPNS_13DecoderBufferE:
  135|    266|    DecoderBuffer *buffer) {
  136|    266|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    266|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    266|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    266|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 43, False: 223]
  ------------------
  140|     43|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 0, False: 43]
  ------------------
  141|      0|      return false;
  142|      0|    }
  143|       |
  144|     43|  } else
  145|    223|#endif
  146|    223|  {
  147|    223|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 223]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    223|  }
  151|    266|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 87, False: 179]
  ------------------
  152|     87|    return false;
  153|     87|  }
  154|    179|  const uint8_t *const data_head =
  155|    179|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    179|  buffer->Advance(bytes_encoded);
  158|    179|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 40, False: 139]
  ------------------
  159|     40|    return false;
  160|     40|  }
  161|    139|  return true;
  162|    179|}
_ZN5draco17RAnsSymbolDecoderILi8EE12DecodeSymbolEv:
   43|  21.2M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi8EE11EndDecodingEv:
  165|    139|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    139|  ans_.read_end();
  167|    139|}
_ZN5draco17RAnsSymbolDecoderILi9EEC2Ev:
   33|    537|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi9EE6CreateEPNS_13DecoderBufferE:
   59|    537|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    537|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 537]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    537|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    537|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    537|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 33, False: 504]
  ------------------
   67|     33|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 33]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     33|  } else
   72|    504|#endif
   73|    504|  {
   74|    504|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 11, False: 493]
  ------------------
   75|     11|      return false;
   76|     11|    }
   77|    504|  }
   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|    526|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 26, False: 500]
  ------------------
   83|     26|    return false;
   84|     26|  }
   85|    500|  probability_table_.resize(num_symbols_);
   86|    500|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 9, False: 491]
  ------------------
   87|      9|    return true;
   88|      9|  }
   89|       |  // Decode the table.
   90|   143k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 142k, False: 398]
  ------------------
   91|   142k|    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|   142k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 45, False: 142k]
  ------------------
   95|     45|      return false;
   96|     45|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   142k|    const int token = prob_data & 3;
  102|   142k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 17.1k, False: 125k]
  ------------------
  103|  17.1k|      const uint32_t offset = prob_data >> 2;
  104|  17.1k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 27, False: 17.0k]
  ------------------
  105|     27|        return false;
  106|     27|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   531k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 514k, False: 17.0k]
  ------------------
  109|   514k|        probability_table_[i + j] = 0;
  110|   514k|      }
  111|  17.0k|      i += offset;
  112|   125k|    } else {
  113|   125k|      const int extra_bytes = token;
  114|   125k|      uint32_t prob = prob_data >> 2;
  115|   165k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 39.8k, False: 125k]
  ------------------
  116|  39.8k|        uint8_t eb;
  117|  39.8k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 21, False: 39.8k]
  ------------------
  118|     21|          return false;
  119|     21|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  39.8k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  39.8k|      }
  124|   125k|      probability_table_[i] = prob;
  125|   125k|    }
  126|   142k|  }
  127|    398|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 61, False: 337]
  ------------------
  128|     61|    return false;
  129|     61|  }
  130|    337|  return true;
  131|    398|}
_ZNK5draco17RAnsSymbolDecoderILi9EE11num_symbolsEv:
   38|    346|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi9EE13StartDecodingEPNS_13DecoderBufferE:
  135|    337|    DecoderBuffer *buffer) {
  136|    337|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    337|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    337|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    337|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 15, False: 322]
  ------------------
  140|     15|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 14]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     15|  } else
  145|    322|#endif
  146|    322|  {
  147|    322|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 4, False: 318]
  ------------------
  148|      4|      return false;
  149|      4|    }
  150|    322|  }
  151|    332|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 80, False: 252]
  ------------------
  152|     80|    return false;
  153|     80|  }
  154|    252|  const uint8_t *const data_head =
  155|    252|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    252|  buffer->Advance(bytes_encoded);
  158|    252|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 59, False: 193]
  ------------------
  159|     59|    return false;
  160|     59|  }
  161|    193|  return true;
  162|    252|}
_ZN5draco17RAnsSymbolDecoderILi9EE12DecodeSymbolEv:
   43|  11.9M|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi9EE11EndDecodingEv:
  165|    193|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|    193|  ans_.read_end();
  167|    193|}
_ZN5draco17RAnsSymbolDecoderILi10EEC2Ev:
   33|    442|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi10EE6CreateEPNS_13DecoderBufferE:
   59|    442|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    442|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 442]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    442|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    442|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    442|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 45, False: 397]
  ------------------
   67|     45|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 43]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     45|  } else
   72|    397|#endif
   73|    397|  {
   74|    397|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 11, False: 386]
  ------------------
   75|     11|      return false;
   76|     11|    }
   77|    397|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    429|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 16, False: 413]
  ------------------
   83|     16|    return false;
   84|     16|  }
   85|    413|  probability_table_.resize(num_symbols_);
   86|    413|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 5, False: 408]
  ------------------
   87|      5|    return true;
   88|      5|  }
   89|       |  // Decode the table.
   90|  90.2k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 89.9k, False: 305]
  ------------------
   91|  89.9k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  89.9k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 52, False: 89.8k]
  ------------------
   95|     52|      return false;
   96|     52|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  89.8k|    const int token = prob_data & 3;
  102|  89.8k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 10.5k, False: 79.3k]
  ------------------
  103|  10.5k|      const uint32_t offset = prob_data >> 2;
  104|  10.5k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 33, False: 10.5k]
  ------------------
  105|     33|        return false;
  106|     33|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   311k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 301k, False: 10.5k]
  ------------------
  109|   301k|        probability_table_[i + j] = 0;
  110|   301k|      }
  111|  10.5k|      i += offset;
  112|  79.3k|    } else {
  113|  79.3k|      const int extra_bytes = token;
  114|  79.3k|      uint32_t prob = prob_data >> 2;
  115|   158k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 79.2k, False: 79.3k]
  ------------------
  116|  79.2k|        uint8_t eb;
  117|  79.2k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 18, False: 79.2k]
  ------------------
  118|     18|          return false;
  119|     18|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  79.2k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  79.2k|      }
  124|  79.3k|      probability_table_[i] = prob;
  125|  79.3k|    }
  126|  89.8k|  }
  127|    305|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 73, False: 232]
  ------------------
  128|     73|    return false;
  129|     73|  }
  130|    232|  return true;
  131|    305|}
_ZNK5draco17RAnsSymbolDecoderILi10EE11num_symbolsEv:
   38|    237|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi10EE13StartDecodingEPNS_13DecoderBufferE:
  135|    232|    DecoderBuffer *buffer) {
  136|    232|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    232|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    232|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    232|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 30, False: 202]
  ------------------
  140|     30|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 29]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     30|  } else
  145|    202|#endif
  146|    202|  {
  147|    202|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 2, False: 200]
  ------------------
  148|      2|      return false;
  149|      2|    }
  150|    202|  }
  151|    229|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 82, False: 147]
  ------------------
  152|     82|    return false;
  153|     82|  }
  154|    147|  const uint8_t *const data_head =
  155|    147|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    147|  buffer->Advance(bytes_encoded);
  158|    147|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 73, False: 74]
  ------------------
  159|     73|    return false;
  160|     73|  }
  161|     74|  return true;
  162|    147|}
_ZN5draco17RAnsSymbolDecoderILi10EE12DecodeSymbolEv:
   43|   572k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi10EE11EndDecodingEv:
  165|     74|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     74|  ans_.read_end();
  167|     74|}
_ZN5draco17RAnsSymbolDecoderILi11EEC2Ev:
   33|    374|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi11EE6CreateEPNS_13DecoderBufferE:
   59|    374|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    374|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 374]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    374|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    374|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    374|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 29, False: 345]
  ------------------
   67|     29|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 29]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     29|  } else
   72|    345|#endif
   73|    345|  {
   74|    345|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 12, False: 333]
  ------------------
   75|     12|      return false;
   76|     12|    }
   77|    345|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    362|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 27, False: 335]
  ------------------
   83|     27|    return false;
   84|     27|  }
   85|    335|  probability_table_.resize(num_symbols_);
   86|    335|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 9, False: 326]
  ------------------
   87|      9|    return true;
   88|      9|  }
   89|       |  // Decode the table.
   90|  39.8k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 39.6k, False: 232]
  ------------------
   91|  39.6k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  39.6k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 44, False: 39.5k]
  ------------------
   95|     44|      return false;
   96|     44|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  39.5k|    const int token = prob_data & 3;
  102|  39.5k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 11.4k, False: 28.1k]
  ------------------
  103|  11.4k|      const uint32_t offset = prob_data >> 2;
  104|  11.4k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 36, False: 11.3k]
  ------------------
  105|     36|        return false;
  106|     36|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   443k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 432k, False: 11.3k]
  ------------------
  109|   432k|        probability_table_[i + j] = 0;
  110|   432k|      }
  111|  11.3k|      i += offset;
  112|  28.1k|    } else {
  113|  28.1k|      const int extra_bytes = token;
  114|  28.1k|      uint32_t prob = prob_data >> 2;
  115|  50.7k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 22.5k, False: 28.1k]
  ------------------
  116|  22.5k|        uint8_t eb;
  117|  22.5k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 14, False: 22.5k]
  ------------------
  118|     14|          return false;
  119|     14|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  22.5k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  22.5k|      }
  124|  28.1k|      probability_table_[i] = prob;
  125|  28.1k|    }
  126|  39.5k|  }
  127|    232|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 69, False: 163]
  ------------------
  128|     69|    return false;
  129|     69|  }
  130|    163|  return true;
  131|    232|}
_ZNK5draco17RAnsSymbolDecoderILi11EE11num_symbolsEv:
   38|    172|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi11EE13StartDecodingEPNS_13DecoderBufferE:
  135|    163|    DecoderBuffer *buffer) {
  136|    163|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    163|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    163|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    163|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 163]
  ------------------
  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|    163|#endif
  146|    163|  {
  147|    163|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 9, False: 154]
  ------------------
  148|      9|      return false;
  149|      9|    }
  150|    163|  }
  151|    154|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 66, False: 88]
  ------------------
  152|     66|    return false;
  153|     66|  }
  154|     88|  const uint8_t *const data_head =
  155|     88|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     88|  buffer->Advance(bytes_encoded);
  158|     88|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 22, False: 66]
  ------------------
  159|     22|    return false;
  160|     22|  }
  161|     66|  return true;
  162|     88|}
_ZN5draco17RAnsSymbolDecoderILi11EE12DecodeSymbolEv:
   43|   449k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi11EE11EndDecodingEv:
  165|     66|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     66|  ans_.read_end();
  167|     66|}
_ZN5draco17RAnsSymbolDecoderILi12EEC2Ev:
   33|    401|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi12EE6CreateEPNS_13DecoderBufferE:
   59|    401|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    401|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 401]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    401|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    401|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    401|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 44, False: 357]
  ------------------
   67|     44|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 44]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     44|  } else
   72|    357|#endif
   73|    357|  {
   74|    357|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 14, False: 343]
  ------------------
   75|     14|      return false;
   76|     14|    }
   77|    357|  }
   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|    387|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 12, False: 375]
  ------------------
   83|     12|    return false;
   84|     12|  }
   85|    375|  probability_table_.resize(num_symbols_);
   86|    375|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 7, False: 368]
  ------------------
   87|      7|    return true;
   88|      7|  }
   89|       |  // Decode the table.
   90|  1.01M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.01M, False: 250]
  ------------------
   91|  1.01M|    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.01M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 69, False: 1.01M]
  ------------------
   95|     69|      return false;
   96|     69|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  1.01M|    const int token = prob_data & 3;
  102|  1.01M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 693k, False: 322k]
  ------------------
  103|   693k|      const uint32_t offset = prob_data >> 2;
  104|   693k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 34, False: 693k]
  ------------------
  105|     34|        return false;
  106|     34|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  29.6M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 28.9M, False: 693k]
  ------------------
  109|  28.9M|        probability_table_[i + j] = 0;
  110|  28.9M|      }
  111|   693k|      i += offset;
  112|   693k|    } else {
  113|   322k|      const int extra_bytes = token;
  114|   322k|      uint32_t prob = prob_data >> 2;
  115|   611k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 288k, False: 322k]
  ------------------
  116|   288k|        uint8_t eb;
  117|   288k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 15, False: 288k]
  ------------------
  118|     15|          return false;
  119|     15|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   288k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   288k|      }
  124|   322k|      probability_table_[i] = prob;
  125|   322k|    }
  126|  1.01M|  }
  127|    250|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 73, False: 177]
  ------------------
  128|     73|    return false;
  129|     73|  }
  130|    177|  return true;
  131|    250|}
_ZNK5draco17RAnsSymbolDecoderILi12EE11num_symbolsEv:
   38|    184|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi12EE13StartDecodingEPNS_13DecoderBufferE:
  135|    177|    DecoderBuffer *buffer) {
  136|    177|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    177|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    177|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    177|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 19, False: 158]
  ------------------
  140|     19|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 17]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     19|  } else
  145|    158|#endif
  146|    158|  {
  147|    158|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 3, False: 155]
  ------------------
  148|      3|      return false;
  149|      3|    }
  150|    158|  }
  151|    172|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 77, False: 95]
  ------------------
  152|     77|    return false;
  153|     77|  }
  154|     95|  const uint8_t *const data_head =
  155|     95|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|     95|  buffer->Advance(bytes_encoded);
  158|     95|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 33, False: 62]
  ------------------
  159|     33|    return false;
  160|     33|  }
  161|     62|  return true;
  162|     95|}
_ZN5draco17RAnsSymbolDecoderILi12EE12DecodeSymbolEv:
   43|  71.4k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi12EE11EndDecodingEv:
  165|     62|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     62|  ans_.read_end();
  167|     62|}
_ZN5draco17RAnsSymbolDecoderILi13EEC2Ev:
   33|    428|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi13EE6CreateEPNS_13DecoderBufferE:
   59|    428|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    428|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 428]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    428|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    428|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    428|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 32, False: 396]
  ------------------
   67|     32|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 0, False: 32]
  ------------------
   68|      0|      return false;
   69|      0|    }
   70|       |
   71|     32|  } else
   72|    396|#endif
   73|    396|  {
   74|    396|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 13, False: 383]
  ------------------
   75|     13|      return false;
   76|     13|    }
   77|    396|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    415|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 22, False: 393]
  ------------------
   83|     22|    return false;
   84|     22|  }
   85|    393|  probability_table_.resize(num_symbols_);
   86|    393|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 12, False: 381]
  ------------------
   87|     12|    return true;
   88|     12|  }
   89|       |  // Decode the table.
   90|  2.07M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 2.07M, False: 270]
  ------------------
   91|  2.07M|    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.07M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 53, False: 2.07M]
  ------------------
   95|     53|      return false;
   96|     53|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  2.07M|    const int token = prob_data & 3;
  102|  2.07M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 954k, False: 1.12M]
  ------------------
  103|   954k|      const uint32_t offset = prob_data >> 2;
  104|   954k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 34, False: 954k]
  ------------------
  105|     34|        return false;
  106|     34|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  52.1M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 51.1M, False: 954k]
  ------------------
  109|  51.1M|        probability_table_[i + j] = 0;
  110|  51.1M|      }
  111|   954k|      i += offset;
  112|  1.12M|    } else {
  113|  1.12M|      const int extra_bytes = token;
  114|  1.12M|      uint32_t prob = prob_data >> 2;
  115|  1.82M|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 700k, False: 1.12M]
  ------------------
  116|   700k|        uint8_t eb;
  117|   700k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 24, False: 700k]
  ------------------
  118|     24|          return false;
  119|     24|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   700k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   700k|      }
  124|  1.12M|      probability_table_[i] = prob;
  125|  1.12M|    }
  126|  2.07M|  }
  127|    270|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 87, False: 183]
  ------------------
  128|     87|    return false;
  129|     87|  }
  130|    183|  return true;
  131|    270|}
_ZNK5draco17RAnsSymbolDecoderILi13EE11num_symbolsEv:
   38|    195|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi13EE13StartDecodingEPNS_13DecoderBufferE:
  135|    183|    DecoderBuffer *buffer) {
  136|    183|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    183|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    183|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    183|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 0, False: 183]
  ------------------
  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|    183|#endif
  146|    183|  {
  147|    183|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 183]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    183|  }
  151|    183|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 79, False: 104]
  ------------------
  152|     79|    return false;
  153|     79|  }
  154|    104|  const uint8_t *const data_head =
  155|    104|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    104|  buffer->Advance(bytes_encoded);
  158|    104|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 26, False: 78]
  ------------------
  159|     26|    return false;
  160|     26|  }
  161|     78|  return true;
  162|    104|}
_ZN5draco17RAnsSymbolDecoderILi13EE12DecodeSymbolEv:
   43|   111k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi13EE11EndDecodingEv:
  165|     78|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     78|  ans_.read_end();
  167|     78|}
_ZN5draco17RAnsSymbolDecoderILi14EEC2Ev:
   33|    374|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi14EE6CreateEPNS_13DecoderBufferE:
   59|    374|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    374|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 374]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    374|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    374|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    374|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 50, False: 324]
  ------------------
   67|     50|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 2, False: 48]
  ------------------
   68|      2|      return false;
   69|      2|    }
   70|       |
   71|     50|  } else
   72|    324|#endif
   73|    324|  {
   74|    324|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 5, False: 319]
  ------------------
   75|      5|      return false;
   76|      5|    }
   77|    324|  }
   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|    367|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 17, False: 350]
  ------------------
   83|     17|    return false;
   84|     17|  }
   85|    350|  probability_table_.resize(num_symbols_);
   86|    350|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 9, False: 341]
  ------------------
   87|      9|    return true;
   88|      9|  }
   89|       |  // Decode the table.
   90|   347k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 347k, False: 223]
  ------------------
   91|   347k|    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|   347k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 53, False: 347k]
  ------------------
   95|     53|      return false;
   96|     53|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|   347k|    const int token = prob_data & 3;
  102|   347k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 236k, False: 110k]
  ------------------
  103|   236k|      const uint32_t offset = prob_data >> 2;
  104|   236k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 42, False: 236k]
  ------------------
  105|     42|        return false;
  106|     42|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  10.1M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 9.94M, False: 236k]
  ------------------
  109|  9.94M|        probability_table_[i + j] = 0;
  110|  9.94M|      }
  111|   236k|      i += offset;
  112|   236k|    } else {
  113|   110k|      const int extra_bytes = token;
  114|   110k|      uint32_t prob = prob_data >> 2;
  115|   182k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 72.1k, False: 110k]
  ------------------
  116|  72.1k|        uint8_t eb;
  117|  72.1k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 23, False: 72.0k]
  ------------------
  118|     23|          return false;
  119|     23|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  72.0k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  72.0k|      }
  124|   110k|      probability_table_[i] = prob;
  125|   110k|    }
  126|   347k|  }
  127|    223|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 37, False: 186]
  ------------------
  128|     37|    return false;
  129|     37|  }
  130|    186|  return true;
  131|    223|}
_ZNK5draco17RAnsSymbolDecoderILi14EE11num_symbolsEv:
   38|    195|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi14EE13StartDecodingEPNS_13DecoderBufferE:
  135|    186|    DecoderBuffer *buffer) {
  136|    186|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    186|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    186|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    186|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 23, False: 163]
  ------------------
  140|     23|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 22]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     23|  } else
  145|    163|#endif
  146|    163|  {
  147|    163|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 7, False: 156]
  ------------------
  148|      7|      return false;
  149|      7|    }
  150|    163|  }
  151|    178|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 70, False: 108]
  ------------------
  152|     70|    return false;
  153|     70|  }
  154|    108|  const uint8_t *const data_head =
  155|    108|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    108|  buffer->Advance(bytes_encoded);
  158|    108|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 35, False: 73]
  ------------------
  159|     35|    return false;
  160|     35|  }
  161|     73|  return true;
  162|    108|}
_ZN5draco17RAnsSymbolDecoderILi14EE12DecodeSymbolEv:
   43|   129k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi14EE11EndDecodingEv:
  165|     73|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     73|  ans_.read_end();
  167|     73|}
_ZN5draco17RAnsSymbolDecoderILi15EEC2Ev:
   33|    399|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi15EE6CreateEPNS_13DecoderBufferE:
   59|    399|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    399|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 399]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    399|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    399|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    399|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 82, False: 317]
  ------------------
   67|     82|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 5, False: 77]
  ------------------
   68|      5|      return false;
   69|      5|    }
   70|       |
   71|     82|  } else
   72|    317|#endif
   73|    317|  {
   74|    317|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 5, False: 312]
  ------------------
   75|      5|      return false;
   76|      5|    }
   77|    317|  }
   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|    389|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 27, False: 362]
  ------------------
   83|     27|    return false;
   84|     27|  }
   85|    362|  probability_table_.resize(num_symbols_);
   86|    362|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 15, False: 347]
  ------------------
   87|     15|    return true;
   88|     15|  }
   89|       |  // Decode the table.
   90|  1.77M|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 1.77M, False: 241]
  ------------------
   91|  1.77M|    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.77M|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 52, False: 1.77M]
  ------------------
   95|     52|      return false;
   96|     52|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  1.77M|    const int token = prob_data & 3;
  102|  1.77M|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 1.58M, False: 183k]
  ------------------
  103|  1.58M|      const uint32_t offset = prob_data >> 2;
  104|  1.58M|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 34, False: 1.58M]
  ------------------
  105|     34|        return false;
  106|     34|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  92.9M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 91.3M, False: 1.58M]
  ------------------
  109|  91.3M|        probability_table_[i + j] = 0;
  110|  91.3M|      }
  111|  1.58M|      i += offset;
  112|  1.58M|    } else {
  113|   183k|      const int extra_bytes = token;
  114|   183k|      uint32_t prob = prob_data >> 2;
  115|   321k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 137k, False: 183k]
  ------------------
  116|   137k|        uint8_t eb;
  117|   137k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 20, False: 137k]
  ------------------
  118|     20|          return false;
  119|     20|        }
  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|   183k|      probability_table_[i] = prob;
  125|   183k|    }
  126|  1.77M|  }
  127|    241|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 34, False: 207]
  ------------------
  128|     34|    return false;
  129|     34|  }
  130|    207|  return true;
  131|    241|}
_ZNK5draco17RAnsSymbolDecoderILi15EE11num_symbolsEv:
   38|    222|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi15EE13StartDecodingEPNS_13DecoderBufferE:
  135|    207|    DecoderBuffer *buffer) {
  136|    207|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    207|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    207|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    207|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 43, False: 164]
  ------------------
  140|     43|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 42]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|     43|  } else
  145|    164|#endif
  146|    164|  {
  147|    164|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 7, False: 157]
  ------------------
  148|      7|      return false;
  149|      7|    }
  150|    164|  }
  151|    199|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 72, False: 127]
  ------------------
  152|     72|    return false;
  153|     72|  }
  154|    127|  const uint8_t *const data_head =
  155|    127|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    127|  buffer->Advance(bytes_encoded);
  158|    127|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 47, False: 80]
  ------------------
  159|     47|    return false;
  160|     47|  }
  161|     80|  return true;
  162|    127|}
_ZN5draco17RAnsSymbolDecoderILi15EE12DecodeSymbolEv:
   43|   366k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi15EE11EndDecodingEv:
  165|     80|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     80|  ans_.read_end();
  167|     80|}
_ZN5draco17RAnsSymbolDecoderILi16EEC2Ev:
   33|    354|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi16EE6CreateEPNS_13DecoderBufferE:
   59|    354|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    354|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 354]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    354|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    354|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    354|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 28, False: 326]
  ------------------
   67|     28|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 27]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     28|  } else
   72|    326|#endif
   73|    326|  {
   74|    326|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 10, False: 316]
  ------------------
   75|     10|      return false;
   76|     10|    }
   77|    326|  }
   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|    343|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 19, False: 324]
  ------------------
   83|     19|    return false;
   84|     19|  }
   85|    324|  probability_table_.resize(num_symbols_);
   86|    324|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 13, False: 311]
  ------------------
   87|     13|    return true;
   88|     13|  }
   89|       |  // Decode the table.
   90|   339k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 339k, False: 212]
  ------------------
   91|   339k|    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|   339k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 50, False: 339k]
  ------------------
   95|     50|      return false;
   96|     50|    }
   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|   339k|    const int token = prob_data & 3;
  102|   339k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 52.5k, False: 286k]
  ------------------
  103|  52.5k|      const uint32_t offset = prob_data >> 2;
  104|  52.5k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 25, False: 52.5k]
  ------------------
  105|     25|        return false;
  106|     25|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  1.80M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 1.75M, False: 52.5k]
  ------------------
  109|  1.75M|        probability_table_[i + j] = 0;
  110|  1.75M|      }
  111|  52.5k|      i += offset;
  112|   286k|    } else {
  113|   286k|      const int extra_bytes = token;
  114|   286k|      uint32_t prob = prob_data >> 2;
  115|   532k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 245k, False: 286k]
  ------------------
  116|   245k|        uint8_t eb;
  117|   245k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 24, False: 245k]
  ------------------
  118|     24|          return false;
  119|     24|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   245k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   245k|      }
  124|   286k|      probability_table_[i] = prob;
  125|   286k|    }
  126|   339k|  }
  127|    212|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 37, False: 175]
  ------------------
  128|     37|    return false;
  129|     37|  }
  130|    175|  return true;
  131|    212|}
_ZNK5draco17RAnsSymbolDecoderILi16EE11num_symbolsEv:
   38|    188|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi16EE13StartDecodingEPNS_13DecoderBufferE:
  135|    175|    DecoderBuffer *buffer) {
  136|    175|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    175|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    175|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    175|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 6, False: 169]
  ------------------
  140|      6|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 1, False: 5]
  ------------------
  141|      1|      return false;
  142|      1|    }
  143|       |
  144|      6|  } else
  145|    169|#endif
  146|    169|  {
  147|    169|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 169]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    169|  }
  151|    174|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 71, False: 103]
  ------------------
  152|     71|    return false;
  153|     71|  }
  154|    103|  const uint8_t *const data_head =
  155|    103|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    103|  buffer->Advance(bytes_encoded);
  158|    103|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 33, False: 70]
  ------------------
  159|     33|    return false;
  160|     33|  }
  161|     70|  return true;
  162|    103|}
_ZN5draco17RAnsSymbolDecoderILi16EE12DecodeSymbolEv:
   43|   157k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi16EE11EndDecodingEv:
  165|     70|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     70|  ans_.read_end();
  167|     70|}
_ZN5draco17RAnsSymbolDecoderILi17EEC2Ev:
   33|    382|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi17EE6CreateEPNS_13DecoderBufferE:
   59|    382|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    382|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 382]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    382|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    382|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    382|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 72, False: 310]
  ------------------
   67|     72|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 4, False: 68]
  ------------------
   68|      4|      return false;
   69|      4|    }
   70|       |
   71|     72|  } else
   72|    310|#endif
   73|    310|  {
   74|    310|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 8, False: 302]
  ------------------
   75|      8|      return false;
   76|      8|    }
   77|    310|  }
   78|       |  // Check that decoded number of symbols is not unreasonably high. Remaining
   79|       |  // buffer size must be at least |num_symbols| / 64 bytes to contain the
   80|       |  // probability table. The |prob_data| below is one byte but it can be
   81|       |  // theoretically stored for each 64th symbol.
   82|    370|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 34, False: 336]
  ------------------
   83|     34|    return false;
   84|     34|  }
   85|    336|  probability_table_.resize(num_symbols_);
   86|    336|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 10, False: 326]
  ------------------
   87|     10|    return true;
   88|     10|  }
   89|       |  // Decode the table.
   90|  12.1k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 11.9k, False: 238]
  ------------------
   91|  11.9k|    uint8_t prob_data = 0;
   92|       |    // Decode the first byte and extract the number of extra bytes we need to
   93|       |    // get, or the offset to the next symbol with non-zero probability.
   94|  11.9k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 45, False: 11.8k]
  ------------------
   95|     45|      return false;
   96|     45|    }
   97|       |    // Token is stored in the first two bits of the first byte. Values 0-2 are
   98|       |    // used to indicate the number of extra bytes, and value 3 is a special
   99|       |    // symbol used to denote run-length coding of zero probability entries.
  100|       |    // See rans_symbol_encoder.h for more details.
  101|  11.8k|    const int token = prob_data & 3;
  102|  11.8k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 4.36k, False: 7.52k]
  ------------------
  103|  4.36k|      const uint32_t offset = prob_data >> 2;
  104|  4.36k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 29, False: 4.33k]
  ------------------
  105|     29|        return false;
  106|     29|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|   170k|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 165k, False: 4.33k]
  ------------------
  109|   165k|        probability_table_[i + j] = 0;
  110|   165k|      }
  111|  4.33k|      i += offset;
  112|  7.52k|    } else {
  113|  7.52k|      const int extra_bytes = token;
  114|  7.52k|      uint32_t prob = prob_data >> 2;
  115|  12.7k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 5.18k, False: 7.51k]
  ------------------
  116|  5.18k|        uint8_t eb;
  117|  5.18k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 14, False: 5.17k]
  ------------------
  118|     14|          return false;
  119|     14|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|  5.17k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|  5.17k|      }
  124|  7.51k|      probability_table_[i] = prob;
  125|  7.51k|    }
  126|  11.8k|  }
  127|    238|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 35, False: 203]
  ------------------
  128|     35|    return false;
  129|     35|  }
  130|    203|  return true;
  131|    238|}
_ZNK5draco17RAnsSymbolDecoderILi17EE11num_symbolsEv:
   38|    213|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi17EE13StartDecodingEPNS_13DecoderBufferE:
  135|    203|    DecoderBuffer *buffer) {
  136|    203|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    203|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    203|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    203|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 41, False: 162]
  ------------------
  140|     41|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 39]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     41|  } else
  145|    162|#endif
  146|    162|  {
  147|    162|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 162]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    162|  }
  151|    201|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 94, False: 107]
  ------------------
  152|     94|    return false;
  153|     94|  }
  154|    107|  const uint8_t *const data_head =
  155|    107|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    107|  buffer->Advance(bytes_encoded);
  158|    107|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 28, False: 79]
  ------------------
  159|     28|    return false;
  160|     28|  }
  161|     79|  return true;
  162|    107|}
_ZN5draco17RAnsSymbolDecoderILi17EE12DecodeSymbolEv:
   43|   310k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi17EE11EndDecodingEv:
  165|     79|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     79|  ans_.read_end();
  167|     79|}
_ZN5draco17RAnsSymbolDecoderILi18EEC2Ev:
   33|    372|  RAnsSymbolDecoder() : num_symbols_(0) {}
_ZN5draco17RAnsSymbolDecoderILi18EE6CreateEPNS_13DecoderBufferE:
   59|    372|    DecoderBuffer *buffer) {
   60|       |  // Check that the DecoderBuffer version is set.
   61|    372|  if (buffer->bitstream_version() == 0) {
  ------------------
  |  Branch (61:7): [True: 0, False: 372]
  ------------------
   62|      0|    return false;
   63|      0|  }
   64|       |  // Decode the number of alphabet symbols.
   65|    372|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   66|    372|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    372|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (66:7): [True: 70, False: 302]
  ------------------
   67|     70|    if (!buffer->Decode(&num_symbols_)) {
  ------------------
  |  Branch (67:9): [True: 1, False: 69]
  ------------------
   68|      1|      return false;
   69|      1|    }
   70|       |
   71|     70|  } else
   72|    302|#endif
   73|    302|  {
   74|    302|    if (!DecodeVarint(&num_symbols_, buffer)) {
  ------------------
  |  Branch (74:9): [True: 6, False: 296]
  ------------------
   75|      6|      return false;
   76|      6|    }
   77|    302|  }
   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|    365|  if (num_symbols_ / 64 > buffer->remaining_size()) {
  ------------------
  |  Branch (82:7): [True: 25, False: 340]
  ------------------
   83|     25|    return false;
   84|     25|  }
   85|    340|  probability_table_.resize(num_symbols_);
   86|    340|  if (num_symbols_ == 0) {
  ------------------
  |  Branch (86:7): [True: 9, False: 331]
  ------------------
   87|      9|    return true;
   88|      9|  }
   89|       |  // Decode the table.
   90|   567k|  for (uint32_t i = 0; i < num_symbols_; ++i) {
  ------------------
  |  Branch (90:24): [True: 566k, False: 219]
  ------------------
   91|   566k|    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|   566k|    if (!buffer->Decode(&prob_data)) {
  ------------------
  |  Branch (94:9): [True: 50, False: 566k]
  ------------------
   95|     50|      return false;
   96|     50|    }
   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|   566k|    const int token = prob_data & 3;
  102|   566k|    if (token == 3) {
  ------------------
  |  Branch (102:9): [True: 116k, False: 450k]
  ------------------
  103|   116k|      const uint32_t offset = prob_data >> 2;
  104|   116k|      if (i + offset >= num_symbols_) {
  ------------------
  |  Branch (104:11): [True: 31, False: 116k]
  ------------------
  105|     31|        return false;
  106|     31|      }
  107|       |      // Set zero probability for all symbols in the specified range.
  108|  5.28M|      for (uint32_t j = 0; j < offset + 1; ++j) {
  ------------------
  |  Branch (108:28): [True: 5.16M, False: 116k]
  ------------------
  109|  5.16M|        probability_table_[i + j] = 0;
  110|  5.16M|      }
  111|   116k|      i += offset;
  112|   450k|    } else {
  113|   450k|      const int extra_bytes = token;
  114|   450k|      uint32_t prob = prob_data >> 2;
  115|   848k|      for (int b = 0; b < extra_bytes; ++b) {
  ------------------
  |  Branch (115:23): [True: 397k, False: 450k]
  ------------------
  116|   397k|        uint8_t eb;
  117|   397k|        if (!buffer->Decode(&eb)) {
  ------------------
  |  Branch (117:13): [True: 31, False: 397k]
  ------------------
  118|     31|          return false;
  119|     31|        }
  120|       |        // Shift 8 bits for each extra byte and subtract 2 for the two first
  121|       |        // bits.
  122|   397k|        prob |= static_cast<uint32_t>(eb) << (8 * (b + 1) - 2);
  123|   397k|      }
  124|   450k|      probability_table_[i] = prob;
  125|   450k|    }
  126|   566k|  }
  127|    219|  if (!ans_.rans_build_look_up_table(&probability_table_[0], num_symbols_)) {
  ------------------
  |  Branch (127:7): [True: 34, False: 185]
  ------------------
  128|     34|    return false;
  129|     34|  }
  130|    185|  return true;
  131|    219|}
_ZNK5draco17RAnsSymbolDecoderILi18EE11num_symbolsEv:
   38|    194|  uint32_t num_symbols() const { return num_symbols_; }
_ZN5draco17RAnsSymbolDecoderILi18EE13StartDecodingEPNS_13DecoderBufferE:
  135|    185|    DecoderBuffer *buffer) {
  136|    185|  uint64_t bytes_encoded;
  137|       |  // Decode the number of bytes encoded by the encoder.
  138|    185|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  139|    185|  if (buffer->bitstream_version() < DRACO_BITSTREAM_VERSION(2, 0)) {
  ------------------
  |  |  115|    185|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (139:7): [True: 36, False: 149]
  ------------------
  140|     36|    if (!buffer->Decode(&bytes_encoded)) {
  ------------------
  |  Branch (140:9): [True: 2, False: 34]
  ------------------
  141|      2|      return false;
  142|      2|    }
  143|       |
  144|     36|  } else
  145|    149|#endif
  146|    149|  {
  147|    149|    if (!DecodeVarint<uint64_t>(&bytes_encoded, buffer)) {
  ------------------
  |  Branch (147:9): [True: 0, False: 149]
  ------------------
  148|      0|      return false;
  149|      0|    }
  150|    149|  }
  151|    183|  if (bytes_encoded > static_cast<uint64_t>(buffer->remaining_size())) {
  ------------------
  |  Branch (151:7): [True: 79, False: 104]
  ------------------
  152|     79|    return false;
  153|     79|  }
  154|    104|  const uint8_t *const data_head =
  155|    104|      reinterpret_cast<const uint8_t *>(buffer->data_head());
  156|       |  // Advance the buffer past the rANS data.
  157|    104|  buffer->Advance(bytes_encoded);
  158|    104|  if (ans_.read_init(data_head, static_cast<int>(bytes_encoded)) != 0) {
  ------------------
  |  Branch (158:7): [True: 35, False: 69]
  ------------------
  159|     35|    return false;
  160|     35|  }
  161|     69|  return true;
  162|    104|}
_ZN5draco17RAnsSymbolDecoderILi18EE12DecodeSymbolEv:
   43|  86.0k|  uint32_t DecodeSymbol() { return ans_.rans_read(); }
_ZN5draco17RAnsSymbolDecoderILi18EE11EndDecodingEv:
  165|     69|void RAnsSymbolDecoder<unique_symbols_bit_length_t>::EndDecoding() {
  166|     69|  ans_.read_end();
  167|     69|}

_ZN5draco13DecodeSymbolsEjiPNS_13DecoderBufferEPj:
   33|  13.0k|                   DecoderBuffer *src_buffer, uint32_t *out_values) {
   34|  13.0k|  if (num_values == 0) {
  ------------------
  |  Branch (34:7): [True: 48, False: 12.9k]
  ------------------
   35|     48|    return true;
   36|     48|  }
   37|       |  // Decode which scheme to use.
   38|  12.9k|  uint8_t scheme;
   39|  12.9k|  if (!src_buffer->Decode(&scheme)) {
  ------------------
  |  Branch (39:7): [True: 184, False: 12.8k]
  ------------------
   40|    184|    return false;
   41|    184|  }
   42|  12.8k|  if (scheme == SYMBOL_CODING_TAGGED) {
  ------------------
  |  Branch (42:7): [True: 1.20k, False: 11.5k]
  ------------------
   43|  1.20k|    return DecodeTaggedSymbols<RAnsSymbolDecoder>(num_values, num_components,
   44|  1.20k|                                                  src_buffer, out_values);
   45|  11.5k|  } else if (scheme == SYMBOL_CODING_RAW) {
  ------------------
  |  Branch (45:14): [True: 8.27k, False: 3.32k]
  ------------------
   46|  8.27k|    return DecodeRawSymbols<RAnsSymbolDecoder>(num_values, src_buffer,
   47|  8.27k|                                               out_values);
   48|  8.27k|  }
   49|  3.32k|  return false;
   50|  12.8k|}
_ZN5draco19DecodeTaggedSymbolsINS_17RAnsSymbolDecoderEEEbjiPNS_13DecoderBufferEPj:
   54|  1.20k|                         DecoderBuffer *src_buffer, uint32_t *out_values) {
   55|       |  // Decode the encoded data.
   56|  1.20k|  SymbolDecoderT<5> tag_decoder;
   57|  1.20k|  if (!tag_decoder.Create(src_buffer)) {
  ------------------
  |  Branch (57:7): [True: 580, False: 627]
  ------------------
   58|    580|    return false;
   59|    580|  }
   60|       |
   61|    627|  if (!tag_decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (61:7): [True: 268, False: 359]
  ------------------
   62|    268|    return false;
   63|    268|  }
   64|       |
   65|    359|  if (num_values > 0 && tag_decoder.num_symbols() == 0) {
  ------------------
  |  Branch (65:7): [True: 359, False: 0]
  |  Branch (65:25): [True: 61, False: 298]
  ------------------
   66|     61|    return false;  // Wrong number of symbols.
   67|     61|  }
   68|       |
   69|       |  // src_buffer now points behind the encoded tag data (to the place where the
   70|       |  // values are encoded).
   71|    298|  src_buffer->StartBitDecoding(false, nullptr);
   72|    298|  int value_id = 0;
   73|  5.69M|  for (uint32_t i = 0; i < num_values; i += num_components) {
  ------------------
  |  Branch (73:24): [True: 5.69M, False: 284]
  ------------------
   74|       |    // Decode the tag.
   75|  5.69M|    const uint32_t bit_length = tag_decoder.DecodeSymbol();
   76|       |    // Decode the actual value.
   77|  14.2M|    for (int j = 0; j < num_components; ++j) {
  ------------------
  |  Branch (77:21): [True: 8.52M, False: 5.69M]
  ------------------
   78|  8.52M|      uint32_t val;
   79|  8.52M|      if (!src_buffer->DecodeLeastSignificantBits32(bit_length, &val)) {
  ------------------
  |  Branch (79:11): [True: 14, False: 8.52M]
  ------------------
   80|     14|        return false;
   81|     14|      }
   82|  8.52M|      out_values[value_id++] = val;
   83|  8.52M|    }
   84|  5.69M|  }
   85|    284|  tag_decoder.EndDecoding();
   86|    284|  src_buffer->EndBitDecoding();
   87|    284|  return true;
   88|    298|}
_ZN5draco16DecodeRawSymbolsINS_17RAnsSymbolDecoderEEEbjPNS_13DecoderBufferEPj:
  116|  8.27k|                      uint32_t *out_values) {
  117|  8.27k|  uint8_t max_bit_length;
  118|  8.27k|  if (!src_buffer->Decode(&max_bit_length)) {
  ------------------
  |  Branch (118:7): [True: 63, False: 8.20k]
  ------------------
  119|     63|    return false;
  120|     63|  }
  121|  8.20k|  switch (max_bit_length) {
  122|    642|    case 1:
  ------------------
  |  Branch (122:5): [True: 642, False: 7.56k]
  ------------------
  123|    642|      return DecodeRawSymbolsInternal<SymbolDecoderT<1>>(num_values, src_buffer,
  124|    642|                                                         out_values);
  125|    536|    case 2:
  ------------------
  |  Branch (125:5): [True: 536, False: 7.67k]
  ------------------
  126|    536|      return DecodeRawSymbolsInternal<SymbolDecoderT<2>>(num_values, src_buffer,
  127|    536|                                                         out_values);
  128|    545|    case 3:
  ------------------
  |  Branch (128:5): [True: 545, False: 7.66k]
  ------------------
  129|    545|      return DecodeRawSymbolsInternal<SymbolDecoderT<3>>(num_values, src_buffer,
  130|    545|                                                         out_values);
  131|    388|    case 4:
  ------------------
  |  Branch (131:5): [True: 388, False: 7.81k]
  ------------------
  132|    388|      return DecodeRawSymbolsInternal<SymbolDecoderT<4>>(num_values, src_buffer,
  133|    388|                                                         out_values);
  134|    210|    case 5:
  ------------------
  |  Branch (134:5): [True: 210, False: 7.99k]
  ------------------
  135|    210|      return DecodeRawSymbolsInternal<SymbolDecoderT<5>>(num_values, src_buffer,
  136|    210|                                                         out_values);
  137|    455|    case 6:
  ------------------
  |  Branch (137:5): [True: 455, False: 7.75k]
  ------------------
  138|    455|      return DecodeRawSymbolsInternal<SymbolDecoderT<6>>(num_values, src_buffer,
  139|    455|                                                         out_values);
  140|    399|    case 7:
  ------------------
  |  Branch (140:5): [True: 399, False: 7.80k]
  ------------------
  141|    399|      return DecodeRawSymbolsInternal<SymbolDecoderT<7>>(num_values, src_buffer,
  142|    399|                                                         out_values);
  143|    452|    case 8:
  ------------------
  |  Branch (143:5): [True: 452, False: 7.75k]
  ------------------
  144|    452|      return DecodeRawSymbolsInternal<SymbolDecoderT<8>>(num_values, src_buffer,
  145|    452|                                                         out_values);
  146|    537|    case 9:
  ------------------
  |  Branch (146:5): [True: 537, False: 7.67k]
  ------------------
  147|    537|      return DecodeRawSymbolsInternal<SymbolDecoderT<9>>(num_values, src_buffer,
  148|    537|                                                         out_values);
  149|    442|    case 10:
  ------------------
  |  Branch (149:5): [True: 442, False: 7.76k]
  ------------------
  150|    442|      return DecodeRawSymbolsInternal<SymbolDecoderT<10>>(
  151|    442|          num_values, src_buffer, out_values);
  152|    374|    case 11:
  ------------------
  |  Branch (152:5): [True: 374, False: 7.83k]
  ------------------
  153|    374|      return DecodeRawSymbolsInternal<SymbolDecoderT<11>>(
  154|    374|          num_values, src_buffer, out_values);
  155|    401|    case 12:
  ------------------
  |  Branch (155:5): [True: 401, False: 7.80k]
  ------------------
  156|    401|      return DecodeRawSymbolsInternal<SymbolDecoderT<12>>(
  157|    401|          num_values, src_buffer, out_values);
  158|    428|    case 13:
  ------------------
  |  Branch (158:5): [True: 428, False: 7.77k]
  ------------------
  159|    428|      return DecodeRawSymbolsInternal<SymbolDecoderT<13>>(
  160|    428|          num_values, src_buffer, out_values);
  161|    374|    case 14:
  ------------------
  |  Branch (161:5): [True: 374, False: 7.83k]
  ------------------
  162|    374|      return DecodeRawSymbolsInternal<SymbolDecoderT<14>>(
  163|    374|          num_values, src_buffer, out_values);
  164|    399|    case 15:
  ------------------
  |  Branch (164:5): [True: 399, False: 7.80k]
  ------------------
  165|    399|      return DecodeRawSymbolsInternal<SymbolDecoderT<15>>(
  166|    399|          num_values, src_buffer, out_values);
  167|    354|    case 16:
  ------------------
  |  Branch (167:5): [True: 354, False: 7.85k]
  ------------------
  168|    354|      return DecodeRawSymbolsInternal<SymbolDecoderT<16>>(
  169|    354|          num_values, src_buffer, out_values);
  170|    382|    case 17:
  ------------------
  |  Branch (170:5): [True: 382, False: 7.82k]
  ------------------
  171|    382|      return DecodeRawSymbolsInternal<SymbolDecoderT<17>>(
  172|    382|          num_values, src_buffer, out_values);
  173|    372|    case 18:
  ------------------
  |  Branch (173:5): [True: 372, False: 7.83k]
  ------------------
  174|    372|      return DecodeRawSymbolsInternal<SymbolDecoderT<18>>(
  175|    372|          num_values, src_buffer, out_values);
  176|    517|    default:
  ------------------
  |  Branch (176:5): [True: 517, False: 7.69k]
  ------------------
  177|    517|      return false;
  178|  8.20k|  }
  179|  8.20k|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi1EEEEEbjPNS_13DecoderBufferEPj:
   92|    642|                              uint32_t *out_values) {
   93|    642|  SymbolDecoderT decoder;
   94|    642|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 388, False: 254]
  ------------------
   95|    388|    return false;
   96|    388|  }
   97|       |
   98|    254|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 254, False: 0]
  |  Branch (98:25): [True: 32, False: 222]
  ------------------
   99|     32|    return false;  // Wrong number of symbols.
  100|     32|  }
  101|       |
  102|    222|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 99, False: 123]
  ------------------
  103|     99|    return false;
  104|     99|  }
  105|  33.0M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 33.0M, False: 123]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  33.0M|    const uint32_t value = decoder.DecodeSymbol();
  108|  33.0M|    out_values[i] = value;
  109|  33.0M|  }
  110|    123|  decoder.EndDecoding();
  111|    123|  return true;
  112|    222|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi2EEEEEbjPNS_13DecoderBufferEPj:
   92|    536|                              uint32_t *out_values) {
   93|    536|  SymbolDecoderT decoder;
   94|    536|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 211, False: 325]
  ------------------
   95|    211|    return false;
   96|    211|  }
   97|       |
   98|    325|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 325, False: 0]
  |  Branch (98:25): [True: 10, False: 315]
  ------------------
   99|     10|    return false;  // Wrong number of symbols.
  100|     10|  }
  101|       |
  102|    315|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 113, False: 202]
  ------------------
  103|    113|    return false;
  104|    113|  }
  105|  1.88M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 1.88M, False: 202]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  1.88M|    const uint32_t value = decoder.DecodeSymbol();
  108|  1.88M|    out_values[i] = value;
  109|  1.88M|  }
  110|    202|  decoder.EndDecoding();
  111|    202|  return true;
  112|    315|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi3EEEEEbjPNS_13DecoderBufferEPj:
   92|    545|                              uint32_t *out_values) {
   93|    545|  SymbolDecoderT decoder;
   94|    545|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 183, False: 362]
  ------------------
   95|    183|    return false;
   96|    183|  }
   97|       |
   98|    362|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 362, False: 0]
  |  Branch (98:25): [True: 14, False: 348]
  ------------------
   99|     14|    return false;  // Wrong number of symbols.
  100|     14|  }
  101|       |
  102|    348|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 198, False: 150]
  ------------------
  103|    198|    return false;
  104|    198|  }
  105|  6.24M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 6.24M, False: 150]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  6.24M|    const uint32_t value = decoder.DecodeSymbol();
  108|  6.24M|    out_values[i] = value;
  109|  6.24M|  }
  110|    150|  decoder.EndDecoding();
  111|    150|  return true;
  112|    348|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi4EEEEEbjPNS_13DecoderBufferEPj:
   92|    388|                              uint32_t *out_values) {
   93|    388|  SymbolDecoderT decoder;
   94|    388|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 142, False: 246]
  ------------------
   95|    142|    return false;
   96|    142|  }
   97|       |
   98|    246|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 246, False: 0]
  |  Branch (98:25): [True: 17, False: 229]
  ------------------
   99|     17|    return false;  // Wrong number of symbols.
  100|     17|  }
  101|       |
  102|    229|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 69, False: 160]
  ------------------
  103|     69|    return false;
  104|     69|  }
  105|  9.44M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 9.44M, False: 160]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  9.44M|    const uint32_t value = decoder.DecodeSymbol();
  108|  9.44M|    out_values[i] = value;
  109|  9.44M|  }
  110|    160|  decoder.EndDecoding();
  111|    160|  return true;
  112|    229|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi5EEEEEbjPNS_13DecoderBufferEPj:
   92|    210|                              uint32_t *out_values) {
   93|    210|  SymbolDecoderT decoder;
   94|    210|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 45, False: 165]
  ------------------
   95|     45|    return false;
   96|     45|  }
   97|       |
   98|    165|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 165, False: 0]
  |  Branch (98:25): [True: 47, False: 118]
  ------------------
   99|     47|    return false;  // Wrong number of symbols.
  100|     47|  }
  101|       |
  102|    118|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 13, False: 105]
  ------------------
  103|     13|    return false;
  104|     13|  }
  105|  11.0M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 11.0M, False: 105]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  11.0M|    const uint32_t value = decoder.DecodeSymbol();
  108|  11.0M|    out_values[i] = value;
  109|  11.0M|  }
  110|    105|  decoder.EndDecoding();
  111|    105|  return true;
  112|    118|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi6EEEEEbjPNS_13DecoderBufferEPj:
   92|    455|                              uint32_t *out_values) {
   93|    455|  SymbolDecoderT decoder;
   94|    455|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 160, False: 295]
  ------------------
   95|    160|    return false;
   96|    160|  }
   97|       |
   98|    295|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 295, False: 0]
  |  Branch (98:25): [True: 7, False: 288]
  ------------------
   99|      7|    return false;  // Wrong number of symbols.
  100|      7|  }
  101|       |
  102|    288|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 145, False: 143]
  ------------------
  103|    145|    return false;
  104|    145|  }
  105|  6.25M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 6.25M, False: 143]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  6.25M|    const uint32_t value = decoder.DecodeSymbol();
  108|  6.25M|    out_values[i] = value;
  109|  6.25M|  }
  110|    143|  decoder.EndDecoding();
  111|    143|  return true;
  112|    288|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi7EEEEEbjPNS_13DecoderBufferEPj:
   92|    399|                              uint32_t *out_values) {
   93|    399|  SymbolDecoderT decoder;
   94|    399|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 178, False: 221]
  ------------------
   95|    178|    return false;
   96|    178|  }
   97|       |
   98|    221|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 221, False: 0]
  |  Branch (98:25): [True: 14, False: 207]
  ------------------
   99|     14|    return false;  // Wrong number of symbols.
  100|     14|  }
  101|       |
  102|    207|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 97, False: 110]
  ------------------
  103|     97|    return false;
  104|     97|  }
  105|  21.9M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 21.9M, False: 110]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  21.9M|    const uint32_t value = decoder.DecodeSymbol();
  108|  21.9M|    out_values[i] = value;
  109|  21.9M|  }
  110|    110|  decoder.EndDecoding();
  111|    110|  return true;
  112|    207|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi8EEEEEbjPNS_13DecoderBufferEPj:
   92|    452|                              uint32_t *out_values) {
   93|    452|  SymbolDecoderT decoder;
   94|    452|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 174, False: 278]
  ------------------
   95|    174|    return false;
   96|    174|  }
   97|       |
   98|    278|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 278, False: 0]
  |  Branch (98:25): [True: 12, False: 266]
  ------------------
   99|     12|    return false;  // Wrong number of symbols.
  100|     12|  }
  101|       |
  102|    266|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 127, False: 139]
  ------------------
  103|    127|    return false;
  104|    127|  }
  105|  21.2M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 21.2M, False: 139]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  21.2M|    const uint32_t value = decoder.DecodeSymbol();
  108|  21.2M|    out_values[i] = value;
  109|  21.2M|  }
  110|    139|  decoder.EndDecoding();
  111|    139|  return true;
  112|    266|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi9EEEEEbjPNS_13DecoderBufferEPj:
   92|    537|                              uint32_t *out_values) {
   93|    537|  SymbolDecoderT decoder;
   94|    537|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 191, False: 346]
  ------------------
   95|    191|    return false;
   96|    191|  }
   97|       |
   98|    346|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 346, False: 0]
  |  Branch (98:25): [True: 9, False: 337]
  ------------------
   99|      9|    return false;  // Wrong number of symbols.
  100|      9|  }
  101|       |
  102|    337|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 144, False: 193]
  ------------------
  103|    144|    return false;
  104|    144|  }
  105|  11.9M|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 11.9M, False: 193]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  11.9M|    const uint32_t value = decoder.DecodeSymbol();
  108|  11.9M|    out_values[i] = value;
  109|  11.9M|  }
  110|    193|  decoder.EndDecoding();
  111|    193|  return true;
  112|    337|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi10EEEEEbjPNS_13DecoderBufferEPj:
   92|    442|                              uint32_t *out_values) {
   93|    442|  SymbolDecoderT decoder;
   94|    442|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 205, False: 237]
  ------------------
   95|    205|    return false;
   96|    205|  }
   97|       |
   98|    237|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 237, False: 0]
  |  Branch (98:25): [True: 5, False: 232]
  ------------------
   99|      5|    return false;  // Wrong number of symbols.
  100|      5|  }
  101|       |
  102|    232|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 158, False: 74]
  ------------------
  103|    158|    return false;
  104|    158|  }
  105|   572k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 572k, False: 74]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   572k|    const uint32_t value = decoder.DecodeSymbol();
  108|   572k|    out_values[i] = value;
  109|   572k|  }
  110|     74|  decoder.EndDecoding();
  111|     74|  return true;
  112|    232|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi11EEEEEbjPNS_13DecoderBufferEPj:
   92|    374|                              uint32_t *out_values) {
   93|    374|  SymbolDecoderT decoder;
   94|    374|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 202, False: 172]
  ------------------
   95|    202|    return false;
   96|    202|  }
   97|       |
   98|    172|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 172, False: 0]
  |  Branch (98:25): [True: 9, False: 163]
  ------------------
   99|      9|    return false;  // Wrong number of symbols.
  100|      9|  }
  101|       |
  102|    163|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 97, False: 66]
  ------------------
  103|     97|    return false;
  104|     97|  }
  105|   449k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 449k, False: 66]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   449k|    const uint32_t value = decoder.DecodeSymbol();
  108|   449k|    out_values[i] = value;
  109|   449k|  }
  110|     66|  decoder.EndDecoding();
  111|     66|  return true;
  112|    163|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi12EEEEEbjPNS_13DecoderBufferEPj:
   92|    401|                              uint32_t *out_values) {
   93|    401|  SymbolDecoderT decoder;
   94|    401|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 217, False: 184]
  ------------------
   95|    217|    return false;
   96|    217|  }
   97|       |
   98|    184|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 184, False: 0]
  |  Branch (98:25): [True: 7, False: 177]
  ------------------
   99|      7|    return false;  // Wrong number of symbols.
  100|      7|  }
  101|       |
  102|    177|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 115, False: 62]
  ------------------
  103|    115|    return false;
  104|    115|  }
  105|  71.4k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 71.4k, False: 62]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  71.4k|    const uint32_t value = decoder.DecodeSymbol();
  108|  71.4k|    out_values[i] = value;
  109|  71.4k|  }
  110|     62|  decoder.EndDecoding();
  111|     62|  return true;
  112|    177|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi13EEEEEbjPNS_13DecoderBufferEPj:
   92|    428|                              uint32_t *out_values) {
   93|    428|  SymbolDecoderT decoder;
   94|    428|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 233, False: 195]
  ------------------
   95|    233|    return false;
   96|    233|  }
   97|       |
   98|    195|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 195, False: 0]
  |  Branch (98:25): [True: 12, False: 183]
  ------------------
   99|     12|    return false;  // Wrong number of symbols.
  100|     12|  }
  101|       |
  102|    183|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 105, False: 78]
  ------------------
  103|    105|    return false;
  104|    105|  }
  105|   111k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 111k, False: 78]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   111k|    const uint32_t value = decoder.DecodeSymbol();
  108|   111k|    out_values[i] = value;
  109|   111k|  }
  110|     78|  decoder.EndDecoding();
  111|     78|  return true;
  112|    183|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi14EEEEEbjPNS_13DecoderBufferEPj:
   92|    374|                              uint32_t *out_values) {
   93|    374|  SymbolDecoderT decoder;
   94|    374|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 179, False: 195]
  ------------------
   95|    179|    return false;
   96|    179|  }
   97|       |
   98|    195|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 195, False: 0]
  |  Branch (98:25): [True: 9, False: 186]
  ------------------
   99|      9|    return false;  // Wrong number of symbols.
  100|      9|  }
  101|       |
  102|    186|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 113, False: 73]
  ------------------
  103|    113|    return false;
  104|    113|  }
  105|   129k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 129k, False: 73]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   129k|    const uint32_t value = decoder.DecodeSymbol();
  108|   129k|    out_values[i] = value;
  109|   129k|  }
  110|     73|  decoder.EndDecoding();
  111|     73|  return true;
  112|    186|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi15EEEEEbjPNS_13DecoderBufferEPj:
   92|    399|                              uint32_t *out_values) {
   93|    399|  SymbolDecoderT decoder;
   94|    399|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 177, False: 222]
  ------------------
   95|    177|    return false;
   96|    177|  }
   97|       |
   98|    222|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 222, False: 0]
  |  Branch (98:25): [True: 15, False: 207]
  ------------------
   99|     15|    return false;  // Wrong number of symbols.
  100|     15|  }
  101|       |
  102|    207|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 127, False: 80]
  ------------------
  103|    127|    return false;
  104|    127|  }
  105|   366k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 366k, False: 80]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   366k|    const uint32_t value = decoder.DecodeSymbol();
  108|   366k|    out_values[i] = value;
  109|   366k|  }
  110|     80|  decoder.EndDecoding();
  111|     80|  return true;
  112|    207|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi16EEEEEbjPNS_13DecoderBufferEPj:
   92|    354|                              uint32_t *out_values) {
   93|    354|  SymbolDecoderT decoder;
   94|    354|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 166, False: 188]
  ------------------
   95|    166|    return false;
   96|    166|  }
   97|       |
   98|    188|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 188, False: 0]
  |  Branch (98:25): [True: 13, False: 175]
  ------------------
   99|     13|    return false;  // Wrong number of symbols.
  100|     13|  }
  101|       |
  102|    175|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 105, False: 70]
  ------------------
  103|    105|    return false;
  104|    105|  }
  105|   157k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 157k, False: 70]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   157k|    const uint32_t value = decoder.DecodeSymbol();
  108|   157k|    out_values[i] = value;
  109|   157k|  }
  110|     70|  decoder.EndDecoding();
  111|     70|  return true;
  112|    175|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi17EEEEEbjPNS_13DecoderBufferEPj:
   92|    382|                              uint32_t *out_values) {
   93|    382|  SymbolDecoderT decoder;
   94|    382|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 169, False: 213]
  ------------------
   95|    169|    return false;
   96|    169|  }
   97|       |
   98|    213|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 213, False: 0]
  |  Branch (98:25): [True: 10, False: 203]
  ------------------
   99|     10|    return false;  // Wrong number of symbols.
  100|     10|  }
  101|       |
  102|    203|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 124, False: 79]
  ------------------
  103|    124|    return false;
  104|    124|  }
  105|   310k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 310k, False: 79]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|   310k|    const uint32_t value = decoder.DecodeSymbol();
  108|   310k|    out_values[i] = value;
  109|   310k|  }
  110|     79|  decoder.EndDecoding();
  111|     79|  return true;
  112|    203|}
_ZN5draco24DecodeRawSymbolsInternalINS_17RAnsSymbolDecoderILi18EEEEEbjPNS_13DecoderBufferEPj:
   92|    372|                              uint32_t *out_values) {
   93|    372|  SymbolDecoderT decoder;
   94|    372|  if (!decoder.Create(src_buffer)) {
  ------------------
  |  Branch (94:7): [True: 178, False: 194]
  ------------------
   95|    178|    return false;
   96|    178|  }
   97|       |
   98|    194|  if (num_values > 0 && decoder.num_symbols() == 0) {
  ------------------
  |  Branch (98:7): [True: 194, False: 0]
  |  Branch (98:25): [True: 9, False: 185]
  ------------------
   99|      9|    return false;  // Wrong number of symbols.
  100|      9|  }
  101|       |
  102|    185|  if (!decoder.StartDecoding(src_buffer)) {
  ------------------
  |  Branch (102:7): [True: 116, False: 69]
  ------------------
  103|    116|    return false;
  104|    116|  }
  105|  86.1k|  for (uint32_t i = 0; i < num_values; ++i) {
  ------------------
  |  Branch (105:24): [True: 86.0k, False: 69]
  ------------------
  106|       |    // Decode a symbol into the value.
  107|  86.0k|    const uint32_t value = decoder.DecodeSymbol();
  108|  86.0k|    out_values[i] = value;
  109|  86.0k|  }
  110|     69|  decoder.EndDecoding();
  111|     69|  return true;
  112|    185|}

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

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

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

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

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

_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE10GetDecoderEv:
   65|  10.8k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE14GetCornerTableEv:
   66|  3.97k|  const CornerTable *GetCornerTable() const override {
   67|  3.97k|    return corner_table_.get();
   68|  3.97k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  14.8M|                       int *out_encoder_split_symbol_id) {
   87|  14.8M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 1.73M, False: 13.0M]
  ------------------
   88|  1.73M|      return false;
   89|  1.73M|    }
   90|  13.0M|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 39, False: 13.0M]
  ------------------
   91|  13.0M|        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|     39|      *out_encoder_split_symbol_id = -1;
   98|     39|      return true;
   99|     39|    }
  100|  13.0M|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 13.0M, False: 2.42k]
  ------------------
  101|  13.0M|      return false;
  102|  13.0M|    }
  103|  2.42k|    *out_face_edge =
  104|  2.42k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  2.42k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  2.42k|    topology_split_data_.pop_back();
  108|  2.42k|    return true;
  109|  13.0M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  49.3M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  49.3M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  49.3M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  49.3M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_31MeshEdgebreakerTraversalDecoderEE13AttributeDataC2Ev:
  210|  11.0k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE10GetDecoderEv:
   65|  6.06k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE14GetCornerTableEv:
   66|  4.01k|  const CornerTable *GetCornerTable() const override {
   67|  4.01k|    return corner_table_.get();
   68|  4.01k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  43.6M|                       int *out_encoder_split_symbol_id) {
   87|  43.6M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 42.9M, False: 642k]
  ------------------
   88|  42.9M|      return false;
   89|  42.9M|    }
   90|   642k|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 56, False: 642k]
  ------------------
   91|   642k|        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|     56|      *out_encoder_split_symbol_id = -1;
   98|     56|      return true;
   99|     56|    }
  100|   642k|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 640k, False: 2.25k]
  ------------------
  101|   640k|      return false;
  102|   640k|    }
  103|  2.25k|    *out_face_edge =
  104|  2.25k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  2.25k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  2.25k|    topology_split_data_.pop_back();
  108|  2.25k|    return true;
  109|   642k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|   127M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|   127M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|   127M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|   127M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_41MeshEdgebreakerTraversalPredictiveDecoderEE13AttributeDataC2Ev:
  210|  18.8k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE10GetDecoderEv:
   65|  15.1k|  MeshEdgebreakerDecoder *GetDecoder() const override { return decoder_; }
_ZNK5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE14GetCornerTableEv:
   66|  3.02k|  const CornerTable *GetCornerTable() const override {
   67|  3.02k|    return corner_table_.get();
   68|  3.02k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE15IsTopologySplitEiPNS_12EdgeFaceNameEPi:
   86|  72.8M|                       int *out_encoder_split_symbol_id) {
   87|  72.8M|    if (topology_split_data_.size() == 0) {
  ------------------
  |  Branch (87:9): [True: 72.4M, False: 369k]
  ------------------
   88|  72.4M|      return false;
   89|  72.4M|    }
   90|   369k|    if (topology_split_data_.back().source_symbol_id >
  ------------------
  |  Branch (90:9): [True: 67, False: 369k]
  ------------------
   91|   369k|        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|     67|      *out_encoder_split_symbol_id = -1;
   98|     67|      return true;
   99|     67|    }
  100|   369k|    if (topology_split_data_.back().source_symbol_id != encoder_symbol_id) {
  ------------------
  |  Branch (100:9): [True: 367k, False: 1.84k]
  ------------------
  101|   367k|      return false;
  102|   367k|    }
  103|  1.84k|    *out_face_edge =
  104|  1.84k|        static_cast<EdgeFaceName>(topology_split_data_.back().source_edge);
  105|  1.84k|    *out_encoder_split_symbol_id = topology_split_data_.back().split_symbol_id;
  106|       |    // Remove the latest split event.
  107|  1.84k|    topology_split_data_.pop_back();
  108|  1.84k|    return true;
  109|   369k|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE18SetOppositeCornersENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES5_:
  133|  79.1M|  void SetOppositeCorners(CornerIndex corner_0, CornerIndex corner_1) {
  134|  79.1M|    corner_table_->SetOppositeCorner(corner_0, corner_1);
  135|  79.1M|    corner_table_->SetOppositeCorner(corner_1, corner_0);
  136|  79.1M|  }
_ZN5draco26MeshEdgebreakerDecoderImplINS_38MeshEdgebreakerTraversalValenceDecoderEE13AttributeDataC2Ev:
  210|  8.61k|    AttributeData() : decoder_id(-1), is_connectivity_used(true) {}

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

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

_ZN5draco31MeshEdgebreakerTraversalDecoderC2Ev:
   33|  9.15k|      : attribute_connectivity_decoders_(nullptr),
   34|  9.15k|        num_attribute_data_(0),
   35|  9.15k|        decoder_impl_(nullptr) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder4InitEPNS_35MeshEdgebreakerDecoderImplInterfaceE:
   36|  8.37k|  void Init(MeshEdgebreakerDecoderImplInterface *decoder) {
   37|  8.37k|    decoder_impl_ = decoder;
   38|  8.37k|    buffer_.Init(decoder->GetDecoder()->buffer()->data_head(),
   39|  8.37k|                 decoder->GetDecoder()->buffer()->remaining_size(),
   40|  8.37k|                 decoder->GetDecoder()->buffer()->bitstream_version());
   41|  8.37k|  }
_ZNK5draco31MeshEdgebreakerTraversalDecoder16BitstreamVersionEv:
   44|  6.92k|  uint16_t BitstreamVersion() const {
   45|  6.92k|    return decoder_impl_->GetDecoder()->bitstream_version();
   46|  6.92k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder21SetNumEncodedVerticesEi:
   50|  3.60k|  void SetNumEncodedVertices(int /* num_vertices */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19SetNumAttributeDataEi:
   54|  8.37k|  void SetNumAttributeData(int num_data) { num_attribute_data_ = num_data; }
_ZN5draco31MeshEdgebreakerTraversalDecoder5StartEPNS_13DecoderBufferE:
   59|  5.62k|  bool Start(DecoderBuffer *out_buffer) {
   60|       |    // Decode symbols from the main buffer decoder and face configurations from
   61|       |    // the start_face_buffer decoder.
   62|  5.62k|    if (!DecodeTraversalSymbols()) {
  ------------------
  |  Branch (62:9): [True: 79, False: 5.54k]
  ------------------
   63|     79|      return false;
   64|     79|    }
   65|       |
   66|  5.54k|    if (!DecodeStartFaces()) {
  ------------------
  |  Branch (66:9): [True: 112, False: 5.43k]
  ------------------
   67|    112|      return false;
   68|    112|    }
   69|       |
   70|  5.43k|    if (!DecodeAttributeSeams()) {
  ------------------
  |  Branch (70:9): [True: 13, False: 5.42k]
  ------------------
   71|     13|      return false;
   72|     13|    }
   73|  5.42k|    *out_buffer = buffer_;
   74|  5.42k|    return true;
   75|  5.43k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder28DecodeStartFaceConfigurationEv:
   78|  7.81M|  inline bool DecodeStartFaceConfiguration() {
   79|  7.81M|    uint32_t face_configuration;
   80|  7.81M|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
   81|  7.81M|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  7.81M|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (81:9): [True: 1.64k, False: 7.81M]
  ------------------
   82|  1.64k|      start_face_buffer_.DecodeLeastSignificantBits32(1, &face_configuration);
   83|       |
   84|  1.64k|    } else
   85|  7.81M|#endif
   86|  7.81M|    {
   87|  7.81M|      face_configuration = start_face_decoder_.DecodeNextBit();
   88|  7.81M|    }
   89|  7.81M|    return face_configuration;
   90|  7.81M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder12DecodeSymbolEv:
   93|  34.4M|  inline uint32_t DecodeSymbol() {
   94|  34.4M|    uint32_t symbol;
   95|  34.4M|    symbol_buffer_.DecodeLeastSignificantBits32(1, &symbol);
   96|  34.4M|    if (symbol == TOPOLOGY_C) {
  ------------------
  |  Branch (96:9): [True: 15.2M, False: 19.1M]
  ------------------
   97|  15.2M|      return symbol;
   98|  15.2M|    }
   99|       |    // Else decode two additional bits.
  100|  19.1M|    uint32_t symbol_suffix;
  101|  19.1M|    symbol_buffer_.DecodeLeastSignificantBits32(2, &symbol_suffix);
  102|  19.1M|    symbol |= (symbol_suffix << 1);
  103|  19.1M|    return symbol;
  104|  34.4M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder22NewActiveCornerReachedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  34.2M|  inline void NewActiveCornerReached(CornerIndex /* corner */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder13MergeVerticesENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_:
  111|  4.24M|  inline void MergeVertices(VertexIndex /* dest */, VertexIndex /* source */) {}
_ZN5draco31MeshEdgebreakerTraversalDecoder19DecodeAttributeSeamEi:
  117|  21.9M|  inline bool DecodeAttributeSeam(int attribute) {
  118|  21.9M|    return attribute_connectivity_decoders_[attribute].DecodeNextBit();
  119|  21.9M|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder4DoneEv:
  122|  5.16k|  void Done() {
  123|  5.16k|    if (symbol_buffer_.bit_decoder_active()) {
  ------------------
  |  Branch (123:9): [True: 4.83k, False: 333]
  ------------------
  124|  4.83k|      symbol_buffer_.EndBitDecoding();
  125|  4.83k|    }
  126|  5.16k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  127|  5.16k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  5.16k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (127:9): [True: 583, False: 4.58k]
  ------------------
  128|    583|      start_face_buffer_.EndBitDecoding();
  129|       |
  130|    583|    } else
  131|  4.58k|#endif
  132|  4.58k|    {
  133|  4.58k|      start_face_decoder_.EndDecoding();
  134|  4.58k|    }
  135|  5.16k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder6bufferEv:
  138|  2.56k|  DecoderBuffer *buffer() { return &buffer_; }
_ZN5draco31MeshEdgebreakerTraversalDecoder22DecodeTraversalSymbolsEv:
  140|  6.01k|  bool DecodeTraversalSymbols() {
  141|  6.01k|    uint64_t traversal_size;
  142|  6.01k|    symbol_buffer_ = buffer_;
  143|  6.01k|    if (!symbol_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (143:9): [True: 23, False: 5.99k]
  ------------------
  144|     23|      return false;
  145|     23|    }
  146|  5.99k|    buffer_ = symbol_buffer_;
  147|  5.99k|    if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (147:9): [True: 119, False: 5.87k]
  ------------------
  148|    119|      return false;
  149|    119|    }
  150|  5.87k|    buffer_.Advance(traversal_size);
  151|  5.87k|    return true;
  152|  5.99k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder16DecodeStartFacesEv:
  154|  8.22k|  bool DecodeStartFaces() {
  155|       |    // Create a decoder that is set to the end of the encoded traversal data.
  156|  8.22k|#ifdef DRACO_BACKWARDS_COMPATIBILITY_SUPPORTED
  157|  8.22k|    if (buffer_.bitstream_version() < DRACO_BITSTREAM_VERSION(2, 2)) {
  ------------------
  |  |  115|  8.22k|  ((static_cast<uint16_t>(MAJOR) << 8) | MINOR)
  ------------------
  |  Branch (157:9): [True: 1.07k, False: 7.15k]
  ------------------
  158|  1.07k|      start_face_buffer_ = buffer_;
  159|  1.07k|      uint64_t traversal_size;
  160|  1.07k|      if (!start_face_buffer_.StartBitDecoding(true, &traversal_size)) {
  ------------------
  |  Branch (160:11): [True: 3, False: 1.07k]
  ------------------
  161|      3|        return false;
  162|      3|      }
  163|  1.07k|      buffer_ = start_face_buffer_;
  164|  1.07k|      if (traversal_size > static_cast<uint64_t>(buffer_.remaining_size())) {
  ------------------
  |  Branch (164:11): [True: 191, False: 883]
  ------------------
  165|    191|        return false;
  166|    191|      }
  167|    883|      buffer_.Advance(traversal_size);
  168|    883|      return true;
  169|  1.07k|    }
  170|  7.15k|#endif
  171|  7.15k|    return start_face_decoder_.StartDecoding(&buffer_);
  172|  8.22k|  }
_ZN5draco31MeshEdgebreakerTraversalDecoder20DecodeAttributeSeamsEv:
  174|  8.01k|  bool DecodeAttributeSeams() {
  175|       |    // Prepare attribute decoding.
  176|  8.01k|    if (num_attribute_data_ > 0) {
  ------------------
  |  Branch (176:9): [True: 5.30k, False: 2.71k]
  ------------------
  177|  5.30k|      attribute_connectivity_decoders_ = std::unique_ptr<BinaryDecoder[]>(
  178|  5.30k|          new BinaryDecoder[num_attribute_data_]);
  179|  14.7k|      for (int i = 0; i < num_attribute_data_; ++i) {
  ------------------
  |  Branch (179:23): [True: 9.49k, False: 5.27k]
  ------------------
  180|  9.49k|        if (!attribute_connectivity_decoders_[i].StartDecoding(&buffer_)) {
  ------------------
  |  Branch (180:13): [True: 32, False: 9.46k]
  ------------------
  181|     32|          return false;
  182|     32|        }
  183|  9.49k|      }
  184|  5.30k|    }
  185|  7.98k|    return true;
  186|  8.01k|  }

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

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

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

_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  1.71k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  1.68M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  1.68M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 1.63M, False: 49.8k]
  ------------------
   61|  1.63M|      return true;  // Already traversed.
   62|  1.63M|    }
   63|       |
   64|  49.8k|    corner_traversal_stack_.clear();
   65|  49.8k|    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|  49.8k|    const VertexIndex next_vert =
   69|  49.8k|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  49.8k|    const VertexIndex prev_vert =
   71|  49.8k|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  49.8k|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 49.8k]
  |  Branch (72:45): [True: 0, False: 49.8k]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  49.8k|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 49.0k, False: 840]
  ------------------
   76|  49.0k|      this->MarkVertexVisited(next_vert);
   77|  49.0k|      this->traversal_observer().OnNewVertexVisited(
   78|  49.0k|          next_vert, this->corner_table()->Next(corner_id));
   79|  49.0k|    }
   80|  49.8k|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 4.19k, False: 45.6k]
  ------------------
   81|  4.19k|      this->MarkVertexVisited(prev_vert);
   82|  4.19k|      this->traversal_observer().OnNewVertexVisited(
   83|  4.19k|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  4.19k|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|   110k|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 61.0k, False: 49.8k]
  ------------------
   88|       |      // Currently processed corner.
   89|  61.0k|      corner_id = corner_traversal_stack_.back();
   90|  61.0k|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  61.0k|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 61.0k]
  |  Branch (92:47): [True: 666, False: 60.4k]
  ------------------
   93|       |        // This face has been already traversed.
   94|    666|        corner_traversal_stack_.pop_back();
   95|    666|        continue;
   96|    666|      }
   97|  1.68M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 1.68M, Folded]
  ------------------
   98|  1.68M|        this->MarkFaceVisited(face_id);
   99|  1.68M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  1.68M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  1.68M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 1.68M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  1.68M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 830k, False: 858k]
  ------------------
  105|   830k|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|   830k|          this->MarkVertexVisited(vert_id);
  107|   830k|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|   830k|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 809k, False: 20.8k]
  ------------------
  109|   809k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   809k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   809k|            continue;
  112|   809k|          }
  113|   830k|        }
  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|   879k|        const CornerIndex right_corner_id =
  118|   879k|            this->corner_table()->GetRightCorner(corner_id);
  119|   879k|        const CornerIndex left_corner_id =
  120|   879k|            this->corner_table()->GetLeftCorner(corner_id);
  121|   879k|        const FaceIndex right_face_id(
  122|   879k|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 16.2k, False: 863k]
  ------------------
  123|   879k|                 ? kInvalidFaceIndex
  124|   879k|                 : FaceIndex(right_corner_id.value() / 3)));
  125|   879k|        const FaceIndex left_face_id(
  126|   879k|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 53.2k, False: 826k]
  ------------------
  127|   879k|                 ? kInvalidFaceIndex
  128|   879k|                 : FaceIndex(left_corner_id.value() / 3)));
  129|   879k|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 839k, False: 39.9k]
  ------------------
  130|       |          // Right face has been already visited.
  131|   839k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 54.8k, False: 784k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  54.8k|            corner_traversal_stack_.pop_back();
  134|  54.8k|            break;  // Break from the while (true) loop.
  135|   784k|          } else {
  136|       |            // Go to the left face.
  137|   784k|            corner_id = left_corner_id;
  138|   784k|            face_id = left_face_id;
  139|   784k|          }
  140|   839k|        } else {
  141|       |          // Right face was not visited.
  142|  39.9k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 34.3k, False: 5.60k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  34.3k|            corner_id = right_corner_id;
  145|  34.3k|            face_id = right_face_id;
  146|  34.3k|          } else {
  147|       |            // Both neighboring faces are unvisited, we need to visit both of
  148|       |            // them.
  149|       |
  150|       |            // Split the traversal.
  151|       |            // First make the top of the current corner stack point to the left
  152|       |            // face (this one will be processed second).
  153|  5.60k|            corner_traversal_stack_.back() = left_corner_id;
  154|       |            // Add a new corner to the top of the stack (right face needs to
  155|       |            // be traversed first).
  156|  5.60k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  5.60k|            break;
  159|  5.60k|          }
  160|  39.9k|        }
  161|   879k|      }
  162|  60.4k|    }
  163|  49.8k|    return true;
  164|  49.8k|  }
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  1.71k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  3.65k|  DepthFirstTraverser() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE16OnTraversalStartEv:
   54|  2.28k|  void OnTraversalStart() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18TraverseFromCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   59|  4.61M|  bool TraverseFromCorner(CornerIndex corner_id) {
   60|  4.61M|    if (this->IsFaceVisited(corner_id)) {
  ------------------
  |  Branch (60:9): [True: 1.51M, False: 3.09M]
  ------------------
   61|  1.51M|      return true;  // Already traversed.
   62|  1.51M|    }
   63|       |
   64|  3.09M|    corner_traversal_stack_.clear();
   65|  3.09M|    corner_traversal_stack_.push_back(corner_id);
   66|       |    // For the first face, check the remaining corners as they may not be
   67|       |    // processed yet.
   68|  3.09M|    const VertexIndex next_vert =
   69|  3.09M|        this->corner_table()->Vertex(this->corner_table()->Next(corner_id));
   70|  3.09M|    const VertexIndex prev_vert =
   71|  3.09M|        this->corner_table()->Vertex(this->corner_table()->Previous(corner_id));
   72|  3.09M|    if (next_vert == kInvalidVertexIndex || prev_vert == kInvalidVertexIndex) {
  ------------------
  |  Branch (72:9): [True: 0, False: 3.09M]
  |  Branch (72:45): [True: 0, False: 3.09M]
  ------------------
   73|      0|      return false;
   74|      0|    }
   75|  3.09M|    if (!this->IsVertexVisited(next_vert)) {
  ------------------
  |  Branch (75:9): [True: 3.09M, False: 1.39k]
  ------------------
   76|  3.09M|      this->MarkVertexVisited(next_vert);
   77|  3.09M|      this->traversal_observer().OnNewVertexVisited(
   78|  3.09M|          next_vert, this->corner_table()->Next(corner_id));
   79|  3.09M|    }
   80|  3.09M|    if (!this->IsVertexVisited(prev_vert)) {
  ------------------
  |  Branch (80:9): [True: 3.06M, False: 34.3k]
  ------------------
   81|  3.06M|      this->MarkVertexVisited(prev_vert);
   82|  3.06M|      this->traversal_observer().OnNewVertexVisited(
   83|  3.06M|          prev_vert, this->corner_table()->Previous(corner_id));
   84|  3.06M|    }
   85|       |
   86|       |    // Start the actual traversal.
   87|  6.24M|    while (!corner_traversal_stack_.empty()) {
  ------------------
  |  Branch (87:12): [True: 3.14M, False: 3.09M]
  ------------------
   88|       |      // Currently processed corner.
   89|  3.14M|      corner_id = corner_traversal_stack_.back();
   90|  3.14M|      FaceIndex face_id(corner_id.value() / 3);
   91|       |      // Make sure the face hasn't been visited yet.
   92|  3.14M|      if (corner_id == kInvalidCornerIndex || this->IsFaceVisited(face_id)) {
  ------------------
  |  Branch (92:11): [True: 0, False: 3.14M]
  |  Branch (92:47): [True: 5.11k, False: 3.14M]
  ------------------
   93|       |        // This face has been already traversed.
   94|  5.11k|        corner_traversal_stack_.pop_back();
   95|  5.11k|        continue;
   96|  5.11k|      }
   97|  4.61M|      while (true) {
  ------------------
  |  Branch (97:14): [True: 4.61M, Folded]
  ------------------
   98|  4.61M|        this->MarkFaceVisited(face_id);
   99|  4.61M|        this->traversal_observer().OnNewFaceVisited(face_id);
  100|  4.61M|        const VertexIndex vert_id = this->corner_table()->Vertex(corner_id);
  101|  4.61M|        if (vert_id == kInvalidVertexIndex) {
  ------------------
  |  Branch (101:13): [True: 0, False: 4.61M]
  ------------------
  102|      0|          return false;
  103|      0|        }
  104|  4.61M|        if (!this->IsVertexVisited(vert_id)) {
  ------------------
  |  Branch (104:13): [True: 3.84M, False: 771k]
  ------------------
  105|  3.84M|          const bool on_boundary = this->corner_table()->IsOnBoundary(vert_id);
  106|  3.84M|          this->MarkVertexVisited(vert_id);
  107|  3.84M|          this->traversal_observer().OnNewVertexVisited(vert_id, corner_id);
  108|  3.84M|          if (!on_boundary) {
  ------------------
  |  Branch (108:15): [True: 724k, False: 3.11M]
  ------------------
  109|   724k|            corner_id = this->corner_table()->GetRightCorner(corner_id);
  110|   724k|            face_id = FaceIndex(corner_id.value() / 3);
  111|   724k|            continue;
  112|   724k|          }
  113|  3.84M|        }
  114|       |        // The current vertex has been already visited or it was on a boundary.
  115|       |        // We need to determine whether we can visit any of it's neighboring
  116|       |        // faces.
  117|  3.88M|        const CornerIndex right_corner_id =
  118|  3.88M|            this->corner_table()->GetRightCorner(corner_id);
  119|  3.88M|        const CornerIndex left_corner_id =
  120|  3.88M|            this->corner_table()->GetLeftCorner(corner_id);
  121|  3.88M|        const FaceIndex right_face_id(
  122|  3.88M|            (right_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (122:14): [True: 3.09M, False: 795k]
  ------------------
  123|  3.88M|                 ? kInvalidFaceIndex
  124|  3.88M|                 : FaceIndex(right_corner_id.value() / 3)));
  125|  3.88M|        const FaceIndex left_face_id(
  126|  3.88M|            (left_corner_id == kInvalidCornerIndex
  ------------------
  |  Branch (126:14): [True: 3.11M, False: 771k]
  ------------------
  127|  3.88M|                 ? kInvalidFaceIndex
  128|  3.88M|                 : FaceIndex(left_corner_id.value() / 3)));
  129|  3.88M|        if (this->IsFaceVisited(right_face_id)) {
  ------------------
  |  Branch (129:13): [True: 3.80M, False: 81.7k]
  ------------------
  130|       |          // Right face has been already visited.
  131|  3.80M|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (131:15): [True: 3.11M, False: 691k]
  ------------------
  132|       |            // Both neighboring faces are visited. End reached.
  133|  3.11M|            corner_traversal_stack_.pop_back();
  134|  3.11M|            break;  // Break from the while (true) loop.
  135|  3.11M|          } else {
  136|       |            // Go to the left face.
  137|   691k|            corner_id = left_corner_id;
  138|   691k|            face_id = left_face_id;
  139|   691k|          }
  140|  3.80M|        } else {
  141|       |          // Right face was not visited.
  142|  81.7k|          if (this->IsFaceVisited(left_face_id)) {
  ------------------
  |  Branch (142:15): [True: 55.8k, False: 25.8k]
  ------------------
  143|       |            // Left face visited, go to the right one.
  144|  55.8k|            corner_id = right_corner_id;
  145|  55.8k|            face_id = right_face_id;
  146|  55.8k|          } else {
  147|       |            // Both neighboring faces are unvisited, we need to visit both of
  148|       |            // them.
  149|       |
  150|       |            // Split the traversal.
  151|       |            // First make the top of the current corner stack point to the left
  152|       |            // face (this one will be processed second).
  153|  25.8k|            corner_traversal_stack_.back() = left_corner_id;
  154|       |            // Add a new corner to the top of the stack (right face needs to
  155|       |            // be traversed first).
  156|  25.8k|            corner_traversal_stack_.push_back(right_corner_id);
  157|       |            // Break from the while (true) loop.
  158|  25.8k|            break;
  159|  25.8k|          }
  160|  81.7k|        }
  161|  3.88M|      }
  162|  3.14M|    }
  163|  3.09M|    return true;
  164|  3.09M|  }
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE14OnTraversalEndEv:
   57|  2.28k|  void OnTraversalEnd() {}
_ZN5draco19DepthFirstTraverserINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   51|  4.71k|  DepthFirstTraverser() {}

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

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

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

_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  4.71k|  virtual ~TraverserBase() = default;
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  35.8M|  inline const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  19.4M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  19.4M|    return is_vertex_visited_[vert_id.value()];
   65|  19.4M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  2.52M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  2.52M|    is_vertex_visited_[vert_id.value()] = true;
   68|  2.52M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  7.42M|  inline TraversalObserverT &traversal_observer() {
   75|  7.42M|    return traversal_observer_;
   76|  7.42M|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  14.5M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  14.5M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 121k, False: 14.4M]
  ------------------
   47|   121k|      return true;  // Invalid faces are always considered as visited.
   48|   121k|    }
   49|  14.4M|    return is_face_visited_[face_id.value()];
   50|  14.5M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  4.90M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  4.90M|    is_face_visited_[face_id.value()] = true;
   62|  4.90M|  }
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  4.72k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEED2Ev:
   33|  4.72k|  virtual ~TraverserBase() = default;
_ZN5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  2.36k|                    TraversalObserver traversal_observer) {
   37|  2.36k|    corner_table_ = corner_table;
   38|  2.36k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  2.36k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  2.36k|    traversal_observer_ = traversal_observer;
   41|  2.36k|  }
_ZNK5draco13TraverserBaseINS_11CornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  1.68M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  1.68M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 1.68M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  1.68M|    return is_face_visited_[corner_id.value() / 3];
   58|  1.68M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE12corner_tableEv:
   70|  35.5M|  inline const CornerTable *corner_table() const { return corner_table_; }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   53|  4.61M|  inline bool IsFaceVisited(CornerIndex corner_id) const {
   54|  4.61M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (54:9): [True: 0, False: 4.61M]
  ------------------
   55|      0|      return true;  // Invalid faces are always considered as visited.
   56|      0|    }
   57|  4.61M|    return is_face_visited_[corner_id.value() / 3];
   58|  4.61M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15IsVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   63|  10.8M|  inline bool IsVertexVisited(VertexIndex vert_id) const {
   64|  10.8M|    return is_vertex_visited_[vert_id.value()];
   65|  10.8M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE17MarkVertexVisitedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
   66|  9.99M|  inline void MarkVertexVisited(VertexIndex vert_id) {
   67|  9.99M|    is_vertex_visited_[vert_id.value()] = true;
   68|  9.99M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE18traversal_observerEv:
   74|  14.6M|  inline TraversalObserverT &traversal_observer() {
   75|  14.6M|    return traversal_observer_;
   76|  14.6M|  }
_ZNK5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE13IsFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   45|  10.9M|  inline bool IsFaceVisited(FaceIndex face_id) const {
   46|  10.9M|    if (face_id == kInvalidFaceIndex) {
  ------------------
  |  Branch (46:9): [True: 6.21M, False: 4.71M]
  ------------------
   47|  6.21M|      return true;  // Invalid faces are always considered as visited.
   48|  6.21M|    }
   49|  4.71M|    return is_face_visited_[face_id.value()];
   50|  10.9M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE15MarkFaceVisitedENS_9IndexTypeIjNS_19FaceIndex_tag_type_EEE:
   60|  4.61M|  inline void MarkFaceVisited(FaceIndex face_id) {
   61|  4.61M|    is_face_visited_[face_id.value()] = true;
   62|  4.61M|  }
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEEC2Ev:
   32|  4.71k|  TraverserBase() : corner_table_(nullptr) {}
_ZN5draco13TraverserBaseINS_24MeshAttributeCornerTableENS_36MeshAttributeIndicesEncodingObserverIS1_EEE4InitEPKS1_S3_:
   36|  2.35k|                    TraversalObserver traversal_observer) {
   37|  2.35k|    corner_table_ = corner_table;
   38|  2.35k|    is_face_visited_.assign(corner_table->num_faces(), false);
   39|  2.35k|    is_vertex_visited_.assign(corner_table_->num_vertices(), false);
   40|  2.35k|    traversal_observer_ = traversal_observer;
   41|  2.35k|  }

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

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

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

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

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

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

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

_ZN5draco13DecoderBuffer28DecodeLeastSignificantBits32EjPj:
   57|  62.1M|  bool DecodeLeastSignificantBits32(uint32_t nbits, uint32_t *out_value) {
   58|  62.1M|    if (!bit_decoder_active()) {
  ------------------
  |  Branch (58:9): [True: 0, False: 62.1M]
  ------------------
   59|      0|      return false;
   60|      0|    }
   61|  62.1M|    return bit_decoder_.GetBits(nbits, out_value);
   62|  62.1M|  }
_ZN5draco13DecoderBuffer6DecodeEPvm:
   76|  1.08G|  bool Decode(void *out_data, size_t size_to_decode) {
   77|  1.08G|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (77:9): [True: 545, False: 1.08G]
  ------------------
   78|    545|      return false;  // Buffer overflow.
   79|    545|    }
   80|  1.08G|    memcpy(out_data, (data_ + pos_), size_to_decode);
   81|  1.08G|    pos_ += size_to_decode;
   82|  1.08G|    return true;
   83|  1.08G|  }
_ZN5draco13DecoderBuffer7AdvanceEl:
  105|  32.5k|  void Advance(int64_t bytes) { pos_ += bytes; }
_ZN5draco13DecoderBuffer21set_bitstream_versionEt:
  111|  13.3k|  void set_bitstream_version(uint16_t version) { bitstream_version_ = version; }
_ZNK5draco13DecoderBuffer9data_headEv:
  114|  50.8k|  const char *data_head() const { return data_ + pos_; }
_ZNK5draco13DecoderBuffer14remaining_sizeEv:
  115|   299k|  int64_t remaining_size() const { return data_size_ - pos_; }
_ZNK5draco13DecoderBuffer12decoded_sizeEv:
  116|  8.37k|  int64_t decoded_size() const { return pos_; }
_ZNK5draco13DecoderBuffer18bit_decoder_activeEv:
  117|  62.1M|  bool bit_decoder_active() const { return bit_mode_; }
_ZNK5draco13DecoderBuffer17bitstream_versionEv:
  120|  7.89M|  uint16_t bitstream_version() const { return bitstream_version_; }
_ZN5draco13DecoderBuffer10BitDecoder5resetEPKvm:
  130|  10.4k|    inline void reset(const void *b, size_t s) {
  131|  10.4k|      bit_offset_ = 0;
  132|  10.4k|      bit_buffer_ = static_cast<const uint8_t *>(b);
  133|  10.4k|      bit_buffer_end_ = bit_buffer_ + s;
  134|  10.4k|    }
_ZNK5draco13DecoderBuffer10BitDecoder11BitsDecodedEv:
  137|  8.77k|    inline uint64_t BitsDecoded() const {
  138|  8.77k|      return static_cast<uint64_t>(bit_offset_);
  139|  8.77k|    }
_ZN5draco13DecoderBuffer10BitDecoder7GetBitsEjPj:
  160|  62.1M|    inline bool GetBits(uint32_t nbits, uint32_t *x) {
  161|  62.1M|      if (nbits > 32) {
  ------------------
  |  Branch (161:11): [True: 14, False: 62.1M]
  ------------------
  162|     14|        return false;
  163|     14|      }
  164|  62.1M|      uint32_t value = 0;
  165|   138M|      for (uint32_t bit = 0; bit < nbits; ++bit) {
  ------------------
  |  Branch (165:30): [True: 76.7M, False: 62.1M]
  ------------------
  166|  76.7M|        value |= GetBit() << bit;
  167|  76.7M|      }
  168|  62.1M|      *x = value;
  169|  62.1M|      return true;
  170|  62.1M|    }
_ZN5draco13DecoderBuffer10BitDecoder6GetBitEv:
  175|  76.7M|    inline int GetBit() {
  176|  76.7M|      const size_t off = bit_offset_;
  177|  76.7M|      const size_t byte_offset = off >> 3;
  178|  76.7M|      const int bit_shift = static_cast<int>(off & 0x7);
  179|  76.7M|      if (bit_buffer_ + byte_offset < bit_buffer_end_) {
  ------------------
  |  Branch (179:11): [True: 68.5M, False: 8.13M]
  ------------------
  180|  68.5M|        const int bit = (bit_buffer_[byte_offset] >> bit_shift) & 1;
  181|  68.5M|        bit_offset_ = off + 1;
  182|  68.5M|        return bit;
  183|  68.5M|      }
  184|  8.13M|      return 0;
  185|  76.7M|    }
_ZN5draco13DecoderBuffer6DecodeIhEEbPT_:
   68|  18.3M|  bool Decode(T *out_val) {
   69|  18.3M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 3.90k, False: 18.3M]
  ------------------
   70|  3.90k|      return false;
   71|  3.90k|    }
   72|  18.3M|    pos_ += sizeof(T);
   73|  18.3M|    return true;
   74|  18.3M|  }
_ZN5draco13DecoderBuffer4PeekIhEEbPT_:
   87|  18.3M|  bool Peek(T *out_val) {
   88|  18.3M|    const size_t size_to_decode = sizeof(T);
   89|  18.3M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 3.90k, False: 18.3M]
  ------------------
   90|  3.90k|      return false;  // Buffer overflow.
   91|  3.90k|    }
   92|  18.3M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  18.3M|    return true;
   94|  18.3M|  }
_ZN5draco13DecoderBuffer6DecodeIiEEbPT_:
   68|  15.0k|  bool Decode(T *out_val) {
   69|  15.0k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 150, False: 14.9k]
  ------------------
   70|    150|      return false;
   71|    150|    }
   72|  14.9k|    pos_ += sizeof(T);
   73|  14.9k|    return true;
   74|  15.0k|  }
_ZN5draco13DecoderBuffer4PeekIiEEbPT_:
   87|  15.0k|  bool Peek(T *out_val) {
   88|  15.0k|    const size_t size_to_decode = sizeof(T);
   89|  15.0k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 150, False: 14.9k]
  ------------------
   90|    150|      return false;  // Buffer overflow.
   91|    150|    }
   92|  14.9k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  14.9k|    return true;
   94|  15.0k|  }
_ZN5draco13DecoderBuffer6DecodeIjEEbPT_:
   68|  1.10M|  bool Decode(T *out_val) {
   69|  1.10M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 206, False: 1.10M]
  ------------------
   70|    206|      return false;
   71|    206|    }
   72|  1.10M|    pos_ += sizeof(T);
   73|  1.10M|    return true;
   74|  1.10M|  }
_ZN5draco13DecoderBuffer4PeekIjEEbPT_:
   87|  1.10M|  bool Peek(T *out_val) {
   88|  1.10M|    const size_t size_to_decode = sizeof(T);
   89|  1.10M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 206, False: 1.10M]
  ------------------
   90|    206|      return false;  // Buffer overflow.
   91|    206|    }
   92|  1.10M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.10M|    return true;
   94|  1.10M|  }
_ZN5draco13DecoderBuffer6DecodeIaEEbPT_:
   68|  29.3k|  bool Decode(T *out_val) {
   69|  29.3k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 351, False: 28.9k]
  ------------------
   70|    351|      return false;
   71|    351|    }
   72|  28.9k|    pos_ += sizeof(T);
   73|  28.9k|    return true;
   74|  29.3k|  }
_ZN5draco13DecoderBuffer4PeekIaEEbPT_:
   87|  29.3k|  bool Peek(T *out_val) {
   88|  29.3k|    const size_t size_to_decode = sizeof(T);
   89|  29.3k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 351, False: 28.9k]
  ------------------
   90|    351|      return false;  // Buffer overflow.
   91|    351|    }
   92|  28.9k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  28.9k|    return true;
   94|  29.3k|  }
_ZN5draco13DecoderBuffer6DecodeINS_13HoleEventDataEEEbPT_:
   68|  1.46M|  bool Decode(T *out_val) {
   69|  1.46M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 157, False: 1.46M]
  ------------------
   70|    157|      return false;
   71|    157|    }
   72|  1.46M|    pos_ += sizeof(T);
   73|  1.46M|    return true;
   74|  1.46M|  }
_ZN5draco13DecoderBuffer4PeekINS_13HoleEventDataEEEbPT_:
   87|  1.46M|  bool Peek(T *out_val) {
   88|  1.46M|    const size_t size_to_decode = sizeof(T);
   89|  1.46M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 157, False: 1.46M]
  ------------------
   90|    157|      return false;  // Buffer overflow.
   91|    157|    }
   92|  1.46M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.46M|    return true;
   94|  1.46M|  }
_ZN5draco13DecoderBuffer6DecodeItEEbPT_:
   68|  1.21M|  bool Decode(T *out_val) {
   69|  1.21M|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 25, False: 1.21M]
  ------------------
   70|     25|      return false;
   71|     25|    }
   72|  1.21M|    pos_ += sizeof(T);
   73|  1.21M|    return true;
   74|  1.21M|  }
_ZN5draco13DecoderBuffer4PeekItEEbPT_:
   87|  1.21M|  bool Peek(T *out_val) {
   88|  1.21M|    const size_t size_to_decode = sizeof(T);
   89|  1.21M|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 25, False: 1.21M]
  ------------------
   90|     25|      return false;  // Buffer overflow.
   91|     25|    }
   92|  1.21M|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  1.21M|    return true;
   94|  1.21M|  }
_ZN5draco13DecoderBuffer6DecodeImEEbPT_:
   68|  2.73k|  bool Decode(T *out_val) {
   69|  2.73k|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 25, False: 2.71k]
  ------------------
   70|     25|      return false;
   71|     25|    }
   72|  2.71k|    pos_ += sizeof(T);
   73|  2.71k|    return true;
   74|  2.73k|  }
_ZN5draco13DecoderBuffer4PeekImEEbPT_:
   87|  2.73k|  bool Peek(T *out_val) {
   88|  2.73k|    const size_t size_to_decode = sizeof(T);
   89|  2.73k|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 25, False: 2.71k]
  ------------------
   90|     25|      return false;  // Buffer overflow.
   91|     25|    }
   92|  2.71k|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|  2.71k|    return true;
   94|  2.73k|  }
_ZN5draco13DecoderBuffer6DecodeIfEEbPT_:
   68|    254|  bool Decode(T *out_val) {
   69|    254|    if (!Peek(out_val)) {
  ------------------
  |  Branch (69:9): [True: 27, False: 227]
  ------------------
   70|     27|      return false;
   71|     27|    }
   72|    227|    pos_ += sizeof(T);
   73|    227|    return true;
   74|    254|  }
_ZN5draco13DecoderBuffer4PeekIfEEbPT_:
   87|    254|  bool Peek(T *out_val) {
   88|    254|    const size_t size_to_decode = sizeof(T);
   89|    254|    if (data_size_ < static_cast<int64_t>(pos_ + size_to_decode)) {
  ------------------
  |  Branch (89:9): [True: 27, False: 227]
  ------------------
   90|     27|      return false;  // Buffer overflow.
   91|     27|    }
   92|    227|    memcpy(out_val, (data_ + pos_), size_to_decode);
   93|    227|    return true;
   94|    254|  }

_ZNK5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EE5valueEv:
   73|   109M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EE5valueEv:
   73|   118M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEgeERKj:
   98|  13.1M|  constexpr bool operator>=(const ValueTypeT &val) const {
   99|  13.1M|    return value_ >= val;
  100|  13.1M|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EE5valueEv:
   73|   353M|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EE5valueEv:
   73|  4.55G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKj:
   90|  29.2M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEaSERKS2_:
  151|   108M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|   108M|    value_ = i.value_;
  153|   108M|    return *this;
  154|   108M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKS2_:
  151|   313M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|   313M|    value_ = i.value_;
  153|   313M|    return *this;
  154|   313M|  }
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEppEv:
  102|  29.1M|  inline ThisIndexType &operator++() {
  103|  29.1M|    ++value_;
  104|  29.1M|    return *this;
  105|  29.1M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEeqERKS2_:
   75|  3.30G|  constexpr bool operator==(const IndexType &i) const {
   76|  3.30G|    return value_ == i.value_;
   77|  3.30G|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EE5valueEv:
   73|  1.35G|  constexpr ValueTypeT value() const { return value_; }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKS2_:
   87|  15.6k|  constexpr bool operator<(const IndexType &i) const {
   88|  15.6k|    return value_ < i.value_;
   89|  15.6k|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEeqERKS2_:
   75|   183M|  constexpr bool operator==(const IndexType &i) const {
   76|   183M|    return value_ == i.value_;
   77|   183M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEmiERKj:
  131|   212M|  constexpr ThisIndexType operator-(const ValueTypeT &val) const {
  132|   212M|    return ThisIndexType(value_ - val);
  133|   212M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEplERKj:
  125|  1.09G|  constexpr ThisIndexType operator+(const ValueTypeT &val) const {
  126|  1.09G|    return ThisIndexType(value_ + val);
  127|  1.09G|  }
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEeqERKS2_:
   75|  25.5M|  constexpr bool operator==(const IndexType &i) const {
   76|  25.5M|    return value_ == i.value_;
   77|  25.5M|  }
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEneERKS2_:
   81|   380M|  constexpr bool operator!=(const IndexType &i) const {
   82|   380M|    return value_ != i.value_;
   83|   380M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEneERKS2_:
   81|   475M|  constexpr bool operator!=(const IndexType &i) const {
   82|   475M|    return value_ != i.value_;
   83|   475M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEppEv:
  102|   735M|  inline ThisIndexType &operator++() {
  103|   735M|    ++value_;
  104|   735M|    return *this;
  105|   735M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEaSERKS2_:
  151|   653M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|   653M|    value_ = i.value_;
  153|   653M|    return *this;
  154|   653M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEaSERKS2_:
  151|  1.58G|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  1.58G|    value_ = i.value_;
  153|  1.58G|    return *this;
  154|  1.58G|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEgeERKj:
   98|  48.1M|  constexpr bool operator>=(const ValueTypeT &val) const {
   99|  48.1M|    return value_ >= val;
  100|  48.1M|  }
_ZNK5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEltERKj:
   90|  11.2M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ej:
   71|  1.58G|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2ERKS2_:
   70|  33.2G|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2Ej:
   71|   278M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2ERKS2_:
   70|  26.2G|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEC2Ev:
   69|   365M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEplERKj:
  125|  27.9M|  constexpr ThisIndexType operator+(const ValueTypeT &val) const {
  126|  27.9M|    return ThisIndexType(value_ + val);
  127|  27.9M|  }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEC2Ej:
   71|   236M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEltERKS2_:
   87|  31.5M|  constexpr bool operator<(const IndexType &i) const {
   88|  31.5M|    return value_ < i.value_;
   89|  31.5M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2ERKS2_:
   70|   265M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ev:
   69|   314M|  constexpr IndexType() : value_(ValueTypeT()) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEC2ERKS2_:
   70|  80.0M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2Ej:
   71|  84.4M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZN5draco9IndexTypeIjNS_29AttributeValueIndex_tag_type_EEC2ERKS2_:
   70|   322M|  constexpr IndexType(const IndexType &i) : value_(i.value_) {}
_ZN5draco9IndexTypeIjNS_19FaceIndex_tag_type_EEaSERKS2_:
  151|  6.31M|  inline ThisIndexType &operator=(const ThisIndexType &i) {
  152|  6.31M|    value_ = i.value_;
  153|  6.31M|    return *this;
  154|  6.31M|  }
_ZN5draco9IndexTypeIjNS_21CornerIndex_tag_type_EEpLERKj:
  139|  11.2M|  inline ThisIndexType operator+=(const ValueTypeT &val) {
  140|  11.2M|    value_ += val;
  141|  11.2M|    return *this;
  142|  11.2M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEaSERKj:
  155|  40.7M|  inline ThisIndexType &operator=(const ValueTypeT &val) {
  156|  40.7M|    value_ = val;
  157|  40.7M|    return *this;
  158|  40.7M|  }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEC2Ej:
   71|   273M|  constexpr explicit IndexType(ValueTypeT value) : value_(value) {}
_ZNK5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEltERKj:
   90|  7.92M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_21VertexIndex_tag_type_EEppEv:
  102|  7.91M|  inline ThisIndexType &operator++() {
  103|  7.91M|    ++value_;
  104|  7.91M|    return *this;
  105|  7.91M|  }
_ZNK5draco9IndexTypeIjNS_20PointIndex_tag_type_EEltERKj:
   90|  26.2M|  constexpr bool operator<(const ValueTypeT &val) const { return value_ < val; }
_ZN5draco9IndexTypeIjNS_20PointIndex_tag_type_EEppEv:
  102|  26.2M|  inline ThisIndexType &operator++() {
  103|  26.2M|    ++value_;
  104|  26.2M|    return *this;
  105|  26.2M|  }

_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   73|  43.9M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  43.9M|    return vector_[index.value()];
   75|  43.9M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE4sizeEv:
   59|  26.2M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE5clearEv:
   48|  14.2k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEE6resizeEmRKS5_:
   51|  20.8k|  void resize(size_t size, const ValueTypeT &val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEixERKS3_:
   70|  74.3M|  inline reference operator[](const IndexTypeT &index) {
   71|  74.3M|    return vector_[index.value()];
   72|  74.3M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE9push_backERKS8_:
   62|   446k|  void push_back(const ValueTypeT &val) { vector_.push_back(val); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE4sizeEv:
   59|  26.2M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEE6resizeEmRKS8_:
   51|  5.16k|  void resize(size_t size, const ValueTypeT &val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEixERKS3_:
   70|  13.1M|  inline reference operator[](const IndexTypeT &index) {
   71|  13.1M|    return vector_[index.value()];
   72|  13.1M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEixERKS3_:
   73|  28.5M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  28.5M|    return vector_[index.value()];
   75|  28.5M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE4sizeEv:
   59|   304M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE4sizeEv:
   59|  13.7M|  size_t size() const { return vector_.size(); }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   73|   434M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|   434M|    return vector_[index.value()];
   75|   434M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   73|  1.20G|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  1.20G|    return vector_[index.value()];
   75|  1.20G|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEixERKS3_:
   70|   610M|  inline reference operator[](const IndexTypeT &index) {
   71|   610M|    return vector_[index.value()];
   72|   610M|  }
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   73|  85.2M|  inline const_reference operator[](const IndexTypeT &index) const {
   74|  85.2M|    return vector_[index.value()];
   75|  85.2M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EixERKS3_:
   70|   511M|  inline reference operator[](const IndexTypeT &index) {
   71|   511M|    return vector_[index.value()];
   72|   511M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE9push_backERKS5_:
   62|   159M|  void push_back(const ValueTypeT &val) { vector_.push_back(val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEixERKS3_:
   70|   350M|  inline reference operator[](const IndexTypeT &index) {
   71|   350M|    return vector_[index.value()];
   72|   350M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE6resizeEmRKi:
   51|  3.04k|  void resize(size_t size, const ValueTypeT &val) { vector_.resize(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEixERKS3_:
   70|   307M|  inline reference operator[](const IndexTypeT &index) {
   71|   307M|    return vector_[index.value()];
   72|   307M|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiEC2Ev:
   39|  68.9k|  IndexTypeVector() {}
_ZNK5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4sizeEv:
   59|  3.21M|  size_t size() const { return vector_.size(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaEC2Ev:
   39|  64.9k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEEC2Ev:
   39|  9.00k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_EC2Ev:
   39|  9.00k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEEC2Ev:
   39|  9.00k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEES3_EC2Ev:
   39|  9.00k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE5clearEv:
   48|  17.4k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEiE4swapERS4_:
   55|  17.4k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT> &arg) {
   56|  17.4k|    vector_.swap(arg.vector_);
   57|  17.4k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE5clearEv:
   48|  17.4k|  void clear() { vector_.clear(); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEEaE4swapERS4_:
   55|  17.4k|  void swap(IndexTypeVector<IndexTypeT, ValueTypeT> &arg) {
   56|  17.4k|    vector_.swap(arg.vector_);
   57|  17.4k|  }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEEE6assignEmRKS5_:
   52|  8.99k|  void assign(size_t size, const ValueTypeT &val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_E6assignEmRKS3_:
   52|  8.99k|  void assign(size_t size, const ValueTypeT &val) { vector_.assign(size, val); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEEE7reserveEm:
   49|  8.99k|  void reserve(size_t size) { vector_.reserve(size); }
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_19FaceIndex_tag_type_EEENSt3__15arrayINS1_IjNS_20PointIndex_tag_type_EEELm3EEEEC2Ev:
   39|  13.3k|  IndexTypeVector() {}
_ZN5draco15IndexTypeVectorINS_9IndexTypeIjNS_20PointIndex_tag_type_EEENS1_IjNS_29AttributeValueIndex_tag_type_EEEEC2Ev:
   39|  52.6k|  IndexTypeVector() {}

_ZN5draco14DataTypeLengthENS_8DataTypeE:
   19|  88.4k|int32_t DataTypeLength(DataType dt) {
   20|  88.4k|  switch (dt) {
   21|  40.6k|    case DT_INT8:
  ------------------
  |  Branch (21:5): [True: 40.6k, False: 47.8k]
  ------------------
   22|  43.0k|    case DT_UINT8:
  ------------------
  |  Branch (22:5): [True: 2.43k, False: 86.0k]
  ------------------
   23|  43.0k|      return 1;
   24|  2.29k|    case DT_INT16:
  ------------------
  |  Branch (24:5): [True: 2.29k, False: 86.2k]
  ------------------
   25|  2.66k|    case DT_UINT16:
  ------------------
  |  Branch (25:5): [True: 373, False: 88.1k]
  ------------------
   26|  2.66k|      return 2;
   27|  35.2k|    case DT_INT32:
  ------------------
  |  Branch (27:5): [True: 35.2k, False: 53.2k]
  ------------------
   28|  36.1k|    case DT_UINT32:
  ------------------
  |  Branch (28:5): [True: 908, False: 87.5k]
  ------------------
   29|  36.1k|      return 4;
   30|    541|    case DT_INT64:
  ------------------
  |  Branch (30:5): [True: 541, False: 87.9k]
  ------------------
   31|  1.05k|    case DT_UINT64:
  ------------------
  |  Branch (31:5): [True: 511, False: 87.9k]
  ------------------
   32|  1.05k|      return 8;
   33|  4.85k|    case DT_FLOAT32:
  ------------------
  |  Branch (33:5): [True: 4.85k, False: 83.6k]
  ------------------
   34|  4.85k|      return 4;
   35|    245|    case DT_FLOAT64:
  ------------------
  |  Branch (35:5): [True: 245, False: 88.2k]
  ------------------
   36|    245|      return 8;
   37|    511|    case DT_BOOL:
  ------------------
  |  Branch (37:5): [True: 511, False: 87.9k]
  ------------------
   38|    511|      return 1;
   39|      0|    default:
  ------------------
  |  Branch (39:5): [True: 0, False: 88.4k]
  ------------------
   40|      0|      return -1;
   41|  88.4k|  }
   42|  88.4k|}

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

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

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

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

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

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

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

_ZN5draco12DecodeVarintIjEEbPT_PNS_13DecoderBufferE:
   63|  1.44M|bool DecodeVarint(IntTypeT *out_val, DecoderBuffer *buffer) {
   64|  1.44M|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 1.44M, Folded]
  ------------------
   65|  1.44M|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 1.46k, False: 1.44M]
  ------------------
   66|  1.46k|      return false;
   67|  1.46k|    }
   68|  1.44M|  } else {
   69|       |    // IntTypeT is a signed value. Decode the symbol and convert to signed.
   70|      0|    typename std::make_unsigned<IntTypeT>::type symbol;
   71|      0|    if (!DecodeVarintUnsigned(1, &symbol, buffer)) {
  ------------------
  |  Branch (71:9): [True: 0, False: 0]
  ------------------
   72|      0|      return false;
   73|      0|    }
   74|      0|    *out_val = ConvertSymbolToSignedInt(symbol);
   75|      0|  }
   76|  1.44M|  return true;
   77|  1.44M|}
mesh_edgebreaker_decoder_impl.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  1.10M|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  1.10M|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  1.10M|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 130, False: 1.10M]
  ------------------
   33|    130|    return false;
   34|    130|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  1.10M|  uint8_t in;
   39|  1.10M|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 903, False: 1.10M]
  ------------------
   40|    903|    return false;
   41|    903|  }
   42|  1.10M|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 25.9k, False: 1.08M]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  25.9k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 761, False: 25.2k]
  ------------------
   45|    761|      return false;
   46|    761|    }
   47|       |    // Append decoded info from this byte.
   48|  25.2k|    *out_val <<= 7;
   49|  25.2k|    *out_val |= in & ((1 << 7) - 1);
   50|  1.08M|  } else {
   51|       |    // Last byte reached
   52|  1.08M|    *out_val = in;
   53|  1.08M|  }
   54|  1.10M|  return true;
   55|  1.10M|}
mesh_sequential_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  9.32k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  9.32k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  9.32k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 2, False: 9.32k]
  ------------------
   33|      2|    return false;
   34|      2|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  9.32k|  uint8_t in;
   39|  9.32k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 10, False: 9.31k]
  ------------------
   40|     10|    return false;
   41|     10|  }
   42|  9.31k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 865, False: 8.44k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    865|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 14, False: 851]
  ------------------
   45|     14|      return false;
   46|     14|    }
   47|       |    // Append decoded info from this byte.
   48|    851|    *out_val <<= 7;
   49|    851|    *out_val |= in & ((1 << 7) - 1);
   50|  8.44k|  } else {
   51|       |    // Last byte reached
   52|  8.44k|    *out_val = in;
   53|  8.44k|  }
   54|  9.29k|  return true;
   55|  9.31k|}
_ZN5draco12DecodeVarintImEEbPT_PNS_13DecoderBufferE:
   63|  9.01k|bool DecodeVarint(IntTypeT *out_val, DecoderBuffer *buffer) {
   64|  9.01k|  if (std::is_unsigned<IntTypeT>::value) {
  ------------------
  |  Branch (64:7): [True: 9.01k, Folded]
  ------------------
   65|  9.01k|    if (!DecodeVarintUnsigned<IntTypeT>(1, out_val, buffer)) {
  ------------------
  |  Branch (65:9): [True: 136, False: 8.88k]
  ------------------
   66|    136|      return false;
   67|    136|    }
   68|  9.01k|  } else {
   69|       |    // IntTypeT is a signed value. Decode the symbol and convert to signed.
   70|      0|    typename std::make_unsigned<IntTypeT>::type symbol;
   71|      0|    if (!DecodeVarintUnsigned(1, &symbol, buffer)) {
  ------------------
  |  Branch (71:9): [True: 0, False: 0]
  ------------------
   72|      0|      return false;
   73|      0|    }
   74|      0|    *out_val = ConvertSymbolToSignedInt(symbol);
   75|      0|  }
   76|  8.88k|  return true;
   77|  9.01k|}
decoder_buffer.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  4.99k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  4.99k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  4.99k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 0, False: 4.99k]
  ------------------
   33|      0|    return false;
   34|      0|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  4.99k|  uint8_t in;
   39|  4.99k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 23, False: 4.97k]
  ------------------
   40|     23|    return false;
   41|     23|  }
   42|  4.97k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 148, False: 4.82k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    148|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 1, False: 147]
  ------------------
   45|      1|      return false;
   46|      1|    }
   47|       |    // Append decoded info from this byte.
   48|    147|    *out_val <<= 7;
   49|    147|    *out_val |= in & ((1 << 7) - 1);
   50|  4.82k|  } else {
   51|       |    // Last byte reached
   52|  4.82k|    *out_val = in;
   53|  4.82k|  }
   54|  4.97k|  return true;
   55|  4.97k|}
metadata_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|   271k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|   271k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|   271k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 19, False: 271k]
  ------------------
   33|     19|    return false;
   34|     19|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|   271k|  uint8_t in;
   39|   271k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 82, False: 271k]
  ------------------
   40|     82|    return false;
   41|     82|  }
   42|   271k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.67k, False: 270k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.67k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 109, False: 1.56k]
  ------------------
   45|    109|      return false;
   46|    109|    }
   47|       |    // Append decoded info from this byte.
   48|  1.56k|    *out_val <<= 7;
   49|  1.56k|    *out_val |= in & ((1 << 7) - 1);
   50|   270k|  } else {
   51|       |    // Last byte reached
   52|   270k|    *out_val = in;
   53|   270k|  }
   54|   271k|  return true;
   55|   271k|}
sequential_integer_attribute_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  4.51k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  4.51k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  4.51k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 4, False: 4.51k]
  ------------------
   33|      4|    return false;
   34|      4|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  4.51k|  uint8_t in;
   39|  4.51k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 36, False: 4.47k]
  ------------------
   40|     36|    return false;
   41|     36|  }
   42|  4.47k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 822, False: 3.65k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    822|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 47, False: 775]
  ------------------
   45|     47|      return false;
   46|     47|    }
   47|       |    // Append decoded info from this byte.
   48|    775|    *out_val <<= 7;
   49|    775|    *out_val |= in & ((1 << 7) - 1);
   50|  3.65k|  } else {
   51|       |    // Last byte reached
   52|  3.65k|    *out_val = in;
   53|  3.65k|  }
   54|  4.42k|  return true;
   55|  4.47k|}
rans_bit_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  20.9k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  20.9k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  20.9k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 4, False: 20.9k]
  ------------------
   33|      4|    return false;
   34|      4|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  20.9k|  uint8_t in;
   39|  20.9k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 25, False: 20.8k]
  ------------------
   40|     25|    return false;
   41|     25|  }
   42|  20.8k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 270, False: 20.6k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|    270|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 24, False: 246]
  ------------------
   45|     24|      return false;
   46|     24|    }
   47|       |    // Append decoded info from this byte.
   48|    246|    *out_val <<= 7;
   49|    246|    *out_val |= in & ((1 << 7) - 1);
   50|  20.6k|  } else {
   51|       |    // Last byte reached
   52|  20.6k|    *out_val = in;
   53|  20.6k|  }
   54|  20.8k|  return true;
   55|  20.8k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  10.4k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  10.4k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  10.4k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 125, False: 10.3k]
  ------------------
   33|    125|    return false;
   34|    125|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  10.3k|  uint8_t in;
   39|  10.3k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 80, False: 10.2k]
  ------------------
   40|     80|    return false;
   41|     80|  }
   42|  10.2k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 2.68k, False: 7.60k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  2.68k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 657, False: 2.02k]
  ------------------
   45|    657|      return false;
   46|    657|    }
   47|       |    // Append decoded info from this byte.
   48|  2.02k|    *out_val <<= 7;
   49|  2.02k|    *out_val |= in & ((1 << 7) - 1);
   50|  7.60k|  } else {
   51|       |    // Last byte reached
   52|  7.60k|    *out_val = in;
   53|  7.60k|  }
   54|  9.62k|  return true;
   55|  10.2k|}
symbol_decoding.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedImEEbiPT_PNS_13DecoderBufferE:
   30|  8.87k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  8.87k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  8.87k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 63, False: 8.80k]
  ------------------
   33|     63|    return false;
   34|     63|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  8.80k|  uint8_t in;
   39|  8.80k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 50, False: 8.75k]
  ------------------
   40|     50|    return false;
   41|     50|  }
   42|  8.75k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 4.70k, False: 4.05k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  4.70k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 732, False: 3.96k]
  ------------------
   45|    732|      return false;
   46|    732|    }
   47|       |    // Append decoded info from this byte.
   48|  3.96k|    *out_val <<= 7;
   49|  3.96k|    *out_val |= in & ((1 << 7) - 1);
   50|  4.05k|  } else {
   51|       |    // Last byte reached
   52|  4.05k|    *out_val = in;
   53|  4.05k|  }
   54|  8.02k|  return true;
   55|  8.75k|}
attributes_decoder.cc:_ZN5draco12_GLOBAL__N_120DecodeVarintUnsignedIjEEbiPT_PNS_13DecoderBufferE:
   30|  52.1k|bool DecodeVarintUnsigned(int depth, IntTypeT *out_val, DecoderBuffer *buffer) {
   31|  52.1k|  constexpr IntTypeT max_depth = sizeof(IntTypeT) + 1 + (sizeof(IntTypeT) >> 3);
   32|  52.1k|  if (depth > max_depth) {
  ------------------
  |  Branch (32:7): [True: 7, False: 52.1k]
  ------------------
   33|      7|    return false;
   34|      7|  }
   35|       |  // Coding of unsigned values.
   36|       |  // 0-6 bit - data
   37|       |  // 7 bit - next byte?
   38|  52.1k|  uint8_t in;
   39|  52.1k|  if (!buffer->Decode(&in)) {
  ------------------
  |  Branch (39:7): [True: 33, False: 52.1k]
  ------------------
   40|     33|    return false;
   41|     33|  }
   42|  52.1k|  if (in & (1 << 7)) {
  ------------------
  |  Branch (42:7): [True: 1.63k, False: 50.4k]
  ------------------
   43|       |    // Next byte is available, decode it first.
   44|  1.63k|    if (!DecodeVarintUnsigned<IntTypeT>(depth + 1, out_val, buffer)) {
  ------------------
  |  Branch (44:9): [True: 43, False: 1.59k]
  ------------------
   45|     43|      return false;
   46|     43|    }
   47|       |    // Append decoded info from this byte.
   48|  1.59k|    *out_val <<= 7;
   49|  1.59k|    *out_val |= in & ((1 << 7) - 1);
   50|  50.4k|  } else {
   51|       |    // Last byte reached
   52|  50.4k|    *out_val = in;
   53|  50.4k|  }
   54|  52.0k|  return true;
   55|  52.1k|}

_ZNK5draco7VectorDIfLi3EEixEi:
  113|   348k|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIfLi3EEixEi:
  112|   457k|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIfLi3EEmiERKS1_:
  137|  38.1k|  Self operator-(const Self &o) const {
  138|  38.1k|    Self ret;
  139|   152k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 114k, False: 38.1k]
  ------------------
  140|   114k|      ret[i] = (*this)[i] - o[i];
  141|   114k|    }
  142|  38.1k|    return ret;
  143|  38.1k|  }
_ZN5draco7VectorDIfLi3EEC2Ev:
   40|  95.0k|  VectorD() {
   41|   380k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 285k, False: 95.0k]
  ------------------
   42|   285k|      (*this)[i] = Scalar(0);
   43|   285k|    }
   44|  95.0k|  }
_ZNK5draco7VectorDIlLi3EEixEi:
  113|   177M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIlLi3EEmiERKS1_:
  137|  14.7M|  Self operator-(const Self &o) const {
  138|  14.7M|    Self ret;
  139|  58.8M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 44.1M, False: 14.7M]
  ------------------
  140|  44.1M|      ret[i] = (*this)[i] - o[i];
  141|  44.1M|    }
  142|  14.7M|    return ret;
  143|  14.7M|  }
_ZN5draco12CrossProductIlEENS_7VectorDIT_Li3EEERKS3_S5_:
  318|  7.33M|                                 const VectorD<ScalarT, 3> &v) {
  319|       |  // Preventing accidental use with uint32_t and the like.
  320|  7.33M|  static_assert(std::is_signed<ScalarT>::value,
  321|  7.33M|                "ScalarT must be a signed type. ");
  322|  7.33M|  VectorD<ScalarT, 3> r;
  323|  7.33M|  r[0] = (u[1] * v[2]) - (u[2] * v[1]);
  324|  7.33M|  r[1] = (u[2] * v[0]) - (u[0] * v[2]);
  325|  7.33M|  r[2] = (u[0] * v[1]) - (u[1] * v[0]);
  326|  7.33M|  return r;
  327|  7.33M|}
_ZN5draco7VectorDIlLi3EE4dataEv:
  282|  7.33M|  Scalar *data() { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE4dataEv:
  283|  7.33M|  const Scalar *data() const { return &(v_[0]); }
_ZNK5draco7VectorDIlLi3EE6AbsSumEv:
  237|  2.87M|  Scalar AbsSum() const {
  238|  2.87M|    Scalar result(0);
  239|  11.4M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (239:21): [True: 8.61M, False: 2.86M]
  ------------------
  240|  8.61M|      Scalar next_value = std::abs(v_[i]);
  241|  8.61M|      if (result > std::numeric_limits<Scalar>::max() - next_value) {
  ------------------
  |  Branch (241:11): [True: 10.9k, False: 8.60M]
  ------------------
  242|       |        // Return the max if adding would have caused an overflow.
  243|  10.9k|        return std::numeric_limits<Scalar>::max();
  244|  10.9k|      }
  245|  8.60M|      result += next_value;
  246|  8.60M|    }
  247|  2.86M|    return result;
  248|  2.87M|  }
_ZNK5draco7VectorDIlLi3EEdvERKl:
  182|   180k|  Self operator/(const Scalar &o) const {
  183|   180k|    Self ret;
  184|   720k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (184:21): [True: 540k, False: 180k]
  ------------------
  185|   540k|      ret[i] = (*this)[i] / o;
  186|   540k|    }
  187|   180k|    return ret;
  188|   180k|  }
_ZN5draco7VectorDIlLi3EEixEi:
  112|   221M|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEixEi:
  112|  11.6M|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EE4dataEv:
  282|  8.61M|  Scalar *data() { return &(v_[0]); }
_ZNK5draco7VectorDIiLi3EEngEv:
  120|  1.93M|  Self operator-() const {
  121|  1.93M|    Self ret;
  122|  7.75M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (122:21): [True: 5.81M, False: 1.93M]
  ------------------
  123|  5.81M|      ret[i] = -(*this)[i];
  124|  5.81M|    }
  125|  1.93M|    return ret;
  126|  1.93M|  }
_ZNK5draco7VectorDIiLi3EEixEi:
  113|  5.81M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEmiERKS1_:
  137|  1.31M|  Self operator-(const Self &o) const {
  138|  1.31M|    Self ret;
  139|  3.95M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 2.63M, False: 1.31M]
  ------------------
  140|  2.63M|      ret[i] = (*this)[i] - o[i];
  141|  2.63M|    }
  142|  1.31M|    return ret;
  143|  1.31M|  }
_ZN5draco7VectorDIjLi2EEixEi:
  112|  15.8M|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEixEi:
  113|  23.7M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIiLi2EEixEi:
  112|  51.7M|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIjLi2EEplERKS1_:
  129|  2.63M|  Self operator+(const Self &o) const {
  130|  2.63M|    Self ret;
  131|  7.90M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 5.27M, False: 2.63M]
  ------------------
  132|  5.27M|      ret[i] = (*this)[i] + o[i];
  133|  5.27M|    }
  134|  2.63M|    return ret;
  135|  2.63M|  }
_ZNK5draco7VectorDIiLi2EEixEi:
  113|  48.3M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIiLi2EEmiERKS1_:
  137|  1.41M|  Self operator-(const Self &o) const {
  138|  1.41M|    Self ret;
  139|  4.25M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 2.83M, False: 1.41M]
  ------------------
  140|  2.83M|      ret[i] = (*this)[i] - o[i];
  141|  2.83M|    }
  142|  1.41M|    return ret;
  143|  1.41M|  }
_ZNK5draco7VectorDIiLi2EEplERKS1_:
  129|  1.41M|  Self operator+(const Self &o) const {
  130|  1.41M|    Self ret;
  131|  4.25M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 2.83M, False: 1.41M]
  ------------------
  132|  2.83M|      ret[i] = (*this)[i] + o[i];
  133|  2.83M|    }
  134|  1.41M|    return ret;
  135|  1.41M|  }
_ZNK5draco7VectorDIfLi2EEeqERKS1_:
  206|   427k|  bool operator==(const Self &o) const {
  207|  1.24M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (207:21): [True: 839k, False: 408k]
  ------------------
  208|   839k|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (208:11): [True: 18.8k, False: 820k]
  ------------------
  209|  18.8k|        return false;
  210|  18.8k|      }
  211|   839k|    }
  212|   408k|    return true;
  213|   427k|  }
_ZNK5draco7VectorDIfLi2EEixEi:
  113|  4.98M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZNK5draco7VectorDIfLi3EE11SquaredNormEv:
  234|  19.2k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIfLi3EE3DotERKS1_:
  250|  19.7k|  Scalar Dot(const Self &o) const {
  251|  19.7k|    Scalar ret(0);
  252|  79.0k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (252:21): [True: 59.2k, False: 19.7k]
  ------------------
  253|  59.2k|      ret += (*this)[i] * o[i];
  254|  59.2k|    }
  255|  19.7k|    return ret;
  256|  19.7k|  }
_ZNK5draco7VectorDIfLi3EEmlERKf:
  174|    473|  Self operator*(const Scalar &o) const {
  175|    473|    Self ret;
  176|  1.89k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 1.41k, False: 473]
  ------------------
  177|  1.41k|      ret[i] = (*this)[i] * o;
  178|  1.41k|    }
  179|    473|    return ret;
  180|    473|  }
_ZNK5draco7VectorDIfLi2EEmiERKS1_:
  137|  18.8k|  Self operator-(const Self &o) const {
  138|  18.8k|    Self ret;
  139|  56.4k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 37.6k, False: 18.8k]
  ------------------
  140|  37.6k|      ret[i] = (*this)[i] - o[i];
  141|  37.6k|    }
  142|  18.8k|    return ret;
  143|  18.8k|  }
_ZN5draco7VectorDIfLi2EEC2Ev:
   40|  37.6k|  VectorD() {
   41|   112k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 75.2k, False: 37.6k]
  ------------------
   42|  75.2k|      (*this)[i] = Scalar(0);
   43|  75.2k|    }
   44|  37.6k|  }
_ZN5draco7VectorDIfLi2EEC2ERKfS3_:
   52|   874k|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|   874k|    DRACO_DCHECK_EQ(dimension, 2);
   54|   874k|    v_[0] = c0;
   55|   874k|    v_[1] = c1;
   56|   874k|  }
_ZN5draco7VectorDIfLi2EEixEi:
  112|   150k|  Scalar &operator[](int i) { return v_[i]; }
_ZNK5draco7VectorDIlLi2EEeqERKS1_:
  206|   408k|  bool operator==(const Self &o) const {
  207|  1.15M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (207:21): [True: 783k, False: 373k]
  ------------------
  208|   783k|      if ((*this)[i] != o[i]) {
  ------------------
  |  Branch (208:11): [True: 34.7k, False: 749k]
  ------------------
  209|  34.7k|        return false;
  210|  34.7k|      }
  211|   783k|    }
  212|   373k|    return true;
  213|   408k|  }
_ZNK5draco7VectorDIlLi2EEixEi:
  113|  2.38M|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDIlLi3EEC2Ev:
   40|  42.7M|  VectorD() {
   41|   170M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 128M, False: 42.7M]
  ------------------
   42|   128M|      (*this)[i] = Scalar(0);
   43|   128M|    }
   44|  42.7M|  }
_ZNK5draco7VectorDIlLi3EE11SquaredNormEv:
  234|  37.3k|  Scalar SquaredNorm() const { return this->Dot(*this); }
_ZNK5draco7VectorDIlLi3EE3DotERKS1_:
  250|  40.1k|  Scalar Dot(const Self &o) const {
  251|  40.1k|    Scalar ret(0);
  252|   160k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (252:21): [True: 120k, False: 40.1k]
  ------------------
  253|   120k|      ret += (*this)[i] * o[i];
  254|   120k|    }
  255|  40.1k|    return ret;
  256|  40.1k|  }
_ZNK5draco7VectorDIlLi2EEmiERKS1_:
  137|  2.81k|  Self operator-(const Self &o) const {
  138|  2.81k|    Self ret;
  139|  8.43k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 5.62k, False: 2.81k]
  ------------------
  140|  5.62k|      ret[i] = (*this)[i] - o[i];
  141|  5.62k|    }
  142|  2.81k|    return ret;
  143|  2.81k|  }
_ZNK5draco7VectorDIlLi2EEmlERKl:
  174|  7.99k|  Self operator*(const Scalar &o) const {
  175|  7.99k|    Self ret;
  176|  23.9k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 15.9k, False: 7.99k]
  ------------------
  177|  15.9k|      ret[i] = (*this)[i] * o;
  178|  15.9k|    }
  179|  7.99k|    return ret;
  180|  7.99k|  }
_ZNK5draco7VectorDIlLi2EEplERKS1_:
  129|  2.67k|  Self operator+(const Self &o) const {
  130|  2.67k|    Self ret;
  131|  8.01k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 5.34k, False: 2.67k]
  ------------------
  132|  5.34k|      ret[i] = (*this)[i] + o[i];
  133|  5.34k|    }
  134|  2.67k|    return ret;
  135|  2.67k|  }
_ZN5dracomlIlLi2EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  292|  2.67k|    const ScalarT &o, const VectorD<ScalarT, dimension_t> &v) {
  293|  2.67k|  return v * o;
  294|  2.67k|}
_ZNK5draco7VectorDIlLi3EEplERKS1_:
  129|  2.64k|  Self operator+(const Self &o) const {
  130|  2.64k|    Self ret;
  131|  10.5k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 7.94k, False: 2.64k]
  ------------------
  132|  7.94k|      ret[i] = (*this)[i] + o[i];
  133|  7.94k|    }
  134|  2.64k|    return ret;
  135|  2.64k|  }
_ZN5dracomlIlLi3EEENS_7VectorDIT_XT0_EEERKS2_RKS3_:
  292|  2.64k|    const ScalarT &o, const VectorD<ScalarT, dimension_t> &v) {
  293|  2.64k|  return v * o;
  294|  2.64k|}
_ZNK5draco7VectorDIlLi3EEmlERKl:
  174|  2.64k|  Self operator*(const Scalar &o) const {
  175|  2.64k|    Self ret;
  176|  10.5k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (176:21): [True: 7.94k, False: 2.64k]
  ------------------
  177|  7.94k|      ret[i] = (*this)[i] * o;
  178|  7.94k|    }
  179|  2.64k|    return ret;
  180|  2.64k|  }
_ZN5draco7VectorDIlLi2EEC2ERKlS3_:
   52|   819k|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|   819k|    DRACO_DCHECK_EQ(dimension, 2);
   54|   819k|    v_[0] = c0;
   55|   819k|    v_[1] = c1;
   56|   819k|  }
_ZN5draco7VectorDIlLi2EEC2Ev:
   40|  18.7k|  VectorD() {
   41|  56.2k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 37.5k, False: 18.7k]
  ------------------
   42|  37.5k|      (*this)[i] = Scalar(0);
   43|  37.5k|    }
   44|  18.7k|  }
_ZN5draco7VectorDImLi2EEC2IlLi2EEERKNS0_IT_XT0_EEE:
  102|  5.27k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  15.8k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 10.5k, False: 5.27k]
  ------------------
  104|  10.5k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 10.5k, False: 0]
  ------------------
  105|  10.5k|        v_[i] = Scalar(src_vector[i]);
  106|  10.5k|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  10.5k|    }
  110|  5.27k|  }
_ZNK5draco7VectorDImLi2EEplERKS1_:
  129|    937|  Self operator+(const Self &o) const {
  130|    937|    Self ret;
  131|  2.81k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (131:21): [True: 1.87k, False: 937]
  ------------------
  132|  1.87k|      ret[i] = (*this)[i] + o[i];
  133|  1.87k|    }
  134|    937|    return ret;
  135|    937|  }
_ZN5draco7VectorDImLi2EEC2Ev:
   40|  2.63k|  VectorD() {
   41|  7.91k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 5.27k, False: 2.63k]
  ------------------
   42|  5.27k|      (*this)[i] = Scalar(0);
   43|  5.27k|    }
   44|  2.63k|  }
_ZNK5draco7VectorDImLi2EEixEi:
  113|  15.8k|  const Scalar &operator[](int i) const { return v_[i]; }
_ZN5draco7VectorDImLi2EEixEi:
  112|  10.5k|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIlLi2EEC2ImLi2EEERKNS0_IT_XT0_EEE:
  102|  2.63k|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  7.91k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 5.27k, False: 2.63k]
  ------------------
  104|  5.27k|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 5.27k, False: 0]
  ------------------
  105|  5.27k|        v_[i] = Scalar(src_vector[i]);
  106|  5.27k|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  5.27k|    }
  110|  2.63k|  }
_ZNK5draco7VectorDIlLi2EEdvERKl:
  182|  2.63k|  Self operator/(const Scalar &o) const {
  183|  2.63k|    Self ret;
  184|  7.91k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (184:21): [True: 5.27k, False: 2.63k]
  ------------------
  185|  5.27k|      ret[i] = (*this)[i] / o;
  186|  5.27k|    }
  187|  2.63k|    return ret;
  188|  2.63k|  }
_ZNK5draco7VectorDImLi2EEmiERKS1_:
  137|  1.70k|  Self operator-(const Self &o) const {
  138|  1.70k|    Self ret;
  139|  5.10k|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (139:21): [True: 3.40k, False: 1.70k]
  ------------------
  140|  3.40k|      ret[i] = (*this)[i] - o[i];
  141|  3.40k|    }
  142|  1.70k|    return ret;
  143|  1.70k|  }
_ZN5draco7VectorDIlLi2EEixEi:
  112|  75.0k|  Scalar &operator[](int i) { return v_[i]; }
_ZN5draco7VectorDIiLi3EEC2Ev:
   40|  1.94M|  VectorD() {
   41|  7.76M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 5.82M, False: 1.94M]
  ------------------
   42|  5.82M|      (*this)[i] = Scalar(0);
   43|  5.82M|    }
   44|  1.94M|  }
_ZN5draco7VectorDIiLi2EEC2ERKiS3_:
   52|  10.3M|  VectorD(const Scalar &c0, const Scalar &c1) : v_({{c0, c1}}) {
   53|  10.3M|    DRACO_DCHECK_EQ(dimension, 2);
   54|  10.3M|    v_[0] = c0;
   55|  10.3M|    v_[1] = c1;
   56|  10.3M|  }
_ZN5draco7VectorDIjLi2EEC2IiLi2EEERKNS0_IT_XT0_EEE:
  102|  7.90M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  23.7M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 15.8M, False: 7.90M]
  ------------------
  104|  15.8M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 15.8M, False: 0]
  ------------------
  105|  15.8M|        v_[i] = Scalar(src_vector[i]);
  106|  15.8M|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  15.8M|    }
  110|  7.90M|  }
_ZN5draco7VectorDIjLi2EEC2Ev:
   40|  3.95M|  VectorD() {
   41|  11.8M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 7.90M, False: 3.95M]
  ------------------
   42|  7.90M|      (*this)[i] = Scalar(0);
   43|  7.90M|    }
   44|  3.95M|  }
_ZN5draco7VectorDIiLi2EEC2IjLi2EEERKNS0_IT_XT0_EEE:
  102|  3.95M|  explicit VectorD(const VectorD<OtherScalarT, other_dimension_t> &src_vector) {
  103|  11.8M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (103:21): [True: 7.90M, False: 3.95M]
  ------------------
  104|  7.90M|      if (i < other_dimension_t) {
  ------------------
  |  Branch (104:11): [True: 7.90M, False: 0]
  ------------------
  105|  7.90M|        v_[i] = Scalar(src_vector[i]);
  106|  7.90M|      } else {
  107|      0|        v_[i] = Scalar(0);
  108|      0|      }
  109|  7.90M|    }
  110|  3.95M|  }
_ZN5draco7VectorDIiLi2EEC2ERKS1_:
   88|  6.25M|  VectorD(const Self &o) {
   89|  18.7M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (89:21): [True: 12.5M, False: 6.25M]
  ------------------
   90|  12.5M|      (*this)[i] = o[i];
   91|  12.5M|    }
   92|  6.25M|  }
_ZN5draco7VectorDIiLi2EEC2Ev:
   40|  2.83M|  VectorD() {
   41|  8.51M|    for (int i = 0; i < dimension; ++i) {
  ------------------
  |  Branch (41:21): [True: 5.67M, False: 2.83M]
  ------------------
   42|  5.67M|      (*this)[i] = Scalar(0);
   43|  5.67M|    }
   44|  2.83M|  }

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

_ZNK5draco11CornerTable12num_verticesEv:
   73|   145M|  inline int num_vertices() const {
   74|   145M|    return static_cast<int>(vertex_corners_.size());
   75|   145M|  }
_ZNK5draco11CornerTable11num_cornersEv:
   76|  11.2M|  inline int num_corners() const {
   77|  11.2M|    return static_cast<int>(corner_to_vertex_map_.size());
   78|  11.2M|  }
_ZNK5draco11CornerTable9num_facesEv:
   79|  2.46M|  inline int num_faces() const {
   80|  2.46M|    return static_cast<int>(corner_to_vertex_map_.size() / 3);
   81|  2.46M|  }
_ZNK5draco11CornerTable8OppositeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   83|   434M|  inline CornerIndex Opposite(CornerIndex corner) const {
   84|   434M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (84:9): [True: 0, False: 434M]
  ------------------
   85|      0|      return corner;
   86|      0|    }
   87|   434M|    return opposite_corners_[corner];
   88|   434M|  }
_ZNK5draco11CornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   89|   752M|  inline CornerIndex Next(CornerIndex corner) const {
   90|   752M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (90:9): [True: 16.9M, False: 735M]
  ------------------
   91|  16.9M|      return corner;
   92|  16.9M|    }
   93|   735M|    return LocalIndex(++corner) ? corner : corner - 3;
  ------------------
  |  Branch (93:12): [True: 672M, False: 62.8M]
  ------------------
   94|   752M|  }
_ZNK5draco11CornerTable8PreviousENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   95|   613M|  inline CornerIndex Previous(CornerIndex corner) const {
   96|   613M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (96:9): [True: 5.99M, False: 607M]
  ------------------
   97|  5.99M|      return corner;
   98|  5.99M|    }
   99|   607M|    return LocalIndex(corner) ? corner - 1 : corner + 2;
  ------------------
  |  Branch (99:12): [True: 149M, False: 458M]
  ------------------
  100|   613M|  }
_ZNK5draco11CornerTable6VertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  101|  1.20G|  inline VertexIndex Vertex(CornerIndex corner) const {
  102|  1.20G|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (102:9): [True: 0, False: 1.20G]
  ------------------
  103|      0|      return kInvalidVertexIndex;
  104|      0|    }
  105|  1.20G|    return ConfidentVertex(corner);
  106|  1.20G|  }
_ZNK5draco11CornerTable15ConfidentVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  107|  1.20G|  inline VertexIndex ConfidentVertex(CornerIndex corner) const {
  108|  1.20G|    DRACO_DCHECK_GE(corner.value(), 0);
  109|  1.20G|    DRACO_DCHECK_LT(corner.value(), num_corners());
  110|  1.20G|    return corner_to_vertex_map_[corner];
  111|  1.20G|  }
_ZNK5draco11CornerTable4FaceENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  112|  42.2M|  inline FaceIndex Face(CornerIndex corner) const {
  113|  42.2M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (113:9): [True: 0, False: 42.2M]
  ------------------
  114|      0|      return kInvalidFaceIndex;
  115|      0|    }
  116|  42.2M|    return FaceIndex(corner.value() / 3);
  117|  42.2M|  }
_ZNK5draco11CornerTable10LocalIndexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  128|  1.34G|  inline int LocalIndex(CornerIndex corner) const { return corner.value() % 3; }
_ZNK5draco11CornerTable14LeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  150|  85.2M|  inline CornerIndex LeftMostCorner(VertexIndex v) const {
  151|  85.2M|    return vertex_corners_[v];
  152|  85.2M|  }
_ZNK5draco11CornerTable12IsOnBoundaryENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  185|   830k|  inline bool IsOnBoundary(VertexIndex vert) const {
  186|   830k|    const CornerIndex corner = LeftMostCorner(vert);
  187|   830k|    if (SwingLeft(corner) == kInvalidCornerIndex) {
  ------------------
  |  Branch (187:9): [True: 20.8k, False: 809k]
  ------------------
  188|  20.8k|      return true;
  189|  20.8k|    }
  190|   809k|    return false;
  191|   830k|  }
_ZNK5draco11CornerTable10SwingRightENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  200|  86.7M|  inline CornerIndex SwingRight(CornerIndex corner) const {
  201|  86.7M|    return Previous(Opposite(Previous(corner)));
  202|  86.7M|  }
_ZNK5draco11CornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  205|  18.1M|  inline CornerIndex SwingLeft(CornerIndex corner) const {
  206|  18.1M|    return Next(Opposite(Next(corner)));
  207|  18.1M|  }
_ZNK5draco11CornerTable13GetLeftCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  217|  4.09M|  inline CornerIndex GetLeftCorner(CornerIndex corner_id) const {
  218|  4.09M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (218:9): [True: 0, False: 4.09M]
  ------------------
  219|      0|      return kInvalidCornerIndex;
  220|      0|    }
  221|  4.09M|    return Opposite(Previous(corner_id));
  222|  4.09M|  }
_ZNK5draco11CornerTable14GetRightCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  223|  4.90M|  inline CornerIndex GetRightCorner(CornerIndex corner_id) const {
  224|  4.90M|    if (corner_id == kInvalidCornerIndex) {
  ------------------
  |  Branch (224:9): [True: 0, False: 4.90M]
  ------------------
  225|      0|      return kInvalidCornerIndex;
  226|      0|    }
  227|  4.90M|    return Opposite(Next(corner_id));
  228|  4.90M|  }
_ZN5draco11CornerTable17SetOppositeCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEES3_:
  248|   511M|                                CornerIndex opp_corner_id) {
  249|   511M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  250|   511M|    opposite_corners_[corner_id] = opp_corner_id;
  251|   511M|  }
_ZN5draco11CornerTable17MapCornerToVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEENS1_IjNS_21VertexIndex_tag_type_EEE:
  265|   610M|  inline void MapCornerToVertex(CornerIndex corner_id, VertexIndex vert_id) {
  266|   610M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  267|   610M|    corner_to_vertex_map_[corner_id] = vert_id;
  268|   610M|  }
_ZN5draco11CornerTable12AddNewVertexEv:
  270|   159M|  VertexIndex AddNewVertex() {
  271|   159M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  272|       |    // Add a new invalid vertex.
  273|   159M|    vertex_corners_.push_back(kInvalidCornerIndex);
  274|   159M|    return VertexIndex(static_cast<uint32_t>(vertex_corners_.size() - 1));
  275|   159M|  }
_ZN5draco11CornerTable17SetLeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEENS1_IjNS_21CornerIndex_tag_type_EEE:
  292|   346M|  void SetLeftMostCorner(VertexIndex vert, CornerIndex corner) {
  293|   346M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  294|   346M|    if (vert != kInvalidVertexIndex) {
  ------------------
  |  Branch (294:9): [True: 346M, False: 0]
  ------------------
  295|   346M|      vertex_corners_[vert] = corner;
  296|   346M|    }
  297|   346M|  }
_ZN5draco11CornerTable18MakeVertexIsolatedENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  328|  4.30M|  void MakeVertexIsolated(VertexIndex vert) {
  329|  4.30M|    DRACO_DCHECK(GetValenceCache().IsCacheEmpty());
  330|  4.30M|    vertex_corners_[vert] = kInvalidCornerIndex;
  331|  4.30M|  }

_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  228|  13.6k|      : corner_table_(table),
  229|  13.6k|        start_corner_(table->LeftMostCorner(vert_id)),
  230|  13.6k|        corner_(start_corner_),
  231|  13.6k|        left_traversal_(true) {}
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE3EndEv:
  244|  5.35M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEppEv:
  267|  95.9k|  VertexCornersIterator &operator++() {
  268|  95.9k|    Next();
  269|  95.9k|    return *this;
  270|  95.9k|  }
_ZN5draco21VertexCornersIteratorINS_11CornerTableEE4NextEv:
  247|  4.58M|  void Next() {
  248|  4.58M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 4.50M, False: 78.8k]
  ------------------
  249|  4.50M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  4.50M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 25.1k, False: 4.48M]
  ------------------
  251|       |        // Open boundary reached.
  252|  25.1k|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  25.1k|        left_traversal_ = false;
  254|  4.48M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 746k, False: 3.73M]
  ------------------
  255|       |        // End reached.
  256|   746k|        corner_ = kInvalidCornerIndex;
  257|   746k|      }
  258|  4.50M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  78.8k|      corner_ = corner_table_->SwingRight(corner_);
  262|  78.8k|    }
  263|  4.58M|  }
_ZNK5draco21VertexCornersIteratorINS_11CornerTableEE6CornerEv:
  241|  8.28M|  CornerIndex Corner() const { return corner_; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE3EndEv:
  244|  4.96M|  bool End() const { return corner_ == kInvalidCornerIndex; }
_ZNK5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE6CornerEv:
  241|  4.79M|  CornerIndex Corner() const { return corner_; }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEE4NextEv:
  247|  2.84M|  void Next() {
  248|  2.84M|    if (left_traversal_) {
  ------------------
  |  Branch (248:9): [True: 2.81M, False: 27.7k]
  ------------------
  249|  2.81M|      corner_ = corner_table_->SwingLeft(corner_);
  250|  2.81M|      if (corner_ == kInvalidCornerIndex) {
  ------------------
  |  Branch (250:11): [True: 1.97M, False: 840k]
  ------------------
  251|       |        // Open boundary reached.
  252|  1.97M|        corner_ = corner_table_->SwingRight(start_corner_);
  253|  1.97M|        left_traversal_ = false;
  254|  1.97M|      } else if (corner_ == start_corner_) {
  ------------------
  |  Branch (254:18): [True: 137k, False: 703k]
  ------------------
  255|       |        // End reached.
  256|   137k|        corner_ = kInvalidCornerIndex;
  257|   137k|      }
  258|  2.81M|    } else {
  259|       |      // Go to the right until we reach a boundary there (no explicit check
  260|       |      // is needed in this case).
  261|  27.7k|      corner_ = corner_table_->SwingRight(corner_);
  262|  27.7k|    }
  263|  2.84M|  }
_ZN5draco21VertexCornersIteratorINS_24MeshAttributeCornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|  2.11M|      : corner_table_(table),
  236|  2.11M|        start_corner_(corner_id),
  237|  2.11M|        corner_(start_corner_),
  238|  2.11M|        left_traversal_(true) {}
_ZN5draco21VertexCornersIteratorINS_11CornerTableEEC2EPKS1_NS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
  235|   757k|      : corner_table_(table),
  236|   757k|        start_corner_(corner_id),
  237|   757k|        corner_(start_corner_),
  238|   757k|        left_traversal_(true) {}

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

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

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

_ZNK5draco24MeshAttributeCornerTable26IsCornerOppositeToSeamEdgeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   45|  68.5M|  inline bool IsCornerOppositeToSeamEdge(CornerIndex corner) const {
   46|  68.5M|    return is_edge_on_seam_[corner.value()];
   47|  68.5M|  }
_ZNK5draco24MeshAttributeCornerTable8OppositeENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   49|  32.7M|  inline CornerIndex Opposite(CornerIndex corner) const {
   50|  32.7M|    if (corner == kInvalidCornerIndex || IsCornerOppositeToSeamEdge(corner)) {
  ------------------
  |  Branch (50:9): [True: 0, False: 32.7M]
  |  Branch (50:42): [True: 25.9M, False: 6.80M]
  ------------------
   51|  25.9M|      return kInvalidCornerIndex;
   52|  25.9M|    }
   53|  6.80M|    return corner_table_->Opposite(corner);
   54|  32.7M|  }
_ZNK5draco24MeshAttributeCornerTable4NextENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   56|  45.0M|  inline CornerIndex Next(CornerIndex corner) const {
   57|  45.0M|    return corner_table_->Next(corner);
   58|  45.0M|  }
_ZNK5draco24MeshAttributeCornerTable8PreviousENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   60|  25.6M|  inline CornerIndex Previous(CornerIndex corner) const {
   61|  25.6M|    return corner_table_->Previous(corner);
   62|  25.6M|  }
_ZNK5draco24MeshAttributeCornerTable14IsCornerOnSeamENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   65|  5.45M|  inline bool IsCornerOnSeam(CornerIndex corner) const {
   66|  5.45M|    return is_vertex_on_seam_[corner_table_->Vertex(corner).value()];
   67|  5.45M|  }
_ZNK5draco24MeshAttributeCornerTable13GetLeftCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   71|  3.88M|  inline CornerIndex GetLeftCorner(CornerIndex corner) const {
   72|  3.88M|    return Opposite(Previous(corner));
   73|  3.88M|  }
_ZNK5draco24MeshAttributeCornerTable14GetRightCornerENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   74|  4.61M|  inline CornerIndex GetRightCorner(CornerIndex corner) const {
   75|  4.61M|    return Opposite(Next(corner));
   76|  4.61M|  }
_ZNK5draco24MeshAttributeCornerTable10SwingRightENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   79|  5.12M|  inline CornerIndex SwingRight(CornerIndex corner) const {
   80|  5.12M|    return Previous(Opposite(Previous(corner)));
   81|  5.12M|  }
_ZNK5draco24MeshAttributeCornerTable9SwingLeftENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   84|  14.4M|  inline CornerIndex SwingLeft(CornerIndex corner) const {
   85|  14.4M|    return Next(Opposite(Next(corner)));
   86|  14.4M|  }
_ZNK5draco24MeshAttributeCornerTable12num_verticesEv:
   88|  13.0k|  int num_vertices() const {
   89|  13.0k|    return static_cast<int>(vertex_to_attribute_entry_id_map_.size());
   90|  13.0k|  }
_ZNK5draco24MeshAttributeCornerTable9num_facesEv:
   91|  4.63k|  int num_faces() const { return static_cast<int>(corner_table_->num_faces()); }
_ZNK5draco24MeshAttributeCornerTable11num_cornersEv:
   92|  1.79k|  int num_corners() const { return corner_table_->num_corners(); }
_ZNK5draco24MeshAttributeCornerTable6VertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   94|   115M|  VertexIndex Vertex(CornerIndex corner) const {
   95|   115M|    DRACO_DCHECK_LT(corner.value(), corner_to_vertex_map_.size());
   96|   115M|    return ConfidentVertex(corner);
   97|   115M|  }
_ZNK5draco24MeshAttributeCornerTable15ConfidentVertexENS_9IndexTypeIjNS_21CornerIndex_tag_type_EEE:
   98|   115M|  VertexIndex ConfidentVertex(CornerIndex corner) const {
   99|   115M|    return corner_to_vertex_map_[corner.value()];
  100|   115M|  }
_ZNK5draco24MeshAttributeCornerTable14LeftMostCornerENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  106|  3.84M|  inline CornerIndex LeftMostCorner(VertexIndex v) const {
  107|  3.84M|    return vertex_to_left_most_corner_map_[v.value()];
  108|  3.84M|  }
_ZNK5draco24MeshAttributeCornerTable12IsOnBoundaryENS_9IndexTypeIjNS_21VertexIndex_tag_type_EEE:
  122|  3.84M|  inline bool IsOnBoundary(VertexIndex vert) const {
  123|  3.84M|    const CornerIndex corner = LeftMostCorner(vert);
  124|  3.84M|    if (corner == kInvalidCornerIndex) {
  ------------------
  |  Branch (124:9): [True: 0, False: 3.84M]
  ------------------
  125|      0|      return true;
  126|      0|    }
  127|  3.84M|    if (SwingLeft(corner) == kInvalidCornerIndex) {
  ------------------
  |  Branch (127:9): [True: 3.11M, False: 724k]
  ------------------
  128|  3.11M|      return true;
  129|  3.11M|    }
  130|   724k|    return false;
  131|  3.84M|  }

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

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

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

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

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

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

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

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

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

